Giter VIP home page Giter VIP logo

caffe-cnn-scripts's Introduction

caffe-cnn-scripts

Scripts for iterative training with multiple models and datasets.

a. for a single iteration

  1. With scripts/generate_lmdb.py generate the "train.txt"/"test.txt", "train_lmdb"/"test_lmdb", "mean_image.binaryproto" files.

  2. Verify models/model-NN/ model_train_val.prototxt model_deploy.prototxt the inputs, parameters of architecture like the size of conv, outputs.

  3. Verify in models/model-NN/model_solver.prototxt the model and iterations.

  4. Train the network, in terminal:

$ cd /home/dennis/Desktop/cnn-caffe-scripts/
$ caffe train --solver /home/dennis/Desktop/cnn-caffe-scripts/models/model-NN/model_solver.prototxt --gpu 0

Note: Fine tunning:

$ caffe train --solver /home/dennis/Desktop/cnn-caffe-scripts/models/model-NN/model_solver.prototxt --weights /home/dennis/Desktop/cnn-caffe-scripts/models/model-NN/bvlc_alexnet.caffemodel --gpu 0

Note: Resume training:

$ caffe train --solver /home/dennis/Desktop/cnn-caffe-scripts/models/model-NN/model_solver.prototxt --snapshot /home/dennis/Desktop/cnn-caffe-scripts/models/model-NN/train_iter_10000.solverstate
  1. Test the network, in terminal:
$ cd /home/dennis/Desktop/cnn-caffe-scripts/
$ python /home/dennis/Desktop/cnn-caffe-scripts/scripts/testing_v2.py --proto /home/dennis/Desktop/cnn-caffe-scripts/models/model-NN/model_deploy.prototxt --model /home/dennis/Desktop/cnn-caffe-scripts/models/model-NN/train_iter_6000.caffemodel --mean /home/dennis/Desktop/cnn-caffe-scripts/input/dataset-MM/mean_image.binaryproto --txt /home/dennis/Desktop/cnn-caffe-scripts/input/dataset-MM/test.txt --cm none
$ python /home/dennis/Desktop/cnn-caffe-scripts/scripts/testing_v1.py --proto /home/dennis/Desktop/cnn-caffe-scripts/models/model-NN/model_deploy.prototxt --model /home/dennis/Desktop/cnn-caffe-scripts/models/model-NN/train_iter_6000.caffemodel --mean /home/dennis/Desktop/cnn-caffe-scripts/input/dataset-MM/mean_image.binaryproto --lmdb /home/dennis/Desktop/cnn-caffe-scripts/input/dataset-MM/test_lmdb
  1. Draw the model and see the colvolutional filters:
cd /home/dennis/Desktop/cnn-caffe-scripts/scripts
$ python /home/dennis/caffe/python/draw_net.py /home/dennis/Desktop/cnn-caffe-scripts/models/model01/model_train_val.prototxt /home/dennis/Desktop/cnn-caffe-scripts/models/model01/model.png
$ python visualize_example.py

b. for single and multiple iterations

  1. With scripts/generate_lmdb.py generate the "train.txt"/"test.txt", "train_lmdb"/"test_lmdb", "mean_image.binaryproto" files.

  2. Verify models/model-NN/ model_train_val.prototxt model_deploy.prototxt the inputs, parameters of architecture like the size of conv, outputs.

  3. Verify in models/model-NN/model_solver.prototxt the model and iterations.

  4. Then, use scripts/recursive_train.py, this script automatically train, test, draw models, and show convolutional filters.

License

GNU General Public License, version 3 (GPLv3).

About

By: Dennis Núñez-Fernández

Website: http://dennishnf.com

caffe-cnn-scripts's People

Contributors

dennishnf avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.