{"id":19154031,"url":"https://github.com/cjimti/aipnd-project","last_synced_at":"2026-03-04T15:03:10.444Z","repository":{"id":101889922,"uuid":"141737169","full_name":"cjimti/aipnd-project","owner":"cjimti","description":"AIML Programming with PyTorch","archived":false,"fork":false,"pushed_at":"2018-07-24T06:43:04.000Z","size":135583,"stargazers_count":10,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-01T16:36:04.675Z","etag":null,"topics":["machine-learning","pytorch","pytorch-implmention","udacity","udacity-nanodegree"],"latest_commit_sha":null,"homepage":"https://mk.imti.co","language":"HTML","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/cjimti.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":"2018-07-20T16:57:41.000Z","updated_at":"2024-04-22T16:13:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"13aa20f4-f8a6-47c1-b684-16657d3672dc","html_url":"https://github.com/cjimti/aipnd-project","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cjimti/aipnd-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjimti%2Faipnd-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjimti%2Faipnd-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjimti%2Faipnd-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjimti%2Faipnd-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cjimti","download_url":"https://codeload.github.com/cjimti/aipnd-project/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cjimti%2Faipnd-project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30084685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T13:22:36.021Z","status":"ssl_error","status_checked_at":"2026-03-04T13:20:45.750Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["machine-learning","pytorch","pytorch-implmention","udacity","udacity-nanodegree"],"created_at":"2024-11-09T08:25:13.958Z","updated_at":"2026-03-04T15:03:10.351Z","avatar_url":"https://github.com/cjimti.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI image classification and machine learning utilizing the PyTorch framework\n\nProject assets:\n\n- `Image Classifier Project.ipynb` Jupyter Notebook\n- `Image Classifier Project.html` HTML export of the Jupyter Notebook above.\n- `train.py` to train a new network on a data set.\n- `predict.py` to predict flower name from an image.\n\n## Example Image for Training\n\nImage categories are found in [cat_to_name.json] and flower images can be downloaded in the gziped tar file [flower_data.tar.gz] from Udacity.\n\nGet flower images:\n```bash\nmkdir -p flowers \u0026\u0026 cd flowers\ncurl https://s3.amazonaws.com/content.udacity-data.com/nd089/flower_data.tar.gz | tar xz\n```\n\nYou should now have **test**, **train** and **valid** directories containing classification directories and flower images under the **flowers** directory.\n\n## Examples train.py\n\nHelp:\n```bash\npython ./train.py -h\n```\n\nTrain on **CPU** with default **vgg16**:\n```bash\npython ./train.py ./flowers/train/\n```\n\nTrain on **GPU** with **densenet121** with one **500** node layer:\n```bash\npython ./train.py ./flowers/train --gpu --arch \"densenet121\" --hidden_units 500 --epochs5\n```\n\nAdditional hidden layers with checkpoint saved to densenet201 directory.\n```bash\npython ./train.py ./flowers/train --gpu --arch=densenet201 --hidden_units 1280 640 --save_dir densenet201\n```\n\n## Examples train.py\n\nHelp\n```bash\npython ./predict.py -h\n```\n\nBasic Prediction\n```bash\npython ./predict.py flowers/valid/5/image_05192.jpg checkpoint.pth\n```\n\nPrediction with Top 10 Probabilities\n```bash\npython ./predict.py flowers/valid/5/image_05192.jpg checkpoint.pth --tok_k 10\n```\n\nPrediction with GPU\n```bash\npython ./predict.py flowers/valid/5/image_05192.jpg checkpoint.pth --gpu\n```\n\n## Part 1 Jupyter Notebook\n\n### [Image Classifier Project.ipynb]\n\nTo review the  [Image Classifier Project.ipynb] notebook, launch **Jupyter Notebook** from the project root:\n\n```bash\njupyter notebook\n```\n\n## Part 2 Scripts\n\n### [train.py]\n\n**Options:**\n\n- Set directory to save checkpoints\n    - `python train.py data_dir --save_dir save_directory`\n- Choose architecture\n    - `python train.py data_dir --arch \"vgg13\"`\n- Set hyperparameters\n    - `python train.py data_dir --learning_rate 0.01 --hidden_units 512 256 --epochs 20`\n- Use GPU for training\n    - `python train.py data_dir --gpu`\n\n**Help** - `python ./train.py -h`:\n```plain\nusage: python ./train.py ./flowers/train --gpu --learning_rate 0.001 --hidden_units 3136 --epochs 5\n\nTrain and save an image classification model.\n\npositional arguments:\n  data_directory\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --save_dir SAVE_DIR   Directory to save training checkpoint file (default:\n                        .)\n  --save_name SAVE_NAME\n                        Checkpoint filename. (default: checkpoint)\n  --categories_json CATEGORIES_JSON\n                        Path to file containing the categories. (default:\n                        cat_to_name.json)\n  --arch ARCH           Supported architectures: vgg11, vgg13, vgg16, vgg19,\n                        densenet121, densenet169, densenet161, densenet201\n                        (default: vgg16)\n  --gpu                 Use GPU (default: False)\n\nhyperparameters:\n  --learning_rate LEARNING_RATE\n                        Learning rate (default: 0.001)\n  --hidden_units HIDDEN_UNITS [HIDDEN_UNITS ...], -hu HIDDEN_UNITS [HIDDEN_UNITS ...]\n                        Hidden layer units (default: [3136, 784])\n  --epochs EPOCHS       Epochs (default: 1)\n```\n\n### [predict.py]\n\n- Basic usage\n    - `python predict.py /path/to/image checkpoint`\n- Options\n    - Return top KK most likely classes\n        - `python predict.py input checkpoint --top_k 3`\n    - Use a mapping of categories to real name\n        - `python predict.py input checkpoint --category_names cat_to_name.json`\n    - Use GPU for inference\n        - `python predict.py input checkpoint --gpu`\n\n**Help** - `python ./predict.py -h`:\n```plain\nusage: python ./predict.py /path/to/image.jpg checkpoint.pth\n\nImage prediction.\n\npositional arguments:\n  path_to_image         Path to image file.\n  checkpoint_file       Path to checkpoint file.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --save_dir SAVE_DIR   Directory to save training checkpoint file (default:\n                        .)\n  --top_k TOP_K         Return top KK most likely classes. (default: 5)\n  --category_names CATEGORIES_JSON\n                        Path to file containing the categories. (default:\n                        cat_to_name.json)\n  --gpu                 Use GPU (default: False)\n\n```\n\n[flower_data.tar.gz]:https://s3.amazonaws.com/content.udacity-data.com/nd089/flower_data.tar.gz\n[Image Classifier Project.ipynb]:https://github.com/cjimti/aipnd-project/blob/master/Image%20Classifier%20Project.ipynb\n[train.py]:https://github.com/cjimti/aipnd-project/blob/master/train.py\n[predict.py]:https://github.com/cjimti/aipnd-project/blob/master/Image%20Classifier%20Project.html\n[cat_to_name.json]:https://github.com/cjimti/aipnd-project/blob/master/cat_to_name.json\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjimti%2Faipnd-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcjimti%2Faipnd-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcjimti%2Faipnd-project/lists"}