check model_maker_object_detection.ipynb
for a in depth look at how the model is trained.
- CUDA Version 11.x download
- cuDNN Version 8.1 download
- ffmpeg download
- Tensorflow 2.5.0
- Python 3.6 -> 3.9
python -m venv venv
# cd into the scripts directory
cd venv/Scripts
# activate the virtual enviroment
activate
# Change to the parent directory where all the scripts are
cd ..
pip install tensorflow==2.5.0
pip install --use-deprecated=legacy-resolver tflite_model_maker
pip install pycocotools
pip install numpy
pip install opencv-python
The video converter script has two flags --video
to specify the video location
and --frame
will tell ffmpeg how many frames it should generate per second three is a good median.
py convert.video.py --video ./dataset/videos/one.mp4 --dir-name images-2
mixing the data will combine all the annotations and images listed in the config.json file into annotations and images folders for create-data.py to process.
py dataset.mixer.py
create-dataset.py will take all the files in the images and annotations folders and randomly copy them to the test
and train
folder's for tensorflow to use.
When making your own dataset use a minimum of 233 images for training to label data using labelimg is a good choice.
py create-dataset.py
Model training collects all the annotations and images and passes them to tensorflow to start training the object detection model.
py new.py