mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-26 07:54:21 +08:00
22 lines
784 B
Python
22 lines
784 B
Python
from ultralytics.engine.model import Model
|
|
from ultralytics.nn.tasks import YOLOv10DetectionModel
|
|
from .val import YOLOv10DetectionValidator
|
|
from .predict import YOLOv10DetectionPredictor
|
|
from .train import YOLOv10DetectionTrainer
|
|
|
|
class YOLOv10(Model):
|
|
|
|
def __init__(self, model="yolov10n.pt", task=None, verbose=False):
|
|
super().__init__(model=model, task=task, verbose=verbose)
|
|
|
|
@property
|
|
def task_map(self):
|
|
"""Map head to model, trainer, validator, and predictor classes."""
|
|
return {
|
|
"detect": {
|
|
"model": YOLOv10DetectionModel,
|
|
"trainer": YOLOv10DetectionTrainer,
|
|
"validator": YOLOv10DetectionValidator,
|
|
"predictor": YOLOv10DetectionPredictor,
|
|
},
|
|
} |