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:
BaseMethodThe 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 extra output folders for all components.
Compute result folders for all components.
Compute visualization folders for all components.
Post-processing after inference.
Execute method detector: run subprocess inference + post_inference.
Visualizes the processed frames of the xgaze3cams algorithm as a video for all cameras.
Attributes
algorithm_typeinference_package_nameAccess predictions mapping from runtime config.
runtimeos_typeconda_pathvenvenv_namescript_pathvisualizerequires_out_folderout_foldersresult_foldersviz_foldersconfig_pathsdataiosequence_contextdetector_configalgorithm_instanceinference_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. –