transfer-learning-training#
Custom trained transfer learning model through tflite model maker#
Steps to create a tflite model#
Install the required packages by running the following command:
pip install -r requirements.txt
In the images folder, there should be all pictures that are to be used for training. The images should be in ‘jpeg’ or ‘png’ format. There should also be a csv file that contains the labels for the images. The csv file should be in the following format:
set,image(path),label,xmax,xmin,,,ymax,ymin,
train,images/0001.jpg,0.32,0.444,,,1,0.123,
The csv file can be made by running
csv_files.py
. This will create a csv file that can be used for training. Make sure you go in the code and change paths to the correct paths for your system.Dynamic running of the code will come later. Run the following command to create a tflite model:
python Model_maker_tflite.py
Testing with a camera can be done if you change the path to your tflite model and
labels.txt
file. Run the following command to test the model:
python test_with_camera.py
Documentation#
HTML#
sudo apt install make python3-sphinx python3-pip
pip3 install furo sphinxcontrib-jquery
cd docs/
make clean
make html
PDF#
sudo apt install latexmk texlive-latex-extra
cd docs/
make latexpdf