How pjlab-adg/detzero works
Main Components
• Detection Module – This core component contains the “detzero_det” submodule. It handles all aspects of 3D object detection. Its inner structure includes:
• Dataset management (with subdirectories like “datasets”, “augmentor”, “processor”, and specific dataset handling for Waymo).
• Model definitions (e.g., centerpoint, PDV head, backbone modules, etc.).
• Utility functions and loss functions specific to 3D detection.
• Tool scripts and configuration files (located in the “tools” directory under detection).
• Tracking Module – Found under the “tracking” folder, this module is responsible for tracking objects over time. It involves:
• Dataset preparation and processing specific to tracking.
• Tracker models (including Kalman filters, data association modules, etc.).
• Dedicated tracking scripts and configurations.
• Refining Module – Located in the “refining” directory, this module refines the detection results via geometry and confidence models. It likewise contains:
• Dataset classes for various refinement aspects (confidence, geometry, position).
• Model definitions for different refinement strategies.
• Tools and configuration files for training and evaluation.
• Evaluator – The “evaluator” directory contains the offline evaluation tools, including scripts for both detection and tracking metrics.
• Daemon – The “daemon” folder has supplementary tools (e.g., combining outputs, generating ground truth, visualizers) that prepare object data for refinement or additional post-processing.
• Shared Utilities – The “utils” directory gathers common libraries and functions (e.g., operations for non-maximum suppression, point cloud processing, visualization) that are used across all modules.
Relationships and Interactions
• Data Flow:
• Input Data from sensors/datasets is stored in the “data” folder and is processed by the detection and tracking modules.
• The detection module pre-processes the raw point cloud data (using its “datasets/processor” and “augmentor”) and forwards detection results to both the tracking and refining modules.
• The tracking module uses these detections to establish temporal object associations, relying on modules like Kalman filtering and data association.
• The refining module further processes outputs from detection (and possibly tracking) to enhance spatial accuracy, using its own dataset processors and transformer-based modules.
• Evaluation: Offline evaluation tools in the “evaluator” folder analyze the performance of detection and tracking models, referencing log files and metrics documentation in “docs”.
Architectural Patterns and Design Principles
• Modular Architecture: Each primary function—detection, tracking, and refining—is isolated in its dedicated module to promote maintainability and scalability.
• Data Processing Pipelines: The separation between data augmentation, voxel/point processing, and model inference highlights a pipeline-based approach.
• Config-driven Execution: The presence of extensive configuration directories (e.g., YAML files under “tools/cfgs” across modules) indicates an emphasis on flexibility and ease of experimentation.
• Utility Abstraction: A shared “utils” directory provides commonly used operations (including optimized ops written in C++/CUDA), enabling efficient reuse across modules.