4.1. Transfer learning in image classification

Transfer learning is an important part of machine learning, which is widely used in various fields such as text and images. Here we mainly introduce transfer learning in the field of image classification, which is often called domain transfer, such as migration of the ImageNet classification model to the specified image classification task, such as flower classification.

4.1.2. Large-scale image classification

In practical applications, due to the lack of training data, the classification model trained on the ImageNet1k data set is often used as the pretrained model for other image classification tasks. In order to further help solve practical problems, based on ResNet50_vd, Baidu open sourced a self-developed large-scale classification pretrained model, in which the training data contains 100,000 categories and 43 million pictures.

We conducted transfer learning experiments on 6 self-collected datasets,

using a set of fixed parameters and a grid search method, in which the number of training rounds was set to 20epochs, the ResNet50_vd model was selected, and the ImageNet pre-training accuracy was 79.12%. The comparison results of the experimental data set parameters and model accuracy are as follows:

Fixed scheme:

lr=0.001,l2 decay=1e-4,label smoothing=False,mixup=False
Dataset Statstics Pretrained moel on ImageNet
Top-1(fixed)/Top-1(search)
Pretrained moel on large-scale dataset
Top-1(fixed)/Top-1(search)
Flowers class:102
train:5789
valid:2396
0.7779/0.9883 0.9892/0.9954
Hand-painted stick figures Class:18
train:1007
valid:432
0.8795/0.9196 0.9107/0.9219
Leaves class:6
train:5256
valid:2278
0.8212/0.8482 0.8385/0.8659
Container vehicle Class:115
train:4879
valid:2094
0.6230/0.9556 0.9524/0.9702
Chair class:5
train:169
valid:78
0.8557/0.9688 0.9077/0.9792
Geology class:4
train:671
valid:296
0.5719/0.8094 0.6781/0.8219
  • The above experiments verified that for fixed parameters, compared with the pretrained model on ImageNet, using the large-scale classification model as a pretrained model can help us improve the model performance on a new dataset in most cases. Parameter search can be further helpful to the model performance.

4.1.3. Reference

[1] Kornblith, Simon, Jonathon Shlens, and Quoc V. Le. “Do better imagenet models transfer better?.” Proceedings of the IEEE conference on computer vision and pattern recognition. 2019.

[2] Kolesnikov, Alexander, et al. “Large Scale Learning of General Visual Representations for Transfer.” arXiv preprint arXiv:1912.11370 (2019).