https://github.com/wingkwong/candy-or-medicine-classifier
Classify an image using TensorFlow with Inception v3 model to see if it is :candy: or :pill:
https://github.com/wingkwong/candy-or-medicine-classifier
candy-or-medicine image-recognition inception-v3 tensorflow
Last synced: 8 months ago
JSON representation
Classify an image using TensorFlow with Inception v3 model to see if it is :candy: or :pill:
- Host: GitHub
- URL: https://github.com/wingkwong/candy-or-medicine-classifier
- Owner: wingkwong
- License: apache-2.0
- Created: 2018-02-28T08:48:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-01T14:26:35.000Z (over 1 year ago)
- Last Synced: 2025-02-16T03:44:21.368Z (9 months ago)
- Topics: candy-or-medicine, image-recognition, inception-v3, tensorflow
- Language: Python
- Homepage:
- Size: 78.8 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Candy or Medicine Classifier
Could 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.
## Prerequisites
- Python 3.5
- TensorFlow 1.5.0
## Approach
- Prepare a large dataset of candy and medicine for training purpose. Sample training images are available in tf_data folder
- The retrain script is retraining Inception V3 model, which is optimized for accuracy
- 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.
- Classifying an image
## Examples
#### An image of Medicine
```
python label_image.py predict/4076-8267-3450.jpg
```

[](https://app.fossa.io/projects/git%2Bgithub.com%2Fwingkwong%2Fcandy-or-medicine-classifier?ref=badge_shield)
```
Medicine (score = 0.98302)
Candy (score = 0.01698)
```
#### An image of Candy
```
python label_image.py predict/16394-2496-24495.jpg
```

```
Candy (score = 0.99137)
Medicine (score = 0.00863)
```
## License
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fwingkwong%2Fcandy-or-medicine-classifier?ref=badge_large)