Model Zoo Overview

If you want to get your hands on pre-trained models, you are in the right place! One of the greatest things about Caffe was the vibrant community of developers and researchers that shared their work in the original Caffe model zoo. Below you will not only find a selection of original Caffe models, but we also provide a set of models here that are ready for use with Caffe2.

You can use these models to quickly build demo applications and explore deep learning capabilities without doing any time-consuming and resource-intensive training. You can recreate and evaluate the results from other’s projects, hack together new uses, or improve upon the previously posted models. This is the place for sharing too. If you’ve created something interesting, please create a Github Issue and share your project, so after a community evaluation, we can share it here in the Model Zoo!

Compatibility

Caffe2 utilizes a newer format, usually found in the protobuf .pb file format, so original .caffemodel files will require conversion. Several Caffe models have been ported to Caffe2 for you. A tutorial and sample code is also provided so that you may convert any Caffe model to the new Caffe2 format on your own.

Converting Models from Caffe to Caffe2

If you have existing Caffe models or have been using Caffe and want a quick jumpstart, checkout the Caffe Migration to start.

Submitting Your Model to Caffe2’s Model Zoo

Please file an Issue to have your project and related models added to the zoo, or if you’re already a contributor to the project you can add your entry directly to the wiki page.

Downloading and Importing Caffe2 Models

A great new model downloading and importing feature has been added to Caffe2. It is simple to use, and allows you to setup and run a pre-trained model very quickly. It has an --install or -i argument that will install the model as a python module. If you don’t use the install switch, it simply downloads the model into your current directory.

For example, downloading and installing the squeezenet model:

1
python -m caffe2.python.models.download --install squeezenet

Then you can use python to import the model directly as a module. If you have trouble, try running this with sudo and/or forcing the PYTHONPATH for sudo with sudo PYTHONPATH=/usr/local python -m caffe2.python.models.download --install

1
2
3
4
5
6
7
8
9
from caffe2.python import workspace
from caffe2.python.models import squeezenet as mynet
init_net = mynet.init_net
predict_net = mynet.predict_net
# you must name it something
predict_net.name = "squeezenet_predict"
workspace.RunNetOnce(init_net)
workspace.CreateNet(predict_net)
p = workspace.Predictor(init_net.SerializeToString(), predict_net.SerializeToString())

This yields init_net and predict_net fully parsed protobufs that are ready to be loaded into a net, and within a few lines of Python you’ve instantiated a neural network from a pre-trained model.

Image Classification

Name Type Dataset Caffe Model Caffe2 Model
Squeezenet image classification ImageNet > AlexNet   caffemodel
BVLC AlexNet image classification ImageNet > AlexNet caffemodel caffemodel
BVLC CaffeNet Model image classification ImageNet > AlexNet caffemodel caffemodel
BVLC GoogleNet Model image classification ILSVRC 2014 > GoogleNet/Inception caffemodel caffemodel
VGG Team ILSVRC14 16-layer image classification ILSVRC 2014 > Very Deep CNN caffemodel  
VGG Team ILSVRC14 19-layer image classification ILSVRC 2014 > Very Deep CNN caffemodel  
Network in Network ImageNet Model small image classification dataset and fast ImageNet caffemodel  
Network in Network CIFAR10 Model tiny image classification dataset and fast CIFAR-10 caffemodel  
FCN-32s PASCAL image classification ILSVRC14 VGG-16 caffemodel  
FCN-16s-PASCAL image classification ILSVRC14 VGG-16 caffemodel  
FCN-8s PASCAL image classification ILSVRC14 VGG-16 caffemodel  
FCN-8s PASCAL at-once image classification ILSVRC14 VGG-16 caffemodel  
FCN-AlexNet PASCAL image classification AlexNet caffemodel  
Places-CNN model places Places205-AlexNet tar.gz  
Flower Power flowers Oxford 102 caffemodel  
ImageNet ILSVRC13 RCNN image classification ILSVRC13 caffemodel caffemodel

Image Segmentation

Name Type Dataset Caffe Model Caffe2 Model
FCN-32s NYUDv2 Color image segmentation AlexNet caffemodel  
FCN-32s NYUDv2 HHA image segmentation AlexNet caffemodel  
FCN-32s NYUDv2 Early Color-Depth image segmentation AlexNet n/a  
FCN-32s NYUDv2 Late Color-HHA image segmentation AlexNet caffemodel  
FCN-32s SIFT Flow image segmentation AlexNet caffemodel  
FCN-16s SIFT Flow image segmentation AlexNet caffemodel  
FCN-8s SIFT Flow image segmentation AlexNet caffemodel  
CRF-RNN PASCAL image segmentation, object classification PASCAL caffemodel  

Object and Scene Labeling

Name Type Dataset Caffe Model Caffe2 Model
FCN-32s PASCAL-Context object and scene labeling AlexNet caffemodel  
FCN-16s PASCAL-Context object and scene labeling AlexNet caffemodel  
FCN-8s PASCAL-Context object and scene labeling AlexNet caffemodel  
Salient Object Subitizing object detection various    
GoogLeNet_cars on car model classification cars CompCars caffemodel  

Style

Name Type Dataset Caffe Model Caffe2 Model
Finetuning CaffeNet on Flickr Style image style CaffeNet caffemodel  

Faces

Name Type Dataset Caffe Model Caffe2 Model
Models for Age and Gender Classification faces > age, gender OUI-Adience Face zip  
VGG Face CNN descriptor faces > celebrities VGG-Face tar.gz  
Yearbook Photo faces > yearbook VGG-16 + train_val,solver caffemodel  
Emotion Recognition faces > emotion   zip  
Facial Landmark Detection faces > landmark   caffemodel  
Pose-Aware CNN Models (PAMs) faces > recognition CASIA WebFaces caffemodel  
ResFace-101 faces > recognition 3D Augmented CASIA caffemodel  
ResNet-101 for regressing 3DMMs faces > recognition, 3D shape and texture 3DMMs on CASIA caffemodel  

Video Processing

Name Type Dataset Caffe Model Caffe2 Model
SegNet scene segmentation: cars, buildings, pedestrians, etc      
Translating Videos to Natural Language CNN + RNN, video input, text output   caffemodel  
Sequence to Sequence - Video to Text CNN + RNN, video input, text output S2VT_VGG, S2VT_vocabulary caffemodel  

Edit on GitHub