- 
Install Python (Setup instructions) 
- 
Install Python packages 
pip3 install -r training/requirements.txt
pip3 install -r api/requirements.txt
- Install Tensorflow Serving (Setup instructions)
- Install Nodejs (Setup instructions)
- Install NPM (Setup instructions)
- Install dependencies
cd frontend
npm install --from-lock-json
npm audit fix- 
Copy .env.exampleas.env.
- 
Change API url in .env.
- 
Go to the React Native environment setup, then select React Native CLI Quickstarttab.
- 
Install dependencies 
cd mobile-app
yarn install- 2.1 Only for mac users
cd ios && pod install && cd ../- 
Copy .env.exampleas.env.
- 
Change API url in .env.
- Download the data from kaggle.
- Only keep folders related to Potatoes.
- Run Jupyter Notebook in Browser.
jupyter notebook- Open training/potato-disease-training.ipynbin Jupyter Notebook.
- In cell #2, update the path to dataset.
- Run all the Cells one by one.
- Copy the model generated and save it with the version number in the modelsfolder.
- Get inside apifolder
cd api- Run the FastAPI Server using uvicorn
uvicorn main:app --reload --host 0.0.0.0- Your API is now running at 0.0.0.0:8000
- Get inside apifolder
cd api- Copy the models.config.exampleasmodels.configand update the paths in file.
- 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- 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- Your API is now running at 0.0.0.0:8000
- Get inside apifolder
cd frontend- Copy the .env.exampleas.envand updateREACT_APP_API_URLto API URL if needed.
- Run the frontend
npm run start- Run Jupyter Notebook in Browser.
jupyter notebook- Open training/using_Imagegenerator.ipynbin Jupyter Notebook.
- In cell #2, update the path to dataset.
- Run all the Cells one by one.
- Model would be saved in save_modelsfolder.
- Create a GCP account.
- Create a Project on GCP (Keep note of the project id).
- Create a GCP bucket.
- Upload the potatoes.h5 model in the bucket in the path models/potatos.h5.
- Install Google Cloud SDK (Setup instructions).
- Authenticate with Google Cloud SDK.
gcloud auth login- Run the deployment script.
cd gcp
gcloud functions deploy predict_lite --runtime python38 --trigger-http --memory 512 --project project_id- Your model is now deployed.
- Use Postman to test the GCF using the Trigger URL.
- Create a GCP account.
- Create a Project on GCP (Keep note of the project id).
- Create a GCP bucket.
- Upload the tf .h5 model generate in the bucket in the path models/potato-model.h5.
- Install Google Cloud SDK (Setup instructions).
- Authenticate with Google Cloud SDK.
gcloud auth login- Run the deployment script.
cd gcp
gcloud functions deploy predict --runtime python38 --trigger-http --memory 512 --project project_id- Your model is now deployed.
- Use Postman to test the GCF using the Trigger URL.