ultralytics/cfg/models/README.md
<a href="https://www.ultralytics.com/" target="_blank"></a>
Welcome to the Ultralytics models configuration directory. This folder contains a collection of model configuration files (*.yaml) that define Ultralytics YOLO model architectures. These configurations are used across common computer vision tasks such as object detection, image segmentation, pose estimation, oriented bounding boxes (OBB), and image classification.
Configurations are designed to run efficiently on a range of hardware, from standard CPUs to modern GPUs. Pick a base model that matches your constraints (latency, memory, and accuracy), then customize it as needed.
To get started, choose a *.yaml file (see the YAML format) and use it to train or export your model. For more details, see the Ultralytics Documentation or open a question on GitHub Issues.
Model configuration files (*.yaml) can be used directly from the Command Line Interface (CLI) via the yolo command:
# Train a YOLO26n detection model using the coco8 dataset for 100 epochs
yolo task=detect mode=train model=yolo26n.yaml data=coco8.yaml epochs=100 imgsz=640
The same YAML files can be used from Python, with the same configuration arguments as in the CLI:
from ultralytics import YOLO
# Initialize a YOLO26n model from a YAML configuration file
# This creates a model architecture without loading pre-trained weights
model = YOLO("yolo26n.yaml")
# Alternatively, load a pre-trained YOLO26n model directly
# This loads both the architecture and the weights trained on COCO
# model = YOLO("yolo26n.pt")
# Display model information (architecture, layers, parameters, etc.)
model.info()
# Train the model using the COCO8 dataset (a small subset of COCO) for 100 epochs
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)
# Run inference with the trained model on an image
results = model("path/to/image.jpg")
Ultralytics supports a variety of model architectures. Visit the Ultralytics Models documentation page for details and usage examples, including:
You can easily use any of these models by loading their configuration files (.yaml) or their pre-trained checkpoints (.pt).
Have you developed a novel YOLO variant, experimented with a unique architecture, or achieved state-of-the-art results through specific tuning? We encourage you to share your innovations with the community by contributing to our Models section! Contributions like new model configurations, architectural improvements, or performance optimizations are highly valuable and help enrich the Ultralytics ecosystem.
Sharing your work here allows others to benefit from your insights and expands the range of available model choices. It's an excellent way to showcase your expertise and make the Ultralytics YOLO platform even more versatile and powerful.
To contribute, review the Contributing Guide for instructions on submitting a Pull Request (PR).
Thank you for helping improve the Ultralytics model zoo.