- Install Python (Setup instructions)
- Make a Virtual Env.
- Install Python packages
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.example
as.env
. -
Change API url in
.env
.
Note :- If have gpu based machine then run it otherwise it will take more than a day for model building . or you can reduce the size of data from every folder then train the model.
- Download the data from kaggle.
- Keep all the data in a seprate folder in a project directory.
- Run Jupyter Notebook in Browser.
jupyter notebook
- Open
training/potato-disease-training.ipynb
in 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
models
folder.
- Get inside
api
folder
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
api
folder
cd api
- Copy the
models.config.example
asmodels.config
and 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
api
folder
cd frontend
- Copy the
.env.example
as.env
and updateREACT_APP_API_URL
to API URL if needed. - Run the frontend
npm run start
Datasets credits:- https://www.kaggle.com/arjuntejaswi/plant-village
Contact Us:- [email protected]