δΈζ | νκ΅μ΄ | ζ₯ζ¬θͺ | Π ΡΡΡΠΊΠΈΠΉ | Deutsch | FranΓ§ais | EspaΓ±ol | PortuguΓͺs | TΓΌrkΓ§e | TiαΊΏng Viα»t | Ψ§ΩΨΉΨ±Ψ¨ΩΨ©
Ultralytics YOLOv3 is a robust and efficient computer vision model developed by Ultralytics. Built on the PyTorch framework, this implementation extends the original YOLOv3 architecture, renowned for its improvements in object detection speed and accuracy over earlier versions. It incorporates best practices and insights from extensive research, making it a reliable choice for a wide range of vision AI applications.
Explore the Ultralytics Docs for in-depth guidance (YOLOv3-specific docs may be limited, but general YOLO principles apply), open an issue on GitHub for support, and join our Discord community for questions and discussions!
For Enterprise License requests, please complete the form at Ultralytics Licensing.
We are thrilled to introduce Ultralytics YOLO11 π, the latest advancement in our state-of-the-art vision models! Available now at the Ultralytics YOLO GitHub repository, YOLO11 continues our legacy of speed, precision, and user-friendly design. Whether you're working on object detection, instance segmentation, pose estimation, image classification, or oriented object detection (OBB), YOLO11 delivers the performance and flexibility needed for modern computer vision tasks.
Get started today and unlock the full potential of YOLO11! Visit the Ultralytics Docs for comprehensive guides and resources:
# Install the ultralytics package
pip install ultralytics
See the Ultralytics Docs for YOLOv3 for full documentation on training, testing, and deployment using the Ultralytics framework. While YOLOv3-specific documentation may be limited, the general YOLO principles apply. Below are quickstart examples adapted for YOLOv3 concepts.
Install
Clone the repository and install dependencies from requirements.txt
in a Python>=3.8.0 environment. Ensure you have PyTorch>=1.8 installed. (Note: This repo is originally YOLOv5, dependencies should be compatible but tailored testing for YOLOv3 is recommended).
# Clone the YOLOv3 repository
git clone https://github.com/ultralytics/yolov3
# Navigate to the cloned directory
cd yolov3
# Install required packages
pip install -r requirements.txt
Inference with PyTorch Hub
Use YOLOv3 via PyTorch Hub for inference. Models like yolov3.pt
, yolov3-spp.pt
, yolov3-tiny.pt
can be loaded.
import torch
# Load a YOLOv3 model (e.g., yolov3, yolov3-spp)
model = torch.hub.load("ultralytics/yolov3", "yolov3", pretrained=True) # specify 'yolov3' or other variants
# Define the input image source (URL, local file, PIL image, OpenCV frame, numpy array, or list)
img = "https://ultralytics.com/images/zidane.jpg" # Example image
# Perform inference
results = model(img)
# Process the results (options: .print(), .show(), .save(), .crop(), .pandas())
results.print() # Print results to console
results.show() # Display results in a window
results.save() # Save results to runs/detect/exp
Inference with detect.py
The detect.py
script runs inference on various sources. Use --weights yolov3.pt
or other YOLOv3 variants. It automatically downloads models and saves results to runs/detect
.
# Run inference using a webcam with yolov3-tiny
python detect.py --weights yolov3-tiny.pt --source 0
# Run inference on a local image file with yolov3
python detect.py --weights yolov3.pt --source img.jpg
# Run inference on a local video file with yolov3-spp
python detect.py --weights yolov3-spp.pt --source vid.mp4
# Run inference on a screen capture
python detect.py --weights yolov3.pt --source screen
# Run inference on a directory of images
python detect.py --weights yolov3.pt --source path/to/images/
# Run inference on a text file listing image paths
python detect.py --weights yolov3.pt --source list.txt
# Run inference on a text file listing stream URLs
python detect.py --weights yolov3.pt --source list.streams
# Run inference using a glob pattern for images
python detect.py --weights yolov3.pt --source 'path/to/*.jpg'
# Run inference on a YouTube video URL
python detect.py --weights yolov3.pt --source 'https://youtu.be/LNwODJXcvt4'
# Run inference on an RTSP, RTMP, or HTTP stream
python detect.py --weights yolov3.pt --source 'rtsp://example.com/media.mp4'
Training
The commands below show how to train YOLOv3 models on the COCO dataset. Models and datasets are downloaded automatically. Use the largest --batch-size
your hardware allows.
# Train YOLOv3-tiny on COCO for 300 epochs (example settings)
python train.py --data coco.yaml --epochs 300 --weights '' --cfg yolov3-tiny.yaml --batch-size 64
# Train YOLOv3 on COCO for 300 epochs (example settings)
python train.py --data coco.yaml --epochs 300 --weights '' --cfg yolov3.yaml --batch-size 32
# Train YOLOv3-SPP on COCO for 300 epochs (example settings)
python train.py --data coco.yaml --epochs 300 --weights '' --cfg yolov3-spp.yaml --batch-size 16
Tutorials
Note: These tutorials primarily use YOLOv5 examples but the principles often apply to YOLOv3 within the Ultralytics framework.
- Train Custom Data π RECOMMENDED: Learn how to train models on your own datasets.
- Tips for Best Training Results βοΈ: Improve your model's performance with expert tips.
- Multi-GPU Training: Speed up training using multiple GPUs.
- PyTorch Hub Integration π NEW: Easily load models using PyTorch Hub.
- Model Export (TFLite, ONNX, CoreML, TensorRT) π: Convert your models to various deployment formats.
- NVIDIA Jetson Deployment π NEW: Deploy models on NVIDIA Jetson devices.
- Test-Time Augmentation (TTA): Enhance prediction accuracy with TTA.
- Model Ensembling: Combine multiple models for better performance.
- Model Pruning/Sparsity: Optimize models for size and speed.
- Hyperparameter Evolution: Automatically find the best training hyperparameters.
- Transfer Learning with Frozen Layers: Adapt pretrained models to new tasks efficiently.
- Architecture Summary π NEW: Understand the model architecture (focus on YOLOv3 principles).
- Ultralytics HUB Training π RECOMMENDED: Train and deploy YOLO models using Ultralytics HUB.
- ClearML Logging: Integrate with ClearML for experiment tracking.
- Neural Magic DeepSparse Integration: Accelerate inference with DeepSparse.
- Comet Logging π NEW: Log experiments using Comet ML.
Ultralytics offers robust integrations with leading AI platforms to enhance your workflow, including dataset labeling, training, visualization, and model management. Discover how Ultralytics, in collaboration with partners like Weights & Biases, Comet ML, Roboflow, and Intel OpenVINO, can optimize your AI projects. Explore more at Ultralytics Integrations.

