All Projects → MarkoArsenovic → TrainCaffeCustomDataset

MarkoArsenovic / TrainCaffeCustomDataset

Licence: MIT license
Transfer learning in Caffe: example on how to train CaffeNet on custom dataset

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to TrainCaffeCustomDataset

Teacher Student Training
This repository stores the files used for my summer internship's work on "teacher-student learning", an experimental method for training deep neural networks using a trained teacher model.
Stars: ✭ 34 (+70%)
Mutual labels:  caffe, transfer-learning
deep-learning-platforms
deep-learning platforms,framework,data(深度学习平台、框架、资料)
Stars: ✭ 17 (-15%)
Mutual labels:  caffe
dehaze
[Preprint] "Improved Techniques for Learning to Dehaze and Beyond: A Collective Study"
Stars: ✭ 46 (+130%)
Mutual labels:  caffe
EntityTargetedActiveLearning
No description or website provided.
Stars: ✭ 17 (-15%)
Mutual labels:  transfer-learning
LegoBrickClassification
Repository to identify Lego bricks automatically only using images
Stars: ✭ 57 (+185%)
Mutual labels:  transfer-learning
NaiveNASflux.jl
Your local Flux surgeon
Stars: ✭ 20 (+0%)
Mutual labels:  transfer-learning
aml-keras-image-recognition
A sample Azure Machine Learning project for Transfer Learning-based custom image recognition by utilizing Keras.
Stars: ✭ 14 (-30%)
Mutual labels:  transfer-learning
yolov5 onnx2caffe
yolov5 onnx caffe
Stars: ✭ 73 (+265%)
Mutual labels:  caffe
Deep-Learning-Experiments-implemented-using-Google-Colab
Colab Compatible FastAI notebooks for NLP and Computer Vision Datasets
Stars: ✭ 16 (-20%)
Mutual labels:  transfer-learning
Classification Nets
Implement popular models by different DL framework. Such as tensorflow and caffe
Stars: ✭ 17 (-15%)
Mutual labels:  caffe
caffe-mobilenet v2
caffe based mobilenet v2 deploy
Stars: ✭ 29 (+45%)
Mutual labels:  caffe
task-transferability
Data and code for our paper "Exploring and Predicting Transferability across NLP Tasks", to appear at EMNLP 2020.
Stars: ✭ 35 (+75%)
Mutual labels:  transfer-learning
caffe example
install script and example for clCaffe which will run caffe by OpenCL (this is for https://github.com/01org/caffe/tree/inference-optimize)
Stars: ✭ 12 (-40%)
Mutual labels:  caffe
paper annotations
A place to keep track of all the annotated papers.
Stars: ✭ 96 (+380%)
Mutual labels:  transfer-learning
DAN
Code release of "Learning Transferable Features with Deep Adaptation Networks" (ICML 2015)
Stars: ✭ 149 (+645%)
Mutual labels:  transfer-learning
MoeFlow
Repository for anime characters recognition website, powered by TensorFlow
Stars: ✭ 113 (+465%)
Mutual labels:  transfer-learning
CPCE-3D
Low-dose CT via Transfer Learning from a 2D Trained Network, In IEEE TMI 2018
Stars: ✭ 40 (+100%)
Mutual labels:  transfer-learning
Open set domain adaptation
Tensorflow Implementation of open set domain adaptation by backpropagation
Stars: ✭ 27 (+35%)
Mutual labels:  transfer-learning
AU Recognition
AU_Recognition based on CKPlus/CK database
Stars: ✭ 21 (+5%)
Mutual labels:  transfer-learning
Deeplearning-digital-pathology
Full package for applying deep learning to virtual slides.
Stars: ✭ 59 (+195%)
Mutual labels:  caffe

Train CaffeNet model on custom dataset

How to train CaffeNet on custom dataset

This is short description of training your own custom Net based on your image dataset using pre-trained CaffeNet model.

This repo contains all required Python and shell scripts for pretraining and training stage, not optimized and could be cleaner code.

  1. Collect all your images for test and valuation process and put them in Test and Train folder, each class of images should be placed as subfolder in these two folders. Example, two classes used for your model, cars and bikes : Train/cars, Train/bikes etc.

  2. First, create your own train.txt and val.txt files using train_val.py script. The content of these txt files will be as the example:

.
+-- train.txt
|   +-- Train/bike/bike.jpg 0
|   +-- Train/car/car.jpg 1
+-- test.txt
|   +-- Test/bike/bike.jpg 0
|   +-- Test/car/car.jpg 1

The images are labeled as class numbers. If names of images contain spaces, could be removed using remove_spaces.py.

  1. The second stage is to create leveldb libraries using create_leveldb.sh, just change the required paths inside the script.

  2. After that, compute the mean using make_imagenet_mean.sh, the imagenet_mean.binaryproto file will be created.

  3. Create your proto files, examples are provided, you should have train & val proto files and solver proto file for setting training parameters (momentum, decay, snapshots, no. of iterations etc.). Change the num_output in fully-connected layer for custom number of classes, for example if you are recognizing only bikes and cars num_output = 2.

  4. The next step is to start training the Net, using finetune_imagenet.sh, gpu or cpu, the log of training will be placed in output_finetune.txt.

  5. After the training is done, caffemodel files will be generated, snapshots after every 1000th iteration.

  6. To test the net you can write simpe Python script, bunch of examples are provided, example.

There are few more Python scripts for plotting errors and accuracy out of the log file, for example progres_plot.py to plot accuracy, usage from terminal python progress_plot.py /path/to/output_finetune.txt.

Also, there is example of plotting top-1 & top-5 accuracy using error_plot.py, plots examples in the Plots directory.

Example visualizing filtered images throughout the layers, visualize_layers.py, usage of script provided with example of leaf as an input image. All layers in the Net model could be visualize using visual.py, example in Plots directory.

Further improvements and suggestions are welcome.

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].