ℹ️ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | PASS | download_stamp > now() - 6 MONTH | 0.3 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://docs.ultralytics.com/quickstart/ |
| Last Crawled | 2026-04-05 08:24:39 (10 days ago) |
| First Indexed | 2023-01-11 07:08:30 (3 years ago) |
| HTTP Status Code | 200 |
| Meta Title | Install Ultralytics - Ultralytics YOLO Docs |
| Meta Description | Learn how to install Ultralytics using pip, conda, or Docker. Follow our step-by-step guide for a seamless setup of Ultralytics YOLO. |
| Meta Canonical | null |
| Boilerpipe Text | Ultralytics offers a variety of installation methods, including pip, conda, and Docker. You can install YOLO via the
ultralytics
pip package for the latest stable release, or by cloning the
Ultralytics GitHub repository
for the most current version. Docker is also an option to run the package in an isolated container, which avoids local installation.
Watch:
Ultralytics YOLO Quick Start Guide
Install
Install or update the
ultralytics
package using pip by running
pip install -U ultralytics
. For more details on the
ultralytics
package, visit the
Python Package Index (PyPI)
.
# Install or upgrade the ultralytics package from PyPI
pip
install
-U
ultralytics
You can also install
ultralytics
directly from the
Ultralytics GitHub repository
. This can be useful if you want the latest development version. Ensure you have the Git command-line tool installed, and then run:
# Install the ultralytics package from GitHub
pip
install
git+https://github.com/ultralytics/ultralytics.git@main
Conda can be used as an alternative package manager to pip. For more details, visit
Anaconda
. The Ultralytics feedstock repository for updating the conda package is available at
GitHub
.
# Install the ultralytics package using conda
conda
install
-c
conda-forge
ultralytics
Note
If you are installing in a CUDA environment, it is best practice to install
ultralytics
,
pytorch
, and
pytorch-cuda
in the same command. This allows the conda package manager to resolve any conflicts. Alternatively, install
pytorch-cuda
last to override the CPU-specific
pytorch
package if necessary.
# Install all packages together using conda
conda
install
-c
pytorch
-c
nvidia
-c
conda-forge
pytorch
torchvision
pytorch-cuda
=
11
.8
ultralytics
Conda Docker Image
Ultralytics Conda Docker images are also available on
Docker Hub
. These images are based on
Miniconda3
and provide a straightforward way to start using
ultralytics
in a Conda environment.
# Set image name as a variable
t
=
ultralytics/ultralytics:latest-conda
# Pull the latest ultralytics image from Docker Hub
sudo
docker
pull
$t
# Run the ultralytics image in a container with GPU support
sudo
docker
run
-it
--ipc
=
host
--runtime
=
nvidia
--gpus
all
$t
# all GPUs
sudo
docker
run
-it
--ipc
=
host
--runtime
=
nvidia
--gpus
'"device=2,3"'
$t
# specify GPUs
Clone the
Ultralytics GitHub repository
if you are interested in contributing to development or wish to experiment with the latest source code. After cloning, navigate into the directory and install the package in editable mode
-e
using pip.
# 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
.
Use Docker to execute the
ultralytics
package in an isolated container, ensuring consistent performance across various environments. By selecting one of the official
ultralytics
images from
Docker Hub
, you avoid the complexity of local installation and gain access to a verified working environment. Ultralytics offers five main supported Docker images, each designed for high compatibility and efficiency:
Dockerfile:
GPU image recommended for training.
Dockerfile-arm64:
Optimized for ARM64 architecture, suitable for deployment on devices like Raspberry Pi and other ARM64-based platforms.
Dockerfile-cpu:
Ubuntu-based CPU-only version, suitable for inference and environments without GPUs.
Dockerfile-jetson:
Tailored for
NVIDIA Jetson
devices, integrating GPU support optimized for these platforms.
Dockerfile-python:
Minimal image with just Python and necessary dependencies, ideal for lightweight applications and development.
Dockerfile-conda:
Based on Miniconda3 with a conda installation of the
ultralytics
package.
Here are the commands to get the latest image and execute it:
# Set image name as a variable
t
=
ultralytics/ultralytics:latest
# Pull the latest ultralytics image from Docker Hub
sudo
docker
pull
$t
# Run the ultralytics image in a container with GPU support
sudo
docker
run
-it
--ipc
=
host
--runtime
=
nvidia
--gpus
all
$t
# all GPUs
sudo
docker
run
-it
--ipc
=
host
--runtime
=
nvidia
--gpus
'"device=2,3"'
$t
# specify GPUs
The above command initializes a Docker container with the latest
ultralytics
image. The
-it
flags assign a pseudo-TTY and keep stdin open, allowing interaction with the container. The
--ipc=host
flag sets the IPC (Inter-Process Communication) namespace to the host, which is essential for sharing memory between processes. The
--gpus all
flag enables access to all available GPUs inside the container, crucial for tasks requiring GPU computation.
Note: To work with files on your local machine within the container, use Docker volumes to mount a local directory into the container:
# Mount local directory to a directory inside the container
sudo
docker
run
-it
--ipc
=
host
--runtime
=
nvidia
--gpus
all
-v
/path/on/host:/path/in/container
$t
Replace
/path/on/host
with the directory path on your local machine, and
/path/in/container
with the desired path inside the Docker container.
For advanced Docker usage, explore the
Ultralytics Docker Guide
.
See the
ultralytics
pyproject.toml
file for a list of dependencies. Note that all examples above install all required dependencies.
Tip
PyTorch
requirements vary by operating system and CUDA requirements, so install PyTorch first by following the instructions at
PyTorch
.
Headless Server Installation
For server environments without a display (e.g., cloud VMs, Docker containers, CI/CD pipelines), use the
ultralytics-opencv-headless
package. This is identical to the standard
ultralytics
package but depends on
opencv-python-headless
instead of
opencv-python
, avoiding unnecessary GUI dependencies and potential
libGL
errors.
Headless Install
pip
install
ultralytics-opencv-headless
Both packages provide the same functionality and API. The headless variant simply excludes OpenCV's GUI components that require display libraries.
Advanced Installation
While the standard installation methods cover most use cases, you might need a more tailored setup for development or custom configurations.
Advanced Methods
If you need persistent custom modifications, you can fork the Ultralytics repository, make changes to
pyproject.toml
or other code, and install from your fork.
Fork
the
Ultralytics GitHub repository
to your own GitHub account.
Clone
your fork locally:
git
clone
https://github.com/YOUR_USERNAME/ultralytics.git
cd
ultralytics
Create a new branch
for your changes:
git
checkout
-b
my-custom-branch
Make your modifications
to
pyproject.toml
or other files as needed.
Commit and push
your changes:
git
add
.
git
commit
-m
"My custom changes"
git
push
origin
my-custom-branch
Install
using pip with the
git+https
syntax, pointing to your branch:
pip
install
git+https://github.com/YOUR_USERNAME/ultralytics.git@my-custom-branch
Clone the repository locally, modify files as needed, and install in editable mode.
Clone
the Ultralytics repository:
git
clone
https://github.com/ultralytics/ultralytics
cd
ultralytics
Make your modifications
to
pyproject.toml
or other files as needed.
Install
the package in editable mode (
-e
). Pip will use your modified
pyproject.toml
to resolve dependencies:
pip
install
-e
.
This approach is useful for development or testing local changes before committing.
Specify a custom Ultralytics fork in your
requirements.txt
file to ensure consistent installations across your team.
requirements.txt
# Install ultralytics from a specific git branch
git+https://github.com/YOUR_USERNAME/ultralytics.git@my-custom-branch
# Other project dependencies
flask
Install dependencies from the file:
pip
install
-r
requirements.txt
Use Ultralytics with CLI
The Ultralytics command-line interface (CLI) allows for simple single-line commands without needing a Python environment. CLI requires no customization or Python code; run all tasks from the terminal with the
yolo
command. For more on using YOLO from the command line, see the
CLI Guide
.
Example
Train a detection model for 10
epochs
with an initial learning rate of 0.01:
yolo
train
data
=
coco8.yaml
model
=
yolo26n.pt
epochs
=
10
lr0
=
0
.01
Predict a YouTube video using a pretrained segmentation model at image size 320:
yolo
predict
model
=
yolo26n-seg.pt
source
=
'https://youtu.be/LNwODJXcvt4'
imgsz
=
320
Validate a pretrained detection model with a batch size of 1 and image size of 640:
yolo
val
model
=
yolo26n.pt
data
=
coco8.yaml
batch
=
1
imgsz
=
640
Export a YOLO26n classification model to ONNX format with an image size of 224x128 (no TASK required):
yolo
export
model
=
yolo26n-cls.pt
format
=
onnx
imgsz
=
224
,128
Count objects in a video or live stream using YOLO26:
yolo
solutions
count
show
=
True
yolo
solutions
count
source
=
"path/to/video.mp4"
# specify video file path
Monitor workout exercises using a YOLO26 pose model:
yolo
solutions
workout
show
=
True
yolo
solutions
workout
source
=
"path/to/video.mp4"
# specify video file path
# Use keypoints for ab-workouts
yolo
solutions
workout
kpts
=
"[5, 11, 13]"
# left side
yolo
solutions
workout
kpts
=
"[6, 12, 14]"
# right side
Use YOLO26 to count objects in a designated queue or region:
yolo
solutions
queue
show
=
True
yolo
solutions
queue
source
=
"path/to/video.mp4"
# specify video file path
yolo
solutions
queue
region
=
"[(20, 400), (1080, 400), (1080, 360), (20, 360)]"
# configure queue coordinates
Perform object detection, instance segmentation, or pose estimation in a web browser using
Streamlit
:
yolo
solutions
inference
yolo
solutions
inference
model
=
"path/to/model.pt"
# use model fine-tuned with Ultralytics Python package
Run special commands to see the version, view settings, run checks, and more:
yolo
help
yolo
checks
yolo
version
yolo
settings
yolo
copy-cfg
yolo
cfg
yolo
solutions
help
Warning
Arguments must be passed as
arg=value
pairs, split by an equals
=
sign and delimited by spaces. Do not use
--
argument prefixes or commas
,
between arguments.
yolo predict model=yolo26n.pt imgsz=640 conf=0.25
✅
yolo predict model yolo26n.pt imgsz 640 conf 0.25
❌ (missing
=
)
yolo predict model=yolo26n.pt, imgsz=640, conf=0.25
❌ (do not use
,
)
yolo predict --model yolo26n.pt --imgsz 640 --conf 0.25
❌ (do not use
--
)
yolo solution model=yolo26n.pt imgsz=640 conf=0.25
❌ (use
solutions
, not
solution
)
CLI Guide
Use Ultralytics with Python
The Ultralytics YOLO Python interface offers seamless integration into Python projects, making it easy to load, run, and process model outputs. Designed for simplicity, the Python interface allows users to quickly implement
object detection
, segmentation, and classification. This makes the YOLO Python interface an invaluable tool for incorporating these functionalities into Python projects.
For instance, users can load a model, train it, evaluate its performance, and export it to ONNX format with just a few lines of code. Explore the
Python Guide
to learn more about using YOLO within your Python projects.
Example
from
ultralytics
import
YOLO
# Create a new YOLO model from scratch
model
=
YOLO
(
"yolo26n.yaml"
)
# Load a pretrained YOLO model (recommended for training)
model
=
YOLO
(
"yolo26n.pt"
)
# Train the model using the 'coco8.yaml' dataset for 3 epochs
results
=
model
.
train
(
data
=
"coco8.yaml"
,
epochs
=
3
)
# Evaluate the model's performance on the validation set
results
=
model
.
val
()
# Perform object detection on an image using the model
results
=
model
(
"https://ultralytics.com/images/bus.jpg"
)
# Export the model to ONNX format
success
=
model
.
export
(
format
=
"onnx"
)
Python Guide
Ultralytics Settings
The Ultralytics library includes a
SettingsManager
for fine-grained control over experiments, allowing users to access and modify settings easily. Stored in a JSON file within the environment's user configuration directory, these settings can be viewed or modified in the Python environment or via the Command-Line Interface (CLI).
Inspecting Settings
To view the current configuration of your settings:
View settings
Use Python to view your settings by importing the
settings
object from the
ultralytics
module. Print and return settings with these commands:
from
ultralytics
import
settings
# View all settings
print
(
settings
)
# Return a specific setting
value
=
settings
[
"runs_dir"
]
The command-line interface allows you to check your settings with:
yolo
settings
Modifying Settings
Ultralytics makes it easy to modify settings in the following ways:
Update settings
In Python, use the
update
method on the
settings
object:
from
ultralytics
import
settings
# Update a setting
settings
.
update
({
"runs_dir"
:
"/path/to/runs"
})
# Update multiple settings
settings
.
update
({
"runs_dir"
:
"/path/to/runs"
,
"tensorboard"
:
False
})
# Reset settings to default values
settings
.
reset
()
To modify settings using the command-line interface:
# Update a setting
yolo
settings
runs_dir
=
'/path/to/runs'
# Update multiple settings
yolo
settings
runs_dir
=
'/path/to/runs'
tensorboard
=
False
# Reset settings to default values
yolo
settings
reset
Understanding Settings
The table below overviews the adjustable settings within Ultralytics, including example values, data types, and descriptions.
Name
Example Value
Data Type
Description
settings_version
'0.0.4'
str
Ultralytics
settings
version (distinct from the Ultralytics
pip
version)
datasets_dir
'/path/to/datasets'
str
Directory where datasets are stored
weights_dir
'/path/to/weights'
str
Directory where model weights are stored
runs_dir
'/path/to/runs'
str
Directory where experiment runs are stored
uuid
'a1b2c3d4'
str
Unique identifier for the current settings
sync
True
bool
Option to sync analytics and crashes to
Ultralytics Platform
api_key
''
str
Ultralytics Platform
API Key
clearml
True
bool
Option to use
ClearML
logging
comet
True
bool
Option to use
Comet ML
for experiment tracking and visualization
dvc
True
bool
Option to use
DVC for experiment tracking
and version control
hub
True
bool
Option to use
Ultralytics Platform
integration
mlflow
True
bool
Option to use
MLFlow
for experiment tracking
neptune
True
bool
Option to use
Neptune
for experiment tracking
raytune
True
bool
Option to use
Ray Tune
for
hyperparameter tuning
tensorboard
True
bool
Option to use
TensorBoard
for visualization
wandb
True
bool
Option to use
Weights & Biases
logging
vscode_msg
True
bool
When a VS Code terminal is detected, enables a prompt to download the
Ultralytics-Snippets
extension.
Revisit these settings as you progress through projects or experiments to ensure optimal configuration.
FAQ
How do I install Ultralytics using pip?
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.
Can I install Ultralytics YOLO using conda?
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
,
pytorch
, and
pytorch-cuda
together to resolve conflicts:
conda
install
-c
pytorch
-c
nvidia
-c
conda-forge
pytorch
torchvision
pytorch-cuda
=
11
.8
ultralytics
For more instructions, see the
Conda quickstart guide
.
What are the advantages of using Docker to run Ultralytics YOLO?
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
--runtime
=
nvidia
--gpus
all
ultralytics/ultralytics:latest
For detailed Docker instructions, see the
Docker quickstart guide
.
How do I clone the Ultralytics repository for development?
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 details, visit the
Ultralytics GitHub repository
.
Why should I use Ultralytics YOLO CLI?
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
. |
| Markdown | [Skip to content](https://docs.ultralytics.com/quickstart/#install-ultralytics)
[ Introducing Ultralytics Platform: Annotate, train, and deploy YOLO models](https://platform.ultralytics.com/)
[](https://www.ultralytics.com/ "Ultralytics YOLO Docs")
Ultralytics YOLO Docs
Install Ultralytics
- [🇬🇧 English](https://docs.ultralytics.com/quickstart/)
- [🇨🇳 简体中文](https://docs.ultralytics.com/zh/quickstart/)
- [🇰🇷 한국어](https://docs.ultralytics.com/ko/quickstart/)
- [🇯🇵 日本語](https://docs.ultralytics.com/ja/quickstart/)
- [🇷🇺 Русский](https://docs.ultralytics.com/ru/quickstart/)
- [🇩🇪 Deutsch](https://docs.ultralytics.com/de/quickstart/)
- [🇫🇷 Français](https://docs.ultralytics.com/fr/quickstart/)
- [🇪🇸 Español](https://docs.ultralytics.com/es/quickstart/)
- [🇵🇹 Português](https://docs.ultralytics.com/pt/quickstart/)
- [🇮🇹 Italiano](https://docs.ultralytics.com/it/quickstart/)
- [🇹🇷 Türkçe](https://docs.ultralytics.com/tr/quickstart/)
- [🇻🇳 Tiếng Việt](https://docs.ultralytics.com/vi/quickstart/)
- [🇸🇦 العربية](https://docs.ultralytics.com/ar/quickstart/)
Search Ctrl+K
[ultralytics/ultralytics v8.4.33 55.4k 10.7k](https://github.com/ultralytics/ultralytics "Go to repository")
- [Home](https://docs.ultralytics.com/)
- [Modes](https://docs.ultralytics.com/modes/)
- [Tasks](https://docs.ultralytics.com/tasks/)
- [Models](https://docs.ultralytics.com/models/)
- [Compare](https://docs.ultralytics.com/compare/)
- [Datasets](https://docs.ultralytics.com/datasets/)
- [Solutions](https://docs.ultralytics.com/solutions/)
- [Guides](https://docs.ultralytics.com/guides/)
- [Integrations](https://docs.ultralytics.com/integrations/)
- [Platform](https://docs.ultralytics.com/platform/)
- [Reference](https://docs.ultralytics.com/reference/__init__/)
- [Help](https://docs.ultralytics.com/help/)
[](https://www.ultralytics.com/ "Ultralytics YOLO Docs") Ultralytics YOLO Docs
[ultralytics/ultralytics v8.4.33 55.4k 10.7k](https://github.com/ultralytics/ultralytics "Go to repository")
- [Home](https://docs.ultralytics.com/)
Home
- Quickstart
[Quickstart](https://docs.ultralytics.com/quickstart/)
On this page
- [Conda Docker Image](https://docs.ultralytics.com/quickstart/#conda-docker-image)
- [Headless Server Installation](https://docs.ultralytics.com/quickstart/#headless-server-installation)
- [Advanced Installation](https://docs.ultralytics.com/quickstart/#advanced-installation)
- [Use Ultralytics with CLI](https://docs.ultralytics.com/quickstart/#use-ultralytics-with-cli)
- [Use Ultralytics with Python](https://docs.ultralytics.com/quickstart/#use-ultralytics-with-python)
- [Ultralytics Settings](https://docs.ultralytics.com/quickstart/#ultralytics-settings)
- [Inspecting Settings](https://docs.ultralytics.com/quickstart/#inspecting-settings)
- [Modifying Settings](https://docs.ultralytics.com/quickstart/#modifying-settings)
- [Understanding Settings](https://docs.ultralytics.com/quickstart/#understanding-settings)
- [FAQ](https://docs.ultralytics.com/quickstart/#faq)
- [How do I install Ultralytics using pip?](https://docs.ultralytics.com/quickstart/#how-do-i-install-ultralytics-using-pip)
- [Can I install Ultralytics YOLO using conda?](https://docs.ultralytics.com/quickstart/#can-i-install-ultralytics-yolo-using-conda)
- [What are the advantages of using Docker to run Ultralytics YOLO?](https://docs.ultralytics.com/quickstart/#what-are-the-advantages-of-using-docker-to-run-ultralytics-yolo)
- [How do I clone the Ultralytics repository for development?](https://docs.ultralytics.com/quickstart/#how-do-i-clone-the-ultralytics-repository-for-development)
- [Why should I use Ultralytics YOLO CLI?](https://docs.ultralytics.com/quickstart/#why-should-i-use-ultralytics-yolo-cli)
- Usage
Usage
- [CLI](https://docs.ultralytics.com/usage/cli/)
- [Python](https://docs.ultralytics.com/usage/python/)
- [Callbacks](https://docs.ultralytics.com/usage/callbacks/)
- [Configuration](https://docs.ultralytics.com/usage/cfg/)
- [Simple Utilities](https://docs.ultralytics.com/usage/simple-utilities/)
- [Advanced Customization](https://docs.ultralytics.com/usage/engine/)
- [YOLO26 🚀](https://docs.ultralytics.com/models/yolo26/)
- Languages
Languages
- [🇬🇧 English](https://ultralytics.com/docs/)
- [🇨🇳 简体中文](https://docs.ultralytics.com/zh/)
- [🇰🇷 한국어](https://docs.ultralytics.com/ko/)
- [🇯🇵 日本語](https://docs.ultralytics.com/ja/)
- [🇷🇺 Русский](https://docs.ultralytics.com/ru/)
- [🇩🇪 Deutsch](https://docs.ultralytics.com/de/)
- [🇫🇷 Français](https://docs.ultralytics.com/fr/)
- [🇪🇸 Español](https://docs.ultralytics.com/es/)
- [🇵🇹 Português](https://docs.ultralytics.com/pt/)
- [🇮🇹 Italiano](https://docs.ultralytics.com/it/)
- [🇹🇷 Türkçe](https://docs.ultralytics.com/tr/)
- [🇻🇳 Tiếng Việt](https://docs.ultralytics.com/vi/)
- [🇸🇦 العربية](https://docs.ultralytics.com/ar/)
- [Ultralytics YOLO26 Modes](https://docs.ultralytics.com/modes/)
- [Computer Vision Tasks Supported by Ultralytics YOLO26](https://docs.ultralytics.com/tasks/)
- [Models Supported by Ultralytics](https://docs.ultralytics.com/models/)
- [Model Comparisons: Choose the Best Object Detection Model for Your Project](https://docs.ultralytics.com/compare/)
- [Datasets](https://docs.ultralytics.com/datasets/)
- [Solutions](https://docs.ultralytics.com/solutions/)
- [Guides](https://docs.ultralytics.com/guides/)
- [Integrations](https://docs.ultralytics.com/integrations/)
- [Platform](https://docs.ultralytics.com/platform/)
- [Reference](https://docs.ultralytics.com/reference/__init__/)
- [Help](https://docs.ultralytics.com/help/)
On this page
- [Conda Docker Image](https://docs.ultralytics.com/quickstart/#conda-docker-image)
- [Headless Server Installation](https://docs.ultralytics.com/quickstart/#headless-server-installation)
- [Advanced Installation](https://docs.ultralytics.com/quickstart/#advanced-installation)
- [Use Ultralytics with CLI](https://docs.ultralytics.com/quickstart/#use-ultralytics-with-cli)
- [Use Ultralytics with Python](https://docs.ultralytics.com/quickstart/#use-ultralytics-with-python)
- [Ultralytics Settings](https://docs.ultralytics.com/quickstart/#ultralytics-settings)
- [Inspecting Settings](https://docs.ultralytics.com/quickstart/#inspecting-settings)
- [Modifying Settings](https://docs.ultralytics.com/quickstart/#modifying-settings)
- [Understanding Settings](https://docs.ultralytics.com/quickstart/#understanding-settings)
- [FAQ](https://docs.ultralytics.com/quickstart/#faq)
- [How do I install Ultralytics using pip?](https://docs.ultralytics.com/quickstart/#how-do-i-install-ultralytics-using-pip)
- [Can I install Ultralytics YOLO using conda?](https://docs.ultralytics.com/quickstart/#can-i-install-ultralytics-yolo-using-conda)
- [What are the advantages of using Docker to run Ultralytics YOLO?](https://docs.ultralytics.com/quickstart/#what-are-the-advantages-of-using-docker-to-run-ultralytics-yolo)
- [How do I clone the Ultralytics repository for development?](https://docs.ultralytics.com/quickstart/#how-do-i-clone-the-ultralytics-repository-for-development)
- [Why should I use Ultralytics YOLO CLI?](https://docs.ultralytics.com/quickstart/#why-should-i-use-ultralytics-yolo-cli)
# Install Ultralytics
Ultralytics offers a variety of installation methods, including pip, conda, and Docker. You can install YOLO via the `ultralytics` pip package for the latest stable release, or by cloning the [Ultralytics GitHub repository](https://github.com/ultralytics/ultralytics) for the most current version. Docker is also an option to run the package in an isolated container, which avoids local installation.
**Watch:** Ultralytics YOLO Quick Start Guide
Install

[Pip install (recommended)](https://docs.ultralytics.com/quickstart/#pip-install-recommended)
[Conda install](https://docs.ultralytics.com/quickstart/#conda-install)
[Git clone](https://docs.ultralytics.com/quickstart/#git-clone)
[Docker](https://docs.ultralytics.com/quickstart/#docker)
Install or update the `ultralytics` package using pip by running `pip install -U ultralytics`. For more details on the `ultralytics` package, visit the [Python Package Index (PyPI)](https://pypi.org/project/ultralytics/).
[](https://pypi.org/project/ultralytics/)[](https://clickpy.clickhouse.com/dashboard/ultralytics)
```
```
You can also install `ultralytics` directly from the [Ultralytics GitHub repository](https://github.com/ultralytics/ultralytics). This can be useful if you want the latest development version. Ensure you have the Git command-line tool installed, and then run:
```
```
Conda can be used as an alternative package manager to pip. For more details, visit [Anaconda](https://anaconda.org/conda-forge/ultralytics). The Ultralytics feedstock repository for updating the conda package is available at [GitHub](https://github.com/conda-forge/ultralytics-feedstock/).
[](https://anaconda.org/conda-forge/ultralytics)[](https://anaconda.org/conda-forge/ultralytics)[](https://anaconda.org/conda-forge/ultralytics)[](https://anaconda.org/conda-forge/ultralytics)
```
```
Note
If you are installing in a CUDA environment, it is best practice to install `ultralytics`, `pytorch`, and `pytorch-cuda` in the same command. This allows the conda package manager to resolve any conflicts. Alternatively, install `pytorch-cuda` last to override the CPU-specific `pytorch` package if necessary.
```
```
### Conda Docker Image
Ultralytics Conda Docker images are also available on [Docker Hub](https://hub.docker.com/r/ultralytics/ultralytics). These images are based on [Miniconda3](https://www.anaconda.com/docs/main) and provide a straightforward way to start using `ultralytics` in a Conda environment.
```
```
Clone the [Ultralytics GitHub repository](https://github.com/ultralytics/ultralytics) if you are interested in contributing to development or wish to experiment with the latest source code. After cloning, navigate into the directory and install the package in editable mode `-e` using pip.
[](https://github.com/ultralytics/ultralytics)[](https://github.com/ultralytics/ultralytics)
```
```
Use Docker to execute the `ultralytics` package in an isolated container, ensuring consistent performance across various environments. By selecting one of the official `ultralytics` images from [Docker Hub](https://hub.docker.com/r/ultralytics/ultralytics), you avoid the complexity of local installation and gain access to a verified working environment. Ultralytics offers five main supported Docker images, each designed for high compatibility and efficiency:
[](https://hub.docker.com/r/ultralytics/ultralytics)[](https://hub.docker.com/r/ultralytics/ultralytics)
- **Dockerfile:** GPU image recommended for training.
- **Dockerfile-arm64:** Optimized for ARM64 architecture, suitable for deployment on devices like Raspberry Pi and other ARM64-based platforms.
- **Dockerfile-cpu:** Ubuntu-based CPU-only version, suitable for inference and environments without GPUs.
- **Dockerfile-jetson:** Tailored for [NVIDIA Jetson](https://docs.ultralytics.com/guides/nvidia-jetson/) devices, integrating GPU support optimized for these platforms.
- **Dockerfile-python:** Minimal image with just Python and necessary dependencies, ideal for lightweight applications and development.
- **Dockerfile-conda:** Based on Miniconda3 with a conda installation of the `ultralytics` package.
Here are the commands to get the latest image and execute it:
```
```
The above command initializes a Docker container with the latest `ultralytics` image. The `-it` flags assign a pseudo-TTY and keep stdin open, allowing interaction with the container. The `--ipc=host` flag sets the IPC (Inter-Process Communication) namespace to the host, which is essential for sharing memory between processes. The `--gpus all` flag enables access to all available GPUs inside the container, crucial for tasks requiring GPU computation.
Note: To work with files on your local machine within the container, use Docker volumes to mount a local directory into the container:
```
```
Replace `/path/on/host` with the directory path on your local machine, and `/path/in/container` with the desired path inside the Docker container.
For advanced Docker usage, explore the [Ultralytics Docker Guide](https://docs.ultralytics.com/guides/docker-quickstart/).
See the `ultralytics` [pyproject.toml](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) file for a list of dependencies. Note that all examples above install all required dependencies.
Tip
[PyTorch](https://www.ultralytics.com/glossary/pytorch) requirements vary by operating system and CUDA requirements, so install PyTorch first by following the instructions at [PyTorch](https://pytorch.org/get-started/locally/).
[](https://pytorch.org/get-started/locally/)
## Headless Server Installation
For server environments without a display (e.g., cloud VMs, Docker containers, CI/CD pipelines), use the `ultralytics-opencv-headless` package. This is identical to the standard `ultralytics` package but depends on `opencv-python-headless` instead of `opencv-python`, avoiding unnecessary GUI dependencies and potential `libGL` errors.
Headless Install
```
pip install ultralytics-opencv-headless
```
Both packages provide the same functionality and API. The headless variant simply excludes OpenCV's GUI components that require display libraries.
## Advanced Installation
While the standard installation methods cover most use cases, you might need a more tailored setup for development or custom configurations.
Advanced Methods
[Install from Fork](https://docs.ultralytics.com/quickstart/#install-from-fork)
[Local Clone and Install](https://docs.ultralytics.com/quickstart/#local-clone-and-install)
[Use requirements.txt](https://docs.ultralytics.com/quickstart/#use-requirementstxt)
If you need persistent custom modifications, you can fork the Ultralytics repository, make changes to `pyproject.toml` or other code, and install from your fork.
1. **Fork** the [Ultralytics GitHub repository](https://github.com/ultralytics/ultralytics) to your own GitHub account.
2. **Clone** your fork locally:
```
```
3. **Create a new branch** for your changes:
```
git checkout -b my-custom-branch
```
4. **Make your modifications** to `pyproject.toml` or other files as needed.
5. **Commit and push** your changes:
```
```
6. **Install** using pip with the `git+https` syntax, pointing to your branch:
```
pip install git+https://github.com/YOUR_USERNAME/ultralytics.git@my-custom-branch
```
Clone the repository locally, modify files as needed, and install in editable mode.
1. **Clone** the Ultralytics repository:
```
```
2. **Make your modifications** to `pyproject.toml` or other files as needed.
3. **Install** the package in editable mode (`-e`). Pip will use your modified `pyproject.toml` to resolve dependencies:
```
pip install -e .
```
This approach is useful for development or testing local changes before committing.
Specify a custom Ultralytics fork in your `requirements.txt` file to ensure consistent installations across your team.
requirements.txt
```
```
Install dependencies from the file:
```
pip install -r requirements.txt
```
## Use Ultralytics with CLI
The Ultralytics command-line interface (CLI) allows for simple single-line commands without needing a Python environment. CLI requires no customization or Python code; run all tasks from the terminal with the `yolo` command. For more on using YOLO from the command line, see the [CLI Guide](https://docs.ultralytics.com/usage/cli/).
Example
[Syntax](https://docs.ultralytics.com/quickstart/#syntax)
[Train](https://docs.ultralytics.com/quickstart/#train)
[Predict](https://docs.ultralytics.com/quickstart/#predict)
[Val](https://docs.ultralytics.com/quickstart/#val)
[Export](https://docs.ultralytics.com/quickstart/#export)
[Count](https://docs.ultralytics.com/quickstart/#count)
[Workout](https://docs.ultralytics.com/quickstart/#workout)
[Queue](https://docs.ultralytics.com/quickstart/#queue)
[Inference with Streamlit](https://docs.ultralytics.com/quickstart/#inference-with-streamlit)
[Special](https://docs.ultralytics.com/quickstart/#special)
Ultralytics `yolo` commands use the following syntax:
```
yolo TASK MODE ARGS
```
\- `TASK` (optional) is one of ([detect](https://docs.ultralytics.com/tasks/detect/), [segment](https://docs.ultralytics.com/tasks/segment/), [classify](https://docs.ultralytics.com/tasks/classify/), [pose](https://docs.ultralytics.com/tasks/pose/), [obb](https://docs.ultralytics.com/tasks/obb/)) - `MODE` (required) is one of ([train](https://docs.ultralytics.com/modes/train/), [val](https://docs.ultralytics.com/modes/val/), [predict](https://docs.ultralytics.com/modes/predict/), [export](https://docs.ultralytics.com/modes/export/), [track](https://docs.ultralytics.com/modes/track/), [benchmark](https://docs.ultralytics.com/modes/benchmark/)) - `ARGS` (optional) are `arg=value` pairs like `imgsz=640` that override defaults.
See all `ARGS` in the full [Configuration Guide](https://docs.ultralytics.com/usage/cfg/) or with the `yolo cfg` CLI command.
Train a detection model for 10 [epochs](https://www.ultralytics.com/glossary/epoch) with an initial learning rate of 0.01:
```
yolo train data=coco8.yaml model=yolo26n.pt epochs=10 lr0=0.01
```
Predict a YouTube video using a pretrained segmentation model at image size 320:
```
yolo predict model=yolo26n-seg.pt source='https://youtu.be/LNwODJXcvt4' imgsz=320
```
Validate a pretrained detection model with a batch size of 1 and image size of 640:
```
yolo val model=yolo26n.pt data=coco8.yaml batch=1 imgsz=640
```
Export a YOLO26n classification model to ONNX format with an image size of 224x128 (no TASK required):
```
yolo export model=yolo26n-cls.pt format=onnx imgsz=224,128
```
Count objects in a video or live stream using YOLO26:
```
```
Monitor workout exercises using a YOLO26 pose model:
```
```
Use YOLO26 to count objects in a designated queue or region:
```
```
Perform object detection, instance segmentation, or pose estimation in a web browser using [Streamlit](https://docs.ultralytics.com/reference/solutions/streamlit_inference/):
```
```
Run special commands to see the version, view settings, run checks, and more:
```
```
Warning
Arguments must be passed as `arg=value` pairs, split by an equals `=` sign and delimited by spaces. Do not use `--` argument prefixes or commas `,` between arguments.
- `yolo predict model=yolo26n.pt imgsz=640 conf=0.25` ✅
- `yolo predict model yolo26n.pt imgsz 640 conf 0.25` ❌ (missing `=`)
- `yolo predict model=yolo26n.pt, imgsz=640, conf=0.25` ❌ (do not use `,`)
- `yolo predict --model yolo26n.pt --imgsz 640 --conf 0.25` ❌ (do not use `--`)
- `yolo solution model=yolo26n.pt imgsz=640 conf=0.25` ❌ (use `solutions`, not `solution`)
[CLI Guide](https://docs.ultralytics.com/usage/cli/)
## Use Ultralytics with Python
The Ultralytics YOLO Python interface offers seamless integration into Python projects, making it easy to load, run, and process model outputs. Designed for simplicity, the Python interface allows users to quickly implement [object detection](https://www.ultralytics.com/glossary/object-detection), segmentation, and classification. This makes the YOLO Python interface an invaluable tool for incorporating these functionalities into Python projects.
For instance, users can load a model, train it, evaluate its performance, and export it to ONNX format with just a few lines of code. Explore the [Python Guide](https://docs.ultralytics.com/usage/python/) to learn more about using YOLO within your Python projects.
Example
```
```
[Python Guide](https://docs.ultralytics.com/usage/python/)
## Ultralytics Settings
The Ultralytics library includes a `SettingsManager` for fine-grained control over experiments, allowing users to access and modify settings easily. Stored in a JSON file within the environment's user configuration directory, these settings can be viewed or modified in the Python environment or via the Command-Line Interface (CLI).
### Inspecting Settings
To view the current configuration of your settings:
View settings
[Python](https://docs.ultralytics.com/quickstart/#python)
[CLI](https://docs.ultralytics.com/quickstart/#cli)
Use Python to view your settings by importing the `settings` object from the `ultralytics` module. Print and return settings with these commands:
```
```
The command-line interface allows you to check your settings with:
```
yolo settings
```
### Modifying Settings
Ultralytics makes it easy to modify settings in the following ways:
Update settings
[Python](https://docs.ultralytics.com/quickstart/#python_1)
[CLI](https://docs.ultralytics.com/quickstart/#cli_1)
In Python, use the `update` method on the `settings` object:
```
```
To modify settings using the command-line interface:
```
```
### Understanding Settings
The table below overviews the adjustable settings within Ultralytics, including example values, data types, and descriptions.
| Name | Example Value | Data Type | Description |
|---|---|---|---|
| `settings_version` | `'0.0.4'` | `str` | Ultralytics *settings* version (distinct from the Ultralytics [pip](https://pypi.org/project/ultralytics/) version) |
| `datasets_dir` | `'/path/to/datasets'` | `str` | Directory where datasets are stored |
| `weights_dir` | `'/path/to/weights'` | `str` | Directory where model weights are stored |
| `runs_dir` | `'/path/to/runs'` | `str` | Directory where experiment runs are stored |
| `uuid` | `'a1b2c3d4'` | `str` | Unique identifier for the current settings |
| `sync` | `True` | `bool` | Option to sync analytics and crashes to [Ultralytics Platform](https://platform.ultralytics.com/) |
| `api_key` | `''` | `str` | [Ultralytics Platform](https://platform.ultralytics.com/) API Key |
| `clearml` | `True` | `bool` | Option to use [ClearML](https://docs.ultralytics.com/integrations/clearml/) logging |
| `comet` | `True` | `bool` | Option to use [Comet ML](https://bit.ly/yolov8-readme-comet) for experiment tracking and visualization |
| `dvc` | `True` | `bool` | Option to use [DVC for experiment tracking](https://dvc.org/doc/dvclive/ml-frameworks/yolo) and version control |
| `hub` | `True` | `bool` | Option to use [Ultralytics Platform](https://platform.ultralytics.com/) integration |
| `mlflow` | `True` | `bool` | Option to use [MLFlow](https://docs.ultralytics.com/integrations/mlflow/) for experiment tracking |
| `neptune` | `True` | `bool` | Option to use [Neptune](https://neptune.ai/) for experiment tracking |
| `raytune` | `True` | `bool` | Option to use [Ray Tune](https://docs.ultralytics.com/integrations/ray-tune/) for [hyperparameter tuning](https://www.ultralytics.com/glossary/hyperparameter-tuning) |
| `tensorboard` | `True` | `bool` | Option to use [TensorBoard](https://docs.ultralytics.com/integrations/tensorboard/) for visualization |
| `wandb` | `True` | `bool` | Option to use [Weights & Biases](https://docs.ultralytics.com/integrations/weights-biases/) logging |
| `vscode_msg` | `True` | `bool` | When a VS Code terminal is detected, enables a prompt to download the [Ultralytics-Snippets](https://docs.ultralytics.com/integrations/vscode/) extension. |
Revisit these settings as you progress through projects or experiments to ensure optimal configuration.
## FAQ
### How do I install Ultralytics using pip?
Install Ultralytics with pip using:
```
pip install -U ultralytics
```
This installs the latest stable release of the `ultralytics` package from [PyPI](https://pypi.org/project/ultralytics/). 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.
### Can I install Ultralytics YOLO using conda?
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`, `pytorch`, and `pytorch-cuda` together to resolve conflicts:
```
conda install -c pytorch -c nvidia -c conda-forge pytorch torchvision pytorch-cuda=11.8 ultralytics
```
For more instructions, see the [Conda quickstart guide](https://docs.ultralytics.com/guides/conda-quickstart/).
### What are the advantages of using Docker to run Ultralytics YOLO?
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](https://hub.docker.com/r/ultralytics/ultralytics), with variants for GPU, CPU, ARM64, [NVIDIA Jetson](https://docs.ultralytics.com/guides/nvidia-jetson/), and Conda. To pull and run the latest image:
```
```
For detailed Docker instructions, see the [Docker quickstart guide](https://docs.ultralytics.com/guides/docker-quickstart/).
### How do I clone the Ultralytics repository for development?
Clone the Ultralytics repository and set up a development environment with:
```
```
This allows contributions to the project or experimentation with the latest source code. For details, visit the [Ultralytics GitHub repository](https://github.com/ultralytics/ultralytics).
### Why should I use Ultralytics YOLO CLI?
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](https://docs.ultralytics.com/usage/cli/).
📅 Created 2 years ago ✏️ Updated 2 months ago
[](https://github.com/glenn-jocher "glenn-jocher (26 changes)")[](https://github.com/RizwanMunawar "RizwanMunawar (4 changes)")[](https://github.com/pderrenger "pderrenger (3 changes)")[](https://github.com/Burhan-Q "Burhan-Q (3 changes)")[](https://github.com/Laughing-q "Laughing-q (2 changes)")[](https://github.com/onuralpszr "onuralpszr (2 changes)")[](https://github.com/jk4e "jk4e (2 changes)")[](https://github.com/RizwanMunawar "RizwanMunawar (2 changes)")[](https://github.com/fcakyon "fcakyon (1 change)")[](https://github.com/lakshanthad "lakshanthad (1 change)")[](https://github.com/picsalex "picsalex (1 change)")[](https://github.com/leonnil "leonnil (1 change)")[](https://github.com/MatthewNoyce "MatthewNoyce (1 change)")[](https://github.com/UltralyticsAssistant "UltralyticsAssistant (1 change)")
Tweet
Share
## Comments
Back to top
[Previous Home](https://docs.ultralytics.com/)
[Next CLI](https://docs.ultralytics.com/usage/cli/)
[© 2026 Ultralytics Inc.](https://www.ultralytics.com/) All rights reserved.
Made with [Zensical](https://zensical.org/)
Ask AI
[](https://www.ultralytics.com/)
Ask anything about Ultralytics, YOLO, and more
Hello 👋
Ask about YOLO, tutorials, training, export, deployment, or troubleshooting.
What's new in SAM 3?
How can I get started with YOLO26?
How does Enterprise Licensing work?
Search
GitHub
Powered by [Ultralytics Chat](https://github.com/ultralytics/llm) |
| Readable Markdown | Ultralytics offers a variety of installation methods, including pip, conda, and Docker. You can install YOLO via the `ultralytics` pip package for the latest stable release, or by cloning the [Ultralytics GitHub repository](https://github.com/ultralytics/ultralytics) for the most current version. Docker is also an option to run the package in an isolated container, which avoids local installation.
**Watch:** Ultralytics YOLO Quick Start Guide
Install

Install or update the `ultralytics` package using pip by running `pip install -U ultralytics`. For more details on the `ultralytics` package, visit the [Python Package Index (PyPI)](https://pypi.org/project/ultralytics/).
[](https://pypi.org/project/ultralytics/)[](https://clickpy.clickhouse.com/dashboard/ultralytics)
```
```
You can also install `ultralytics` directly from the [Ultralytics GitHub repository](https://github.com/ultralytics/ultralytics). This can be useful if you want the latest development version. Ensure you have the Git command-line tool installed, and then run:
```
```
Conda can be used as an alternative package manager to pip. For more details, visit [Anaconda](https://anaconda.org/conda-forge/ultralytics). The Ultralytics feedstock repository for updating the conda package is available at [GitHub](https://github.com/conda-forge/ultralytics-feedstock/).
[](https://anaconda.org/conda-forge/ultralytics)[](https://anaconda.org/conda-forge/ultralytics)[](https://anaconda.org/conda-forge/ultralytics)[](https://anaconda.org/conda-forge/ultralytics)
```
```
Note
If you are installing in a CUDA environment, it is best practice to install `ultralytics`, `pytorch`, and `pytorch-cuda` in the same command. This allows the conda package manager to resolve any conflicts. Alternatively, install `pytorch-cuda` last to override the CPU-specific `pytorch` package if necessary.
```
```
### Conda Docker Image
Ultralytics Conda Docker images are also available on [Docker Hub](https://hub.docker.com/r/ultralytics/ultralytics). These images are based on [Miniconda3](https://www.anaconda.com/docs/main) and provide a straightforward way to start using `ultralytics` in a Conda environment.
```
```
Clone the [Ultralytics GitHub repository](https://github.com/ultralytics/ultralytics) if you are interested in contributing to development or wish to experiment with the latest source code. After cloning, navigate into the directory and install the package in editable mode `-e` using pip.
[](https://github.com/ultralytics/ultralytics)[](https://github.com/ultralytics/ultralytics)
```
```
Use Docker to execute the `ultralytics` package in an isolated container, ensuring consistent performance across various environments. By selecting one of the official `ultralytics` images from [Docker Hub](https://hub.docker.com/r/ultralytics/ultralytics), you avoid the complexity of local installation and gain access to a verified working environment. Ultralytics offers five main supported Docker images, each designed for high compatibility and efficiency:
[](https://hub.docker.com/r/ultralytics/ultralytics)[](https://hub.docker.com/r/ultralytics/ultralytics)
- **Dockerfile:** GPU image recommended for training.
- **Dockerfile-arm64:** Optimized for ARM64 architecture, suitable for deployment on devices like Raspberry Pi and other ARM64-based platforms.
- **Dockerfile-cpu:** Ubuntu-based CPU-only version, suitable for inference and environments without GPUs.
- **Dockerfile-jetson:** Tailored for [NVIDIA Jetson](https://docs.ultralytics.com/guides/nvidia-jetson/) devices, integrating GPU support optimized for these platforms.
- **Dockerfile-python:** Minimal image with just Python and necessary dependencies, ideal for lightweight applications and development.
- **Dockerfile-conda:** Based on Miniconda3 with a conda installation of the `ultralytics` package.
Here are the commands to get the latest image and execute it:
```
```
The above command initializes a Docker container with the latest `ultralytics` image. The `-it` flags assign a pseudo-TTY and keep stdin open, allowing interaction with the container. The `--ipc=host` flag sets the IPC (Inter-Process Communication) namespace to the host, which is essential for sharing memory between processes. The `--gpus all` flag enables access to all available GPUs inside the container, crucial for tasks requiring GPU computation.
Note: To work with files on your local machine within the container, use Docker volumes to mount a local directory into the container:
```
```
Replace `/path/on/host` with the directory path on your local machine, and `/path/in/container` with the desired path inside the Docker container.
For advanced Docker usage, explore the [Ultralytics Docker Guide](https://docs.ultralytics.com/guides/docker-quickstart/).
See the `ultralytics` [pyproject.toml](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) file for a list of dependencies. Note that all examples above install all required dependencies.
Tip
[PyTorch](https://www.ultralytics.com/glossary/pytorch) requirements vary by operating system and CUDA requirements, so install PyTorch first by following the instructions at [PyTorch](https://pytorch.org/get-started/locally/).
[](https://pytorch.org/get-started/locally/)
## Headless Server Installation
For server environments without a display (e.g., cloud VMs, Docker containers, CI/CD pipelines), use the `ultralytics-opencv-headless` package. This is identical to the standard `ultralytics` package but depends on `opencv-python-headless` instead of `opencv-python`, avoiding unnecessary GUI dependencies and potential `libGL` errors.
Headless Install
```
pip install ultralytics-opencv-headless
```
Both packages provide the same functionality and API. The headless variant simply excludes OpenCV's GUI components that require display libraries.
## Advanced Installation
While the standard installation methods cover most use cases, you might need a more tailored setup for development or custom configurations.
Advanced Methods
If you need persistent custom modifications, you can fork the Ultralytics repository, make changes to `pyproject.toml` or other code, and install from your fork.
1. **Fork** the [Ultralytics GitHub repository](https://github.com/ultralytics/ultralytics) to your own GitHub account.
2. **Clone** your fork locally:
```
```
3. **Create a new branch** for your changes:
```
git checkout -b my-custom-branch
```
4. **Make your modifications** to `pyproject.toml` or other files as needed.
5. **Commit and push** your changes:
```
```
6. **Install** using pip with the `git+https` syntax, pointing to your branch:
```
pip install git+https://github.com/YOUR_USERNAME/ultralytics.git@my-custom-branch
```
Clone the repository locally, modify files as needed, and install in editable mode.
1. **Clone** the Ultralytics repository:
```
```
2. **Make your modifications** to `pyproject.toml` or other files as needed.
3. **Install** the package in editable mode (`-e`). Pip will use your modified `pyproject.toml` to resolve dependencies:
```
pip install -e .
```
This approach is useful for development or testing local changes before committing.
Specify a custom Ultralytics fork in your `requirements.txt` file to ensure consistent installations across your team.
requirements.txt
```
```
Install dependencies from the file:
```
pip install -r requirements.txt
```
## Use Ultralytics with CLI
The Ultralytics command-line interface (CLI) allows for simple single-line commands without needing a Python environment. CLI requires no customization or Python code; run all tasks from the terminal with the `yolo` command. For more on using YOLO from the command line, see the [CLI Guide](https://docs.ultralytics.com/usage/cli/).
Example
Train a detection model for 10 [epochs](https://www.ultralytics.com/glossary/epoch) with an initial learning rate of 0.01:
```
yolo train data=coco8.yaml model=yolo26n.pt epochs=10 lr0=0.01
```
Predict a YouTube video using a pretrained segmentation model at image size 320:
```
yolo predict model=yolo26n-seg.pt source='https://youtu.be/LNwODJXcvt4' imgsz=320
```
Validate a pretrained detection model with a batch size of 1 and image size of 640:
```
yolo val model=yolo26n.pt data=coco8.yaml batch=1 imgsz=640
```
Export a YOLO26n classification model to ONNX format with an image size of 224x128 (no TASK required):
```
yolo export model=yolo26n-cls.pt format=onnx imgsz=224,128
```
Count objects in a video or live stream using YOLO26:
```
```
Monitor workout exercises using a YOLO26 pose model:
```
```
Use YOLO26 to count objects in a designated queue or region:
```
```
Perform object detection, instance segmentation, or pose estimation in a web browser using [Streamlit](https://docs.ultralytics.com/reference/solutions/streamlit_inference/):
```
```
Run special commands to see the version, view settings, run checks, and more:
```
```
Warning
Arguments must be passed as `arg=value` pairs, split by an equals `=` sign and delimited by spaces. Do not use `--` argument prefixes or commas `,` between arguments.
- `yolo predict model=yolo26n.pt imgsz=640 conf=0.25` ✅
- `yolo predict model yolo26n.pt imgsz 640 conf 0.25` ❌ (missing `=`)
- `yolo predict model=yolo26n.pt, imgsz=640, conf=0.25` ❌ (do not use `,`)
- `yolo predict --model yolo26n.pt --imgsz 640 --conf 0.25` ❌ (do not use `--`)
- `yolo solution model=yolo26n.pt imgsz=640 conf=0.25` ❌ (use `solutions`, not `solution`)
[CLI Guide](https://docs.ultralytics.com/usage/cli/)
## Use Ultralytics with Python
The Ultralytics YOLO Python interface offers seamless integration into Python projects, making it easy to load, run, and process model outputs. Designed for simplicity, the Python interface allows users to quickly implement [object detection](https://www.ultralytics.com/glossary/object-detection), segmentation, and classification. This makes the YOLO Python interface an invaluable tool for incorporating these functionalities into Python projects.
For instance, users can load a model, train it, evaluate its performance, and export it to ONNX format with just a few lines of code. Explore the [Python Guide](https://docs.ultralytics.com/usage/python/) to learn more about using YOLO within your Python projects.
Example
```
```
[Python Guide](https://docs.ultralytics.com/usage/python/)
## Ultralytics Settings
The Ultralytics library includes a `SettingsManager` for fine-grained control over experiments, allowing users to access and modify settings easily. Stored in a JSON file within the environment's user configuration directory, these settings can be viewed or modified in the Python environment or via the Command-Line Interface (CLI).
### Inspecting Settings
To view the current configuration of your settings:
View settings
Use Python to view your settings by importing the `settings` object from the `ultralytics` module. Print and return settings with these commands:
```
```
The command-line interface allows you to check your settings with:
```
yolo settings
```
### Modifying Settings
Ultralytics makes it easy to modify settings in the following ways:
Update settings
In Python, use the `update` method on the `settings` object:
```
```
To modify settings using the command-line interface:
```
```
### Understanding Settings
The table below overviews the adjustable settings within Ultralytics, including example values, data types, and descriptions.
| Name | Example Value | Data Type | Description |
|---|---|---|---|
| `settings_version` | `'0.0.4'` | `str` | Ultralytics *settings* version (distinct from the Ultralytics [pip](https://pypi.org/project/ultralytics/) version) |
| `datasets_dir` | `'/path/to/datasets'` | `str` | Directory where datasets are stored |
| `weights_dir` | `'/path/to/weights'` | `str` | Directory where model weights are stored |
| `runs_dir` | `'/path/to/runs'` | `str` | Directory where experiment runs are stored |
| `uuid` | `'a1b2c3d4'` | `str` | Unique identifier for the current settings |
| `sync` | `True` | `bool` | Option to sync analytics and crashes to [Ultralytics Platform](https://platform.ultralytics.com/) |
| `api_key` | `''` | `str` | [Ultralytics Platform](https://platform.ultralytics.com/) API Key |
| `clearml` | `True` | `bool` | Option to use [ClearML](https://docs.ultralytics.com/integrations/clearml/) logging |
| `comet` | `True` | `bool` | Option to use [Comet ML](https://bit.ly/yolov8-readme-comet) for experiment tracking and visualization |
| `dvc` | `True` | `bool` | Option to use [DVC for experiment tracking](https://dvc.org/doc/dvclive/ml-frameworks/yolo) and version control |
| `hub` | `True` | `bool` | Option to use [Ultralytics Platform](https://platform.ultralytics.com/) integration |
| `mlflow` | `True` | `bool` | Option to use [MLFlow](https://docs.ultralytics.com/integrations/mlflow/) for experiment tracking |
| `neptune` | `True` | `bool` | Option to use [Neptune](https://neptune.ai/) for experiment tracking |
| `raytune` | `True` | `bool` | Option to use [Ray Tune](https://docs.ultralytics.com/integrations/ray-tune/) for [hyperparameter tuning](https://www.ultralytics.com/glossary/hyperparameter-tuning) |
| `tensorboard` | `True` | `bool` | Option to use [TensorBoard](https://docs.ultralytics.com/integrations/tensorboard/) for visualization |
| `wandb` | `True` | `bool` | Option to use [Weights & Biases](https://docs.ultralytics.com/integrations/weights-biases/) logging |
| `vscode_msg` | `True` | `bool` | When a VS Code terminal is detected, enables a prompt to download the [Ultralytics-Snippets](https://docs.ultralytics.com/integrations/vscode/) extension. |
Revisit these settings as you progress through projects or experiments to ensure optimal configuration.
## FAQ
### How do I install Ultralytics using pip?
Install Ultralytics with pip using:
```
pip install -U ultralytics
```
This installs the latest stable release of the `ultralytics` package from [PyPI](https://pypi.org/project/ultralytics/). 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.
### Can I install Ultralytics YOLO using conda?
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`, `pytorch`, and `pytorch-cuda` together to resolve conflicts:
```
conda install -c pytorch -c nvidia -c conda-forge pytorch torchvision pytorch-cuda=11.8 ultralytics
```
For more instructions, see the [Conda quickstart guide](https://docs.ultralytics.com/guides/conda-quickstart/).
### What are the advantages of using Docker to run Ultralytics YOLO?
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](https://hub.docker.com/r/ultralytics/ultralytics), with variants for GPU, CPU, ARM64, [NVIDIA Jetson](https://docs.ultralytics.com/guides/nvidia-jetson/), and Conda. To pull and run the latest image:
```
```
For detailed Docker instructions, see the [Docker quickstart guide](https://docs.ultralytics.com/guides/docker-quickstart/).
### How do I clone the Ultralytics repository for development?
Clone the Ultralytics repository and set up a development environment with:
```
```
This allows contributions to the project or experimentation with the latest source code. For details, visit the [Ultralytics GitHub repository](https://github.com/ultralytics/ultralytics).
### Why should I use Ultralytics YOLO CLI?
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](https://docs.ultralytics.com/usage/cli/). |
| Shard | 133 (laksa) |
| Root Hash | 10189578256822373533 |
| Unparsed URL | com,ultralytics!docs,/quickstart/ s443 |