Ultralytics HUB π | Weights & Biases | Comet | Neural Magic |
---|---|---|---|
Streamline YOLO workflows: Label, train, and deploy effortlessly with Ultralytics HUB. Try now! | Track experiments, hyperparameters, and results with Weights & Biases. | Free forever, Comet ML lets you save YOLO models, resume training, and interactively visualize predictions. | Run YOLO inference up to 6x faster with Neural Magic DeepSparse. |
Experience seamless AI development with Ultralytics HUB β, the ultimate platform for building, training, and deploying computer vision models. Visualize datasets, train YOLOv3, YOLOv5, and YOLOv8 π models, and deploy them to real-world applications without writing any code. Transform images into actionable insights using our advanced tools and user-friendly Ultralytics App. Start your journey for Free today!

YOLOv3 marked a major leap forward in real-time object detection at its release. Key advantages include:
- Improved Accuracy: Enhanced detection of small objects compared to YOLOv2.
- Multi-Scale Predictions: Detects objects at three different scales, boosting performance across varied object sizes.
- Class Prediction: Uses logistic classifiers for object classes, enabling multi-label classification.
- Feature Extractor: Employs a deeper network (Darknet-53) versus the Darknet-19 used in YOLOv2.
While newer models like YOLOv5 and YOLO11 offer further advancements, YOLOv3 remains a reliable and widely adopted baseline, efficiently implemented in PyTorch by Ultralytics.
Get started quickly with our pre-configured environments. Click the icons below for setup details.
We welcome your contributions! Making YOLO models accessible and effective is a community effort. Please see our Contributing Guide to get started. Share your feedback through the Ultralytics Survey. Thank you to all our contributors for making Ultralytics YOLO better!
Ultralytics provides two licensing options to meet different needs:
- AGPL-3.0 License: An OSI-approved open-source license ideal for academic research, personal projects, and testing. It promotes open collaboration and knowledge sharing. See the LICENSE file for details.
- Enterprise License: Tailored for commercial applications, this license allows seamless integration of Ultralytics software and AI models into commercial products and services, bypassing the open-source requirements of AGPL-3.0. For commercial use cases, please contact us via Ultralytics Licensing.
For bug reports and feature requests related to Ultralytics YOLO implementations, please visit GitHub Issues. For general questions, discussions, and community support, join our Discord server!