{"id":21693540,"url":"https://github.com/kleinyuan/tf-ft","last_synced_at":"2025-04-12T10:40:43.427Z","repository":{"id":87912035,"uuid":"106060834","full_name":"KleinYuan/tf-ft","owner":"KleinYuan","description":"Implementation on tensorflow fine tuning of generic CNN based model","archived":false,"fork":false,"pushed_at":"2017-10-19T18:56:21.000Z","size":106,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T05:33:12.050Z","etag":null,"topics":["alexnet","convolutional-neural-networks","fine-tuning","fine-tuning-cnns","tensorflow","vgg"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KleinYuan.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":"2017-10-07T00:24:09.000Z","updated_at":"2019-06-29T05:25:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9a3b439-e332-4af5-a02f-d7a2d4ca0be2","html_url":"https://github.com/KleinYuan/tf-ft","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/KleinYuan%2Ftf-ft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KleinYuan%2Ftf-ft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KleinYuan%2Ftf-ft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KleinYuan%2Ftf-ft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KleinYuan","download_url":"https://codeload.github.com/KleinYuan/tf-ft/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248556605,"owners_count":21124155,"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":["alexnet","convolutional-neural-networks","fine-tuning","fine-tuning-cnns","tensorflow","vgg"],"created_at":"2024-11-25T18:20:41.647Z","updated_at":"2025-04-12T10:40:43.420Z","avatar_url":"https://github.com/KleinYuan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Intro\n\nA project for generic fine-tuning/extending\n(freeze CNN layers and connect with your own customzied FC layers)\npre-trained/existing models, such as AlexNet, VGG-16, ... (More CNN based).\n\n# Manual\n\nStep1. Put your datasets somewhere and train.csv under `/data/alexnet_finetune`\n\nStep2. train.csv should be the format with first column to be the locations of images (I put an example in the folder)\n\nStep3. Run:\n\n```\n# Download Pre-trained model\nbash setup.sh\n\nexport PYTHONPATH='.'\n\n# You can also take advantages of the Makefile, which actually inspires me dockerize this project if I have time\npython apps/finetune_alexnet_train.py\n```\n\n\n# Keys\n\nOne dependencies we live on is the pre-trained [weights](http://www.cs.toronto.edu/~guerzhoy/tf_alexnet/bvlc_alexnet.npy) from BVLC.\nThat said you don't wanna mess up with the name scope of those layers you wanna freeze. So be careful.\nHow we load the weights (`/services/weights_load_services`) should provide you enough information.\n\nYou are free to add as many layers as you like and just be aware that `conv1 ~ conv5` and `fc6~fc8` are those layers (as well as the NAME) you can load a pre-trained weights.\n\nI try very hard to implement what I thought is the best practice for tensorflow -- separate:\n\n- [X] architecture model (models/alexnet.py)\n\n- [X] computation model (models/finetune_graph.py)\n\n- [X] trainer model (models/train.py)\n\n- [X] training app (apps/finetune_alexnet_train.py)\n\nso that you can independently change any part of those without impacting other components.\n\nA better example will be my anther repo -- [generic CNN in tensorflow](https://github.com/KleinYuan/cnn), which may have a better idea of what I am trying to do.\nSince for this project, you need to sacrifice some graceful implementation due to the constraints of the pre-trained weights organization.\n\n\n# references\n\n1. [AlexNet Paper](http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf)\n2. [Fine Tuning AlexNet on Tensorflow Example](https://kratzert.github.io/2017/02/24/finetuning-alexnet-with-tensorflow.html#finetune)\n3. [AlexNet Explainations in details](http://vision.stanford.edu/teaching/cs231b_spring1415/slides/alexnet_tugce_kyunghee.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkleinyuan%2Ftf-ft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkleinyuan%2Ftf-ft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkleinyuan%2Ftf-ft/lists"}