All Projects → junyuseu → Fine Tuning

junyuseu / Fine Tuning

Fine-tuning an already learned model, adapts the architecture to other datasets

Programming Languages

python
139335 projects - #7 most used programming language

Notice

Oxford102 is forked from caffe-Oxford102. I modified some code and trained with VGG16 rather than VGG_S.I got better results than the original version.

caffe-oxford102

This bootstraps the training of deep convolutional neural networks with Caffe to classify images in the Oxford 102 category flower dataset. A more detailed explanation can be found here. The prototxt files for fine-tuning AlexNet and VGG_S models are included and use initial weights from training on the ILSVRC 2012 (ImageNet) data.

To download the Oxford 102 dataset, prepare Caffe image files, and download pre-trained model weights for CaffeNet and VGG_16, run

python bootstrap.py

This will give you some pretty flower pictures:

alt tag

The categories are split into training, testing, and validation sets. It seems odd that there are more testing images than training images.

alt tag

CaffeNet

Once you've run the bootstrap.py script, you can begin training from this directory with:

cd CaffeNet
caffe train -solver solver.prototxt -weights pretrained-weights.caffemodel -gpu 0

VGG-16

To train,

cd VGG16
caffe train -solver solver.prototxt -weights pretrained-weights.caffemodel -gpu 0

ResNet-50

If you want to use that: you need running convert_imageset.exe script to get lmdb and downloading the model of resnet-50

Results

Model Valid Acc Test Acc
CaffeNet 83.90% 81.43%
VGG16 89.12% 86.31%
ResNet-50 91.37% 88.08%

Blog address


zhihu

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].