{"id":18402625,"url":"https://github.com/wingkwong/candy-or-medicine-classifier","last_synced_at":"2026-05-04T07:36:41.835Z","repository":{"id":95977605,"uuid":"123256610","full_name":"wingkwong/candy-or-medicine-classifier","owner":"wingkwong","description":"Classify an image using TensorFlow with Inception v3 model to see if it is :candy: or :pill:","archived":false,"fork":false,"pushed_at":"2024-05-01T14:26:35.000Z","size":82633,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T03:44:21.368Z","etag":null,"topics":["candy-or-medicine","image-recognition","inception-v3","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wingkwong.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},"funding":{"github":"wingkwong","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2018-02-28T08:48:25.000Z","updated_at":"2018-05-28T09:32:25.000Z","dependencies_parsed_at":"2024-11-06T03:21:24.358Z","dependency_job_id":null,"html_url":"https://github.com/wingkwong/candy-or-medicine-classifier","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/wingkwong%2Fcandy-or-medicine-classifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingkwong%2Fcandy-or-medicine-classifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingkwong%2Fcandy-or-medicine-classifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wingkwong%2Fcandy-or-medicine-classifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wingkwong","download_url":"https://codeload.github.com/wingkwong/candy-or-medicine-classifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248612758,"owners_count":21133368,"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":["candy-or-medicine","image-recognition","inception-v3","tensorflow"],"created_at":"2024-11-06T02:43:00.961Z","updated_at":"2026-05-04T07:36:41.776Z","avatar_url":"https://github.com/wingkwong.png","language":"Python","funding_links":["https://github.com/sponsors/wingkwong"],"categories":[],"sub_categories":[],"readme":"# Candy or Medicine Classifier\nCould you tell the difference between candy and medicine? This python program is used to classify an image using TensorFlow with Inception v3 model to see if it is candy or medicine. \n\n## Prerequisites\n- Python 3.5\n- TensorFlow 1.5.0\n\n## Approach\n- Prepare a large dataset of candy and medicine for training purpose. Sample training images are available in tf_data folder\n- The retrain script is retraining Inception V3 model, which is optimized for accuracy\n- By running the retrain script, retrained_graph.pb which is a trained model and tf_files/retrained_labels.txt which is a text file containing Candy and Medicine labels will be generated. \n- Classifying an image\n\n## Examples\n#### An image of Medicine\n\n```\npython label_image.py predict/4076-8267-3450.jpg\n```\n![alt text](https://raw.githubusercontent.com/wingkwong/candy-or-medicine-classifier/master/predict/4076-8267-3450.jpg)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fwingkwong%2Fcandy-or-medicine-classifier.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fwingkwong%2Fcandy-or-medicine-classifier?ref=badge_shield)\n\n```\nMedicine (score = 0.98302)\nCandy (score = 0.01698)\n```\n\n#### An image of Candy\n```\npython label_image.py predict/16394-2496-24495.jpg\n```\n![alt text](https://raw.githubusercontent.com/wingkwong/candy-or-medicine-classifier/master/predict/16394-2496-24495.jpg)\n\n```\nCandy (score = 0.99137)\nMedicine (score = 0.00863)\n```\n\n## License\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fwingkwong%2Fcandy-or-medicine-classifier.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fwingkwong%2Fcandy-or-medicine-classifier?ref=badge_large)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwingkwong%2Fcandy-or-medicine-classifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwingkwong%2Fcandy-or-medicine-classifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwingkwong%2Fcandy-or-medicine-classifier/lists"}