dgenerate-ultralytics-headless 8.3.134__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.134.dist-info/METADATA +400 -0
- dgenerate_ultralytics_headless-8.3.134.dist-info/RECORD +272 -0
- dgenerate_ultralytics_headless-8.3.134.dist-info/WHEEL +5 -0
- dgenerate_ultralytics_headless-8.3.134.dist-info/entry_points.txt +3 -0
- dgenerate_ultralytics_headless-8.3.134.dist-info/licenses/LICENSE +661 -0
- dgenerate_ultralytics_headless-8.3.134.dist-info/top_level.txt +1 -0
- tests/__init__.py +22 -0
- tests/conftest.py +83 -0
- tests/test_cli.py +138 -0
- tests/test_cuda.py +215 -0
- tests/test_engine.py +131 -0
- tests/test_exports.py +236 -0
- tests/test_integrations.py +154 -0
- tests/test_python.py +694 -0
- tests/test_solutions.py +187 -0
- ultralytics/__init__.py +30 -0
- ultralytics/assets/bus.jpg +0 -0
- ultralytics/assets/zidane.jpg +0 -0
- ultralytics/cfg/__init__.py +1023 -0
- ultralytics/cfg/datasets/Argoverse.yaml +77 -0
- ultralytics/cfg/datasets/DOTAv1.5.yaml +37 -0
- ultralytics/cfg/datasets/DOTAv1.yaml +36 -0
- ultralytics/cfg/datasets/GlobalWheat2020.yaml +68 -0
- ultralytics/cfg/datasets/HomeObjects-3K.yaml +33 -0
- ultralytics/cfg/datasets/ImageNet.yaml +2025 -0
- ultralytics/cfg/datasets/Objects365.yaml +443 -0
- ultralytics/cfg/datasets/SKU-110K.yaml +58 -0
- ultralytics/cfg/datasets/VOC.yaml +106 -0
- ultralytics/cfg/datasets/VisDrone.yaml +77 -0
- ultralytics/cfg/datasets/african-wildlife.yaml +25 -0
- ultralytics/cfg/datasets/brain-tumor.yaml +23 -0
- ultralytics/cfg/datasets/carparts-seg.yaml +44 -0
- ultralytics/cfg/datasets/coco-pose.yaml +42 -0
- ultralytics/cfg/datasets/coco.yaml +118 -0
- ultralytics/cfg/datasets/coco128-seg.yaml +101 -0
- ultralytics/cfg/datasets/coco128.yaml +101 -0
- ultralytics/cfg/datasets/coco8-multispectral.yaml +104 -0
- ultralytics/cfg/datasets/coco8-pose.yaml +26 -0
- ultralytics/cfg/datasets/coco8-seg.yaml +101 -0
- ultralytics/cfg/datasets/coco8.yaml +101 -0
- ultralytics/cfg/datasets/crack-seg.yaml +22 -0
- ultralytics/cfg/datasets/dog-pose.yaml +24 -0
- ultralytics/cfg/datasets/dota8-multispectral.yaml +38 -0
- ultralytics/cfg/datasets/dota8.yaml +35 -0
- ultralytics/cfg/datasets/hand-keypoints.yaml +26 -0
- ultralytics/cfg/datasets/lvis.yaml +1240 -0
- ultralytics/cfg/datasets/medical-pills.yaml +22 -0
- ultralytics/cfg/datasets/open-images-v7.yaml +666 -0
- ultralytics/cfg/datasets/package-seg.yaml +22 -0
- ultralytics/cfg/datasets/signature.yaml +21 -0
- ultralytics/cfg/datasets/tiger-pose.yaml +25 -0
- ultralytics/cfg/datasets/xView.yaml +155 -0
- ultralytics/cfg/default.yaml +127 -0
- ultralytics/cfg/models/11/yolo11-cls-resnet18.yaml +17 -0
- ultralytics/cfg/models/11/yolo11-cls.yaml +33 -0
- ultralytics/cfg/models/11/yolo11-obb.yaml +50 -0
- ultralytics/cfg/models/11/yolo11-pose.yaml +51 -0
- ultralytics/cfg/models/11/yolo11-seg.yaml +50 -0
- ultralytics/cfg/models/11/yolo11.yaml +50 -0
- ultralytics/cfg/models/11/yoloe-11-seg.yaml +48 -0
- ultralytics/cfg/models/11/yoloe-11.yaml +48 -0
- ultralytics/cfg/models/12/yolo12-cls.yaml +32 -0
- ultralytics/cfg/models/12/yolo12-obb.yaml +48 -0
- ultralytics/cfg/models/12/yolo12-pose.yaml +49 -0
- ultralytics/cfg/models/12/yolo12-seg.yaml +48 -0
- ultralytics/cfg/models/12/yolo12.yaml +48 -0
- ultralytics/cfg/models/rt-detr/rtdetr-l.yaml +53 -0
- ultralytics/cfg/models/rt-detr/rtdetr-resnet101.yaml +45 -0
- ultralytics/cfg/models/rt-detr/rtdetr-resnet50.yaml +45 -0
- ultralytics/cfg/models/rt-detr/rtdetr-x.yaml +57 -0
- ultralytics/cfg/models/v10/yolov10b.yaml +45 -0
- ultralytics/cfg/models/v10/yolov10l.yaml +45 -0
- ultralytics/cfg/models/v10/yolov10m.yaml +45 -0
- ultralytics/cfg/models/v10/yolov10n.yaml +45 -0
- ultralytics/cfg/models/v10/yolov10s.yaml +45 -0
- ultralytics/cfg/models/v10/yolov10x.yaml +45 -0
- ultralytics/cfg/models/v3/yolov3-spp.yaml +49 -0
- ultralytics/cfg/models/v3/yolov3-tiny.yaml +40 -0
- ultralytics/cfg/models/v3/yolov3.yaml +49 -0
- ultralytics/cfg/models/v5/yolov5-p6.yaml +62 -0
- ultralytics/cfg/models/v5/yolov5.yaml +51 -0
- ultralytics/cfg/models/v6/yolov6.yaml +56 -0
- ultralytics/cfg/models/v8/yoloe-v8-seg.yaml +45 -0
- ultralytics/cfg/models/v8/yoloe-v8.yaml +45 -0
- ultralytics/cfg/models/v8/yolov8-cls-resnet101.yaml +28 -0
- ultralytics/cfg/models/v8/yolov8-cls-resnet50.yaml +28 -0
- ultralytics/cfg/models/v8/yolov8-cls.yaml +32 -0
- ultralytics/cfg/models/v8/yolov8-ghost-p2.yaml +58 -0
- ultralytics/cfg/models/v8/yolov8-ghost-p6.yaml +60 -0
- ultralytics/cfg/models/v8/yolov8-ghost.yaml +50 -0
- ultralytics/cfg/models/v8/yolov8-obb.yaml +49 -0
- ultralytics/cfg/models/v8/yolov8-p2.yaml +57 -0
- ultralytics/cfg/models/v8/yolov8-p6.yaml +59 -0
- ultralytics/cfg/models/v8/yolov8-pose-p6.yaml +60 -0
- ultralytics/cfg/models/v8/yolov8-pose.yaml +50 -0
- ultralytics/cfg/models/v8/yolov8-rtdetr.yaml +49 -0
- ultralytics/cfg/models/v8/yolov8-seg-p6.yaml +59 -0
- ultralytics/cfg/models/v8/yolov8-seg.yaml +49 -0
- ultralytics/cfg/models/v8/yolov8-world.yaml +51 -0
- ultralytics/cfg/models/v8/yolov8-worldv2.yaml +49 -0
- ultralytics/cfg/models/v8/yolov8.yaml +49 -0
- ultralytics/cfg/models/v9/yolov9c-seg.yaml +41 -0
- ultralytics/cfg/models/v9/yolov9c.yaml +41 -0
- ultralytics/cfg/models/v9/yolov9e-seg.yaml +64 -0
- ultralytics/cfg/models/v9/yolov9e.yaml +64 -0
- ultralytics/cfg/models/v9/yolov9m.yaml +41 -0
- ultralytics/cfg/models/v9/yolov9s.yaml +41 -0
- ultralytics/cfg/models/v9/yolov9t.yaml +41 -0
- ultralytics/cfg/trackers/botsort.yaml +22 -0
- ultralytics/cfg/trackers/bytetrack.yaml +14 -0
- ultralytics/data/__init__.py +26 -0
- ultralytics/data/annotator.py +66 -0
- ultralytics/data/augment.py +2945 -0
- ultralytics/data/base.py +438 -0
- ultralytics/data/build.py +258 -0
- ultralytics/data/converter.py +754 -0
- ultralytics/data/dataset.py +834 -0
- ultralytics/data/loaders.py +676 -0
- ultralytics/data/scripts/download_weights.sh +18 -0
- ultralytics/data/scripts/get_coco.sh +61 -0
- ultralytics/data/scripts/get_coco128.sh +18 -0
- ultralytics/data/scripts/get_imagenet.sh +52 -0
- ultralytics/data/split.py +125 -0
- ultralytics/data/split_dota.py +325 -0
- ultralytics/data/utils.py +777 -0
- ultralytics/engine/__init__.py +1 -0
- ultralytics/engine/exporter.py +1519 -0
- ultralytics/engine/model.py +1156 -0
- ultralytics/engine/predictor.py +502 -0
- ultralytics/engine/results.py +1840 -0
- ultralytics/engine/trainer.py +853 -0
- ultralytics/engine/tuner.py +243 -0
- ultralytics/engine/validator.py +377 -0
- ultralytics/hub/__init__.py +168 -0
- ultralytics/hub/auth.py +137 -0
- ultralytics/hub/google/__init__.py +176 -0
- ultralytics/hub/session.py +446 -0
- ultralytics/hub/utils.py +248 -0
- ultralytics/models/__init__.py +9 -0
- ultralytics/models/fastsam/__init__.py +7 -0
- ultralytics/models/fastsam/model.py +61 -0
- ultralytics/models/fastsam/predict.py +181 -0
- ultralytics/models/fastsam/utils.py +24 -0
- ultralytics/models/fastsam/val.py +40 -0
- ultralytics/models/nas/__init__.py +7 -0
- ultralytics/models/nas/model.py +102 -0
- ultralytics/models/nas/predict.py +58 -0
- ultralytics/models/nas/val.py +39 -0
- ultralytics/models/rtdetr/__init__.py +7 -0
- ultralytics/models/rtdetr/model.py +63 -0
- ultralytics/models/rtdetr/predict.py +84 -0
- ultralytics/models/rtdetr/train.py +85 -0
- ultralytics/models/rtdetr/val.py +191 -0
- ultralytics/models/sam/__init__.py +6 -0
- ultralytics/models/sam/amg.py +260 -0
- ultralytics/models/sam/build.py +358 -0
- ultralytics/models/sam/model.py +170 -0
- ultralytics/models/sam/modules/__init__.py +1 -0
- ultralytics/models/sam/modules/blocks.py +1129 -0
- ultralytics/models/sam/modules/decoders.py +515 -0
- ultralytics/models/sam/modules/encoders.py +854 -0
- ultralytics/models/sam/modules/memory_attention.py +299 -0
- ultralytics/models/sam/modules/sam.py +1006 -0
- ultralytics/models/sam/modules/tiny_encoder.py +1002 -0
- ultralytics/models/sam/modules/transformer.py +351 -0
- ultralytics/models/sam/modules/utils.py +394 -0
- ultralytics/models/sam/predict.py +1605 -0
- ultralytics/models/utils/__init__.py +1 -0
- ultralytics/models/utils/loss.py +455 -0
- ultralytics/models/utils/ops.py +268 -0
- ultralytics/models/yolo/__init__.py +7 -0
- ultralytics/models/yolo/classify/__init__.py +7 -0
- ultralytics/models/yolo/classify/predict.py +88 -0
- ultralytics/models/yolo/classify/train.py +233 -0
- ultralytics/models/yolo/classify/val.py +215 -0
- ultralytics/models/yolo/detect/__init__.py +7 -0
- ultralytics/models/yolo/detect/predict.py +124 -0
- ultralytics/models/yolo/detect/train.py +217 -0
- ultralytics/models/yolo/detect/val.py +451 -0
- ultralytics/models/yolo/model.py +354 -0
- ultralytics/models/yolo/obb/__init__.py +7 -0
- ultralytics/models/yolo/obb/predict.py +66 -0
- ultralytics/models/yolo/obb/train.py +81 -0
- ultralytics/models/yolo/obb/val.py +283 -0
- ultralytics/models/yolo/pose/__init__.py +7 -0
- ultralytics/models/yolo/pose/predict.py +79 -0
- ultralytics/models/yolo/pose/train.py +154 -0
- ultralytics/models/yolo/pose/val.py +394 -0
- ultralytics/models/yolo/segment/__init__.py +7 -0
- ultralytics/models/yolo/segment/predict.py +113 -0
- ultralytics/models/yolo/segment/train.py +123 -0
- ultralytics/models/yolo/segment/val.py +428 -0
- ultralytics/models/yolo/world/__init__.py +5 -0
- ultralytics/models/yolo/world/train.py +119 -0
- ultralytics/models/yolo/world/train_world.py +176 -0
- ultralytics/models/yolo/yoloe/__init__.py +22 -0
- ultralytics/models/yolo/yoloe/predict.py +169 -0
- ultralytics/models/yolo/yoloe/train.py +298 -0
- ultralytics/models/yolo/yoloe/train_seg.py +124 -0
- ultralytics/models/yolo/yoloe/val.py +191 -0
- ultralytics/nn/__init__.py +29 -0
- ultralytics/nn/autobackend.py +842 -0
- ultralytics/nn/modules/__init__.py +182 -0
- ultralytics/nn/modules/activation.py +53 -0
- ultralytics/nn/modules/block.py +1966 -0
- ultralytics/nn/modules/conv.py +712 -0
- ultralytics/nn/modules/head.py +880 -0
- ultralytics/nn/modules/transformer.py +713 -0
- ultralytics/nn/modules/utils.py +164 -0
- ultralytics/nn/tasks.py +1627 -0
- ultralytics/nn/text_model.py +351 -0
- ultralytics/solutions/__init__.py +41 -0
- ultralytics/solutions/ai_gym.py +116 -0
- ultralytics/solutions/analytics.py +252 -0
- ultralytics/solutions/config.py +106 -0
- ultralytics/solutions/distance_calculation.py +124 -0
- ultralytics/solutions/heatmap.py +127 -0
- ultralytics/solutions/instance_segmentation.py +84 -0
- ultralytics/solutions/object_blurrer.py +90 -0
- ultralytics/solutions/object_counter.py +195 -0
- ultralytics/solutions/object_cropper.py +84 -0
- ultralytics/solutions/parking_management.py +273 -0
- ultralytics/solutions/queue_management.py +93 -0
- ultralytics/solutions/region_counter.py +120 -0
- ultralytics/solutions/security_alarm.py +154 -0
- ultralytics/solutions/similarity_search.py +172 -0
- ultralytics/solutions/solutions.py +724 -0
- ultralytics/solutions/speed_estimation.py +110 -0
- ultralytics/solutions/streamlit_inference.py +196 -0
- ultralytics/solutions/templates/similarity-search.html +160 -0
- ultralytics/solutions/trackzone.py +88 -0
- ultralytics/solutions/vision_eye.py +68 -0
- ultralytics/trackers/__init__.py +7 -0
- ultralytics/trackers/basetrack.py +124 -0
- ultralytics/trackers/bot_sort.py +260 -0
- ultralytics/trackers/byte_tracker.py +480 -0
- ultralytics/trackers/track.py +125 -0
- ultralytics/trackers/utils/__init__.py +1 -0
- ultralytics/trackers/utils/gmc.py +376 -0
- ultralytics/trackers/utils/kalman_filter.py +493 -0
- ultralytics/trackers/utils/matching.py +157 -0
- ultralytics/utils/__init__.py +1435 -0
- ultralytics/utils/autobatch.py +106 -0
- ultralytics/utils/autodevice.py +174 -0
- ultralytics/utils/benchmarks.py +695 -0
- ultralytics/utils/callbacks/__init__.py +5 -0
- ultralytics/utils/callbacks/base.py +234 -0
- ultralytics/utils/callbacks/clearml.py +153 -0
- ultralytics/utils/callbacks/comet.py +552 -0
- ultralytics/utils/callbacks/dvc.py +205 -0
- ultralytics/utils/callbacks/hub.py +108 -0
- ultralytics/utils/callbacks/mlflow.py +138 -0
- ultralytics/utils/callbacks/neptune.py +140 -0
- ultralytics/utils/callbacks/raytune.py +43 -0
- ultralytics/utils/callbacks/tensorboard.py +132 -0
- ultralytics/utils/callbacks/wb.py +185 -0
- ultralytics/utils/checks.py +897 -0
- ultralytics/utils/dist.py +119 -0
- ultralytics/utils/downloads.py +499 -0
- ultralytics/utils/errors.py +43 -0
- ultralytics/utils/export.py +219 -0
- ultralytics/utils/files.py +221 -0
- ultralytics/utils/instance.py +499 -0
- ultralytics/utils/loss.py +813 -0
- ultralytics/utils/metrics.py +1356 -0
- ultralytics/utils/ops.py +885 -0
- ultralytics/utils/patches.py +143 -0
- ultralytics/utils/plotting.py +1011 -0
- ultralytics/utils/tal.py +416 -0
- ultralytics/utils/torch_utils.py +990 -0
- ultralytics/utils/triton.py +116 -0
- ultralytics/utils/tuner.py +159 -0
@@ -0,0 +1,443 @@
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
2
|
+
|
3
|
+
# Objects365 dataset https://www.objects365.org/ by Megvii
|
4
|
+
# Documentation: https://docs.ultralytics.com/datasets/detect/objects365/
|
5
|
+
# Example usage: yolo train data=Objects365.yaml
|
6
|
+
# parent
|
7
|
+
# ├── ultralytics
|
8
|
+
# └── datasets
|
9
|
+
# └── Objects365 ← downloads here (712 GB = 367G data + 345G zips)
|
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: ../datasets/Objects365 # dataset root dir
|
13
|
+
train: images/train # train images (relative to 'path') 1742289 images
|
14
|
+
val: images/val # val images (relative to 'path') 80000 images
|
15
|
+
test: # test images (optional)
|
16
|
+
|
17
|
+
# Classes
|
18
|
+
names:
|
19
|
+
0: Person
|
20
|
+
1: Sneakers
|
21
|
+
2: Chair
|
22
|
+
3: Other Shoes
|
23
|
+
4: Hat
|
24
|
+
5: Car
|
25
|
+
6: Lamp
|
26
|
+
7: Glasses
|
27
|
+
8: Bottle
|
28
|
+
9: Desk
|
29
|
+
10: Cup
|
30
|
+
11: Street Lights
|
31
|
+
12: Cabinet/shelf
|
32
|
+
13: Handbag/Satchel
|
33
|
+
14: Bracelet
|
34
|
+
15: Plate
|
35
|
+
16: Picture/Frame
|
36
|
+
17: Helmet
|
37
|
+
18: Book
|
38
|
+
19: Gloves
|
39
|
+
20: Storage box
|
40
|
+
21: Boat
|
41
|
+
22: Leather Shoes
|
42
|
+
23: Flower
|
43
|
+
24: Bench
|
44
|
+
25: Potted Plant
|
45
|
+
26: Bowl/Basin
|
46
|
+
27: Flag
|
47
|
+
28: Pillow
|
48
|
+
29: Boots
|
49
|
+
30: Vase
|
50
|
+
31: Microphone
|
51
|
+
32: Necklace
|
52
|
+
33: Ring
|
53
|
+
34: SUV
|
54
|
+
35: Wine Glass
|
55
|
+
36: Belt
|
56
|
+
37: Monitor/TV
|
57
|
+
38: Backpack
|
58
|
+
39: Umbrella
|
59
|
+
40: Traffic Light
|
60
|
+
41: Speaker
|
61
|
+
42: Watch
|
62
|
+
43: Tie
|
63
|
+
44: Trash bin Can
|
64
|
+
45: Slippers
|
65
|
+
46: Bicycle
|
66
|
+
47: Stool
|
67
|
+
48: Barrel/bucket
|
68
|
+
49: Van
|
69
|
+
50: Couch
|
70
|
+
51: Sandals
|
71
|
+
52: Basket
|
72
|
+
53: Drum
|
73
|
+
54: Pen/Pencil
|
74
|
+
55: Bus
|
75
|
+
56: Wild Bird
|
76
|
+
57: High Heels
|
77
|
+
58: Motorcycle
|
78
|
+
59: Guitar
|
79
|
+
60: Carpet
|
80
|
+
61: Cell Phone
|
81
|
+
62: Bread
|
82
|
+
63: Camera
|
83
|
+
64: Canned
|
84
|
+
65: Truck
|
85
|
+
66: Traffic cone
|
86
|
+
67: Cymbal
|
87
|
+
68: Lifesaver
|
88
|
+
69: Towel
|
89
|
+
70: Stuffed Toy
|
90
|
+
71: Candle
|
91
|
+
72: Sailboat
|
92
|
+
73: Laptop
|
93
|
+
74: Awning
|
94
|
+
75: Bed
|
95
|
+
76: Faucet
|
96
|
+
77: Tent
|
97
|
+
78: Horse
|
98
|
+
79: Mirror
|
99
|
+
80: Power outlet
|
100
|
+
81: Sink
|
101
|
+
82: Apple
|
102
|
+
83: Air Conditioner
|
103
|
+
84: Knife
|
104
|
+
85: Hockey Stick
|
105
|
+
86: Paddle
|
106
|
+
87: Pickup Truck
|
107
|
+
88: Fork
|
108
|
+
89: Traffic Sign
|
109
|
+
90: Balloon
|
110
|
+
91: Tripod
|
111
|
+
92: Dog
|
112
|
+
93: Spoon
|
113
|
+
94: Clock
|
114
|
+
95: Pot
|
115
|
+
96: Cow
|
116
|
+
97: Cake
|
117
|
+
98: Dining Table
|
118
|
+
99: Sheep
|
119
|
+
100: Hanger
|
120
|
+
101: Blackboard/Whiteboard
|
121
|
+
102: Napkin
|
122
|
+
103: Other Fish
|
123
|
+
104: Orange/Tangerine
|
124
|
+
105: Toiletry
|
125
|
+
106: Keyboard
|
126
|
+
107: Tomato
|
127
|
+
108: Lantern
|
128
|
+
109: Machinery Vehicle
|
129
|
+
110: Fan
|
130
|
+
111: Green Vegetables
|
131
|
+
112: Banana
|
132
|
+
113: Baseball Glove
|
133
|
+
114: Airplane
|
134
|
+
115: Mouse
|
135
|
+
116: Train
|
136
|
+
117: Pumpkin
|
137
|
+
118: Soccer
|
138
|
+
119: Skiboard
|
139
|
+
120: Luggage
|
140
|
+
121: Nightstand
|
141
|
+
122: Tea pot
|
142
|
+
123: Telephone
|
143
|
+
124: Trolley
|
144
|
+
125: Head Phone
|
145
|
+
126: Sports Car
|
146
|
+
127: Stop Sign
|
147
|
+
128: Dessert
|
148
|
+
129: Scooter
|
149
|
+
130: Stroller
|
150
|
+
131: Crane
|
151
|
+
132: Remote
|
152
|
+
133: Refrigerator
|
153
|
+
134: Oven
|
154
|
+
135: Lemon
|
155
|
+
136: Duck
|
156
|
+
137: Baseball Bat
|
157
|
+
138: Surveillance Camera
|
158
|
+
139: Cat
|
159
|
+
140: Jug
|
160
|
+
141: Broccoli
|
161
|
+
142: Piano
|
162
|
+
143: Pizza
|
163
|
+
144: Elephant
|
164
|
+
145: Skateboard
|
165
|
+
146: Surfboard
|
166
|
+
147: Gun
|
167
|
+
148: Skating and Skiing shoes
|
168
|
+
149: Gas stove
|
169
|
+
150: Donut
|
170
|
+
151: Bow Tie
|
171
|
+
152: Carrot
|
172
|
+
153: Toilet
|
173
|
+
154: Kite
|
174
|
+
155: Strawberry
|
175
|
+
156: Other Balls
|
176
|
+
157: Shovel
|
177
|
+
158: Pepper
|
178
|
+
159: Computer Box
|
179
|
+
160: Toilet Paper
|
180
|
+
161: Cleaning Products
|
181
|
+
162: Chopsticks
|
182
|
+
163: Microwave
|
183
|
+
164: Pigeon
|
184
|
+
165: Baseball
|
185
|
+
166: Cutting/chopping Board
|
186
|
+
167: Coffee Table
|
187
|
+
168: Side Table
|
188
|
+
169: Scissors
|
189
|
+
170: Marker
|
190
|
+
171: Pie
|
191
|
+
172: Ladder
|
192
|
+
173: Snowboard
|
193
|
+
174: Cookies
|
194
|
+
175: Radiator
|
195
|
+
176: Fire Hydrant
|
196
|
+
177: Basketball
|
197
|
+
178: Zebra
|
198
|
+
179: Grape
|
199
|
+
180: Giraffe
|
200
|
+
181: Potato
|
201
|
+
182: Sausage
|
202
|
+
183: Tricycle
|
203
|
+
184: Violin
|
204
|
+
185: Egg
|
205
|
+
186: Fire Extinguisher
|
206
|
+
187: Candy
|
207
|
+
188: Fire Truck
|
208
|
+
189: Billiards
|
209
|
+
190: Converter
|
210
|
+
191: Bathtub
|
211
|
+
192: Wheelchair
|
212
|
+
193: Golf Club
|
213
|
+
194: Briefcase
|
214
|
+
195: Cucumber
|
215
|
+
196: Cigar/Cigarette
|
216
|
+
197: Paint Brush
|
217
|
+
198: Pear
|
218
|
+
199: Heavy Truck
|
219
|
+
200: Hamburger
|
220
|
+
201: Extractor
|
221
|
+
202: Extension Cord
|
222
|
+
203: Tong
|
223
|
+
204: Tennis Racket
|
224
|
+
205: Folder
|
225
|
+
206: American Football
|
226
|
+
207: earphone
|
227
|
+
208: Mask
|
228
|
+
209: Kettle
|
229
|
+
210: Tennis
|
230
|
+
211: Ship
|
231
|
+
212: Swing
|
232
|
+
213: Coffee Machine
|
233
|
+
214: Slide
|
234
|
+
215: Carriage
|
235
|
+
216: Onion
|
236
|
+
217: Green beans
|
237
|
+
218: Projector
|
238
|
+
219: Frisbee
|
239
|
+
220: Washing Machine/Drying Machine
|
240
|
+
221: Chicken
|
241
|
+
222: Printer
|
242
|
+
223: Watermelon
|
243
|
+
224: Saxophone
|
244
|
+
225: Tissue
|
245
|
+
226: Toothbrush
|
246
|
+
227: Ice cream
|
247
|
+
228: Hot-air balloon
|
248
|
+
229: Cello
|
249
|
+
230: French Fries
|
250
|
+
231: Scale
|
251
|
+
232: Trophy
|
252
|
+
233: Cabbage
|
253
|
+
234: Hot dog
|
254
|
+
235: Blender
|
255
|
+
236: Peach
|
256
|
+
237: Rice
|
257
|
+
238: Wallet/Purse
|
258
|
+
239: Volleyball
|
259
|
+
240: Deer
|
260
|
+
241: Goose
|
261
|
+
242: Tape
|
262
|
+
243: Tablet
|
263
|
+
244: Cosmetics
|
264
|
+
245: Trumpet
|
265
|
+
246: Pineapple
|
266
|
+
247: Golf Ball
|
267
|
+
248: Ambulance
|
268
|
+
249: Parking meter
|
269
|
+
250: Mango
|
270
|
+
251: Key
|
271
|
+
252: Hurdle
|
272
|
+
253: Fishing Rod
|
273
|
+
254: Medal
|
274
|
+
255: Flute
|
275
|
+
256: Brush
|
276
|
+
257: Penguin
|
277
|
+
258: Megaphone
|
278
|
+
259: Corn
|
279
|
+
260: Lettuce
|
280
|
+
261: Garlic
|
281
|
+
262: Swan
|
282
|
+
263: Helicopter
|
283
|
+
264: Green Onion
|
284
|
+
265: Sandwich
|
285
|
+
266: Nuts
|
286
|
+
267: Speed Limit Sign
|
287
|
+
268: Induction Cooker
|
288
|
+
269: Broom
|
289
|
+
270: Trombone
|
290
|
+
271: Plum
|
291
|
+
272: Rickshaw
|
292
|
+
273: Goldfish
|
293
|
+
274: Kiwi fruit
|
294
|
+
275: Router/modem
|
295
|
+
276: Poker Card
|
296
|
+
277: Toaster
|
297
|
+
278: Shrimp
|
298
|
+
279: Sushi
|
299
|
+
280: Cheese
|
300
|
+
281: Notepaper
|
301
|
+
282: Cherry
|
302
|
+
283: Pliers
|
303
|
+
284: CD
|
304
|
+
285: Pasta
|
305
|
+
286: Hammer
|
306
|
+
287: Cue
|
307
|
+
288: Avocado
|
308
|
+
289: Hami melon
|
309
|
+
290: Flask
|
310
|
+
291: Mushroom
|
311
|
+
292: Screwdriver
|
312
|
+
293: Soap
|
313
|
+
294: Recorder
|
314
|
+
295: Bear
|
315
|
+
296: Eggplant
|
316
|
+
297: Board Eraser
|
317
|
+
298: Coconut
|
318
|
+
299: Tape Measure/Ruler
|
319
|
+
300: Pig
|
320
|
+
301: Showerhead
|
321
|
+
302: Globe
|
322
|
+
303: Chips
|
323
|
+
304: Steak
|
324
|
+
305: Crosswalk Sign
|
325
|
+
306: Stapler
|
326
|
+
307: Camel
|
327
|
+
308: Formula 1
|
328
|
+
309: Pomegranate
|
329
|
+
310: Dishwasher
|
330
|
+
311: Crab
|
331
|
+
312: Hoverboard
|
332
|
+
313: Meatball
|
333
|
+
314: Rice Cooker
|
334
|
+
315: Tuba
|
335
|
+
316: Calculator
|
336
|
+
317: Papaya
|
337
|
+
318: Antelope
|
338
|
+
319: Parrot
|
339
|
+
320: Seal
|
340
|
+
321: Butterfly
|
341
|
+
322: Dumbbell
|
342
|
+
323: Donkey
|
343
|
+
324: Lion
|
344
|
+
325: Urinal
|
345
|
+
326: Dolphin
|
346
|
+
327: Electric Drill
|
347
|
+
328: Hair Dryer
|
348
|
+
329: Egg tart
|
349
|
+
330: Jellyfish
|
350
|
+
331: Treadmill
|
351
|
+
332: Lighter
|
352
|
+
333: Grapefruit
|
353
|
+
334: Game board
|
354
|
+
335: Mop
|
355
|
+
336: Radish
|
356
|
+
337: Baozi
|
357
|
+
338: Target
|
358
|
+
339: French
|
359
|
+
340: Spring Rolls
|
360
|
+
341: Monkey
|
361
|
+
342: Rabbit
|
362
|
+
343: Pencil Case
|
363
|
+
344: Yak
|
364
|
+
345: Red Cabbage
|
365
|
+
346: Binoculars
|
366
|
+
347: Asparagus
|
367
|
+
348: Barbell
|
368
|
+
349: Scallop
|
369
|
+
350: Noddles
|
370
|
+
351: Comb
|
371
|
+
352: Dumpling
|
372
|
+
353: Oyster
|
373
|
+
354: Table Tennis paddle
|
374
|
+
355: Cosmetics Brush/Eyeliner Pencil
|
375
|
+
356: Chainsaw
|
376
|
+
357: Eraser
|
377
|
+
358: Lobster
|
378
|
+
359: Durian
|
379
|
+
360: Okra
|
380
|
+
361: Lipstick
|
381
|
+
362: Cosmetics Mirror
|
382
|
+
363: Curling
|
383
|
+
364: Table Tennis
|
384
|
+
|
385
|
+
# Download script/URL (optional) ---------------------------------------------------------------------------------------
|
386
|
+
download: |
|
387
|
+
from pathlib import Path
|
388
|
+
|
389
|
+
import numpy as np
|
390
|
+
from tqdm import tqdm
|
391
|
+
|
392
|
+
from ultralytics.utils.checks import check_requirements
|
393
|
+
from ultralytics.utils.downloads import download
|
394
|
+
from ultralytics.utils.ops import xyxy2xywhn
|
395
|
+
|
396
|
+
check_requirements(("pycocotools>=2.0",))
|
397
|
+
from pycocotools.coco import COCO
|
398
|
+
|
399
|
+
# Make Directories
|
400
|
+
dir = Path(yaml["path"]) # dataset root dir
|
401
|
+
for p in "images", "labels":
|
402
|
+
(dir / p).mkdir(parents=True, exist_ok=True)
|
403
|
+
for q in "train", "val":
|
404
|
+
(dir / p / q).mkdir(parents=True, exist_ok=True)
|
405
|
+
|
406
|
+
# Train, Val Splits
|
407
|
+
for split, patches in [("train", 50 + 1), ("val", 43 + 1)]:
|
408
|
+
print(f"Processing {split} in {patches} patches ...")
|
409
|
+
images, labels = dir / "images" / split, dir / "labels" / split
|
410
|
+
|
411
|
+
# Download
|
412
|
+
url = f"https://dorc.ks3-cn-beijing.ksyun.com/data-set/2020Objects365%E6%95%B0%E6%8D%AE%E9%9B%86/{split}/"
|
413
|
+
if split == "train":
|
414
|
+
download([f"{url}zhiyuan_objv2_{split}.tar.gz"], dir=dir) # annotations json
|
415
|
+
download([f"{url}patch{i}.tar.gz" for i in range(patches)], dir=images, curl=True, threads=8)
|
416
|
+
elif split == "val":
|
417
|
+
download([f"{url}zhiyuan_objv2_{split}.json"], dir=dir) # annotations json
|
418
|
+
download([f"{url}images/v1/patch{i}.tar.gz" for i in range(15 + 1)], dir=images, curl=True, threads=8)
|
419
|
+
download([f"{url}images/v2/patch{i}.tar.gz" for i in range(16, patches)], dir=images, curl=True, threads=8)
|
420
|
+
|
421
|
+
# Move
|
422
|
+
for f in tqdm(images.rglob("*.jpg"), desc=f"Moving {split} images"):
|
423
|
+
f.rename(images / f.name) # move to /images/{split}
|
424
|
+
|
425
|
+
# Labels
|
426
|
+
coco = COCO(dir / f"zhiyuan_objv2_{split}.json")
|
427
|
+
names = [x["name"] for x in coco.loadCats(coco.getCatIds())]
|
428
|
+
for cid, cat in enumerate(names):
|
429
|
+
catIds = coco.getCatIds(catNms=[cat])
|
430
|
+
imgIds = coco.getImgIds(catIds=catIds)
|
431
|
+
for im in tqdm(coco.loadImgs(imgIds), desc=f"Class {cid + 1}/{len(names)} {cat}"):
|
432
|
+
width, height = im["width"], im["height"]
|
433
|
+
path = Path(im["file_name"]) # image filename
|
434
|
+
try:
|
435
|
+
with open(labels / path.with_suffix(".txt").name, "a", encoding="utf-8") as file:
|
436
|
+
annIds = coco.getAnnIds(imgIds=im["id"], catIds=catIds, iscrowd=None)
|
437
|
+
for a in coco.loadAnns(annIds):
|
438
|
+
x, y, w, h = a["bbox"] # bounding box in xywh (xy top-left corner)
|
439
|
+
xyxy = np.array([x, y, x + w, y + h])[None] # pixels(1,4)
|
440
|
+
x, y, w, h = xyxy2xywhn(xyxy, w=width, h=height, clip=True)[0] # normalized and clipped
|
441
|
+
file.write(f"{cid} {x:.5f} {y:.5f} {w:.5f} {h:.5f}\n")
|
442
|
+
except Exception as e:
|
443
|
+
print(e)
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
2
|
+
|
3
|
+
# SKU-110K retail items dataset https://github.com/eg4000/SKU110K_CVPR19 by Trax Retail
|
4
|
+
# Documentation: https://docs.ultralytics.com/datasets/detect/sku-110k/
|
5
|
+
# Example usage: yolo train data=SKU-110K.yaml
|
6
|
+
# parent
|
7
|
+
# ├── ultralytics
|
8
|
+
# └── datasets
|
9
|
+
# └── SKU-110K ← downloads here (13.6 GB)
|
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: ../datasets/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
|
+
|
17
|
+
# Classes
|
18
|
+
names:
|
19
|
+
0: object
|
20
|
+
|
21
|
+
# Download script/URL (optional) ---------------------------------------------------------------------------------------
|
22
|
+
download: |
|
23
|
+
import shutil
|
24
|
+
from pathlib import Path
|
25
|
+
|
26
|
+
import numpy as np
|
27
|
+
import pandas as pd
|
28
|
+
from tqdm import tqdm
|
29
|
+
|
30
|
+
from ultralytics.utils.downloads import download
|
31
|
+
from ultralytics.utils.ops import xyxy2xywh
|
32
|
+
|
33
|
+
# Download
|
34
|
+
dir = Path(yaml["path"]) # dataset root dir
|
35
|
+
parent = Path(dir.parent) # download dir
|
36
|
+
urls = ["http://trax-geometry.s3.amazonaws.com/cvpr_challenge/SKU110K_fixed.tar.gz"]
|
37
|
+
download(urls, dir=parent)
|
38
|
+
|
39
|
+
# Rename directories
|
40
|
+
if dir.exists():
|
41
|
+
shutil.rmtree(dir)
|
42
|
+
(parent / "SKU110K_fixed").rename(dir) # rename dir
|
43
|
+
(dir / "labels").mkdir(parents=True, exist_ok=True) # create labels dir
|
44
|
+
|
45
|
+
# Convert labels
|
46
|
+
names = "image", "x1", "y1", "x2", "y2", "class", "image_width", "image_height" # column names
|
47
|
+
for d in "annotations_train.csv", "annotations_val.csv", "annotations_test.csv":
|
48
|
+
x = pd.read_csv(dir / "annotations" / d, names=names).values # annotations
|
49
|
+
images, unique_images = x[:, 0], np.unique(x[:, 0])
|
50
|
+
with open((dir / d).with_suffix(".txt").__str__().replace("annotations_", ""), "w", encoding="utf-8") as f:
|
51
|
+
f.writelines(f"./images/{s}\n" for s in unique_images)
|
52
|
+
for im in tqdm(unique_images, desc=f"Converting {dir / d}"):
|
53
|
+
cls = 0 # single-class dataset
|
54
|
+
with open((dir / "labels" / im).with_suffix(".txt"), "a", encoding="utf-8") as f:
|
55
|
+
for r in x[images == im]:
|
56
|
+
w, h = r[6], r[7] # image width, height
|
57
|
+
xywh = xyxy2xywh(np.array([[r[1] / w, r[2] / h, r[3] / w, r[4] / h]]))[0] # instance
|
58
|
+
f.write(f"{cls} {xywh[0]:.5f} {xywh[1]:.5f} {xywh[2]:.5f} {xywh[3]:.5f}\n") # write label
|
@@ -0,0 +1,106 @@
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
2
|
+
|
3
|
+
# PASCAL VOC dataset http://host.robots.ox.ac.uk/pascal/VOC by University of Oxford
|
4
|
+
# Documentation: # Documentation: https://docs.ultralytics.com/datasets/detect/voc/
|
5
|
+
# Example usage: yolo train data=VOC.yaml
|
6
|
+
# parent
|
7
|
+
# ├── ultralytics
|
8
|
+
# └── datasets
|
9
|
+
# └── VOC ← downloads here (2.8 GB)
|
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: ../datasets/VOC
|
13
|
+
train: # train images (relative to 'path') 16551 images
|
14
|
+
- images/train2012
|
15
|
+
- images/train2007
|
16
|
+
- images/val2012
|
17
|
+
- images/val2007
|
18
|
+
val: # val images (relative to 'path') 4952 images
|
19
|
+
- images/test2007
|
20
|
+
test: # test images (optional)
|
21
|
+
- images/test2007
|
22
|
+
|
23
|
+
# Classes
|
24
|
+
names:
|
25
|
+
0: aeroplane
|
26
|
+
1: bicycle
|
27
|
+
2: bird
|
28
|
+
3: boat
|
29
|
+
4: bottle
|
30
|
+
5: bus
|
31
|
+
6: car
|
32
|
+
7: cat
|
33
|
+
8: chair
|
34
|
+
9: cow
|
35
|
+
10: diningtable
|
36
|
+
11: dog
|
37
|
+
12: horse
|
38
|
+
13: motorbike
|
39
|
+
14: person
|
40
|
+
15: pottedplant
|
41
|
+
16: sheep
|
42
|
+
17: sofa
|
43
|
+
18: train
|
44
|
+
19: tvmonitor
|
45
|
+
|
46
|
+
# Download script/URL (optional) ---------------------------------------------------------------------------------------
|
47
|
+
download: |
|
48
|
+
import xml.etree.ElementTree as ET
|
49
|
+
from pathlib import Path
|
50
|
+
|
51
|
+
from tqdm import tqdm
|
52
|
+
|
53
|
+
from ultralytics.utils.downloads import download
|
54
|
+
|
55
|
+
|
56
|
+
def convert_label(path, lb_path, year, image_id):
|
57
|
+
"""Converts XML annotations from VOC format to YOLO format by extracting bounding boxes and class IDs."""
|
58
|
+
|
59
|
+
def convert_box(size, box):
|
60
|
+
dw, dh = 1.0 / size[0], 1.0 / size[1]
|
61
|
+
x, y, w, h = (box[0] + box[1]) / 2.0 - 1, (box[2] + box[3]) / 2.0 - 1, box[1] - box[0], box[3] - box[2]
|
62
|
+
return x * dw, y * dh, w * dw, h * dh
|
63
|
+
|
64
|
+
in_file = open(path / f"VOC{year}/Annotations/{image_id}.xml")
|
65
|
+
out_file = open(lb_path, "w")
|
66
|
+
tree = ET.parse(in_file)
|
67
|
+
root = tree.getroot()
|
68
|
+
size = root.find("size")
|
69
|
+
w = int(size.find("width").text)
|
70
|
+
h = int(size.find("height").text)
|
71
|
+
|
72
|
+
names = list(yaml["names"].values()) # names list
|
73
|
+
for obj in root.iter("object"):
|
74
|
+
cls = obj.find("name").text
|
75
|
+
if cls in names and int(obj.find("difficult").text) != 1:
|
76
|
+
xmlbox = obj.find("bndbox")
|
77
|
+
bb = convert_box((w, h), [float(xmlbox.find(x).text) for x in ("xmin", "xmax", "ymin", "ymax")])
|
78
|
+
cls_id = names.index(cls) # class id
|
79
|
+
out_file.write(" ".join(str(a) for a in (cls_id, *bb)) + "\n")
|
80
|
+
|
81
|
+
|
82
|
+
# Download
|
83
|
+
dir = Path(yaml["path"]) # dataset root dir
|
84
|
+
url = "https://github.com/ultralytics/assets/releases/download/v0.0.0/"
|
85
|
+
urls = [
|
86
|
+
f"{url}VOCtrainval_06-Nov-2007.zip", # 446MB, 5012 images
|
87
|
+
f"{url}VOCtest_06-Nov-2007.zip", # 438MB, 4953 images
|
88
|
+
f"{url}VOCtrainval_11-May-2012.zip", # 1.95GB, 17126 images
|
89
|
+
]
|
90
|
+
download(urls, dir=dir / "images", curl=True, threads=3, exist_ok=True) # download and unzip over existing (required)
|
91
|
+
|
92
|
+
# Convert
|
93
|
+
path = dir / "images/VOCdevkit"
|
94
|
+
for year, image_set in ("2012", "train"), ("2012", "val"), ("2007", "train"), ("2007", "val"), ("2007", "test"):
|
95
|
+
imgs_path = dir / "images" / f"{image_set}{year}"
|
96
|
+
lbs_path = dir / "labels" / f"{image_set}{year}"
|
97
|
+
imgs_path.mkdir(exist_ok=True, parents=True)
|
98
|
+
lbs_path.mkdir(exist_ok=True, parents=True)
|
99
|
+
|
100
|
+
with open(path / f"VOC{year}/ImageSets/Main/{image_set}.txt") as f:
|
101
|
+
image_ids = f.read().strip().split()
|
102
|
+
for id in tqdm(image_ids, desc=f"{image_set}{year}"):
|
103
|
+
f = path / f"VOC{year}/JPEGImages/{id}.jpg" # old img path
|
104
|
+
lb_path = (lbs_path / f.name).with_suffix(".txt") # new label path
|
105
|
+
f.rename(imgs_path / f.name) # move image
|
106
|
+
convert_label(path, lb_path, year, id) # convert labels to YOLO format
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
2
|
+
|
3
|
+
# VisDrone2019-DET dataset https://github.com/VisDrone/VisDrone-Dataset by Tianjin University
|
4
|
+
# Documentation: https://docs.ultralytics.com/datasets/detect/visdrone/
|
5
|
+
# Example usage: yolo train data=VisDrone.yaml
|
6
|
+
# parent
|
7
|
+
# ├── ultralytics
|
8
|
+
# └── datasets
|
9
|
+
# └── VisDrone ← downloads here (2.3 GB)
|
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: ../datasets/VisDrone # dataset root dir
|
13
|
+
train: VisDrone2019-DET-train/images # train images (relative to 'path') 6471 images
|
14
|
+
val: VisDrone2019-DET-val/images # val images (relative to 'path') 548 images
|
15
|
+
test: VisDrone2019-DET-test-dev/images # test images (optional) 1610 images
|
16
|
+
|
17
|
+
# Classes
|
18
|
+
names:
|
19
|
+
0: pedestrian
|
20
|
+
1: people
|
21
|
+
2: bicycle
|
22
|
+
3: car
|
23
|
+
4: van
|
24
|
+
5: truck
|
25
|
+
6: tricycle
|
26
|
+
7: awning-tricycle
|
27
|
+
8: bus
|
28
|
+
9: motor
|
29
|
+
|
30
|
+
# Download script/URL (optional) ---------------------------------------------------------------------------------------
|
31
|
+
download: |
|
32
|
+
import os
|
33
|
+
from pathlib import Path
|
34
|
+
|
35
|
+
from ultralytics.utils.downloads import download
|
36
|
+
|
37
|
+
|
38
|
+
def visdrone2yolo(dir):
|
39
|
+
"""Convert VisDrone annotations to YOLO format, creating label files with normalized bounding box coordinates."""
|
40
|
+
from PIL import Image
|
41
|
+
from tqdm import tqdm
|
42
|
+
|
43
|
+
def convert_box(size, box):
|
44
|
+
# Convert VisDrone box to YOLO xywh box
|
45
|
+
dw = 1.0 / size[0]
|
46
|
+
dh = 1.0 / size[1]
|
47
|
+
return (box[0] + box[2] / 2) * dw, (box[1] + box[3] / 2) * dh, box[2] * dw, box[3] * dh
|
48
|
+
|
49
|
+
(dir / "labels").mkdir(parents=True, exist_ok=True) # make labels directory
|
50
|
+
pbar = tqdm((dir / "annotations").glob("*.txt"), desc=f"Converting {dir}")
|
51
|
+
for f in pbar:
|
52
|
+
img_size = Image.open((dir / "images" / f.name).with_suffix(".jpg")).size
|
53
|
+
lines = []
|
54
|
+
with open(f, encoding="utf-8") as file: # read annotation.txt
|
55
|
+
for row in [x.split(",") for x in file.read().strip().splitlines()]:
|
56
|
+
if row[4] == "0": # VisDrone 'ignored regions' class 0
|
57
|
+
continue
|
58
|
+
cls = int(row[5]) - 1
|
59
|
+
box = convert_box(img_size, tuple(map(int, row[:4])))
|
60
|
+
lines.append(f"{cls} {' '.join(f'{x:.6f}' for x in box)}\n")
|
61
|
+
with open(str(f).replace(f"{os.sep}annotations{os.sep}", f"{os.sep}labels{os.sep}"), "w", encoding="utf-8") as fl:
|
62
|
+
fl.writelines(lines) # write label.txt
|
63
|
+
|
64
|
+
|
65
|
+
# Download
|
66
|
+
dir = Path(yaml["path"]) # dataset root dir
|
67
|
+
urls = [
|
68
|
+
"https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-train.zip",
|
69
|
+
"https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-val.zip",
|
70
|
+
"https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-test-dev.zip",
|
71
|
+
"https://github.com/ultralytics/assets/releases/download/v0.0.0/VisDrone2019-DET-test-challenge.zip",
|
72
|
+
]
|
73
|
+
download(urls, dir=dir, curl=True, threads=4)
|
74
|
+
|
75
|
+
# Convert
|
76
|
+
for d in "VisDrone2019-DET-train", "VisDrone2019-DET-val", "VisDrone2019-DET-test-dev":
|
77
|
+
visdrone2yolo(dir / d) # convert VisDrone annotations to YOLO labels
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
2
|
+
|
3
|
+
# African-wildlife dataset by Ultralytics
|
4
|
+
# Documentation: https://docs.ultralytics.com/datasets/detect/african-wildlife/
|
5
|
+
# Example usage: yolo train data=african-wildlife.yaml
|
6
|
+
# parent
|
7
|
+
# ├── ultralytics
|
8
|
+
# └── datasets
|
9
|
+
# └── african-wildlife ← downloads here (100 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: ../datasets/african-wildlife # dataset root dir
|
13
|
+
train: train/images # train images (relative to 'path') 1052 images
|
14
|
+
val: valid/images # val images (relative to 'path') 225 images
|
15
|
+
test: test/images # test images (relative to 'path') 227 images
|
16
|
+
|
17
|
+
# Classes
|
18
|
+
names:
|
19
|
+
0: buffalo
|
20
|
+
1: elephant
|
21
|
+
2: rhino
|
22
|
+
3: zebra
|
23
|
+
|
24
|
+
# Download script/URL (optional)
|
25
|
+
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/african-wildlife.zip
|