TL;DR
This paper introduces Dynamic-DINO, a novel approach to real-time open-vocabulary object detection by adapting the Mixture of Experts (MoE) architecture. By dynamically activating only relevant "expert" sub-networks within a larger model, Dynamic-DINO achieves state-of-the-art performance with significantly less training data and comparable inference speeds to existing methods.
What Problem Does This Paper Address?
Open-vocabulary object detection (OVD) aims to detect objects of any category, not just those seen during training. While this is powerful, achieving this in real-time has been a challenge. Existing real-time OVD models often use fixed, dense architectures, which can be computationally expensive and struggle with the vast diversity of patterns in open-world scenarios. The paper explores how the Mixture of Experts (MoE) paradigm, successful in large language models, can be adapted for compact, real-time OVD models that leverage large vision-language datasets but require smaller model footprints. The core challenge is to scale model capacity for better performance without sacrificing inference speed, especially when training data is limited.
Methods
Dynamic-DINO extends the Grounding DINO 1.5 Edge model by incorporating a Mixture of Experts (MoE) approach. The key innovation is "MoE-Tuning," which transforms the standard Feed-Forward Network (FFN) in each transformer layer into multiple specialized "expert" networks.
- Granularity Decomposition: Instead of randomly initializing new experts, Dynamic-DINO decomposes the parameters of the pre-trained FFNs from the base model. This ensures that the combined output of the experts mimics the original FFN's output, allowing for incremental fine-tuning.
- Dynamic Inference: During inference, a router network selects a subset of these experts based on the input token. This "subnet search" activates only the most relevant experts, forming a compact network for efficient computation while maintaining high capacity.
- Expert Initialization: A crucial aspect is the initialization strategy for both the experts and the router. This is designed to ensure that the MoE model starts fine-tuning by closely resembling the pre-trained base model, preventing abrupt performance drops.
- MoE-Tuning Strategy: The training process involves fine-tuning specific components like the detection head and cross-attention modules, while freezing others. A load balancing loss is also introduced to ensure all experts are utilized effectively.
Datasets
- Training Data: Objects365 (V1), GoldG, and V3Det datasets were used for pre-training. The authors note that these are open-source datasets, totaling approximately 1.56 million images.
- Evaluation Benchmarks: The model was evaluated on standard benchmarks for zero-shot performance: COCO, LVIS (minival and val), and ODinW.
Key Insights and Ideas
- Deeper Layers Develop Stable Expert Collaboration: The paper observes that in the deeper layers of the network, experts tend to form stable collaborations, specializing in specific patterns. This suggests a hierarchical specialization within the MoE architecture.
- Finer Expert Granularity Expands Search Space: By decomposing FFNs into more, smaller experts, the model gains a larger "search space" for processing diverse input patterns, leading to improved learning with limited data.
- MoE-Tuning Enables Incremental Improvement: The proposed initialization and fine-tuning strategy allows for gradual performance gains, avoiding the instability often associated with training large MoE models from scratch.
- Specialized Expert Combinations for Patterns: Visualizations show that specific combinations of experts are dedicated to processing similar types of image patches or tokens (e.g., refrigerators vs. clothing), highlighting the effectiveness of fine-grained specialization.
Key Results
- State-of-the-Art Performance: Dynamic-DINO outperforms the reproduced Grounding DINO 1.5 Edge (trained on a much larger private dataset) on zero-shot benchmarks like COCO and LVIS, using only 1.56M open-source training images.
- Comparable Inference Speed: Despite the MoE architecture, the dynamic inference strategy ensures that the number of activated parameters during inference is constrained, leading to comparable inference speeds to the dense base model. For example, at 800x1333 resolution, Dynamic-DINO achieves 15.1 FPS compared to 18.1 FPS for Grounding DINO 1.5 Edge (TensorRT FP32).
- Alleviates Long-Tail Problem: The model shows significant improvements in detecting rare classes, indicating that MoE-Tuning effectively addresses the long-tail issue in object detection.
- Training Efficiency: MoE-Tuning achieves a notable speedup (1.87x) compared to the original pre-training scheme.
Limitations and Future Work
- Computational Constraints: The authors acknowledge that due to limited computational resources (8 NVIDIA 3090 GPUs), they could not train on scaled-up models like Grounding DINO 1.5 Pro or explore the full potential with even larger datasets.
- Inference Optimization: While dynamic inference is efficient, the current implementation involves sequential processing of tokens through experts, which slightly reduces efficiency. Future work aims to optimize this for parallel acceleration.
- Excessive Subdivision: The ablation study shows that while increasing expert granularity is beneficial, excessive subdivision can lead to overfitting, especially with limited training data. This suggests a trade-off that needs careful tuning.
Summary updated