How to use
pip install -U yolov5
- Load model and perform prediction:
import yolov5
model = yolov5.load('MBARI-org/megamidwater')
model.conf = 0.25
model.iou = 0.1
model.agnostic = False
model.multi_label = False
model.max_det = 1000
img = 'http://dsg.mbari.org/images/dsg/external/Ctenophora/Deiopea_01.png'
results = model(img, size=1280)
print(results.pandas().xyxy[0])
- Finetune the model on your custom dataset:
yolov5 train --data data.yaml --img 1280 --batch 16 --weights mbari-org/megamidwater --epochs 10