Deep learning based automated tomato plant disease classification covering over 40 disease classes and 4 healthy classes.
sudo apt install virtualenv virtualenv --system-site-packages -p python3 py35
source py35/bin/activate
sh requirements.sh
Note:
-
To setup nginx properly, follow the setup tutorial here: https://www.matthealy.com.au/blog/post/deploying-flask-to-amazon-web-services-ec2/
-
Delete the default nginx page
sudo rm /etc/nginx/sites-enabled/default -
Restart the nginx server
sudo service nginx restart
-
- models: directory containing model files for training
- bottlenecks: feature files for each image for each
-
[data_dir]: get data_dir @{insert link to S3 bucket}
-
scripts: contains python files for training the models, evaluation and quantization
-
train.sh: bash script to run the training for inceptionV3 model
-
train_mobilenet.sh: bash script to run the training for the mobilenet model
-
retrain.sh: bash script to re-train the model on new images
-
retrain_compare.py: utility script for retrain.sh
source py35/bin/activate
cd KisanLab_CPU
sh train.sh
or
sh train_mobilenet.sh
Kisan_app folder contains all the files for the API.
source py35/bin/activate
cd crop_classification_updated/kisan_app
nohup gunicorn app:app -b localhost:8000 &
curl -F file=@/path/to/your/image ${PUBLIC_IP_OF_EC2_INSTANCE}/api_call
[ { "Prediction1": "tomato fruit borer", "Confidence1": "0.490311", "Confidence2": "0.258647", "Prediction2": "cutworm on tomato" } ]
or