nicetoolbox.detectors.method_detectors.eth_xgaze.eth_xgaze_detector.EthXgaze

class nicetoolbox.detectors.method_detectors.eth_xgaze.eth_xgaze_detector.EthXgaze(io: SequenceIO, data: SequenceData, sequence_context: SequenceRuntimeConfig, algorithm_instance: str)[source]

Bases: BaseMethod

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 base method detector with references.

Methods

compute_output_folders

Compute extra output folders for all components.

compute_result_folders

Compute result folders for all components.

compute_viz_folders

Compute visualization folders for all components.

post_inference

Post-processing after inference.

run

Execute method detector: run subprocess inference + post_inference.

visualization

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

Attributes

algorithm_type

components

inference_package_name

predictions_mapping

Access predictions mapping from runtime config.

runtime

os_type

conda_path

venv

env_name

script_path

visualize

requires_out_folder

out_folders

result_folders

viz_folders

config_paths

data

io

sequence_context

detector_config

algorithm_instance

inference_config

compute_output_folders(requires_out_folder: bool) Dict[str, str]

Compute extra output folders for all components.

compute_result_folders() Dict[str, str]

Compute result folders for all components.

compute_viz_folders(visualize: bool) Dict[str, str]

Compute visualization folders for all 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.

property predictions_mapping

Access predictions mapping from runtime config.

run() None

Execute method detector: run subprocess inference + post_inference.

Returns None - visualization uses external data.

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.