Skip to content

Commit 93e0555

Browse files
Laughing-qlmycrossUltralyticsAssistantglenn-jocher
authored
ultralytics 8.4.52 YOLO Semantic Segmentation models (ultralytics#24518)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: lmycross <mengyu@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
1 parent b7852cf commit 93e0555

64 files changed

Lines changed: 3497 additions & 269 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ jobs:
9090
- name: Benchmark OBBModel
9191
shell: bash
9292
run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-obb.pt' imgsz=160 verbose=0.371
93+
- name: Benchmark SemanticSegmentationModel
94+
shell: bash
95+
run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-sem.pt' imgsz=160 verbose=0.189
9396
- name: Merge Coverage Reports
9497
run: |
9598
coverage xml -o coverage-benchmarks.xml
@@ -269,8 +272,24 @@ jobs:
269272
uses: ultralytics/actions/retry@main
270273
with:
271274
shell: bash # for Windows compatibility
272-
run: pytest --slow --cov=ultralytics/ --cov-report=xml tests/
275+
run: |
276+
python - <<'PY'
277+
import os
278+
import platform
279+
import shutil
280+
import sys
281+
282+
total, used, free = shutil.disk_usage(".")
283+
print(f"Python: {sys.version}")
284+
print(f"Platform: {platform.platform()}")
285+
print(f"CPU count: {os.cpu_count()}")
286+
print(f"Disk: total={total // 2**30}GiB used={used // 2**30}GiB free={free // 2**30}GiB")
287+
PY
288+
df -h .
289+
if command -v free >/dev/null 2>&1; then free -h; fi
290+
PYTHONFAULTHANDLER=1 PYTHONUNBUFFERED=1 pytest -vv -s --durations=50 --durations-min=1 --slow --cov=ultralytics/ --cov-report=xml tests/ --deselect tests/test_exports.py::test_export_imx
273291
retries: 1 # Retry once after initial attempt (2 total runs)
292+
timeout_minutes: 180
274293
retry_delay_seconds: 60
275294
- name: Prune uv Cache
276295
run: uv cache prune --ci
@@ -357,6 +376,8 @@ jobs:
357376
run: python -m ultralytics.cfg.__init__ benchmark model='yolo26n-pose.pt' imgsz=160 verbose=0.185
358377
- name: Benchmark OBBModel
359378
run: python -m ultralytics.cfg.__init__ benchmark model='yolo26n-obb.pt' imgsz=160 verbose=0.371
379+
- name: Benchmark SemanticSegmentationModel
380+
run: python -m ultralytics.cfg.__init__ benchmark model='yolo26n-sem.pt' imgsz=160 verbose=0.189
360381
- name: Benchmark Summary
361382
run: |
362383
cat benchmarks.log

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</div>
2222
<br>
2323

24-
[Ultralytics](https://www.ultralytics.com/) creates cutting-edge, state-of-the-art (SOTA) [YOLO models](https://www.ultralytics.com/yolo) built on years of foundational research in computer vision and AI. Constantly updated for performance and flexibility, our models are **fast**, **accurate**, and **easy to use**. They excel at [object detection](https://docs.ultralytics.com/tasks/detect), [tracking](https://docs.ultralytics.com/modes/track), [instance segmentation](https://docs.ultralytics.com/tasks/segment), [image classification](https://docs.ultralytics.com/tasks/classify), and [pose estimation](https://docs.ultralytics.com/tasks/pose) tasks.
24+
[Ultralytics](https://www.ultralytics.com/) creates cutting-edge, state-of-the-art (SOTA) [YOLO models](https://www.ultralytics.com/yolo) built on years of foundational research in computer vision and AI. Constantly updated for performance and flexibility, our models are **fast**, **accurate**, and **easy to use**. They excel at [object detection](https://docs.ultralytics.com/tasks/detect), [tracking](https://docs.ultralytics.com/modes/track), [instance segmentation](https://docs.ultralytics.com/tasks/segment), [semantic segmentation](https://docs.ultralytics.com/tasks/semantic), [image classification](https://docs.ultralytics.com/tasks/classify), and [pose estimation](https://docs.ultralytics.com/tasks/pose) tasks.
2525

2626
Find detailed documentation in the [Ultralytics Docs](https://docs.ultralytics.com/). Get support via [GitHub Issues](https://github.com/ultralytics/ultralytics/issues/new/choose). Join discussions on [Discord](https://discord.com/invite/ultralytics), [Reddit](https://www.reddit.com/r/ultralytics/), and the [Ultralytics Community Forums](https://community.ultralytics.com/)!
2727

@@ -117,7 +117,7 @@ Discover more examples in the YOLO [Python Docs](https://docs.ultralytics.com/us
117117

118118
## ✨ Models
119119

120-
Ultralytics supports a wide range of YOLO models, from early versions like [YOLOv3](https://docs.ultralytics.com/models/yolov3) to the latest [YOLO26](https://docs.ultralytics.com/models/yolo26). The tables below showcase YOLO26 models pretrained on the [COCO](https://docs.ultralytics.com/datasets/detect/coco) dataset for [Detection](https://docs.ultralytics.com/tasks/detect), [Segmentation](https://docs.ultralytics.com/tasks/segment), and [Pose Estimation](https://docs.ultralytics.com/tasks/pose). Additionally, [Classification](https://docs.ultralytics.com/tasks/classify) models pretrained on the [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet) dataset are available. [Tracking](https://docs.ultralytics.com/modes/track) mode is compatible with all Detection, Segmentation, and Pose models. All [Models](https://docs.ultralytics.com/models) are automatically downloaded from the latest Ultralytics [release](https://github.com/ultralytics/assets/releases) upon first use.
120+
Ultralytics supports a wide range of YOLO models, from early versions like [YOLOv3](https://docs.ultralytics.com/models/yolov3) to the latest [YOLO26](https://docs.ultralytics.com/models/yolo26). The tables below showcase YOLO26 models pretrained on [COCO](https://docs.ultralytics.com/datasets/detect/coco) for [Detection](https://docs.ultralytics.com/tasks/detect), [Segmentation](https://docs.ultralytics.com/tasks/segment), and [Pose Estimation](https://docs.ultralytics.com/tasks/pose). [Semantic Segmentation](https://docs.ultralytics.com/tasks/semantic) models are pretrained on [Cityscapes](https://docs.ultralytics.com/datasets/semantic/cityscapes), and [Classification](https://docs.ultralytics.com/tasks/classify) models are pretrained on [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet). [Tracking](https://docs.ultralytics.com/modes/track) mode is compatible with Detection, Segmentation, and Pose models. All [Models](https://docs.ultralytics.com/models) download automatically from the latest Ultralytics [release](https://github.com/ultralytics/assets/releases) on first use.
121121

122122
<a href="https://docs.ultralytics.com/tasks" target="_blank">
123123
<img width="100%" src="https://github.com/ultralytics/docs/releases/download/0/ultralytics-yolov8-tasks-banner.avif" alt="Ultralytics YOLO supported tasks">
@@ -159,6 +159,23 @@ Refer to the [Segmentation Docs](https://docs.ultralytics.com/tasks/segment) for
159159

160160
</details>
161161

162+
<details><summary>Semantic Segmentation (Cityscapes)</summary>
163+
164+
See the [Semantic Segmentation Docs](https://docs.ultralytics.com/tasks/semantic) for usage examples. These models are trained on [Cityscapes](https://docs.ultralytics.com/datasets/semantic/cityscapes), including 19 classes.
165+
166+
| Model | size<br><sup>(pixels)</sup> | mIoU<sup>val</sup> | Speed<br><sup>RTX3090 PyTorch<br>(ms)</sup> | params<br><sup>(M)</sup> | FLOPs<br><sup>(B)</sup> |
167+
| -------------------------------------------------------------------------------------------- | --------------------------- | ------------------ | ------------------------------------------- | ------------------------ | ----------------------- |
168+
| [YOLO26n-sem](https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26n-sem.pt) | 1024 &times; 2048 | 78.3 | 4.4 ± 0.0 | 1.6 | 22.7 |
169+
| [YOLO26s-sem](https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26s-sem.pt) | 1024 &times; 2048 | 80.8 | 8.4 ± 0.0 | 6.5 | 88.8 |
170+
| [YOLO26m-sem](https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26m-sem.pt) | 1024 &times; 2048 | 82.0 | 19.9 ± 0.1 | 14.3 | 304.5 |
171+
| [YOLO26l-sem](https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26l-sem.pt) | 1024 &times; 2048 | 82.9 | 26.5 ± 0.1 | 17.9 | 384.7 |
172+
| [YOLO26x-sem](https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26x-sem.pt) | 1024 &times; 2048 | 83.6 | 48.9 ± 0.2 | 40.2 | 861.7 |
173+
174+
- **mIoU<sup>val</sup>** values are for single-model single-scale on the [Cityscapes](https://www.cityscapes-dataset.com/) validation set. <br>Reproduce with `yolo semantic val data=cityscapes.yaml device=0 imgsz=2048`
175+
- **Speed** metrics are averaged over Cityscapes validation images using an RTX3090 instance. <br>Reproduce with `yolo semantic val data=cityscapes.yaml batch=1 device=0|cpu imgsz=2048`
176+
177+
</details>
178+
162179
<details><summary>Classification (ImageNet)</summary>
163180

164181
Consult the [Classification Docs](https://docs.ultralytics.com/tasks/classify) for usage examples. These models are trained on [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet), covering 1000 classes.

README.zh-CN.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</div>
2222
<br>
2323

24-
[Ultralytics](https://www.ultralytics.com/) 基于多年在计算机视觉和人工智能领域的基础研究,创造了尖端的、最先进的 (SOTA) [YOLO 模型](https://www.ultralytics.com/yolo)。我们的模型不断更新以提高性能和灵活性,具有**速度快****精度高****易于使用**的特点。它们在[目标检测](https://docs.ultralytics.com/tasks/detect)[跟踪](https://docs.ultralytics.com/modes/track)[实例分割](https://docs.ultralytics.com/tasks/segment)[图像分类](https://docs.ultralytics.com/tasks/classify)[姿态估计](https://docs.ultralytics.com/tasks/pose)任务中表现出色。
24+
[Ultralytics](https://www.ultralytics.com/) 基于多年在计算机视觉和人工智能领域的基础研究,创造了尖端的、最先进的 (SOTA) [YOLO 模型](https://www.ultralytics.com/yolo)。我们的模型不断更新以提高性能和灵活性,具有**速度快****精度高****易于使用**的特点。它们在[目标检测](https://docs.ultralytics.com/tasks/detect)[跟踪](https://docs.ultralytics.com/modes/track)[实例分割](https://docs.ultralytics.com/tasks/segment)[语义分割](https://docs.ultralytics.com/tasks/semantic)[图像分类](https://docs.ultralytics.com/tasks/classify)[姿态估计](https://docs.ultralytics.com/tasks/pose)任务中表现出色。
2525

2626
[Ultralytics 文档](https://docs.ultralytics.com/)中查找详细文档。通过 [GitHub Issues](https://github.com/ultralytics/ultralytics/issues/new/choose) 获取支持。加入 [Discord](https://discord.com/invite/ultralytics)[Reddit](https://www.reddit.com/r/ultralytics/)[Ultralytics 社区论坛](https://community.ultralytics.com/)参与讨论!
2727

@@ -117,7 +117,7 @@ path = model.export(format="onnx") # 返回导出模型的路径
117117

118118
## ✨ 模型
119119

120-
Ultralytics 支持广泛的 YOLO 模型,从早期的版本如 [YOLOv3](https://docs.ultralytics.com/models/yolov3) 到最新的 [YOLO26](https://docs.ultralytics.com/models/yolo26)。下表展示了在 [COCO](https://docs.ultralytics.com/datasets/detect/coco) 数据集上预训练的 YOLO26 模型,用于[检测](https://docs.ultralytics.com/tasks/detect)[分割](https://docs.ultralytics.com/tasks/segment)[姿态估计](https://docs.ultralytics.com/tasks/pose)任务。此外,还提供了在 [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet) 数据集上预训练的[分类](https://docs.ultralytics.com/tasks/classify)模型[跟踪](https://docs.ultralytics.com/modes/track)模式与所有检测、分割和姿态模型兼容。所有[模型](https://docs.ultralytics.com/models)在首次使用时都会自动从最新的 Ultralytics [发布版本](https://github.com/ultralytics/assets/releases)下载。
120+
Ultralytics 支持广泛的 YOLO 模型,从早期的版本如 [YOLOv3](https://docs.ultralytics.com/models/yolov3) 到最新的 [YOLO26](https://docs.ultralytics.com/models/yolo26)。下表展示了在 [COCO](https://docs.ultralytics.com/datasets/detect/coco) 上预训练的 YOLO26 模型,用于[检测](https://docs.ultralytics.com/tasks/detect)、[分割](https://docs.ultralytics.com/tasks/segment)和[姿态估计](https://docs.ultralytics.com/tasks/pose)任务。[语义分割](https://docs.ultralytics.com/tasks/semantic)模型在 [Cityscapes](https://docs.ultralytics.com/datasets/semantic/cityscapes) 上预训练,[分类](https://docs.ultralytics.com/tasks/classify)模型在 [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet) 上预训练。[跟踪](https://docs.ultralytics.com/modes/track)模式与检测、分割和姿态模型兼容。所有[模型](https://docs.ultralytics.com/models)在首次使用时都会自动从最新的 Ultralytics [发布版本](https://github.com/ultralytics/assets/releases)下载。
121121

122122
<a href="https://docs.ultralytics.com/tasks" target="_blank">
123123
<img width="100%" src="https://github.com/ultralytics/docs/releases/download/0/ultralytics-yolov8-tasks-banner.avif" alt="Ultralytics YOLO supported tasks">
@@ -159,6 +159,23 @@ Ultralytics 支持广泛的 YOLO 模型,从早期的版本如 [YOLOv3](https:/
159159

160160
</details>
161161

162+
<details><summary>语义分割 (Cityscapes)</summary>
163+
164+
请参阅[语义分割文档](https://docs.ultralytics.com/tasks/semantic)获取使用示例。这些模型在 [Cityscapes](https://docs.ultralytics.com/datasets/semantic/cityscapes) 数据集上训练,包含 19 个类别。
165+
166+
| 模型 | 尺寸<br><sup>(像素) | mIoU<sup>val | 速度<br><sup>RTX3090 PyTorch<br>(毫秒) | 参数<br><sup>(百万) | FLOPs<br><sup>(十亿) |
167+
| -------------------------------------------------------------------------------------------- | ------------------- | ------------ | -------------------------------------- | ------------------- | -------------------- |
168+
| [YOLO26n-sem](https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26n-sem.pt) | 1024 &times; 2048 | 78.3 | 4.4 ± 0.0 | 1.6 | 22.7 |
169+
| [YOLO26s-sem](https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26s-sem.pt) | 1024 &times; 2048 | 80.8 | 8.4 ± 0.0 | 6.5 | 88.8 |
170+
| [YOLO26m-sem](https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26m-sem.pt) | 1024 &times; 2048 | 82.0 | 19.9 ± 0.1 | 14.3 | 304.5 |
171+
| [YOLO26l-sem](https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26l-sem.pt) | 1024 &times; 2048 | 82.9 | 26.5 ± 0.1 | 17.9 | 384.7 |
172+
| [YOLO26x-sem](https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26x-sem.pt) | 1024 &times; 2048 | 83.6 | 48.9 ± 0.2 | 40.2 | 861.7 |
173+
174+
- **mIoU<sup>val</sup>** 值指的是在 [Cityscapes](https://www.cityscapes-dataset.com/) 验证集上的单模型单尺度性能。<br>使用 `yolo semantic val data=cityscapes.yaml device=0 imgsz=2048` 复现结果。
175+
- **速度** 指标是在 RTX3090 实例上对 Cityscapes 验证集图像进行平均测量的。<br>使用 `yolo semantic val data=cityscapes.yaml batch=1 device=0 imgsz=2048` 复现结果。
176+
177+
</details>
178+
162179
<details><summary>分类 (ImageNet)</summary>
163180

164181
请查阅[分类文档](https://docs.ultralytics.com/tasks/classify)获取使用示例。这些模型在 [ImageNet](https://docs.ultralytics.com/datasets/classify/imagenet) 数据集上训练,涵盖 1000 个类别。

docs/en/datasets/index.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
comments: true
3-
description: Explore Ultralytics' diverse datasets for vision tasks like detection, segmentation, classification, and more. Enhance your projects with high-quality annotated data.
4-
keywords: Ultralytics, datasets, computer vision, object detection, instance segmentation, pose estimation, image classification, multi-object tracking
3+
description: Explore Ultralytics' diverse datasets for vision tasks like detection, segmentation, semantic segmentation, classification, and more. Enhance your projects with high-quality annotated data.
4+
keywords: Ultralytics, datasets, computer vision, object detection, instance segmentation, semantic segmentation, pose estimation, image classification, multi-object tracking
55
---
66

77
# Datasets Overview
88

9-
Ultralytics provides support for various datasets to facilitate computer vision tasks such as detection, [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation), pose estimation, classification, and multi-object tracking. Below is a list of the main Ultralytics datasets, followed by a summary of each computer vision task and the respective datasets.
9+
Ultralytics provides support for various datasets to facilitate computer vision tasks such as detection, [instance segmentation](https://www.ultralytics.com/glossary/instance-segmentation), semantic segmentation, pose estimation, classification, and multi-object tracking. Below is a list of the main Ultralytics datasets, followed by a summary of each computer vision task and the respective datasets.
1010

1111
<p align="center">
1212
<br>
@@ -57,6 +57,14 @@ Instance segmentation is a computer vision technique that involves identifying a
5757
- [Crack-seg](segment/crack-seg.md): Specifically crafted dataset for detecting cracks on roads and walls, applicable for both object detection and segmentation tasks.
5858
- [Package-seg](segment/package-seg.md): Tailored dataset for identifying packages in warehouses or industrial settings, suitable for both object detection and segmentation applications.
5959

60+
## [Semantic Segmentation](semantic/index.md)
61+
62+
Semantic segmentation assigns a class label to every pixel in an image, producing dense scene maps for applications such as autonomous driving, scene parsing, and land-cover mapping.
63+
64+
- [Cityscapes](semantic/cityscapes.md): Urban street-scene semantic segmentation dataset with 19 train classes.
65+
- [Cityscapes8](semantic/cityscapes8.md): A compact 8-image Cityscapes subset for quick semantic segmentation pipeline checks.
66+
- [ADE20K](semantic/ade20k.md): Scene parsing dataset with 150 semantic classes.
67+
6068
## [Pose Estimation](pose/index.md)
6169

6270
Pose estimation is a technique used to determine the pose of the object relative to the camera or the world coordinate system. This involves identifying key points or joints on objects, particularly humans or animals.

0 commit comments

Comments
 (0)