The goal of the project is to create an energy-efficient inference model on Android to classify fruits and vegetables.
This project takes the VegFru Dataset (the download link is hosted in China so it will be quite slow) and retrains MobileNet V2 on it for image classification.
- Download the VegFru Dataset and extract it under /data/raw
- Create a virtual environment with
virtualenv env
and activate it - Get the dependencies
pip install -r requirements.txt
- Run the preprocess shell script with
./preprocess.sh.
Feel free to delete the files indata/raw
after. - Start the transfer learning by running the retrain shell script with
./retrain.sh.
This will take a long time - Check to see if the retrain is successful by running
./test_retrained.sh
- Convert the model to tflite format by running
./convert.sh
- Check to make sure the tflite model is sane by running
./test_tflite.sh