Reference for ultralytics/models/yolo/model.py
Note
This file is available at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/model.py. If you spot a problem please help fix it by contributing a Pull Request 🛠️. Thank you 🙏!
ultralytics.models.yolo.model.YOLO
Bases: Model
YOLO (You Only Look Once) object detection model.
Source code in ultralytics/models/yolo/model.py
ultralytics.models.yolo.model.YOLOWorld
Bases: Model
YOLO-World object detection model.
Loads a YOLOv8-World model for object detection. If no custom class names are provided, it assigns default COCO class names.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model | str | Path | Path to the pre-trained model file. Supports .pt and .yaml formats. | 'yolov8s-world.pt' |
verbose | bool | If True, prints additional information during initialization. | False |
Source code in ultralytics/models/yolo/model.py
set_classes
Set classes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
classes | List(str | A list of categories i.e. ["person"]. | required |
Source code in ultralytics/models/yolo/model.py
📅 Created 11 months ago ✏️ Updated 1 month ago