Fetch and Forge: Efficient Dataset Condensation for Object Detection

Ding Qi, Jian Li, Jinlong Peng, Bo Zhao, Shuguang Dou, Jialin Li, Jiangning Zhang, Yabiao Wang, Chengjie Wang, Cairong ZhaoNeurIPS 2024

Training state-of-the-art object detection models usually requires massive datasets and weeks of GPU time. But what if you could distill the essence of a 100,000-image dataset into just 1,000 synthetic images without losing significant accuracy? This is the promise of Dataset Condensation (DC), and a new paper finally brings this technique to the complex world of object detection.

TL;DR

The researchers introduce DCOD, the first dataset condensation framework specifically designed for object detection. By using a two-stage "Fetch and Forge" approach, they can condense massive datasets like COCO and Pascal VOC into a tiny fraction of their original size (as low as 1%), while still achieving impressive detection performance.

What Problem Does This Paper Address?

Dataset Condensation has seen great success in image classification, where the goal is simply to map an image to a single label. However, object detection is a much tougher nut to crack for two reasons:

  1. Multitasking Complexity: A detector must simultaneously solve localization (where is it?) and classification (what is it?). Traditional DC methods struggle to balance these two goals.
  2. Scale and Resolution: Detection datasets are typically high-resolution and contain multiple objects per image. Existing DC methods rely on "bi-level optimization"—a computationally expensive process that breaks down when faced with the high-dimensional data required for detection.

As a result, most DC research has been stuck on small-scale classification benchmarks like CIFAR-10. DCOD aims to break this barrier.

Methods: The "Fetch and Forge" Framework

DCOD abandons the traditional, heavy bi-level optimization in favor of a streamlined two-stage process:

  • Stage I: Fetch: Instead of trying to optimize synthetic images and model parameters at the same time, the researchers first train a standard object detector on the full, original dataset. This "fetches" the crucial localization and classification information and stores it within the model's weights.
  • Stage II: Forge: This is where the synthetic data is created. Using a technique called model inversion, they freeze the trained detector's weights and optimize a set of randomly initialized "synthetic" images. The goal is to update these images so that the frozen detector "sees" the objects it was trained to recognize.

To handle the specific challenges of multi-object scenes, they introduced two clever tricks:

  • Foreground-Background Decoupling (FBD): Since the background in detection is often just "noise" or context, DCOD uses a suppression strategy to keep the background stable while focusing the optimization power on the foreground objects.
  • Incremental PatchExpand ($IP_E$): To increase diversity, they divide a single synthetic image into multiple patches, each guided by different target labels. This allows a single image to "forge" a variety of object instances.

Finally, they use Pixel-level and Feature-level Regularization to ensure the generated images look somewhat natural and match the internal statistics (like Batch Normalization layers) of the original model.

Datasets

The authors evaluated DCOD on the two "gold standards" of object detection:

  • Pascal VOC (2007 + 2012): A classic benchmark with 20 object categories.
  • MS COCO: A much larger and more challenging dataset with 80 categories and complex scenes.

They compared their results against "core-set" selection methods like Random sampling, Herding, and K-Center, which simply pick the "best" real images rather than synthesizing new ones.

Key Insights and Ideas

  • Models as Knowledge Containers: The core "aha" moment is treating a trained model as a compressed representation of the dataset. If a model has learned to detect a sheep perfectly, we can "reverse" the model to find out what the "ideal" sheep looks like to that model.
  • Decoupling is Key: In classification, the whole image is the object. In detection, the object is just a small part of the image. By explicitly decoupling the foreground from the background during the synthesis phase, the authors prevent the optimization from getting "distracted" by irrelevant pixels.
  • Efficiency over Complexity: By moving away from bi-level optimization, DCOD becomes practical for high-resolution images (512x512) that would crash traditional DC algorithms.

Key Results

The performance of DCOD at extreme compression levels is remarkable:

  • Pascal VOC: At just 1% compression (condensing ~16,500 images down to 165), DCOD achieved 46.4% $AP_{50}$. For context, training on the entire dataset yields 76.4%.
  • MS COCO: At 1% compression, it reached 24.7% $AP_{50}$.
  • Superiority over Selection: In almost every test case, DCOD significantly outperformed core-set selection methods. For example, at 0.5% compression on VOC, DCOD (14.2% mAP) nearly tripled the performance of Random sampling (4.9% mAP).
  • Training Speedup: By training on only 1% of the data, researchers can iterate on model architectures in a fraction of the time it would take to run a full training cycle.

Limitations and Future Work

While DCOD is a major step forward, the authors note a few areas for improvement:

  • Architecture Gap: The performance drops when you "forge" images using one type of detector (like YOLOv3) but try to train a completely different architecture (like a two-stage Faster R-CNN) on them.
  • Complex Detectors: The current framework hasn't been extended to Transformer-based detectors like DETR, which have very different internal structures compared to convolutional networks.
  • Visual Fidelity: While the synthetic images contain the "features" needed for training, they often look like abstract, hallucinatory textures to the human eye—a common trait of model inversion.

Summary updated

BibTeX
@inproceedings{qi2024fetch,
  author = {Ding Qi and Jian Li and Jinlong Peng and Bo Zhao and Shuguang Dou and Jialin Li and Jiangning Zhang and Yabiao Wang and Chengjie Wang and Cairong Zhao},
  title = {{Fetch and Forge: Efficient Dataset Condensation for Object Detection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=ZMnI4TTyhd},
}
Figure