Packaged version of ultralytics/yolov5 + many extra features
import yolov5
# load model
model = yolov5.load('fcakyon/yolov5s-v7.0')
# set image
img = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
# perform inference
results = model(img, size=640)
# show detection bounding boxes on image
results.show()
yolov5 train --img 640 --batch 16 --weights fcakyon/yolov5s-v7.0 --epochs 10 --device cuda:0
yolov5 train --data data.yaml --weights yolov5s.pt --hf_model_id username/modelname --hf_token YOUR-HF-WRITE-TOKEN
Available models: https://huggingface.co/models?other=yolov5
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/7.0.2...7.0.3
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/7.0.1...7.0.2
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/7.0.0...7.0.1
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.2.3...7.0.0
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.2.2...6.2.3
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.2.1...6.2.2
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.2.0...6.2.1
Train/Val/Predict with YOLOv5 image classifier:
$ yolov5 classify train --img 640 --data mnist2560 --weights yolov5s-cls.pt --epochs 1
$ yolov5 classify predict --img 640 --weights yolov5s-cls.pt --source images/
from yolov5.classify import train, val, predict
train.run(imgsz=640, data='mnist2560.yaml')
val.run(imgsz=640, weights='yolov5s-cls.pt')
predict.run(imgsz=640)
import yolov5
model = yolov5.load('yolov5s-cls.pt')
Train/Val/Predict with YOLOv5 instance segmentation model:
$ yolov5 segment train --img 640 --weights yolov5s-seg.pt --epochs 1
$ yolov5 segment predict --img 640 --weights yolov5s-seg.pt --source images/
from yolov5.segment import train, val, predict
train.run(imgsz=640, data='coco128.yaml')
val.run(imgsz=640, weights='yolov5s-seg.pt')
predict.run(imgsz=640)
import yolov5
model = yolov5.load('yolov5s-seg.pt')
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.1.9...6.2.0
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.1.8...6.1.9
Full Changelog: https://github.com/fcakyon/yolov5-pip/compare/6.1.7...6.1.8