Fix YOLOv3 pre-trained weights and examples (#18757)

Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
pull/18756/head^2
Mohammed Yasin 1 month ago committed by GitHub
parent 232cc9bde3
commit 8aa9b4818d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 56
      docs/en/models/yolov3.md
  2. 3
      docs/mkdocs_github_authors.yaml

@ -4,7 +4,7 @@ description: Discover YOLOv3 and its variants YOLOv3-Ultralytics and YOLOv3u. Le
keywords: YOLOv3, YOLOv3-Ultralytics, YOLOv3u, object detection, Ultralytics, computer vision, AI models, deep learning
---
# YOLOv3, YOLOv3-Ultralytics, and YOLOv3u
# YOLOv3, and YOLOv3u
## Overview
@ -12,9 +12,7 @@ This document presents an overview of three closely related object detection mod
1. **YOLOv3:** This is the third version of the You Only Look Once (YOLO) object detection algorithm. Originally developed by Joseph Redmon, YOLOv3 improved on its predecessors by introducing features such as multiscale predictions and three different sizes of detection kernels.
2. **YOLOv3-Ultralytics:** This is Ultralytics' implementation of the YOLOv3 model. It reproduces the original YOLOv3 architecture and offers additional functionalities, such as support for more pre-trained models and easier customization options.
3. **YOLOv3u:** This is an updated version of YOLOv3-Ultralytics that incorporates the anchor-free, objectness-free split head used in YOLOv8 models. YOLOv3u maintains the same backbone and neck architecture as YOLOv3 but with the updated detection head from YOLOv8.
2. **YOLOv3u:** This is an updated version of YOLOv3-Ultralytics that incorporates the anchor-free, objectness-free split head used in YOLOv8 models. YOLOv3u maintains the same backbone and neck architecture as YOLOv3 but with the updated detection head from YOLOv8.
![Ultralytics YOLOv3](https://github.com/ultralytics/docs/releases/download/0/ultralytics-yolov3-banner.avif)
@ -22,23 +20,21 @@ This document presents an overview of three closely related object detection mod
- **YOLOv3:** Introduced the use of three different scales for detection, leveraging three different sizes of detection kernels: 13x13, 26x26, and 52x52. This significantly improved detection accuracy for objects of different sizes. Additionally, YOLOv3 added features such as multi-label predictions for each [bounding box](https://www.ultralytics.com/glossary/bounding-box) and a better feature extractor network.
- **YOLOv3-Ultralytics:** Ultralytics' implementation of YOLOv3 provides the same performance as the original model but comes with added support for more pre-trained models, additional training methods, and easier customization options. This makes it more versatile and user-friendly for practical applications.
- **YOLOv3u:** This updated model incorporates the anchor-free, objectness-free split head from YOLOv8. By eliminating the need for pre-defined anchor boxes and objectness scores, this detection head design can improve the model's ability to detect objects of varying sizes and shapes. This makes YOLOv3u more robust and accurate for object detection tasks.
## Supported Tasks and Modes
The YOLOv3 series, including YOLOv3, YOLOv3-Ultralytics, and YOLOv3u, are designed specifically for object detection tasks. These models are renowned for their effectiveness in various real-world scenarios, balancing accuracy and speed. Each variant offers unique features and optimizations, making them suitable for a range of applications.
YOLOv3 is designed specifically for object detection tasks. Ultralytics supports three variants of YOLOv3: `yolov3u`, `yolov3-tinyu` and `yolov3-sppu`. The `u` in the name signifies that these utilize the anchor-free head of YOLOv8, unlike their original architecture which is anchor-based. These models are renowned for their effectiveness in various real-world scenarios, balancing accuracy and speed. Each variant offers unique features and optimizations, making them suitable for a range of applications.
All three models support a comprehensive set of modes, ensuring versatility in various stages of [model deployment](https://www.ultralytics.com/glossary/model-deployment) and development. These modes include [Inference](../modes/predict.md), [Validation](../modes/val.md), [Training](../modes/train.md), and [Export](../modes/export.md), providing users with a complete toolkit for effective object detection.
| Model Type | Tasks Supported | Inference | Validation | Training | Export |
| ------------------ | -------------------------------------- | --------- | ---------- | -------- | ------ |
| YOLOv3 | [Object Detection](../tasks/detect.md) | ✅ | ✅ | ✅ | ✅ |
| YOLOv3-Ultralytics | [Object Detection](../tasks/detect.md) | ✅ | ✅ | ✅ | ✅ |
| YOLOv3u | [Object Detection](../tasks/detect.md) | ✅ | ✅ | ✅ | ✅ |
| Model Type | Pre-Trained Weights | Tasks Supported | Inference | Validation | Training | Export |
| -------------- | ------------------- | -------------------------------------- | -------------------------------------- | ---------- | -------- | ------ | --- |
| YOLOv3(u) | `yolov3u.pt` | [Object Detection](../tasks/detect.md) | ✅ | ✅ | ✅ | ✅ |
| YOLOv3-Tiny(u) | `yolov3-tinyu.pt` | [Object Detection](../tasks/detect.md) | ✅ | ✅ | ✅ | ✅ |
| YOLOv3u-SPP(u) | `yolov3-sppu.pt` | | [Object Detection](../tasks/detect.md) | ✅ | ✅ | ✅ | ✅ |
This table provides an at-a-glance view of the capabilities of each YOLOv3 variant, highlighting their versatility and suitability for various tasks and operational modes in object detection workflows.
## This table provides an at-a-glance view of the capabilities of each YOLOv3 variant, highlighting their versatility and suitability for various tasks and operational modes in object detection workflows.
## Usage Examples
@ -53,8 +49,8 @@ This example provides simple YOLOv3 training and inference examples. For full do
```python
from ultralytics import YOLO
# Load a COCO-pretrained YOLOv3n model
model = YOLO("yolov3n.pt")
# Load a COCO-pretrained YOLOv3u model
model = YOLO("yolov3u.pt")
# Display model information (optional)
model.info()
@ -62,7 +58,7 @@ This example provides simple YOLOv3 training and inference examples. For full do
# Train the model on the COCO8 example dataset for 100 epochs
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)
# Run inference with the YOLOv3n model on the 'bus.jpg' image
# Run inference with the YOLOv3u model on the 'bus.jpg' image
results = model("path/to/bus.jpg")
```
@ -71,11 +67,11 @@ This example provides simple YOLOv3 training and inference examples. For full do
CLI commands are available to directly run the models:
```bash
# Load a COCO-pretrained YOLOv3n model and train it on the COCO8 example dataset for 100 epochs
yolo train model=yolov3n.pt data=coco8.yaml epochs=100 imgsz=640
# Load a COCO-pretrained YOLOv3u model and train it on the COCO8 example dataset for 100 epochs
yolo train model=yolov3u.pt data=coco8.yaml epochs=100 imgsz=640
# Load a COCO-pretrained YOLOv3n model and run inference on the 'bus.jpg' image
yolo predict model=yolov3n.pt source=path/to/bus.jpg
# Load a COCO-pretrained YOLOv3u model and run inference on the 'bus.jpg' image
yolo predict model=yolov3u.pt source=path/to/bus.jpg
```
## Citations and Acknowledgements
@ -114,8 +110,8 @@ Training a YOLOv3 model with Ultralytics is straightforward. You can train the m
```python
from ultralytics import YOLO
# Load a COCO-pretrained YOLOv3n model
model = YOLO("yolov3n.pt")
# Load a COCO-pretrained YOLOv3u model
model = YOLO("yolov3u.pt")
# Train the model on the COCO8 example dataset for 100 epochs
results = model.train(data="coco8.yaml", epochs=100, imgsz=640)
@ -124,8 +120,8 @@ Training a YOLOv3 model with Ultralytics is straightforward. You can train the m
=== "CLI"
```bash
# Load a COCO-pretrained YOLOv3n model and train it on the COCO8 example dataset for 100 epochs
yolo train model=yolov3n.pt data=coco8.yaml epochs=100 imgsz=640
# Load a COCO-pretrained YOLOv3u model and train it on the COCO8 example dataset for 100 epochs
yolo train model=yolov3u.pt data=coco8.yaml epochs=100 imgsz=640
```
For more comprehensive training options and guidelines, visit our [Train mode documentation](../modes/train.md).
@ -145,25 +141,25 @@ You can perform inference using YOLOv3 models by either Python scripts or CLI co
```python
from ultralytics import YOLO
# Load a COCO-pretrained YOLOv3n model
model = YOLO("yolov3n.pt")
# Load a COCO-pretrained YOLOv3u model
model = YOLO("yolov3u.pt")
# Run inference with the YOLOv3n model on the 'bus.jpg' image
# Run inference with the YOLOv3u model on the 'bus.jpg' image
results = model("path/to/bus.jpg")
```
=== "CLI"
```bash
# Load a COCO-pretrained YOLOv3n model and run inference on the 'bus.jpg' image
yolo predict model=yolov3n.pt source=path/to/bus.jpg
# Load a COCO-pretrained YOLOv3u model and run inference on the 'bus.jpg' image
yolo predict model=yolov3u.pt source=path/to/bus.jpg
```
Refer to the [Inference mode documentation](../modes/predict.md) for more details on running YOLO models.
### What tasks are supported by YOLOv3 and its variants?
YOLOv3, YOLOv3-Ultralytics, and YOLOv3u primarily support object detection tasks. These models can be used for various stages of model deployment and development, such as Inference, Validation, Training, and Export. For a comprehensive set of tasks supported and more in-depth details, visit our [Object Detection tasks documentation](../tasks/detect.md).
YOLOv3, YOLOv3-Tiny and YOLOv3-SPP primarily support object detection tasks. These models can be used for various stages of model deployment and development, such as Inference, Validation, Training, and Export. For a comprehensive set of tasks supported and more in-depth details, visit our [Object Detection tasks documentation](../tasks/detect.md).
### Where can I find resources to cite YOLOv3 in my research?

@ -97,6 +97,9 @@
Francesco.mttl@gmail.com:
avatar: https://avatars.githubusercontent.com/u/3855193?v=4
username: ambitious-octopus
Fruchtzwerg94@users.noreply.github.com:
avatar: https://avatars.githubusercontent.com/u/29866610?v=4
username: Fruchtzwerg94
abirami.vina@gmail.com:
avatar: https://avatars.githubusercontent.com/u/25847604?v=4
username: abirami-vina

Loading…
Cancel
Save