DeCAF: A Deep Convolutional Activation Feature for Generic Visual Recognition

Jeff Donahue, Yangqing Jia, Oriol Vinyals, Judy Hoffman, Ning Zhang, Eric Tzeng, Trevor Darrell

TL;DR

This seminal paper demonstrates that features extracted from a deep convolutional neural network (CNN) pre-trained on a large dataset (ImageNet) are highly "generic" and can be repurposed for a wide variety of other visual recognition tasks. By introducing DeCAF (Deep Convolutional Activation Features), the authors proved that you don't need millions of images to benefit from deep learning; you can simply "transfer" the knowledge from a pre-trained model to achieve state-of-the-art results on smaller datasets.

What Problem Does This Paper Address?

In 2014, the computer vision community was at a crossroads. Deep learning (specifically AlexNet) had recently shattered records on the massive ImageNet challenge, but many researchers remained skeptical. The prevailing wisdom was that deep networks required astronomical amounts of labeled data and specialized hardware to be useful.

Most "standard" vision tasks (like recognizing specific bird species or adapting to different camera domains) only have a few dozen or hundred examples per category. For these tasks, researchers still relied on hand-engineered features like SIFT, HOG, or GIST. This paper asks a fundamental question: Can a deep model trained on one massive task serve as a "black-box" feature extractor for entirely different tasks?

Methods

The authors utilize a CNN architecture similar to AlexNet, consisting of five convolutional layers followed by three fully connected ($fc$) layers.

The core innovation is the concept of DeCAF:

  1. Pre-training: They train the network on the 1.2 million images of the ILSVRC-2012 (ImageNet) dataset.
  2. Feature Extraction: Instead of using the final output (the 1000-way classification), they "tap into" the activations of the hidden layers—specifically the 6th and 7th layers ($fc_6$ and $fc_7$).
  3. Transfer Learning: These activations are treated as fixed, high-dimensional feature vectors. They then train simple, "shallow" classifiers (like a Linear SVM or Logistic Regression) on top of these features for new, unrelated datasets.

The authors also released an open-source Python framework (the precursor to the famous Caffe library) to allow others to use these pre-trained weights.

Datasets

The model was pre-trained on ILSVRC-2012 (ImageNet). It was then evaluated on several diverse benchmarks to test its "genericity":

  • Caltech-101: Standard object recognition.
  • Office Dataset: A domain adaptation benchmark featuring images of office objects from three sources: Amazon (clean product shots), Webcam (low-res), and DSLR (high-res).
  • Caltech-UCSD Birds (CUB-200-2011): Fine-grained recognition of 200 bird species.
  • SUN-397: Large-scale scene recognition (e.g., "abbey," "diner," "stadium").

Key Insights and Ideas

  • The "Deep" Advantage: Visualizations using t-SNE (a tool to project high-dimensional data into 2D) showed that while early layers see edges and textures, the deeper layers ($fc_6$, $fc_7$) naturally cluster images by semantic category, even for categories the network wasn't explicitly trained to recognize.
t-SNE visualizations comparing LLC, GIST, and DeCAF features
  • Layer Depth Matters: The authors found that $fc_6$ often generalizes better than $fc_7$. While $fc_7$ is closer to the final output, it can become too "specialized" to the original ImageNet labels, whereas $fc_6$ retains a more robust, general representation of the visual world.
  • Overcoming Dataset Bias: One of the most striking findings was in Domain Adaptation. Traditional features (SURF) fail miserably when trying to recognize a "webcam" object using a model trained on "Amazon" images. DeCAF features significantly closed this gap, suggesting that deep features are more invariant to changes in lighting, angle, and resolution.
  • Efficiency: Once the network is trained, extracting DeCAF features is relatively fast (~40 images per second on a CPU at the time), making it a practical alternative to complex hand-engineered pipelines.

Key Results

DeCAF consistently outperformed the state-of-the-art (SOTA) across the board:

  • Object Recognition: On Caltech-101, DeCAF achieved 86.91% accuracy, beating the previous SOTA of 84.3% which used a complex combination of five different hand-engineered features.
Caltech-101 accuracy comparison showing DeCAF outperforming prior methods
  • Scene Recognition: On SUN-397, it reached 40.94%, surpassing the previous best of 38.0%.
  • Domain Adaptation: In the most difficult transfer task (Amazon $\rightarrow$ Webcam), DeCAF improved accuracy from roughly 10% (using SURF) to over 48%.
  • Fine-grained Recognition: On the Birds dataset, combining DeCAF with a part-based model reached 64.96% accuracy, a massive jump over the 50.98% baseline.

Limitations and Future Work

  • Fine-tuning: This paper focused on using the CNN as a fixed feature extractor. The authors noted that "fine-tuning" (updating the weights of the deep network itself for the new task) would likely yield even better results—a prediction that has since become the standard industry practice.
  • Domain Gaps: While DeCAF is better than SIFT/HOG, it still struggles when the target domain is extremely different from ImageNet (e.g., medical imaging or satellite data, though these weren't tested here).
  • Computational Cost: While faster than training from scratch, running a deep network still required more memory and power than the simple gradient-based features of the era.

Summary updated

BibTeX
@inproceedings{donahue2014decaf,
  author = {Jeff Donahue and Yangqing Jia and Oriol Vinyals and Judy Hoffman and Ning Zhang and Eric Tzeng and Trevor Darrell},
  title = {{DeCAF: A Deep Convolutional Activation Feature for Generic Visual Recognition}},
  booktitle = {International Conference on Machine Learning},
  year = {2014},
  url = {https://openreview.net/forum?id=rJ-7InbOZS},
}
Figure