Skip to content

🌻 Deep learning project of Taiwan plants classification and detection with chatbot implementation

Notifications You must be signed in to change notification settings

alvinbhou/Plants-Identification

Repository files navigation

Plants-Identification

Project Info

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.

Demo Telegram Chatbot

Plant Classification Bot

Usage

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

Results

Classification results

  • 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

Boxing results

Example on Helianthus annuus 向日葵

Chatbot Demo Screenshots

  • GIF demo

  • User uploads photo

  • Feeling lucky! for random results

  • Telegram app screenshot

Contributors

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

About

🌻 Deep learning project of Taiwan plants classification and detection with chatbot implementation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages