KaiQiao1992 / fine-tuning

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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


Languages

Language:Python 100.0%