---
title: models.yolo.detect.train API Reference
description: Learn about the DetectionTrainer class for training YOLO models on custom datasets. Discover methods, examples, and more.
keywords: Ultralytics, YOLO, DetectionTrainer, training, object detection, machine learning, build dataset, dataloader, detection model
---

# Reference for `ultralytics/models/yolo/detect/train.py`

!!! success "Improvements"

    This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/train.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/models/yolo/detect/train.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing) — thank you! 🙏

<br>

## ::: ultralytics.models.yolo.detect.train.DetectionTrainer

<br><br>
