All Projects → codebasics → potato-disease-classification

codebasics / potato-disease-classification

Licence: other
Potato Disease Classification - Training, Rest APIs, and Frontend to test.

Programming Languages

Jupyter Notebook
11667 projects
PureBasic
71 projects
javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
java
68154 projects - #9 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to potato-disease-classification

labml
🔎 Monitor deep learning model training and hardware usage from your mobile phone 📱
Stars: ✭ 1,213 (+1176.84%)
Mutual labels:  keras-tensorflow, tensorflow2
gcnn keras
Graph convolution with tf.keras
Stars: ✭ 47 (-50.53%)
Mutual labels:  keras-tensorflow, tensorflow2
GradCAM and GuidedGradCAM tf2
Implementation of GradCAM & Guided GradCAM with Tensorflow 2.x
Stars: ✭ 16 (-83.16%)
Mutual labels:  keras-tensorflow, tensorflow2
GLOM-TensorFlow
An attempt at the implementation of GLOM, Geoffrey Hinton's paper for emergent part-whole hierarchies from data
Stars: ✭ 32 (-66.32%)
Mutual labels:  keras-tensorflow, tensorflow2
tennis action recognition
Using deep learning to perform action recognition in the sport of tennis.
Stars: ✭ 17 (-82.11%)
Mutual labels:  cnn-keras, cnn-classification
tf-faster-rcnn
Tensorflow 2 Faster-RCNN implementation from scratch supporting to the batch processing with MobileNetV2 and VGG16 backbones
Stars: ✭ 88 (-7.37%)
Mutual labels:  keras-tensorflow, tensorflow2
G-SimCLR
This is the code base for paper "G-SimCLR : Self-Supervised Contrastive Learning with Guided Projection via Pseudo Labelling" by Souradip Chakraborty, Aritra Roy Gosthipaty and Sayak Paul.
Stars: ✭ 69 (-27.37%)
Mutual labels:  keras-tensorflow, tensorflow2
Text and Audio classification with Bert
Text Classification in Turkish Texts with Bert
Stars: ✭ 34 (-64.21%)
Mutual labels:  keras-tensorflow, tensorflow2
Facial-Expression-Recognition
Facial Expression Recognition with Keras
Stars: ✭ 17 (-82.11%)
Mutual labels:  cnn-keras, keras-tensorflow
PolyphonicPianoTranscription
Recurrent Neural Network for generating piano MIDI-files from audio (MP3, WAV, etc.)
Stars: ✭ 146 (+53.68%)
Mutual labels:  cnn-keras, keras-tensorflow
Weapon-Detection-And-Classification
Weapon Detection & Classification through CCTV surveillance using Deep Learning-CNNs.
Stars: ✭ 53 (-44.21%)
Mutual labels:  cnn-keras, cnn-classification
Resnetcam Keras
Keras implementation of a ResNet-CAM model
Stars: ✭ 269 (+183.16%)
Mutual labels:  cnn-keras, keras-tensorflow
TF2DeepFloorplan
TF2 Deep FloorPlan Recognition using a Multi-task Network with Room-boundary-Guided Attention. Enable tensorboard, quantization, flask, tflite, docker, github actions and google colab.
Stars: ✭ 98 (+3.16%)
Mutual labels:  keras-tensorflow, tensorflow2
KerasMNIST
Keras MNIST for Handwriting Detection
Stars: ✭ 25 (-73.68%)
Mutual labels:  keras-tensorflow
GTAV-Self-driving-car
Self driving car in GTAV with Deep Learning
Stars: ✭ 15 (-84.21%)
Mutual labels:  keras-tensorflow
Open-Source-Models
Address book for computer vision models.
Stars: ✭ 30 (-68.42%)
Mutual labels:  tensorflow2
3D-GuidedGradCAM-for-Medical-Imaging
This Repo containes the implemnetation of generating Guided-GradCAM for 3D medical Imaging using Nifti file in tensorflow 2.0. Different input files can be used in that case need to edit the input to the Guided-gradCAM model.
Stars: ✭ 60 (-36.84%)
Mutual labels:  tensorflow2
faster rcnn
An implementation of Faster R-CNN applied to vehicle detection.
Stars: ✭ 22 (-76.84%)
Mutual labels:  keras-tensorflow
FaceMaskDetector
Real time face-mask detection using Deep Learning and OpenCV
Stars: ✭ 106 (+11.58%)
Mutual labels:  cnn-keras
TensorFlow2.0 SSD
A tensorflow_2.0 implementation of SSD (Single Shot MultiBox Detector) .
Stars: ✭ 83 (-12.63%)
Mutual labels:  tensorflow2

