Ultralytics YOLO27:

Install Ultralytics#

Install the ultralytics package with pip, conda, or Docker, or from source, then run your first prediction with a pretrained YOLO26 model. Every method installs all required dependencies listed in pyproject.toml.

Install

Install or update the ultralytics package in a Python>=3.8 environment with PyTorch>=1.8:

pip install -U ultralytics

For the latest development version, install directly from the Ultralytics GitHub repository:

pip install git+https://github.com/ultralytics/ultralytics.git@main
Tip

PyTorch requirements vary by operating system and CUDA version. To use a specific build, install PyTorch first by following the PyTorch installation instructions, then install ultralytics.

Use Ultralytics with CLI#

Run your first prediction from the terminal with the yolo command:

yolo predict model=yolo26n.pt

The pretrained yolo26n.pt weights download automatically, the model runs on two bundled sample images, and the command prints where it saved the annotated results, runs/detect/predict on a first run. Point source at your own image, video, directory, URL, or stream, or at a webcam with source=0:

yolo predict model=yolo26n.pt source=0 show=True

predict is the mode, what to do with the model: train, val, predict, export, track, or benchmark. The task (detect, segment, semantic, depth, classify, pose, or obb) is read from the model file, so the yolo TASK MODE ARGS syntax usually needs only the mode plus arg=value pairs such as imgsz=640. See the CLI Guide for every mode and the Configuration page for all arguments.

Use Ultralytics with Python#

The same prediction in Python:

from ultralytics import YOLO

model = YOLO("yolo26n.pt")  # load a pretrained YOLO26n detection model
results = model("https://ultralytics.com/images/bus.jpg", save=True)  # predict and save the annotated image

results is a list of Results objects, one per image, carrying boxes, masks, keypoints, or class probabilities depending on the task. The Python Guide covers training, validation, export, and tracking with the same YOLO class.



Watch: Ultralytics YOLO Quick Start Guide

Ultralytics Settings#

Persistent settings such as the datasets, weights, and runs directories, the Ultralytics Platform API key, and experiment-logger toggles live in a JSON file managed with yolo settings. See the Settings page to view, change, or reset them.

What's Next#

Browse the modes YOLO runs in and the YOLO26 model sizes, then train on your own data after formatting it with the Datasets guide.

For a look ahead, explore YOLO27 (Coming Soon). Its models are not yet available; the examples above use the released YOLO26 family.

FAQ#

  • Install Ultralytics with pip using:

    pip install -U ultralytics

    This installs the latest stable release of the ultralytics package from PyPI. To install the development version directly from GitHub:

    pip install git+https://github.com/ultralytics/ultralytics.git

    Ensure the Git command-line tool is installed on your system.

  • Yes, install Ultralytics YOLO using conda with:

    conda install -c conda-forge ultralytics

    This method is a great alternative to pip, ensuring compatibility with other packages. For CUDA environments, install ultralytics together with the pytorch-gpu metapackage so conda selects a CUDA-enabled PyTorch build:

    conda install -c conda-forge ultralytics pytorch-gpu

    For more instructions, see the Conda quickstart guide.

  • Docker provides an isolated, consistent environment for Ultralytics YOLO, ensuring smooth performance across systems and avoiding local installation complexities. Official Docker images are available on Docker Hub, with variants for GPU, CPU, ARM64, NVIDIA Jetson, and Conda. To pull and run the latest image:

    # Pull the latest ultralytics image from Docker Hub
    sudo docker pull ultralytics/ultralytics:latest
    
    # Run the ultralytics image in a container with GPU support
    sudo docker run -it --ipc=host --device nvidia.com/gpu=all ultralytics/ultralytics:latest

    On Linux, CDI device requests require Docker >= 28.2.0 and NVIDIA Container Toolkit >= 1.18. For detailed Docker instructions, see the Docker quickstart guide.

  • Clone the Ultralytics repository and set up a development environment with:

    # Clone the ultralytics repository
    git clone https://github.com/ultralytics/ultralytics
    
    # Navigate to the cloned directory
    cd ultralytics
    
    # Install the package in editable mode for development
    pip install -e .

    This allows contributions to the project or experimentation with the latest source code. For forks and pinning a custom branch, see Development Installation.

  • The Ultralytics YOLO CLI simplifies running object detection tasks without Python code, enabling single-line commands for training, validation, and prediction directly from your terminal. The basic syntax is:

    yolo TASK MODE ARGS

    For example, to train a detection model:

    yolo train data=coco8.yaml model=yolo26n.pt epochs=10 lr0=0.01

    Explore more commands and usage examples in the full CLI Guide.

Comments