We will use the images in 02_train/training_data created with our capture program to train our model.
Read my medium article about this project to learn about all the details necessary to build an artificial intelligence experience on the browser from end-to-end.
You will need a virtual env with Python 3.7.
# change directory
$ cd 02_train
# install the necessary modules
$ pip install -r requirements.txt
# use jupyter notebook to train the model
$ jupyter notebook
This is our model architecture:
We are using TF2/Keras to train our model, as it will be running on the browser with TensorflowJS
It is much simpler to have the same result with FASTAI, but converting it to run on the browser isn't so simple.
Not working at the moment. I tried converting from the FASTAI model above in Pytorch to ONNX then to TFJS, but it isn't working.
After we train our model, we can copy the TFJS model to 03_experience/static/ and update the MODEL_HUIA_URL variable in 03_experience/src/scripts/App.vue