TL;DR
This paper introduces "contextual object detection," a new task that aims to understand objects within human-AI interactions, going beyond standard object detection by leveraging Multimodal Large Language Models (MLLMs). They propose ContextDET, a novel framework that uses MLLMs to generate contextual object words and then detect their corresponding bounding boxes, enabling detection of objects from a human vocabulary.
What Problem Does This Paper Address?
Current Multimodal Large Language Models (MLLMs) excel at tasks like image captioning and question answering but struggle with precise object localization (object detection). Existing object detection models are typically trained on a fixed, predefined set of object classes and cannot generalize to the vast and dynamic vocabulary humans use. This limitation hinders seamless human-AI interaction, where understanding specific objects within a given context is crucial. For example, a "person" can be a "hockey goalie," "groom," or "cowboy" depending on the scene. This paper addresses this gap by proposing a new task and a model that can detect objects based on contextual understanding and a human-like vocabulary.
Methods
The core of the proposed solution is ContextDET, a unified, end-to-end framework that employs a "generate-then-detect" approach. It consists of three main components:
- Visual Encoder: This module extracts visual features from input images. It produces both "local visual tokens" (aggregated features from image patches) and "full visual tokens" (flattened image features).
- Multimodal Context Modeling with LLM: A pre-trained MLLM is used to model the multimodal context. It takes the local visual tokens and task-specific language inputs (e.g., masked sentences for cloze tests, prompts for captioning, or questions for QA) as a prefix. The LLM then generates contextual text, which implicitly contains information about objects.
- Visual Decoder: This module takes the LLM's generated contextual tokens and the full visual tokens. It uses cross-attention to focus on relevant image regions and predicts bounding boxes for objects corresponding to the contextual object words identified from the LLM's output. This allows for the detection of objects using a human vocabulary, not limited by predefined classes.
Datasets
The authors introduce a new benchmark called CODE (Contextual Object DEtection). This dataset is built upon Flickr30k and Flickr30k Entities, with added annotations for language captions and the precise location (start and end indices) of object names within these captions. These object names are then masked to create the "cloze test" task. The CODE dataset contains 10,346 unique object names, significantly more than existing datasets like COCO.
Key Insights and Ideas
- MLLMs are key to contextual understanding: The paper highlights that MLLMs, with their ability to process and generate language in context, are crucial for bridging the gap between visual perception and human language.
- "Generate-then-detect" is more flexible: Moving away from the traditional "detect-then-classify" paradigm allows for a more dynamic and vocabulary-agnostic approach to object detection.
- Human vocabulary is the target: The ultimate goal is to enable AI to detect objects using the same rich and varied vocabulary that humans use, rather than being constrained by predefined categories.
- Local visual tokens are important: Ablation studies show that incorporating local visual tokens as input to the LLM significantly improves performance, emphasizing the need for fine-grained visual information in contextual understanding.
Key Results
- CODE Benchmark Performance: ContextDET achieves competitive results on its proposed CODE benchmark, outperforming cascade solutions (e.g., BLIP-2 + GLIP) in cloze test, QA, and captioning tasks. For instance, it achieves an Acc@1 of 48.7% on the cloze test.
- Open-Vocabulary Detection: ContextDET demonstrates strong performance on open-vocabulary object detection, significantly outperforming the BARON baseline by margins of 2.8%, 4.7%, and 4.2% on novel, base, and all classes, respectively.
- Referring Image Segmentation: The model also shows promise in referring image segmentation, achieving mIoU gains of 0.63% and 0.45% over PolyFormer on RefCOCO and RefCOCO+ datasets.
- Standard Object Detection: On the COCO benchmark, ContextDET shows competitive performance, particularly in detecting small objects, attributed to its contextual understanding.
Limitations and Future Work
- Annotation Cost: The authors acknowledge that creating datasets for contextual object detection requires significant annotation effort, which can limit the amount of training data available compared to other MLLM research.
- Failure Cases: The model can still make mistakes, especially with occluded objects or less common terms.
- Future Directions:
- Semi-supervised/Weakly-supervised learning: To address the annotation cost, future work could explore methods that require less labeled data.
- Interactive Instruction Tuning: The authors propose exploring how MLLMs can be used to post-process detection outputs based on human language instructions (e.g., "shift the box," "correct the class"). This could lead to more adaptable and user-friendly AI systems.
Summary updated