nicetoolbox.detectors.method_detectors.gaze_individual.Multiview_Eth_XGaze.MultiviewEthXgaze

class nicetoolbox.detectors.method_detectors.gaze_individual.Multiview_Eth_XGaze.MultiviewEthXgaze(config, io, data)[source]

Bases: BaseDetector

The XGaze3cams class is a method detector that computes the gaze_individual component.

The method detector computes the gaze of individuals in the scene using multiple cameras.It provides the necessary preparations and post-inference visualizations to integrate the XGaze3cams algorithm into our pipeline.

Component: gaze_individual

components

A list containing the name of the component: gaze_individual.

Type:

list

algorithm

The name of the algorithm used to compute the gaze_individual component.

Type:

str

camera_names

A list of camera names used to capture the original input data.

Type:

list

Initialize the XGaze3cams method detector with all inference preparations completed.

Parameters:
  • config (dict) – A dictionary containing the configuration settings for the method detector.

  • io (class) – An instance of the IO class for input-output operations.

  • data (class) – An instance of the Data class for accessing data.

Methods

post_inference

Post-processing after inference.

run_inference

Runs the inference of the method detector in a separate terminal/cmd window using the specified virtual environment or conda environment.

visualization

Visualizes the processed frames of the xgaze3cams algorithm as a video for all cameras.

Attributes

algorithm

components

post_inference()[source]

Post-processing after inference.

This method is called after the inference step and is used for any post-processing tasks that need to be performed.

run_inference() None

Runs the inference of the method detector in a separate terminal/cmd window using the specified virtual environment or conda environment. Captures the output and logs the success or failure of the inference.

visualization(data)[source]

Visualizes the processed frames of the xgaze3cams algorithm as a video for all cameras.

This function reads the processed frames from each camera, checks if all frames are present, and verifies that the number of frames per camera is consistent. It then creates a video for each camera using the processed frames.

Returns:

None

Raises:
  • AssertionError – If no frames are found for at least one camera or if the

  • number of frames per camera is not consistent.