Plants identification on 240 categories Taiwan endemic plants with a dataset size of 41834 images. Trained on ResNet50 with pre-trained weights from imagenet.
Designed an easy-to-use chatbot on Telegram for users to upload photos of plants and get instant boxing and predicted category result.
plant_classifier.py
usage: plant_classfier.py [-h] --uid UID [--train_path TRAIN_PATH]
[--valid_path VALID_PATH] [--train_resnet]
[--train_inception] [--learning_rate LEARNING_RATE]
[--batch_size BATCH_SIZE] [--epoch EPOCH]
[--img_size IMG_SIZE]
optional arguments:
-h, --help show this help message and exit
--uid UID training uid
--train_path TRAIN_PATH
training data path
--valid_path VALID_PATH
valid data path
--train_resnet whether train on ResNet50
--train_inception whether train on InceptionResNetV2
--learning_rate LEARNING_RATE
learning rate for training
--batch_size BATCH_SIZE
batch size for training
--epoch EPOCH epochs for training
--img_size IMG_SIZE img width, height size
bot.py
usage: python bot.py TELEGRAM_KEY_TOKEN
-
Trained the model for 57 epochs freezing the Resnet layers
-
Trained the model for more epochs (until early stop) unfreezing the Resnet layers
Training accuracy on 33372 images: 0.744375
Testing accuracy on 8374 images: 0.64296875
Testing Top 5 accuracy 8374 images: 0.81634120
Example on Helianthus annuus 向日葵
- GIF demo
- User uploads photo
- Feeling lucky! for random results
- Telegram app screenshot
Contributor | Contribute |
---|---|
Franklyn Chen | Help building up this project, putting in huge effort fine-tuning the model and wrote the boxing script |
ITRI | Providing ideas, supports and the dataset |