Potato Disease Classification

Setup for Python:

  1. Install Python (Setup instructions)

  2. Install Python packages

pip3 install -r training/requirements.txt
pip3 install -r api/requirements.txt
  1. Install Tensorflow Serving (Setup instructions)

Setup for ReactJS

  1. Install Nodejs (Setup instructions)
  2. Install NPM (Setup instructions)
  3. Install dependencies
cd frontend
npm install --from-lock-json
npm audit fix
  1. Copy .env.example as .env.

  2. Change API url in .env.

Setup for React-Native app

  1. Go to the React Native environment setup, then select React Native CLI Quickstart tab.

  2. Install dependencies

cd mobile-app
yarn install
  • 2.1 Only for mac users
cd ios && pod install && cd ../
  1. Copy .env.example as .env.

  2. Change API url in .env.

Training the Model

  1. Download the data from kaggle.
  2. Only keep folders related to Potatoes.
  3. Run Jupyter Notebook in Browser.
jupyter notebook
  1. Open training/potato-disease-training.ipynb in Jupyter Notebook.
  2. In cell #2, update the path to dataset.
  3. Run all the Cells one by one.
  4. Copy the model generated and save it with the version number in the models folder.

Running the API

Using FastAPI

  1. Get inside api folder
cd api
  1. Run the FastAPI Server using uvicorn
uvicorn main:app --reload --host 0.0.0.0
  1. Your API is now running at 0.0.0.0:8000

Using FastAPI & TF Serve

  1. Get inside api folder
cd api
  1. Copy the models.config.example as models.config and update the paths in file.
  2. Run the TF Serve (Update config file path below)
docker run -t --rm -p 8501:8501 -v C:/Code/potato-disease-classification:/potato-disease-classification tensorflow/serving --rest_api_port=8501 --model_config_file=/potato-disease-classification/models.config
  1. Run the FastAPI Server using uvicorn For this you can directly run it from your main.py or main-tf-serving.py using pycharm run option (as shown in the video tutorial) OR you can run it from command prompt as shown below,
uvicorn main-tf-serving:app --reload --host 0.0.0.0
  1. Your API is now running at 0.0.0.0:8000

Running the Frontend

  1. Get inside api folder
cd frontend
  1. Copy the .env.example as .env and update REACT_APP_API_URL to API URL if needed.
  2. Run the frontend
npm run start

Running the app

  1. Get inside mobile-app folder
cd mobile-app
  1. Copy the .env.example as .env and update URL to API URL if needed.

  2. Run the app (android/iOS)

npm run android

or

npm run ios
  1. Creating public (signed APK)

Creating the TF Lite Model

  1. Run Jupyter Notebook in Browser.
jupyter notebook
  1. Open training/tf-lite-converter.ipynb in Jupyter Notebook.
  2. In cell #2, update the path to dataset.
  3. Run all the Cells one by one.
  4. Model would be saved in tf-lite-models folder.

Deploying the TF Lite on GCP

  1. Create a GCP account.
  2. Create a Project on GCP (Keep note of the project id).
  3. Create a GCP bucket.
  4. Upload the potatoes.h5 model in the bucket in the path models/potatos.h5.
  5. Install Google Cloud SDK (Setup instructions).
  6. Authenticate with Google Cloud SDK.
gcloud auth login
  1. Run the deployment script.
cd gcp
gcloud functions deploy predict_lite --runtime python38 --trigger-http --memory 512 --project project_id
  1. Your model is now deployed.
  2. Use Postman to test the GCF using the Trigger URL.

Inspiration: https://cloud.google.com/blog/products/ai-machine-learning/how-to-serve-deep-learning-models-using-tensorflow-2-0-with-cloud-functions

Deploying the TF Model (.h5) on GCP

  1. Create a GCP account.
  2. Create a Project on GCP (Keep note of the project id).
  3. Create a GCP bucket.
  4. Upload the tf .h5 model generate in the bucket in the path models/potato-model.h5.
  5. Install Google Cloud SDK (Setup instructions).
  6. Authenticate with Google Cloud SDK.
gcloud auth login
  1. Run the deployment script.
cd gcp
gcloud functions deploy predict --runtime python38 --trigger-http --memory 512 --project project_id
  1. Your model is now deployed.
  2. Use Postman to test the GCF using the Trigger URL.

Inspiration: https://cloud.google.com/blog/products/ai-machine-learning/how-to-serve-deep-learning-models-using-tensorflow-2-0-with-cloud-functions

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].