nicetoolbox.detectors.feature_detectors.gaze_multiview.gaze_fusion.GazeFusion¶
- class nicetoolbox.detectors.feature_detectors.gaze_multiview.gaze_fusion.GazeFusion(io, data, sequence_context, algorithm_instance: str)[source]¶
Bases:
BaseFeatureComputes a single 3D gaze vector from multiple camera views and/or multiple algorithms.
Given the fused 3D gaze vectors, the user can optionally select to apply a Savitzky-Golay filter for temporal smoothing. Finally, the fused 3D gaze vectors are projected back to each camera view to obtain 2D gaze points for visualization (If enabled).
- Expected Input:
Method detectors outputting ‘3d’ array.
Shape: (Subjects, Cameras, Frames, 3)
Optional: ‘confidence_scores’ (Subjects, Cameras, Frames) for weighted fusion.
Initialize base detector with references.
Subclasses should call super().__init__() and set inference_config.
Methods
Run the fusion pipeline.
Compute extra output folders for all components.
Compute result folders for all components.
Compute visualization folders for all components.
Get the input file path for a specific upstream detector.
Execute feature detector: compute() + post_compute().
Generates visualization images with fused gaze overlays.
Attributes
algorithm_typecomponentsAccess predictions mapping from runtime config.
requires_out_folderdataiosequence_contextdetector_configalgorithm_instanceinference_configvisualize- compute() Dict[str, Any] | None[source]¶
Run the fusion pipeline.
- Returns:
A list of dictionaries containing fused results.
- 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.
- get_input_file(component: str, algorithm: str) Path¶
Get the input file path for a specific upstream detector.
- Parameters:
component – Component name (e.g., ‘body_joints’)
algorithm – Algorithm name (e.g., ‘hrnetw48’)
- Returns:
Path to the .npz result file
- property predictions_mapping¶
Access predictions mapping from runtime config.
- run() Any¶
Execute feature detector: compute() + post_compute().
Returns computed data for visualization.