Home

Awesome

Semi-Supervised and Semi-Weakly Supervised ImageNet Models

This project includes the semi-supervised and semi-weakly supervised ImageNet models introduced in "Billion-scale Semi-Supervised Learning for Image Classification" https://arxiv.org/abs/1905.00546.

"Semi-supervised" (SSL) ImageNet models are pre-trained on a subset of unlabeled YFCC100M public image dataset and fine-tuned with the ImageNet1K training dataset, as described by the semi-supervised training framework in the paper mentioned above. In this case, the high capacity teacher model was trained only with labeled examples.

"Semi-weakly" supervised (SWSL) ImageNet models are pre-trained on 940 million public images with 1.5K hashtags matching with 1000 ImageNet1K synsets, followed by fine-tuning on ImageNet1K dataset. In this case, the associated hashtags are only used for building a better teacher model. During training the student model, those hashtags are ingored and the student model is pretrained with a subset of 64M images selected by the teacher model from the same 940 million public image dataset.

We are providing the following semi-supervised and semi-weakly supervised ImageNet models. The teacher models used for training these models have the ResNet-101-32x48 model architecture.

Semi-weakly supervised ResNet and ResNext models provided in the table below significantly improve the top-1 accuracy on the ImageNet validation set compared to training from scratch or other training mechanisms introduced in the literature as of September 2019. For example, We achieve state-of-the-art accuracy of 81.2% on ImageNet for the widely used/adopted ResNet-50 model architecture.

ArchitectureSupervision#ParametersFLOPSTop-1 Acc.Top-5 Acc.
ResNet-18semi-supervised14M2B72.891.5
ResNet-50semi-supervised25M4B79.394.9
ResNeXt-50 32x4dsemi-supervised25M4B80.395.4
ResNeXt-101 32x4dsemi-supervised42M8B81.095.7
ResNeXt-101 32x8dsemi-supervised88M16B81.796.1
ResNeXt-101 32x16dsemi-supervised193M36B81.996.2
ResNet-18semi-weakly supervised14M2B73.491.9
ResNet-50semi-weakly supervised25M4B81.296.0
ResNeXt-50 32x4dsemi-weakly supervised25M4B82.296.3
ResNeXt-101 32x4dsemi-weakly supervised42M8B83.496.8
ResNeXt-101 32x8dsemi-weakly supervised88M16B84.397.2
ResNeXt-101 32x16dsemi-weakly supervised193M36B84.897.4

Loading models with torch.hub

The models are available with torch.hub. As an example, to load the semi-weakly trained ResNet-50 model, simply run:

model = torch.hub.load('facebookresearch/semi-supervised-ImageNet1K-models', 'resnet50_swsl')

Please refer to torch.hub to see a full example of using the model to classify an image.

Citation

If you use the models released in this repository, please cite the following publication.

@misc{yalniz2019billionscale,
    title={Billion-scale semi-supervised learning for image classification},
    author={I. Zeki Yalniz and Hervé Jégou and Kan Chen and Manohar Paluri and Dhruv Mahajan},
    year={2019},
    eprint={1905.00546},
    archivePrefix={arXiv},
    primaryClass={cs.CV}
}

License

The models in this repository are released under the CC-BY-NC 4.0 license. See LICENSE for additional details.