YOLOv5¶
YOLOv5 is an open-source computer vision model by Ultralytics, the creators of YOLOv5. You can use autodistill
to train a YOLOv5 object detection model on a dataset of labelled images generated by the base models that autodistill
supports.
Installation¶
To use the YOLOv5 target model, you will need to install the following dependency:
pip3 install autodistill-yolov5
Quickstart¶
from autodistill_YOLOv5 import YOLOv5
target_model = YOLOv5("YOLOv5n.pt")
# train a model
target_model.train("./context_images_labeled/data.yaml", epochs=200)
# run inference on the new model
pred = target_model.predict("./context_images_labeled/train/images/dog-7.jpg", conf=0.01)