!python train.py --img 640 --batch 16 --epochs 10 --data DATAS2-4/data.yaml --weights yolov5s.pt
!python detect.py --source DATAS2-4/valid/images --weights runs/train/exp4/weights/best.pt
!python detect.py --source BOPRC_test --weights runs/train/exp/weights/best.pt
The website: https://roboflow.com/ , after upload images, use the label tool to label the images, then export the dataset to YOLOv5 format.
After we have the exported yolov5 format dataset, we can use it to train our model same like the code above.
!python detect.py --source 0 --weights runs/train/exp/weights/best.pt
<<<<<<< Updated upstream
For andorid app, we can use the tflite model, to convert the model to tflite model, just follow this bellow steps:
!python export.py --weights runs/train/exp/weights/best.pt --img 640 --batch 1
=======
!python export.py --include tflite --imgsz 320 --weights runs/train/exp/weights/best.pt