python, triplet loss, batch triplet loss, kaggle, image classifier, svm
Here, I have some experiments in order to make more accurate classifier. Triplet Loss, Batch Triplet, SVM are used for experiments. softmax features + SVM was the best in my result as a record of 91% top1 accuracy.
Kaggle’s State Farm Distracted Driver Detection Dataset is used for evaluating the performance of Image Classification, you should modify sampledata.py
to fit your dataset.
Rebuild your caffe directory:
cd $CAFFEROOT$
cp Makefile.configexample Makefile.config
Remember to uncomment the line to makesure your python layers could be found:
WITH_PYTHON_LAYER := 1
Then build caffe and pycaffe:
make all -j8 & make pycaffe
Modify sampledata.py
, config.py
and train.py
to fit your dataset and working environment.
Pre-train your model with softmax loss.
Finetune triplet model based on your pre-trained model.
Learn to adjust parameters.
softmax
triplet loss
batch triplet loss
softmax+svm
This project is based on hizhangp’s job