This guide is for Windows. For Linux and MacOS, it should be easier :)
-
Install Anaconda
-
Install Postman
-
Install Visual Studio Community (Core Editor Only)
-
Install CUDA Toolkit 11.0 Update
-
Download cuDNN 8.0.5 for CUDA 11.0
-
Extract cuDNN zip file, copy all folders in
cudafolder toC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0(select replace) -
Add these to
Pathenvironment variablesC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\libnvvp C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\extras\CUPTI\lib64 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include
-
Reboot
-
-
Create virtual environment
conda create --name tf2.4 python==3.8conda activate tf2.4pip install tensorflow==2.4.0pip install opencv-pythonpip install numpy
-
Install Jupyter Notebook
conda install -y jupyterconda install -y nb_conda
-
Open the project
cd ML_Final-Project jupyter notebook Final_Project_Bangkit.ipynb
-
Convert image to base64 format using
deploy/tobase64.pyby changingPATHvariable to your image file location. Then run this command:cd deploy python tobase64.py -
Generate JSON
python generateJSON.py
-
run the flask app on
deploy/deploy.pypython deploy.py
-
Copy everything from
deploy/data.jsonto body like this -
Test to send POST method to
<url-where-the-flask-app-running>/predicton Postman
We use Google Cloud Run for the deployment of this project
