{"id":21441931,"url":"https://github.com/dennishnf/caffe-cnn-scripts","last_synced_at":"2025-03-17T00:43:40.952Z","repository":{"id":151119064,"uuid":"266254964","full_name":"dennishnf/caffe-cnn-scripts","owner":"dennishnf","description":"Scripts for iterative training with multiple models and datasets using Caffe framework.","archived":false,"fork":false,"pushed_at":"2020-05-23T05:10:58.000Z","size":41227,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T10:36:53.145Z","etag":null,"topics":["artificial-intelligence","caffe","caffe-framework","caffe-model","caffe-prototxt","deep-learning","deep-learning-framework","machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dennishnf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-23T03:24:06.000Z","updated_at":"2024-08-24T23:42:12.000Z","dependencies_parsed_at":"2023-04-26T05:46:02.226Z","dependency_job_id":null,"html_url":"https://github.com/dennishnf/caffe-cnn-scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennishnf%2Fcaffe-cnn-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennishnf%2Fcaffe-cnn-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennishnf%2Fcaffe-cnn-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennishnf%2Fcaffe-cnn-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dennishnf","download_url":"https://codeload.github.com/dennishnf/caffe-cnn-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955725,"owners_count":20374372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","caffe","caffe-framework","caffe-model","caffe-prototxt","deep-learning","deep-learning-framework","machine-learning"],"created_at":"2024-11-23T01:45:12.773Z","updated_at":"2025-03-17T00:43:40.934Z","avatar_url":"https://github.com/dennishnf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# caffe-cnn-scripts #\n\nScripts for iterative training with multiple models and datasets.\n\n\n## a. for a single iteration ##\n\n\n1. With scripts/generate_lmdb.py generate the \"train.txt\"/\"test.txt\", \"train_lmdb\"/\"test_lmdb\", \"mean_image.binaryproto\" files. \n\n\n2. Verify models/model-NN/ model_train_val.prototxt model_deploy.prototxt the inputs, parameters of architecture like the size of conv, outputs.\n\n\n3. Verify in models/model-NN/model_solver.prototxt the model and iterations.\n\n\n4. Train the network, in terminal:\n\n```\n$ cd /home/dennis/Desktop/cnn-caffe-scripts/\n```\n\n```\n$ caffe train --solver /home/dennis/Desktop/cnn-caffe-scripts/models/model-NN/model_solver.prototxt --gpu 0\n```\n\nNote: Fine tunning:\n\n```\n$ 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\n```\n\nNote: Resume training:\n\n```\n$ 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\n```\n\n5. Test the network, in terminal:\n\n```\n$ cd /home/dennis/Desktop/cnn-caffe-scripts/\n```\n\n```\n$ 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\n```\n\n```\n$ 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\n```\n\n6. Draw the model and see the colvolutional filters:\n\n```\ncd /home/dennis/Desktop/cnn-caffe-scripts/scripts\n```\n\n```\n$ 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\n```\n\n```\n$ python visualize_example.py\n```\n\n\n## b. for single and multiple iterations ##\n\n\n1. With scripts/generate_lmdb.py generate the \"train.txt\"/\"test.txt\", \"train_lmdb\"/\"test_lmdb\", \"mean_image.binaryproto\" files. \n\n\n2. Verify models/model-NN/ model_train_val.prototxt model_deploy.prototxt the inputs, parameters of architecture like the size of conv, outputs.\n\n\n3. Verify in models/model-NN/model_solver.prototxt the model and iterations.\n\n\n4. Then, use scripts/recursive_train.py, this script automatically train, test, draw models, and show convolutional filters.\n\n\n## License ##\n\nGNU General Public License, version 3 (GPLv3).\n\n\n## About ##\n\nBy: Dennis Núñez-Fernández\n\nWebsite: [http://dennishnf.com](http://dennishnf.com)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdennishnf%2Fcaffe-cnn-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdennishnf%2Fcaffe-cnn-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdennishnf%2Fcaffe-cnn-scripts/lists"}