This project is the data files and labels to train a Yolov8n model.
- Use labelme to label new images
- Run labelme2yolo.py to convert the Labelme labels to YOLO labels
python3 labelme2yolo.py --category_mapping labels.json images dataset
- Setup Ultralytics in a virtualenv:
virtualenv -p python3 venv
pip install ultralytics
-
Retrain Yolov8n:
yolo detect train data=/home/nlbutts/projects/reefscape_data/reefscape.yaml model=yolov8n.pt epochs=100 imgsz=640
-
Test it on a video clip
yolo detect predict model=runs/detect/train/weights/best.pt source=../reefscape_data/images/PXL_20250107_222204416.TS.mp4
-
Export to IMX500:
yolo export format=imx model=runs/detect/train5/weights/best.pt
This will export directory called best_imx_model in the runs/detect/trainX/weights directory.
SCP this folder to a Pi and then run TBD to generate a packed model.