dgenerate-ultralytics-headless 8.3.137__py3-none-any.whl → 8.3.224__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dgenerate_ultralytics_headless-8.3.137.dist-info → dgenerate_ultralytics_headless-8.3.224.dist-info}/METADATA +41 -34
- dgenerate_ultralytics_headless-8.3.224.dist-info/RECORD +285 -0
- {dgenerate_ultralytics_headless-8.3.137.dist-info → dgenerate_ultralytics_headless-8.3.224.dist-info}/WHEEL +1 -1
- tests/__init__.py +7 -6
- tests/conftest.py +15 -39
- tests/test_cli.py +17 -17
- tests/test_cuda.py +17 -8
- tests/test_engine.py +36 -10
- tests/test_exports.py +98 -37
- tests/test_integrations.py +12 -15
- tests/test_python.py +126 -82
- tests/test_solutions.py +319 -135
- ultralytics/__init__.py +27 -9
- ultralytics/cfg/__init__.py +83 -87
- ultralytics/cfg/datasets/Argoverse.yaml +4 -4
- ultralytics/cfg/datasets/DOTAv1.5.yaml +2 -2
- ultralytics/cfg/datasets/DOTAv1.yaml +2 -2
- ultralytics/cfg/datasets/GlobalWheat2020.yaml +2 -2
- ultralytics/cfg/datasets/HomeObjects-3K.yaml +4 -5
- ultralytics/cfg/datasets/ImageNet.yaml +3 -3
- ultralytics/cfg/datasets/Objects365.yaml +24 -20
- ultralytics/cfg/datasets/SKU-110K.yaml +9 -9
- ultralytics/cfg/datasets/VOC.yaml +10 -13
- ultralytics/cfg/datasets/VisDrone.yaml +43 -33
- ultralytics/cfg/datasets/african-wildlife.yaml +5 -5
- ultralytics/cfg/datasets/brain-tumor.yaml +4 -5
- ultralytics/cfg/datasets/carparts-seg.yaml +5 -5
- ultralytics/cfg/datasets/coco-pose.yaml +26 -4
- ultralytics/cfg/datasets/coco.yaml +4 -4
- ultralytics/cfg/datasets/coco128-seg.yaml +2 -2
- ultralytics/cfg/datasets/coco128.yaml +2 -2
- ultralytics/cfg/datasets/coco8-grayscale.yaml +103 -0
- ultralytics/cfg/datasets/coco8-multispectral.yaml +2 -2
- ultralytics/cfg/datasets/coco8-pose.yaml +23 -2
- ultralytics/cfg/datasets/coco8-seg.yaml +2 -2
- ultralytics/cfg/datasets/coco8.yaml +2 -2
- ultralytics/cfg/datasets/construction-ppe.yaml +32 -0
- ultralytics/cfg/datasets/crack-seg.yaml +5 -5
- ultralytics/cfg/datasets/dog-pose.yaml +32 -4
- ultralytics/cfg/datasets/dota8-multispectral.yaml +2 -2
- ultralytics/cfg/datasets/dota8.yaml +2 -2
- ultralytics/cfg/datasets/hand-keypoints.yaml +29 -4
- ultralytics/cfg/datasets/lvis.yaml +9 -9
- ultralytics/cfg/datasets/medical-pills.yaml +4 -5
- ultralytics/cfg/datasets/open-images-v7.yaml +7 -10
- ultralytics/cfg/datasets/package-seg.yaml +5 -5
- ultralytics/cfg/datasets/signature.yaml +4 -4
- ultralytics/cfg/datasets/tiger-pose.yaml +20 -4
- ultralytics/cfg/datasets/xView.yaml +5 -5
- ultralytics/cfg/default.yaml +96 -93
- ultralytics/cfg/trackers/botsort.yaml +16 -17
- ultralytics/cfg/trackers/bytetrack.yaml +9 -11
- ultralytics/data/__init__.py +4 -4
- ultralytics/data/annotator.py +12 -12
- ultralytics/data/augment.py +531 -564
- ultralytics/data/base.py +76 -81
- ultralytics/data/build.py +206 -42
- ultralytics/data/converter.py +179 -78
- ultralytics/data/dataset.py +121 -121
- ultralytics/data/loaders.py +114 -91
- ultralytics/data/split.py +28 -15
- ultralytics/data/split_dota.py +67 -48
- ultralytics/data/utils.py +110 -89
- ultralytics/engine/exporter.py +422 -460
- ultralytics/engine/model.py +224 -252
- ultralytics/engine/predictor.py +94 -89
- ultralytics/engine/results.py +345 -595
- ultralytics/engine/trainer.py +231 -134
- ultralytics/engine/tuner.py +279 -73
- ultralytics/engine/validator.py +53 -46
- ultralytics/hub/__init__.py +26 -28
- ultralytics/hub/auth.py +30 -16
- ultralytics/hub/google/__init__.py +34 -36
- ultralytics/hub/session.py +53 -77
- ultralytics/hub/utils.py +23 -109
- ultralytics/models/__init__.py +1 -1
- ultralytics/models/fastsam/__init__.py +1 -1
- ultralytics/models/fastsam/model.py +36 -18
- ultralytics/models/fastsam/predict.py +33 -44
- ultralytics/models/fastsam/utils.py +4 -5
- ultralytics/models/fastsam/val.py +12 -14
- ultralytics/models/nas/__init__.py +1 -1
- ultralytics/models/nas/model.py +16 -20
- ultralytics/models/nas/predict.py +12 -14
- ultralytics/models/nas/val.py +4 -5
- ultralytics/models/rtdetr/__init__.py +1 -1
- ultralytics/models/rtdetr/model.py +9 -9
- ultralytics/models/rtdetr/predict.py +22 -17
- ultralytics/models/rtdetr/train.py +20 -16
- ultralytics/models/rtdetr/val.py +79 -59
- ultralytics/models/sam/__init__.py +8 -2
- ultralytics/models/sam/amg.py +53 -38
- ultralytics/models/sam/build.py +29 -31
- ultralytics/models/sam/model.py +33 -38
- ultralytics/models/sam/modules/blocks.py +159 -182
- ultralytics/models/sam/modules/decoders.py +38 -47
- ultralytics/models/sam/modules/encoders.py +114 -133
- ultralytics/models/sam/modules/memory_attention.py +38 -31
- ultralytics/models/sam/modules/sam.py +114 -93
- ultralytics/models/sam/modules/tiny_encoder.py +268 -291
- ultralytics/models/sam/modules/transformer.py +59 -66
- ultralytics/models/sam/modules/utils.py +55 -72
- ultralytics/models/sam/predict.py +745 -341
- ultralytics/models/utils/loss.py +118 -107
- ultralytics/models/utils/ops.py +118 -71
- ultralytics/models/yolo/__init__.py +1 -1
- ultralytics/models/yolo/classify/predict.py +28 -26
- ultralytics/models/yolo/classify/train.py +50 -81
- ultralytics/models/yolo/classify/val.py +68 -61
- ultralytics/models/yolo/detect/predict.py +12 -15
- ultralytics/models/yolo/detect/train.py +56 -46
- ultralytics/models/yolo/detect/val.py +279 -223
- ultralytics/models/yolo/model.py +167 -86
- ultralytics/models/yolo/obb/predict.py +7 -11
- ultralytics/models/yolo/obb/train.py +23 -25
- ultralytics/models/yolo/obb/val.py +107 -99
- ultralytics/models/yolo/pose/__init__.py +1 -1
- ultralytics/models/yolo/pose/predict.py +12 -14
- ultralytics/models/yolo/pose/train.py +31 -69
- ultralytics/models/yolo/pose/val.py +119 -254
- ultralytics/models/yolo/segment/predict.py +21 -25
- ultralytics/models/yolo/segment/train.py +12 -66
- ultralytics/models/yolo/segment/val.py +126 -305
- ultralytics/models/yolo/world/train.py +53 -45
- ultralytics/models/yolo/world/train_world.py +51 -32
- ultralytics/models/yolo/yoloe/__init__.py +7 -7
- ultralytics/models/yolo/yoloe/predict.py +30 -37
- ultralytics/models/yolo/yoloe/train.py +89 -71
- ultralytics/models/yolo/yoloe/train_seg.py +15 -17
- ultralytics/models/yolo/yoloe/val.py +56 -41
- ultralytics/nn/__init__.py +9 -11
- ultralytics/nn/autobackend.py +179 -107
- ultralytics/nn/modules/__init__.py +67 -67
- ultralytics/nn/modules/activation.py +8 -7
- ultralytics/nn/modules/block.py +302 -323
- ultralytics/nn/modules/conv.py +61 -104
- ultralytics/nn/modules/head.py +488 -186
- ultralytics/nn/modules/transformer.py +183 -123
- ultralytics/nn/modules/utils.py +15 -20
- ultralytics/nn/tasks.py +327 -203
- ultralytics/nn/text_model.py +81 -65
- ultralytics/py.typed +1 -0
- ultralytics/solutions/__init__.py +12 -12
- ultralytics/solutions/ai_gym.py +19 -27
- ultralytics/solutions/analytics.py +36 -26
- ultralytics/solutions/config.py +29 -28
- ultralytics/solutions/distance_calculation.py +23 -24
- ultralytics/solutions/heatmap.py +17 -19
- ultralytics/solutions/instance_segmentation.py +21 -19
- ultralytics/solutions/object_blurrer.py +16 -17
- ultralytics/solutions/object_counter.py +48 -53
- ultralytics/solutions/object_cropper.py +22 -16
- ultralytics/solutions/parking_management.py +61 -58
- ultralytics/solutions/queue_management.py +19 -19
- ultralytics/solutions/region_counter.py +63 -50
- ultralytics/solutions/security_alarm.py +22 -25
- ultralytics/solutions/similarity_search.py +107 -60
- ultralytics/solutions/solutions.py +343 -262
- ultralytics/solutions/speed_estimation.py +35 -31
- ultralytics/solutions/streamlit_inference.py +104 -40
- ultralytics/solutions/templates/similarity-search.html +31 -24
- ultralytics/solutions/trackzone.py +24 -24
- ultralytics/solutions/vision_eye.py +11 -12
- ultralytics/trackers/__init__.py +1 -1
- ultralytics/trackers/basetrack.py +18 -27
- ultralytics/trackers/bot_sort.py +48 -39
- ultralytics/trackers/byte_tracker.py +94 -94
- ultralytics/trackers/track.py +7 -16
- ultralytics/trackers/utils/gmc.py +37 -69
- ultralytics/trackers/utils/kalman_filter.py +68 -76
- ultralytics/trackers/utils/matching.py +13 -17
- ultralytics/utils/__init__.py +251 -275
- ultralytics/utils/autobatch.py +19 -7
- ultralytics/utils/autodevice.py +68 -38
- ultralytics/utils/benchmarks.py +169 -130
- ultralytics/utils/callbacks/base.py +12 -13
- ultralytics/utils/callbacks/clearml.py +14 -15
- ultralytics/utils/callbacks/comet.py +139 -66
- ultralytics/utils/callbacks/dvc.py +19 -27
- ultralytics/utils/callbacks/hub.py +8 -6
- ultralytics/utils/callbacks/mlflow.py +6 -10
- ultralytics/utils/callbacks/neptune.py +11 -19
- ultralytics/utils/callbacks/platform.py +73 -0
- ultralytics/utils/callbacks/raytune.py +3 -4
- ultralytics/utils/callbacks/tensorboard.py +9 -12
- ultralytics/utils/callbacks/wb.py +33 -30
- ultralytics/utils/checks.py +163 -114
- ultralytics/utils/cpu.py +89 -0
- ultralytics/utils/dist.py +24 -20
- ultralytics/utils/downloads.py +176 -146
- ultralytics/utils/errors.py +11 -13
- ultralytics/utils/events.py +113 -0
- ultralytics/utils/export/__init__.py +7 -0
- ultralytics/utils/{export.py → export/engine.py} +81 -63
- ultralytics/utils/export/imx.py +294 -0
- ultralytics/utils/export/tensorflow.py +217 -0
- ultralytics/utils/files.py +33 -36
- ultralytics/utils/git.py +137 -0
- ultralytics/utils/instance.py +105 -120
- ultralytics/utils/logger.py +404 -0
- ultralytics/utils/loss.py +99 -61
- ultralytics/utils/metrics.py +649 -478
- ultralytics/utils/nms.py +337 -0
- ultralytics/utils/ops.py +263 -451
- ultralytics/utils/patches.py +70 -31
- ultralytics/utils/plotting.py +253 -223
- ultralytics/utils/tal.py +48 -61
- ultralytics/utils/torch_utils.py +244 -251
- ultralytics/utils/tqdm.py +438 -0
- ultralytics/utils/triton.py +22 -23
- ultralytics/utils/tuner.py +11 -10
- dgenerate_ultralytics_headless-8.3.137.dist-info/RECORD +0 -272
- {dgenerate_ultralytics_headless-8.3.137.dist-info → dgenerate_ultralytics_headless-8.3.224.dist-info}/entry_points.txt +0 -0
- {dgenerate_ultralytics_headless-8.3.137.dist-info → dgenerate_ultralytics_headless-8.3.224.dist-info}/licenses/LICENSE +0 -0
- {dgenerate_ultralytics_headless-8.3.137.dist-info → dgenerate_ultralytics_headless-8.3.224.dist-info}/top_level.txt +0 -0
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── SKU-110K
|
|
9
|
+
# └── SKU-110K ← downloads here (13.6 GB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
13
|
-
train: train.txt # train images (relative to 'path')
|
|
14
|
-
val: val.txt # val images (relative to 'path')
|
|
15
|
-
test: test.txt # test images (optional)
|
|
12
|
+
path: SKU-110K # dataset root dir
|
|
13
|
+
train: train.txt # train images (relative to 'path') 8219 images
|
|
14
|
+
val: val.txt # val images (relative to 'path') 588 images
|
|
15
|
+
test: test.txt # test images (optional) 2936 images
|
|
16
16
|
|
|
17
17
|
# Classes
|
|
18
18
|
names:
|
|
@@ -24,9 +24,9 @@ download: |
|
|
|
24
24
|
from pathlib import Path
|
|
25
25
|
|
|
26
26
|
import numpy as np
|
|
27
|
-
import
|
|
28
|
-
from tqdm import tqdm
|
|
27
|
+
import polars as pl
|
|
29
28
|
|
|
29
|
+
from ultralytics.utils import TQDM
|
|
30
30
|
from ultralytics.utils.downloads import download
|
|
31
31
|
from ultralytics.utils.ops import xyxy2xywh
|
|
32
32
|
|
|
@@ -45,11 +45,11 @@ download: |
|
|
|
45
45
|
# Convert labels
|
|
46
46
|
names = "image", "x1", "y1", "x2", "y2", "class", "image_width", "image_height" # column names
|
|
47
47
|
for d in "annotations_train.csv", "annotations_val.csv", "annotations_test.csv":
|
|
48
|
-
x =
|
|
48
|
+
x = pl.read_csv(dir / "annotations" / d, has_header=False, new_columns=names, infer_schema_length=None).to_numpy() # annotations
|
|
49
49
|
images, unique_images = x[:, 0], np.unique(x[:, 0])
|
|
50
50
|
with open((dir / d).with_suffix(".txt").__str__().replace("annotations_", ""), "w", encoding="utf-8") as f:
|
|
51
51
|
f.writelines(f"./images/{s}\n" for s in unique_images)
|
|
52
|
-
for im in
|
|
52
|
+
for im in TQDM(unique_images, desc=f"Converting {dir / d}"):
|
|
53
53
|
cls = 0 # single-class dataset
|
|
54
54
|
with open((dir / "labels" / im).with_suffix(".txt"), "a", encoding="utf-8") as f:
|
|
55
55
|
for r in x[images == im]:
|
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── VOC
|
|
9
|
+
# └── VOC ← downloads here (2.8 GB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
13
|
-
train: # train images (relative to 'path')
|
|
12
|
+
path: VOC
|
|
13
|
+
train: # train images (relative to 'path') 16551 images
|
|
14
14
|
- images/train2012
|
|
15
15
|
- images/train2007
|
|
16
16
|
- images/val2012
|
|
17
17
|
- images/val2007
|
|
18
|
-
val: # val images (relative to 'path')
|
|
18
|
+
val: # val images (relative to 'path') 4952 images
|
|
19
19
|
- images/test2007
|
|
20
20
|
test: # test images (optional)
|
|
21
21
|
- images/test2007
|
|
@@ -48,10 +48,8 @@ download: |
|
|
|
48
48
|
import xml.etree.ElementTree as ET
|
|
49
49
|
from pathlib import Path
|
|
50
50
|
|
|
51
|
-
from tqdm import tqdm
|
|
52
|
-
|
|
53
51
|
from ultralytics.utils.downloads import download
|
|
54
|
-
|
|
52
|
+
from ultralytics.utils import ASSETS_URL, TQDM
|
|
55
53
|
|
|
56
54
|
def convert_label(path, lb_path, year, image_id):
|
|
57
55
|
"""Converts XML annotations from VOC format to YOLO format by extracting bounding boxes and class IDs."""
|
|
@@ -81,13 +79,12 @@ download: |
|
|
|
81
79
|
|
|
82
80
|
# Download
|
|
83
81
|
dir = Path(yaml["path"]) # dataset root dir
|
|
84
|
-
url = "https://github.com/ultralytics/assets/releases/download/v0.0.0/"
|
|
85
82
|
urls = [
|
|
86
|
-
f"{
|
|
87
|
-
f"{
|
|
88
|
-
f"{
|
|
83
|
+
f"{ASSETS_URL}/VOCtrainval_06-Nov-2007.zip", # 446MB, 5012 images
|
|
84
|
+
f"{ASSETS_URL}/VOCtest_06-Nov-2007.zip", # 438MB, 4953 images
|
|
85
|
+
f"{ASSETS_URL}/VOCtrainval_11-May-2012.zip", # 1.95GB, 17126 images
|
|
89
86
|
]
|
|
90
|
-
download(urls, dir=dir / "images",
|
|
87
|
+
download(urls, dir=dir / "images", threads=3, exist_ok=True) # download and unzip over existing (required)
|
|
91
88
|
|
|
92
89
|
# Convert
|
|
93
90
|
path = dir / "images/VOCdevkit"
|
|
@@ -99,7 +96,7 @@ download: |
|
|
|
99
96
|
|
|
100
97
|
with open(path / f"VOC{year}/ImageSets/Main/{image_set}.txt") as f:
|
|
101
98
|
image_ids = f.read().strip().split()
|
|
102
|
-
for id in
|
|
99
|
+
for id in TQDM(image_ids, desc=f"{image_set}{year}"):
|
|
103
100
|
f = path / f"VOC{year}/JPEGImages/{id}.jpg" # old img path
|
|
104
101
|
lb_path = (lbs_path / f.name).with_suffix(".txt") # new label path
|
|
105
102
|
f.rename(imgs_path / f.name) # move image
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── VisDrone
|
|
9
|
+
# └── VisDrone ← downloads here (2.3 GB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
13
|
-
train:
|
|
14
|
-
val:
|
|
15
|
-
test:
|
|
12
|
+
path: VisDrone # dataset root dir
|
|
13
|
+
train: images/train # train images (relative to 'path') 6471 images
|
|
14
|
+
val: images/val # val images (relative to 'path') 548 images
|
|
15
|
+
test: images/test # test-dev images (optional) 1610 images
|
|
16
16
|
|
|
17
17
|
# Classes
|
|
18
18
|
names:
|
|
@@ -31,47 +31,57 @@ names:
|
|
|
31
31
|
download: |
|
|
32
32
|
import os
|
|
33
33
|
from pathlib import Path
|
|
34
|
+
import shutil
|
|
34
35
|
|
|
35
36
|
from ultralytics.utils.downloads import download
|
|
37
|
+
from ultralytics.utils import ASSETS_URL, TQDM
|
|
36
38
|
|
|
37
39
|
|
|
38
|
-
def visdrone2yolo(dir):
|
|
39
|
-
"""Convert VisDrone annotations to YOLO format
|
|
40
|
+
def visdrone2yolo(dir, split, source_name=None):
|
|
41
|
+
"""Convert VisDrone annotations to YOLO format with images/{split} and labels/{split} structure."""
|
|
40
42
|
from PIL import Image
|
|
41
|
-
from tqdm import tqdm
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return (box[0] + box[2] / 2) * dw, (box[1] + box[3] / 2) * dh, box[2] * dw, box[3] * dh
|
|
44
|
+
source_dir = dir / (source_name or f"VisDrone2019-DET-{split}")
|
|
45
|
+
images_dir = dir / "images" / split
|
|
46
|
+
labels_dir = dir / "labels" / split
|
|
47
|
+
labels_dir.mkdir(parents=True, exist_ok=True)
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
# Move images to new structure
|
|
50
|
+
if (source_images_dir := source_dir / "images").exists():
|
|
51
|
+
images_dir.mkdir(parents=True, exist_ok=True)
|
|
52
|
+
for img in source_images_dir.glob("*.jpg"):
|
|
53
|
+
img.rename(images_dir / img.name)
|
|
54
|
+
|
|
55
|
+
for f in TQDM((source_dir / "annotations").glob("*.txt"), desc=f"Converting {split}"):
|
|
56
|
+
img_size = Image.open(images_dir / f.with_suffix(".jpg").name).size
|
|
57
|
+
dw, dh = 1.0 / img_size[0], 1.0 / img_size[1]
|
|
53
58
|
lines = []
|
|
54
|
-
|
|
59
|
+
|
|
60
|
+
with open(f, encoding="utf-8") as file:
|
|
55
61
|
for row in [x.split(",") for x in file.read().strip().splitlines()]:
|
|
56
|
-
if row[4]
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
if row[4] != "0": # Skip ignored regions
|
|
63
|
+
x, y, w, h = map(int, row[:4])
|
|
64
|
+
cls = int(row[5]) - 1
|
|
65
|
+
# Convert to YOLO format
|
|
66
|
+
x_center, y_center = (x + w / 2) * dw, (y + h / 2) * dh
|
|
67
|
+
w_norm, h_norm = w * dw, h * dh
|
|
68
|
+
lines.append(f"{cls} {x_center:.6f} {y_center:.6f} {w_norm:.6f} {h_norm:.6f}\n")
|
|
69
|
+
|
|
70
|
+
(labels_dir / f.name).write_text("".join(lines), encoding="utf-8")
|
|
63
71
|
|
|
64
72
|
|
|
65
|
-
# Download
|
|
73
|
+
# Download (ignores test-challenge split)
|
|
66
74
|
dir = Path(yaml["path"]) # dataset root dir
|
|
67
75
|
urls = [
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
76
|
+
f"{ASSETS_URL}/VisDrone2019-DET-train.zip",
|
|
77
|
+
f"{ASSETS_URL}/VisDrone2019-DET-val.zip",
|
|
78
|
+
f"{ASSETS_URL}/VisDrone2019-DET-test-dev.zip",
|
|
79
|
+
# f"{ASSETS_URL}/VisDrone2019-DET-test-challenge.zip",
|
|
72
80
|
]
|
|
73
|
-
download(urls, dir=dir,
|
|
81
|
+
download(urls, dir=dir, threads=4)
|
|
74
82
|
|
|
75
83
|
# Convert
|
|
76
|
-
|
|
77
|
-
|
|
84
|
+
splits = {"VisDrone2019-DET-train": "train", "VisDrone2019-DET-val": "val", "VisDrone2019-DET-test-dev": "test"}
|
|
85
|
+
for folder, split in splits.items():
|
|
86
|
+
visdrone2yolo(dir, split, folder) # convert VisDrone annotations to YOLO labels
|
|
87
|
+
shutil.rmtree(dir / folder) # cleanup original directory
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── african-wildlife
|
|
9
|
+
# └── african-wildlife ← downloads here (100 MB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
13
|
-
train: train
|
|
14
|
-
val:
|
|
15
|
-
test: test
|
|
12
|
+
path: african-wildlife # dataset root dir
|
|
13
|
+
train: images/train # train images (relative to 'path') 1052 images
|
|
14
|
+
val: images/val # val images (relative to 'path') 225 images
|
|
15
|
+
test: images/test # test images (relative to 'path') 227 images
|
|
16
16
|
|
|
17
17
|
# Classes
|
|
18
18
|
names:
|
|
@@ -6,13 +6,12 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── brain-tumor
|
|
9
|
+
# └── brain-tumor ← downloads here (4.21 MB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
13
|
-
train: train
|
|
14
|
-
val:
|
|
15
|
-
test: # test images (relative to 'path')
|
|
12
|
+
path: brain-tumor # dataset root dir
|
|
13
|
+
train: images/train # train images (relative to 'path') 893 images
|
|
14
|
+
val: images/val # val images (relative to 'path') 223 images
|
|
16
15
|
|
|
17
16
|
# Classes
|
|
18
17
|
names:
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── carparts-seg
|
|
9
|
+
# └── carparts-seg ← downloads here (133 MB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
13
|
-
train: train
|
|
14
|
-
val:
|
|
15
|
-
test: test
|
|
12
|
+
path: carparts-seg # dataset root dir
|
|
13
|
+
train: images/train # train images (relative to 'path') 3516 images
|
|
14
|
+
val: images/val # val images (relative to 'path') 276 images
|
|
15
|
+
test: images/test # test images (relative to 'path') 401 images
|
|
16
16
|
|
|
17
17
|
# Classes
|
|
18
18
|
names:
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── coco-pose
|
|
9
|
+
# └── coco-pose ← downloads here (20.1 GB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
12
|
+
path: coco-pose # dataset root dir
|
|
13
13
|
train: train2017.txt # train images (relative to 'path') 56599 images
|
|
14
14
|
val: val2017.txt # val images (relative to 'path') 2346 images
|
|
15
15
|
test: test-dev2017.txt # 20288 of 40670 images, submit to https://codalab.lisn.upsaclay.fr/competitions/7403
|
|
@@ -22,16 +22,38 @@ flip_idx: [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15]
|
|
|
22
22
|
names:
|
|
23
23
|
0: person
|
|
24
24
|
|
|
25
|
+
# Keypoint names per class
|
|
26
|
+
kpt_names:
|
|
27
|
+
0:
|
|
28
|
+
- nose
|
|
29
|
+
- left_eye
|
|
30
|
+
- right_eye
|
|
31
|
+
- left_ear
|
|
32
|
+
- right_ear
|
|
33
|
+
- left_shoulder
|
|
34
|
+
- right_shoulder
|
|
35
|
+
- left_elbow
|
|
36
|
+
- right_elbow
|
|
37
|
+
- left_wrist
|
|
38
|
+
- right_wrist
|
|
39
|
+
- left_hip
|
|
40
|
+
- right_hip
|
|
41
|
+
- left_knee
|
|
42
|
+
- right_knee
|
|
43
|
+
- left_ankle
|
|
44
|
+
- right_ankle
|
|
45
|
+
|
|
25
46
|
# Download script/URL (optional)
|
|
26
47
|
download: |
|
|
27
48
|
from pathlib import Path
|
|
28
49
|
|
|
50
|
+
from ultralytics.utils import ASSETS_URL
|
|
29
51
|
from ultralytics.utils.downloads import download
|
|
30
52
|
|
|
31
53
|
# Download labels
|
|
32
54
|
dir = Path(yaml["path"]) # dataset root dir
|
|
33
|
-
|
|
34
|
-
urls = [f"{
|
|
55
|
+
|
|
56
|
+
urls = [f"{ASSETS_URL}/coco2017labels-pose.zip"]
|
|
35
57
|
download(urls, dir=dir.parent)
|
|
36
58
|
# Download data
|
|
37
59
|
urls = [
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── coco
|
|
9
|
+
# └── coco ← downloads here (20.1 GB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
12
|
+
path: coco # dataset root dir
|
|
13
13
|
train: train2017.txt # train images (relative to 'path') 118287 images
|
|
14
14
|
val: val2017.txt # val images (relative to 'path') 5000 images
|
|
15
15
|
test: test-dev2017.txt # 20288 of 40670 images, submit to https://competitions.codalab.org/competitions/20794
|
|
@@ -101,13 +101,13 @@ names:
|
|
|
101
101
|
download: |
|
|
102
102
|
from pathlib import Path
|
|
103
103
|
|
|
104
|
+
from ultralytics.utils import ASSETS_URL
|
|
104
105
|
from ultralytics.utils.downloads import download
|
|
105
106
|
|
|
106
107
|
# Download labels
|
|
107
108
|
segments = True # segment or box labels
|
|
108
109
|
dir = Path(yaml["path"]) # dataset root dir
|
|
109
|
-
|
|
110
|
-
urls = [url + ("coco2017labels-segments.zip" if segments else "coco2017labels.zip")] # labels
|
|
110
|
+
urls = [ASSETS_URL + ("/coco2017labels-segments.zip" if segments else "/coco2017labels.zip")] # labels
|
|
111
111
|
download(urls, dir=dir.parent)
|
|
112
112
|
# Download data
|
|
113
113
|
urls = [
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── coco128-seg
|
|
9
|
+
# └── coco128-seg ← downloads here (7 MB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
12
|
+
path: coco128-seg # dataset root dir
|
|
13
13
|
train: images/train2017 # train images (relative to 'path') 128 images
|
|
14
14
|
val: images/train2017 # val images (relative to 'path') 128 images
|
|
15
15
|
test: # test images (optional)
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── coco128
|
|
9
|
+
# └── coco128 ← downloads here (7 MB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
12
|
+
path: coco128 # dataset root dir
|
|
13
13
|
train: images/train2017 # train images (relative to 'path') 128 images
|
|
14
14
|
val: images/train2017 # val images (relative to 'path') 128 images
|
|
15
15
|
test: # test images (optional)
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
2
|
+
|
|
3
|
+
# COCO8-Grayscale dataset (first 8 images from COCO train2017) by Ultralytics
|
|
4
|
+
# Documentation: https://docs.ultralytics.com/datasets/detect/coco8-grayscale/
|
|
5
|
+
# Example usage: yolo train data=coco8-grayscale.yaml
|
|
6
|
+
# parent
|
|
7
|
+
# ├── ultralytics
|
|
8
|
+
# └── datasets
|
|
9
|
+
# └── coco8-grayscale ← downloads here (1 MB)
|
|
10
|
+
|
|
11
|
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
+
path: coco8-grayscale # dataset root dir
|
|
13
|
+
train: images/train # train images (relative to 'path') 4 images
|
|
14
|
+
val: images/val # val images (relative to 'path') 4 images
|
|
15
|
+
test: # test images (optional)
|
|
16
|
+
|
|
17
|
+
channels: 1
|
|
18
|
+
|
|
19
|
+
# Classes
|
|
20
|
+
names:
|
|
21
|
+
0: person
|
|
22
|
+
1: bicycle
|
|
23
|
+
2: car
|
|
24
|
+
3: motorcycle
|
|
25
|
+
4: airplane
|
|
26
|
+
5: bus
|
|
27
|
+
6: train
|
|
28
|
+
7: truck
|
|
29
|
+
8: boat
|
|
30
|
+
9: traffic light
|
|
31
|
+
10: fire hydrant
|
|
32
|
+
11: stop sign
|
|
33
|
+
12: parking meter
|
|
34
|
+
13: bench
|
|
35
|
+
14: bird
|
|
36
|
+
15: cat
|
|
37
|
+
16: dog
|
|
38
|
+
17: horse
|
|
39
|
+
18: sheep
|
|
40
|
+
19: cow
|
|
41
|
+
20: elephant
|
|
42
|
+
21: bear
|
|
43
|
+
22: zebra
|
|
44
|
+
23: giraffe
|
|
45
|
+
24: backpack
|
|
46
|
+
25: umbrella
|
|
47
|
+
26: handbag
|
|
48
|
+
27: tie
|
|
49
|
+
28: suitcase
|
|
50
|
+
29: frisbee
|
|
51
|
+
30: skis
|
|
52
|
+
31: snowboard
|
|
53
|
+
32: sports ball
|
|
54
|
+
33: kite
|
|
55
|
+
34: baseball bat
|
|
56
|
+
35: baseball glove
|
|
57
|
+
36: skateboard
|
|
58
|
+
37: surfboard
|
|
59
|
+
38: tennis racket
|
|
60
|
+
39: bottle
|
|
61
|
+
40: wine glass
|
|
62
|
+
41: cup
|
|
63
|
+
42: fork
|
|
64
|
+
43: knife
|
|
65
|
+
44: spoon
|
|
66
|
+
45: bowl
|
|
67
|
+
46: banana
|
|
68
|
+
47: apple
|
|
69
|
+
48: sandwich
|
|
70
|
+
49: orange
|
|
71
|
+
50: broccoli
|
|
72
|
+
51: carrot
|
|
73
|
+
52: hot dog
|
|
74
|
+
53: pizza
|
|
75
|
+
54: donut
|
|
76
|
+
55: cake
|
|
77
|
+
56: chair
|
|
78
|
+
57: couch
|
|
79
|
+
58: potted plant
|
|
80
|
+
59: bed
|
|
81
|
+
60: dining table
|
|
82
|
+
61: toilet
|
|
83
|
+
62: tv
|
|
84
|
+
63: laptop
|
|
85
|
+
64: mouse
|
|
86
|
+
65: remote
|
|
87
|
+
66: keyboard
|
|
88
|
+
67: cell phone
|
|
89
|
+
68: microwave
|
|
90
|
+
69: oven
|
|
91
|
+
70: toaster
|
|
92
|
+
71: sink
|
|
93
|
+
72: refrigerator
|
|
94
|
+
73: book
|
|
95
|
+
74: clock
|
|
96
|
+
75: vase
|
|
97
|
+
76: scissors
|
|
98
|
+
77: teddy bear
|
|
99
|
+
78: hair drier
|
|
100
|
+
79: toothbrush
|
|
101
|
+
|
|
102
|
+
# Download script/URL (optional)
|
|
103
|
+
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/coco8-grayscale.zip
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── coco8-multispectral
|
|
9
|
+
# └── coco8-multispectral ← downloads here (20.2 MB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
12
|
+
path: coco8-multispectral # dataset root dir
|
|
13
13
|
train: images/train # train images (relative to 'path') 4 images
|
|
14
14
|
val: images/val # val images (relative to 'path') 4 images
|
|
15
15
|
test: # test images (optional)
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── coco8-pose
|
|
9
|
+
# └── coco8-pose ← downloads here (1 MB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
12
|
+
path: coco8-pose # dataset root dir
|
|
13
13
|
train: images/train # train images (relative to 'path') 4 images
|
|
14
14
|
val: images/val # val images (relative to 'path') 4 images
|
|
15
15
|
test: # test images (optional)
|
|
@@ -22,5 +22,26 @@ flip_idx: [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15]
|
|
|
22
22
|
names:
|
|
23
23
|
0: person
|
|
24
24
|
|
|
25
|
+
# Keypoint names per class
|
|
26
|
+
kpt_names:
|
|
27
|
+
0:
|
|
28
|
+
- nose
|
|
29
|
+
- left_eye
|
|
30
|
+
- right_eye
|
|
31
|
+
- left_ear
|
|
32
|
+
- right_ear
|
|
33
|
+
- left_shoulder
|
|
34
|
+
- right_shoulder
|
|
35
|
+
- left_elbow
|
|
36
|
+
- right_elbow
|
|
37
|
+
- left_wrist
|
|
38
|
+
- right_wrist
|
|
39
|
+
- left_hip
|
|
40
|
+
- right_hip
|
|
41
|
+
- left_knee
|
|
42
|
+
- right_knee
|
|
43
|
+
- left_ankle
|
|
44
|
+
- right_ankle
|
|
45
|
+
|
|
25
46
|
# Download script/URL (optional)
|
|
26
47
|
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/coco8-pose.zip
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── coco8-seg
|
|
9
|
+
# └── coco8-seg ← downloads here (1 MB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
12
|
+
path: coco8-seg # dataset root dir
|
|
13
13
|
train: images/train # train images (relative to 'path') 4 images
|
|
14
14
|
val: images/val # val images (relative to 'path') 4 images
|
|
15
15
|
test: # test images (optional)
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── coco8
|
|
9
|
+
# └── coco8 ← downloads here (1 MB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
12
|
+
path: coco8 # dataset root dir
|
|
13
13
|
train: images/train # train images (relative to 'path') 4 images
|
|
14
14
|
val: images/val # val images (relative to 'path') 4 images
|
|
15
15
|
test: # test images (optional)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
2
|
+
|
|
3
|
+
# Construction-PPE dataset by Ultralytics
|
|
4
|
+
# Documentation: https://docs.ultralytics.com/datasets/detect/construction-ppe/
|
|
5
|
+
# Example usage: yolo train data=construction-ppe.yaml
|
|
6
|
+
# parent
|
|
7
|
+
# ├── ultralytics
|
|
8
|
+
# └── datasets
|
|
9
|
+
# └── construction-ppe ← downloads here (178.4 MB)
|
|
10
|
+
|
|
11
|
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
+
path: construction-ppe # dataset root dir
|
|
13
|
+
train: images/train # train images (relative to 'path') 1132 images
|
|
14
|
+
val: images/val # val images (relative to 'path') 143 images
|
|
15
|
+
test: images/test # test images (relative to 'path') 141 images
|
|
16
|
+
|
|
17
|
+
# Classes
|
|
18
|
+
names:
|
|
19
|
+
0: helmet
|
|
20
|
+
1: gloves
|
|
21
|
+
2: vest
|
|
22
|
+
3: boots
|
|
23
|
+
4: goggles
|
|
24
|
+
5: none
|
|
25
|
+
6: Person
|
|
26
|
+
7: no_helmet
|
|
27
|
+
8: no_goggle
|
|
28
|
+
9: no_gloves
|
|
29
|
+
10: no_boots
|
|
30
|
+
|
|
31
|
+
# Download script/URL (optional)
|
|
32
|
+
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/construction-ppe.zip
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
# parent
|
|
7
7
|
# ├── ultralytics
|
|
8
8
|
# └── datasets
|
|
9
|
-
# └── crack-seg
|
|
9
|
+
# └── crack-seg ← downloads here (91.6 MB)
|
|
10
10
|
|
|
11
11
|
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
12
|
-
path:
|
|
13
|
-
train: train
|
|
14
|
-
val:
|
|
15
|
-
test: test
|
|
12
|
+
path: crack-seg # dataset root dir
|
|
13
|
+
train: images/train # train images (relative to 'path') 3717 images
|
|
14
|
+
val: images/val # val images (relative to 'path') 112 images
|
|
15
|
+
test: images/test # test images (relative to 'path') 200 images
|
|
16
16
|
|
|
17
17
|
# Classes
|
|
18
18
|
names:
|