Ultralytics YOLOv3: one hub call, three checkpoints, and an install that skips export
PyTorch implementation of YOLOv3, YOLOv3-SPP, and YOLOv3-tiny for real-time object detection with training, validation, inference, and multi-format export.
At a glance
- What is it?
- A look at the PyTorch port of YOLOv3, YOLOv3-SPP and YOLOv3-tiny: how its scripts divide the work, what the release tags actually track, and where the checkout you get from the documented install cannot go.
- Who is it for?
- Use it if you want a small, readable reference for a classic single-pass detector and you are comfortable driving three separate scripts. Skip it if you need a maintained release cadence or a turnkey export path.
- Can I use it commercially?
- Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
- Is it still maintained?
- Yes. The repository last received commits 8 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- ultralytics/yolov310,639 ★ · +35
| Repository | 2026-09-11 | 2026-11-15 |
|---|---|---|
| ultralytics/yolov3 | 10.6k | 10.6k |
35 Stars in the last 65 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
One hub call, three checkpoints, one results wrapper
The first thing most people run is a single PyTorch Hub call, and the model name is the only thing that changes between the three checkpoints here: yolov3, yolov3_spp, or yolov3_tiny. Weights download automatically on first use, so nothing has to be fetched by hand before the call returns something usable. What comes back is not a tensor but a results wrapper with three methods: one prints detections to the console, one displays the annotated image, and one saves it under runs/detect/exp. The same call also takes a local file, a URL, a PIL image, an OpenCV frame, or a numpy array, which is what lets one model object serve a notebook and a video loop.
import torch
# Load a YOLOv3 model (choices: 'yolov3', 'yolov3_spp', 'yolov3_tiny')
model = torch.hub.load("ultralytics/yolov3", "yolov3", pretrained=True)
# Run inference on an image (local file, URL, PIL image, OpenCV frame, or numpy array)
results = model("https://ultralytics.com/images/zidane.jpg")
# Inspect the results
results.print() # print detections to the console
results.show() # display the annotated image
results.save() # save the annotated image to runs/detect/expdetect.py infers the source type from the string you pass
detect.py folds the input type into one flag, --source, and the documented examples are the clearest map of what that flag accepts: a zero for a webcam, an image filename, a video file, the word screen for a screenshot, a directory, a quoted glob pattern, and an RTSP stream. Results are written to runs/detect.
python detect.py --weights yolov3.pt --source 0 # webcam
python detect.py --weights yolov3.pt --source img.jpg # image
python detect.py --weights yolov3.pt --source vid.mp4 # video
python detect.py --weights yolov3.pt --source screen # screenshot
python detect.py --weights yolov3.pt --source path/ # directory
python detect.py --weights yolov3.pt --source 'path/*.jpg' # glob
python detect.py --weights yolov3.pt --source 'rtsp://example.com/media.mThe three training commands differ only in cfg and batch size
The training examples differ in exactly two flags, --cfg and --batch-size, which is a compact view of the cost ladder: the tiny model takes 64 images per batch, the standard model 32, and the SPP model 16, all for 300 epochs on COCO. Every one of them passes an empty string to --weights, and that is the detail that catches newcomers, because an empty value trains from scratch rather than starting from pretrained weights. Models and datasets download automatically, so there is no manual checkpoint step, but these examples show no resume flag either. If you want pretrained starting weights or a restart after an interrupted run, nothing here hands you that, and you have to derive it from the shared Ultralytics training framework guides.
# Train YOLOv3-tiny
python train.py --data coco.yaml --epochs 300 --weights '' --cfg yolov3-tiny.yaml --batch-size 64
# Train YOLOv3
python train.py --data coco.yaml --epochs 300 --weights '' --cfg yolov3.yaml --batch-size 32
# Train YOLOv3-SPP
python train.py --data coco.yaml --epochs 300 --weights '' --cfg yolov3-spp.yaml --batch-size 16Validation and export are one-liners the install does not prepare
Accuracy checking and format conversion are each a single command. The export targets named alongside them are TorchScript, ONNX, OpenVINO, TensorRT, CoreML, and PaddlePaddle, with onnx given as the include value. Here is the catch that decides whether your afternoon works: in requirements.txt the optional export packages are commented out, coremltools for Apple CoreML export, onnx for ONNX export, and onnx-simplifier for optimizing ONNX models. A checkout that followed the documented install step therefore has no ONNX support installed, and the export command may need those packages added by hand. Nothing in the install block asks you to do that, so treat the export path as a second setup task rather than a third command.
python val.py --weights yolov3.pt --data coco.yaml
python export.py --weights yolov3.pt --include onnxrequirements.txt carries the real floor, and the floor moves without you
Three scripts do the visible work, detect.py, train.py, and val.py, and all three lean on the separately versioned ultralytics package, required here at 8.4.192 or newer, for models, training, and utilities. Next to it sit torch at 1.8.0 or newer and torchvision at 0.9.0 or newer, over a numeric and imaging stack that runs down to numpy at 1.23.5 and Pillow at 10.3.0, with packaging at 25.0 and requests at 2.32.2 handling version parsing and downloads. Because those lower bounds belong to other projects, two clones of the same commit can behave differently once the shared library ships a new version. pyproject.toml states the arrangement plainly: most users run this from a repository clone with dependencies from requirements.txt.
# 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.txtTags stop in 2021 while the default branch keeps taking commits
The repository is not archived, and the repository was last pushed on 1 November 2026, so the code itself is not frozen. The tags tell a different story about releases: v9.6.0 dated 14 November 2021, v9.5.0 dated 12 April 2021, and v9.1 dated 13 January 2021, and each of those release notes describes itself as a compatibility update carrying a YOLOv5 v5.0 or v6.0 release into this repository. The versioning here tracks a dependency's cadence rather than new detection work, which leaves you with two practical problems. No tag corresponds to the current state of master, so a version pin buys you older code than the branch you would clone. And the tutorial links point at yolov5 documentation paths, so a YOLOv3 newcomer reads material written for a different generation. The tree also ships benchmarks.py, which the quickstart examples do not cover. Pin a commit hash in your own notes if you need the behaviour of a given day to stay fixed.
AGPL-3.0 by default, with a request form for commercial use
The license field in pyproject.toml reads AGPL-3.0, the classifier names the GNU Affero General Public License v3 or later, and the development status is Beta with the audience listed as developers, education, and science and research. For commercial use the guidance does not lead with the AGPL grant, it leads with a request: request an Enterprise License at Ultralytics Licensing. That is the practical trap for a company weighing this code, because the default terms apply unless you go through that request. Settle the licensing question before you wrap a service around these scripts, not after a deployment is live. The support entry points are the GitHub issue chooser, Discord, Reddit, and the Ultralytics forums.
Editorial conclusion
Use it if you want a small, readable reference for a classic single-pass detector and you are comfortable driving three separate scripts. Skip it if you need a maintained release cadence or a turnkey export path. Before you commit, check the license terms for your deployment model, install the export extras yourself, and read the arguments of val.py, export.py and benchmarks.py in the source, because the quickstart examples show only one command each for val.py and export.py and none for benchmarks.py.
Frequently asked questions
how to use yolov3
Clone the repository, change into the directory, and install dependencies from requirements.txt in a Python 3.8 or newer environment with PyTorch 1.8 or newer. Then either load a checkpoint through PyTorch Hub with torch.hub.load, choosing the name yolov3, yolov3_spp, or yolov3_tiny, or call detect.py with a weights file and a source such as an image, a video, a directory, a glob, or a webcam index.
what is yolov3
YOLOv3 is a real-time object detection model that treats detection as a single regression problem, predicting bounding boxes and class probabilities directly from full images in one forward pass. This repository is the PyTorch implementation, and it packages three checkpoints: YOLOv3, YOLOv3-SPP, and YOLOv3-tiny.
what is yolov3 model
The model in this repository is YOLOv3 as a PyTorch implementation, available in three sizes, and it comes with training, validation, inference, and export tooling. It reuses shared utilities from the separately versioned ultralytics package, required at 8.4.192 or newer in requirements.txt.
is yolov3 open source
Yes, the repository is released under AGPL-3.0, and pyproject.toml declares that license text with a GNU Affero General Public License v3 or later classifier. For commercial use the guidance is to request an Enterprise License at Ultralytics Licensing.
yolov3 vs yolov5
This repository's own release history tracks YOLOv5 rather than competing with it: v9.5.0 is described as a YOLOv5 v5.0 release compatibility update for YOLOv3, and v9.6.0 as a YOLOv5 v6.0 release compatibility update. Several tutorial links are also hosted under yolov5 documentation paths, and the code reuses shared utilities from the ultralytics package.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/ultralytics-yolov3)Star history chart for your README
[](https://hysenlabs.com/projects/ultralytics-yolov3)Was this useful?