ultralytics 8.3.33__py3-none-any.whl → 8.3.35__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.
- ultralytics/__init__.py +1 -1
- ultralytics/data/augment.py +3 -2
- ultralytics/engine/predictor.py +5 -1
- ultralytics/models/fastsam/predict.py +3 -0
- ultralytics/models/rtdetr/train.py +3 -0
- ultralytics/solutions/heatmap.py +2 -2
- ultralytics/solutions/object_counter.py +1 -1
- ultralytics/utils/callbacks/wb.py +6 -1
- {ultralytics-8.3.33.dist-info → ultralytics-8.3.35.dist-info}/METADATA +13 -13
- {ultralytics-8.3.33.dist-info → ultralytics-8.3.35.dist-info}/RECORD +14 -14
- {ultralytics-8.3.33.dist-info → ultralytics-8.3.35.dist-info}/WHEEL +1 -1
- {ultralytics-8.3.33.dist-info → ultralytics-8.3.35.dist-info}/LICENSE +0 -0
- {ultralytics-8.3.33.dist-info → ultralytics-8.3.35.dist-info}/entry_points.txt +0 -0
- {ultralytics-8.3.33.dist-info → ultralytics-8.3.35.dist-info}/top_level.txt +0 -0
ultralytics/__init__.py
CHANGED
ultralytics/data/augment.py
CHANGED
@@ -2280,7 +2280,7 @@ def v8_transforms(dataset, imgsz, hyp, stretch=False):
|
|
2280
2280
|
Args:
|
2281
2281
|
dataset (Dataset): The dataset object containing image data and annotations.
|
2282
2282
|
imgsz (int): The target image size for resizing.
|
2283
|
-
hyp (
|
2283
|
+
hyp (Namespace): A dictionary of hyperparameters controlling various aspects of the transformations.
|
2284
2284
|
stretch (bool): If True, applies stretching to the image. If False, uses LetterBox resizing.
|
2285
2285
|
|
2286
2286
|
Returns:
|
@@ -2288,8 +2288,9 @@ def v8_transforms(dataset, imgsz, hyp, stretch=False):
|
|
2288
2288
|
|
2289
2289
|
Examples:
|
2290
2290
|
>>> from ultralytics.data.dataset import YOLODataset
|
2291
|
+
>>> from ultralytics.utils import IterableSimpleNamespace
|
2291
2292
|
>>> dataset = YOLODataset(img_path="path/to/images", imgsz=640)
|
2292
|
-
>>> hyp =
|
2293
|
+
>>> hyp = IterableSimpleNamespace(mosaic=1.0, copy_paste=0.5, degrees=10.0, translate=0.2, scale=0.9)
|
2293
2294
|
>>> transforms = v8_transforms(dataset, imgsz=640, hyp=hyp)
|
2294
2295
|
>>> augmented_data = transforms(dataset[0])
|
2295
2296
|
"""
|
ultralytics/engine/predictor.py
CHANGED
@@ -153,7 +153,11 @@ class BasePredictor:
|
|
153
153
|
(list): A list of transformed images.
|
154
154
|
"""
|
155
155
|
same_shapes = len({x.shape for x in im}) == 1
|
156
|
-
letterbox = LetterBox(
|
156
|
+
letterbox = LetterBox(
|
157
|
+
self.imgsz,
|
158
|
+
auto=same_shapes and (self.model.pt or getattr(self.model, "dynamic", False)),
|
159
|
+
stride=self.model.stride,
|
160
|
+
)
|
157
161
|
return [letterbox(image=x) for x in im]
|
158
162
|
|
159
163
|
def postprocess(self, preds, img, orig_imgs):
|
@@ -64,6 +64,9 @@ class FastSAMPredictor(SegmentationPredictor):
|
|
64
64
|
if not isinstance(results, list):
|
65
65
|
results = [results]
|
66
66
|
for result in results:
|
67
|
+
if len(result) == 0:
|
68
|
+
prompt_results.append(result)
|
69
|
+
continue
|
67
70
|
masks = result.masks.data
|
68
71
|
if masks.shape[1:] != result.orig_shape:
|
69
72
|
masks = scale_masks(masks[None], result.orig_shape)[0]
|
@@ -68,8 +68,11 @@ class RTDETRTrainer(DetectionTrainer):
|
|
68
68
|
hyp=self.args,
|
69
69
|
rect=False,
|
70
70
|
cache=self.args.cache or None,
|
71
|
+
single_cls=self.args.single_cls or False,
|
71
72
|
prefix=colorstr(f"{mode}: "),
|
73
|
+
classes=self.args.classes,
|
72
74
|
data=self.data,
|
75
|
+
fraction=self.args.fraction if mode == "train" else 1.0,
|
73
76
|
)
|
74
77
|
|
75
78
|
def get_validator(self):
|
ultralytics/solutions/heatmap.py
CHANGED
@@ -104,12 +104,12 @@ class Heatmap(ObjectCounter):
|
|
104
104
|
self.annotator.draw_region(reg_pts=self.region, color=(104, 0, 123), thickness=self.line_width * 2)
|
105
105
|
self.store_tracking_history(track_id, box) # Store track history
|
106
106
|
self.store_classwise_counts(cls) # store classwise counts in dict
|
107
|
-
|
107
|
+
current_centroid = ((box[0] + box[2]) / 2, (box[1] + box[3]) / 2)
|
108
108
|
# Store tracking previous position and perform object counting
|
109
109
|
prev_position = None
|
110
110
|
if len(self.track_history[track_id]) > 1:
|
111
111
|
prev_position = self.track_history[track_id][-2]
|
112
|
-
self.count_objects(
|
112
|
+
self.count_objects(current_centroid, track_id, prev_position, cls) # Perform object counting
|
113
113
|
|
114
114
|
if self.region is not None:
|
115
115
|
self.display_counts(im0) # Display the counts on the frame
|
@@ -63,7 +63,7 @@ class ObjectCounter(BaseSolution):
|
|
63
63
|
>>> track_id = 1
|
64
64
|
>>> prev_position = (120, 220)
|
65
65
|
>>> cls = 0
|
66
|
-
>>> counter.count_objects(
|
66
|
+
>>> counter.count_objects(current_centroid, track_id, prev_position, cls)
|
67
67
|
"""
|
68
68
|
if prev_position is None or track_id in self.counted_ids:
|
69
69
|
return
|
@@ -109,7 +109,12 @@ def _log_plots(plots, step):
|
|
109
109
|
|
110
110
|
def on_pretrain_routine_start(trainer):
|
111
111
|
"""Initiate and start project if module is present."""
|
112
|
-
|
112
|
+
if not wb.run:
|
113
|
+
wb.init(
|
114
|
+
project=str(trainer.args.project).replace("/", "-") if trainer.args.project else "Ultralytics",
|
115
|
+
name=str(trainer.args.name).replace("/", "-"),
|
116
|
+
config=vars(trainer.args),
|
117
|
+
)
|
113
118
|
|
114
119
|
|
115
120
|
def on_fit_epoch_end(trainer):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ultralytics
|
3
|
-
Version: 8.3.
|
3
|
+
Version: 8.3.35
|
4
4
|
Summary: Ultralytics YOLO 🚀 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
|
5
5
|
Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>, Jing Qiu <jing.qiu@ultralytics.com>
|
6
6
|
Maintainer-email: Ultralytics <hello@ultralytics.com>
|
@@ -33,6 +33,7 @@ Requires-Python: >=3.8
|
|
33
33
|
Description-Content-Type: text/markdown
|
34
34
|
License-File: LICENSE
|
35
35
|
Requires-Dist: numpy>=1.23.0
|
36
|
+
Requires-Dist: numpy<2.0.0; sys_platform == "darwin"
|
36
37
|
Requires-Dist: matplotlib>=3.3.0
|
37
38
|
Requires-Dist: opencv-python>=4.6.0
|
38
39
|
Requires-Dist: pillow>=7.1.2
|
@@ -40,6 +41,7 @@ Requires-Dist: pyyaml>=5.3.1
|
|
40
41
|
Requires-Dist: requests>=2.23.0
|
41
42
|
Requires-Dist: scipy>=1.4.1
|
42
43
|
Requires-Dist: torch>=1.8.0
|
44
|
+
Requires-Dist: torch!=2.4.0,>=1.8.0; sys_platform == "win32"
|
43
45
|
Requires-Dist: torchvision>=0.9.0
|
44
46
|
Requires-Dist: tqdm>=4.64.0
|
45
47
|
Requires-Dist: psutil
|
@@ -47,8 +49,6 @@ Requires-Dist: py-cpuinfo
|
|
47
49
|
Requires-Dist: pandas>=1.1.4
|
48
50
|
Requires-Dist: seaborn>=0.11.0
|
49
51
|
Requires-Dist: ultralytics-thop>=2.0.0
|
50
|
-
Requires-Dist: numpy<2.0.0; sys_platform == "darwin"
|
51
|
-
Requires-Dist: torch!=2.4.0,>=1.8.0; sys_platform == "win32"
|
52
52
|
Provides-Extra: dev
|
53
53
|
Requires-Dist: ipython; extra == "dev"
|
54
54
|
Requires-Dist: pytest; extra == "dev"
|
@@ -63,28 +63,28 @@ Requires-Dist: mkdocs-ultralytics-plugin>=0.1.8; extra == "dev"
|
|
63
63
|
Requires-Dist: mkdocs-macros-plugin>=1.0.5; extra == "dev"
|
64
64
|
Provides-Extra: export
|
65
65
|
Requires-Dist: onnx>=1.12.0; extra == "export"
|
66
|
+
Requires-Dist: coremltools>=7.0; (platform_system != "Windows" and python_version <= "3.11") and extra == "export"
|
67
|
+
Requires-Dist: scikit-learn>=1.3.2; (platform_system != "Windows" and python_version <= "3.11") and extra == "export"
|
66
68
|
Requires-Dist: openvino>=2024.0.0; extra == "export"
|
67
69
|
Requires-Dist: tensorflow>=2.0.0; extra == "export"
|
68
70
|
Requires-Dist: tensorflowjs>=3.9.0; extra == "export"
|
71
|
+
Requires-Dist: tensorstore>=0.1.63; (platform_machine == "aarch64" and python_version >= "3.9") and extra == "export"
|
69
72
|
Requires-Dist: keras; extra == "export"
|
70
73
|
Requires-Dist: flatbuffers<100,>=23.5.26; platform_machine == "aarch64" and extra == "export"
|
71
74
|
Requires-Dist: numpy==1.23.5; platform_machine == "aarch64" and extra == "export"
|
72
75
|
Requires-Dist: h5py!=3.11.0; platform_machine == "aarch64" and extra == "export"
|
73
|
-
|
74
|
-
Requires-Dist:
|
75
|
-
Requires-Dist:
|
76
|
+
Provides-Extra: solutions
|
77
|
+
Requires-Dist: shapely>=2.0.0; extra == "solutions"
|
78
|
+
Requires-Dist: streamlit; extra == "solutions"
|
79
|
+
Provides-Extra: logging
|
80
|
+
Requires-Dist: comet; extra == "logging"
|
81
|
+
Requires-Dist: tensorboard>=2.13.0; extra == "logging"
|
82
|
+
Requires-Dist: dvclive>=2.12.0; extra == "logging"
|
76
83
|
Provides-Extra: extra
|
77
84
|
Requires-Dist: hub-sdk>=0.0.12; extra == "extra"
|
78
85
|
Requires-Dist: ipython; extra == "extra"
|
79
86
|
Requires-Dist: albumentations>=1.4.6; extra == "extra"
|
80
87
|
Requires-Dist: pycocotools>=2.0.7; extra == "extra"
|
81
|
-
Provides-Extra: logging
|
82
|
-
Requires-Dist: comet; extra == "logging"
|
83
|
-
Requires-Dist: tensorboard>=2.13.0; extra == "logging"
|
84
|
-
Requires-Dist: dvclive>=2.12.0; extra == "logging"
|
85
|
-
Provides-Extra: solutions
|
86
|
-
Requires-Dist: shapely>=2.0.0; extra == "solutions"
|
87
|
-
Requires-Dist: streamlit; extra == "solutions"
|
88
88
|
|
89
89
|
<div align="center">
|
90
90
|
<p>
|
@@ -7,7 +7,7 @@ tests/test_exports.py,sha256=1MvhcQ2qHdbJImHII-bFarcaIcm-kPlEK-OdFLxnj7o,8769
|
|
7
7
|
tests/test_integrations.py,sha256=f5-QCUk1SU_-qn4mBCZwS3GN3tXEBIIXo4z2EhExbHw,6126
|
8
8
|
tests/test_python.py,sha256=I1RRdCwLdrc3jX06huVxct8HX8ccQOmQgVpuEflRl0U,23560
|
9
9
|
tests/test_solutions.py,sha256=sPYhy2d814mIVvojQeVxeZPu0IVy01_Y8zuMcu_9GF0,3790
|
10
|
-
ultralytics/__init__.py,sha256=
|
10
|
+
ultralytics/__init__.py,sha256=p3VhL7Jt1EsmTNx5u8oPqKFLzRTINa9Rr948aS_1HgM,681
|
11
11
|
ultralytics/assets/bus.jpg,sha256=wCAZxJecGR63Od3ZRERe9Aja1Weayrb9Ug751DS_vGM,137419
|
12
12
|
ultralytics/assets/zidane.jpg,sha256=Ftc4aeMmen1O0A3o6GCDO9FlfBslLpTAw0gnetx7bts,50427
|
13
13
|
ultralytics/cfg/__init__.py,sha256=ArJow4-pOPN3y6aKOv5KcVXimikI6vAQvQlSRb7IdWE,38743
|
@@ -91,7 +91,7 @@ ultralytics/cfg/trackers/botsort.yaml,sha256=FDIrZ3hAhRtMfDl654pt1HIexmPqlFQK-3l
|
|
91
91
|
ultralytics/cfg/trackers/bytetrack.yaml,sha256=rBWY4RjjX6PTO2o6TUJFYHVgXNZHCN5TuBuzwuPYVjA,723
|
92
92
|
ultralytics/data/__init__.py,sha256=VGe-ATG7j35F4A4r8Jmzffjlhve4JAJPgRa5ahKTU18,616
|
93
93
|
ultralytics/data/annotator.py,sha256=JNmS6uELlEABrU5ViVJiPnjt44v-Us7j39Bwoug_73Y,3117
|
94
|
-
ultralytics/data/augment.py,sha256=
|
94
|
+
ultralytics/data/augment.py,sha256=1yBz98EO0uVvzVEk6rvuO8YwmxwyYZfe5NV0mNIsHkI,120509
|
95
95
|
ultralytics/data/base.py,sha256=ZCIhAyFfxXVp5fVnYD8mwbksNALJTayBKIR5FKGV7ZM,15168
|
96
96
|
ultralytics/data/build.py,sha256=AfMmz0sHIYmwry_90tEJFRk_kz0S3SolScVXqYHiT08,7261
|
97
97
|
ultralytics/data/converter.py,sha256=RIfTXNrazwZqmTYOYoJtupDMtNzm8dxsrVp6q2m8gyg,24388
|
@@ -102,7 +102,7 @@ ultralytics/data/utils.py,sha256=bmWEIrdogj4kssZQSJdSbIF8QsJU00lo-EY-Mgcqv4M,310
|
|
102
102
|
ultralytics/engine/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7JI8grmQDTs,42
|
103
103
|
ultralytics/engine/exporter.py,sha256=USEnyGvaTrF6JZtbMPct2LqyiaQHX_Ddt5kO1BbDmRo,67009
|
104
104
|
ultralytics/engine/model.py,sha256=TfuTczFjNJ3GW0E_qWVH6OaJ_2I-_Srx7i_4GQebDoo,51472
|
105
|
-
ultralytics/engine/predictor.py,sha256=
|
105
|
+
ultralytics/engine/predictor.py,sha256=nO6lzxG75GXyQsUNEimLk5MLfcMwl8AkRAaoYMPwQug,17687
|
106
106
|
ultralytics/engine/results.py,sha256=a1XFZRPwqgKDBOEAibHuT9nP2xefLiWVsMoBJbcr4iA,75058
|
107
107
|
ultralytics/engine/trainer.py,sha256=Cd95QLJ3C4fncoOX1YgauLA9aWVYRd1G6x0Au2xX86k,37335
|
108
108
|
ultralytics/engine/tuner.py,sha256=WBj8iw1K1TK0hvanlA-wkwmfqh1SI8jEe2dGwUINeTg,11838
|
@@ -115,7 +115,7 @@ ultralytics/hub/google/__init__.py,sha256=uclNs-_5vAzQMgQKgl8eBvml1cx6IZYXRUhrF5
|
|
115
115
|
ultralytics/models/__init__.py,sha256=TT9iLCL_n9Y80dcUq0Fo-p-GRZCSU2vrWXM3CoMwqqE,265
|
116
116
|
ultralytics/models/fastsam/__init__.py,sha256=W0rRSJM3vdxcsneuiN6_ajkUw86k6-opUKdLxVhKOoQ,203
|
117
117
|
ultralytics/models/fastsam/model.py,sha256=ikqOUoRbcTYH00YqA7WKdGXnrff1R8OdBi2OG0n9uaA,2008
|
118
|
-
ultralytics/models/fastsam/predict.py,sha256=
|
118
|
+
ultralytics/models/fastsam/predict.py,sha256=cBtR56iIpZ2e5IHzMeqWZgfXpiGdYcy-Yjg7pebaB20,7481
|
119
119
|
ultralytics/models/fastsam/utils.py,sha256=wH6pEjR2G45LYKqms5e8cJr5-Q-0bKyU8YcytDAn7d4,714
|
120
120
|
ultralytics/models/fastsam/val.py,sha256=ILKmw3U8FYmmQsO9wk9-bJ9Pyp_ZthJM36b61L75s3Y,1967
|
121
121
|
ultralytics/models/nas/__init__.py,sha256=d6-WTrYLXvbPs58ebA0-583ODi-VyzXc-t4aGIDQK6M,179
|
@@ -125,7 +125,7 @@ ultralytics/models/nas/val.py,sha256=6lt1wf8JCYO-rc0G0DjYUVDggvTAXks2eu5QnwL08S4
|
|
125
125
|
ultralytics/models/rtdetr/__init__.py,sha256=AZga1C3qlGTtgpAupDW4doijq5aZlQeF8e55_DP2Uas,197
|
126
126
|
ultralytics/models/rtdetr/model.py,sha256=2VkppF1_581XmQ0UI7lo8fX7MqhAJPXVMr2jyMHXtbk,1988
|
127
127
|
ultralytics/models/rtdetr/predict.py,sha256=cxULdJAzL9RM11Y24tIguKcNJZXwynNsrWRCW-jUYEQ,3568
|
128
|
-
ultralytics/models/rtdetr/train.py,sha256=
|
128
|
+
ultralytics/models/rtdetr/train.py,sha256=m8S9Z94kNaH0HN9TR51iQpToIDV8AUoXpkI5qMdLB7Q,3847
|
129
129
|
ultralytics/models/rtdetr/val.py,sha256=xVjZShZ1AvES97wVekl2q_1g20Pq-IIHhkJdWtxMncs,5566
|
130
130
|
ultralytics/models/sam/__init__.py,sha256=o4_D6y8YJlOXIK7Lwo9RHnIJJ9xoFNi4zK99QSc1kdM,176
|
131
131
|
ultralytics/models/sam/amg.py,sha256=GrmO_8YfIDt_QkPEMF_WFjPZkhwhf7iwx7ig8JgOUnE,8709
|
@@ -183,8 +183,8 @@ ultralytics/solutions/__init__.py,sha256=4i8QCABfxRWPYUEdb58Pbg1xvR_Ra1u-ifB9fx2
|
|
183
183
|
ultralytics/solutions/ai_gym.py,sha256=Jb9Rbd9gOOj2ox4Q5mqalCdvg3RMXA6Cxe5kS18IFgA,5232
|
184
184
|
ultralytics/solutions/analytics.py,sha256=C57pIghXeKN8hul8QOV7W9YDMpfFfSfPTBb-lE9HeAc,11535
|
185
185
|
ultralytics/solutions/distance_calculation.py,sha256=KN3CC-dm2dTQylj79IrifCJT8ZhE7hc2EweH3KK31mE,5461
|
186
|
-
ultralytics/solutions/heatmap.py,sha256
|
187
|
-
ultralytics/solutions/object_counter.py,sha256
|
186
|
+
ultralytics/solutions/heatmap.py,sha256=-1VtMCJRmpHnLqgna0i2HOBsxNoqFernzpKQnICngUM,5449
|
187
|
+
ultralytics/solutions/object_counter.py,sha256=-U6l9-2in5MDrex7C_qRa6vDOIEIAWPI40HjLZtfotc,9976
|
188
188
|
ultralytics/solutions/parking_management.py,sha256=1DsEE94eauqcnnFxUYI-BX9eA1GbJVNt7oncj1okYpI,11198
|
189
189
|
ultralytics/solutions/queue_management.py,sha256=D9TqwJSVrZQFxp_M8O62WfBAxkAuDWWnXe7FFmnp7_w,4881
|
190
190
|
ultralytics/solutions/region_counter.py,sha256=w0c0Sz9XG6rwzr5nA6nb1zFW8IVkTQuatfZNBtOik68,4947
|
@@ -228,10 +228,10 @@ ultralytics/utils/callbacks/mlflow.py,sha256=mkl_rK0Gy02cXnQUYmzmLE5W97fMgfEb7Il
|
|
228
228
|
ultralytics/utils/callbacks/neptune.py,sha256=IbGQfEltamUKXJt93uSLQFn8c2rYh3DMTgVE1xsnmUI,3813
|
229
229
|
ultralytics/utils/callbacks/raytune.py,sha256=Ck_yFzg7UZXiDWrLHaltjQybzVWSFDfzpdrx9ZYTRfI,700
|
230
230
|
ultralytics/utils/callbacks/tensorboard.py,sha256=SHlE58Fb-sg-uZKtgy-ybIO3SAIfK55aj8kTYGA0Cyg,4167
|
231
|
-
ultralytics/utils/callbacks/wb.py,sha256=
|
232
|
-
ultralytics-8.3.
|
233
|
-
ultralytics-8.3.
|
234
|
-
ultralytics-8.3.
|
235
|
-
ultralytics-8.3.
|
236
|
-
ultralytics-8.3.
|
237
|
-
ultralytics-8.3.
|
231
|
+
ultralytics/utils/callbacks/wb.py,sha256=sizfTa-xI9k2pnDSP_Q9pHZEFwcl__gSFM0AcneuRpY,7058
|
232
|
+
ultralytics-8.3.35.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
233
|
+
ultralytics-8.3.35.dist-info/METADATA,sha256=bsX4oqwxlyJOT7mSgsEHyCGsxbzs_lXqBxD7Tn-Ztfw,35213
|
234
|
+
ultralytics-8.3.35.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
235
|
+
ultralytics-8.3.35.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
|
236
|
+
ultralytics-8.3.35.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
|
237
|
+
ultralytics-8.3.35.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|