dgenerate-ultralytics-headless 8.3.229__py3-none-any.whl → 8.3.230__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dgenerate-ultralytics-headless
3
- Version: 8.3.229
3
+ Version: 8.3.230
4
4
  Summary: Automatically built Ultralytics package with python-opencv-headless dependency instead of python-opencv
5
5
  Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>, Jing Qiu <jing.qiu@ultralytics.com>
6
6
  Maintainer-email: Ultralytics <hello@ultralytics.com>
@@ -32,19 +32,19 @@ Classifier: Operating System :: Microsoft :: Windows
32
32
  Requires-Python: >=3.8
33
33
  Description-Content-Type: text/markdown
34
34
  License-File: LICENSE
35
- Requires-Dist: numpy<=2.3.4,>=1.23.0
36
- Requires-Dist: matplotlib<=3.10.7,>=3.3.0
37
- Requires-Dist: opencv-python-headless<=4.12.0.88,>=4.6.0
38
- Requires-Dist: pillow<=12.0.0,>=7.1.2
39
- Requires-Dist: pyyaml<=6.0.3,>=5.3.1
40
- Requires-Dist: requests<=2.32.5,>=2.23.0
41
- Requires-Dist: scipy<=1.16.3,>=1.4.1
42
- Requires-Dist: torch<=2.9.1,>=1.8.0; sys_platform != "win32"
43
- Requires-Dist: torch!=2.4.0,<=2.9.1,>=1.8.0; sys_platform == "win32"
44
- Requires-Dist: torchvision<=0.24.1,>=0.9.0
45
- Requires-Dist: psutil<=7.1.3,>=5.8.0
46
- Requires-Dist: polars<=1.35.2,>=0.20.0
47
- Requires-Dist: ultralytics-thop<=2.0.18
35
+ Requires-Dist: numpy>=1.23.0
36
+ Requires-Dist: matplotlib>=3.3.0
37
+ Requires-Dist: opencv-python-headless>=4.6.0
38
+ Requires-Dist: pillow>=7.1.2
39
+ Requires-Dist: pyyaml>=5.3.1
40
+ Requires-Dist: requests>=2.23.0
41
+ Requires-Dist: scipy>=1.4.1
42
+ Requires-Dist: torch>=1.8.0
43
+ Requires-Dist: torch!=2.4.0,>=1.8.0; sys_platform == "win32"
44
+ Requires-Dist: torchvision>=0.9.0
45
+ Requires-Dist: psutil>=5.8.0
46
+ Requires-Dist: polars>=0.20.0
47
+ Requires-Dist: ultralytics-thop>=2.0.18
48
48
  Provides-Extra: dev
49
49
  Requires-Dist: ipython; extra == "dev"
50
50
  Requires-Dist: pytest; extra == "dev"
@@ -1,4 +1,4 @@
1
- dgenerate_ultralytics_headless-8.3.229.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
1
+ dgenerate_ultralytics_headless-8.3.230.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
2
2
  tests/__init__.py,sha256=bCox_hLdGRFYGLb2kd722VdNP2zEXNYNuLLYtqZSrbw,804
3
3
  tests/conftest.py,sha256=mOy9lGpNp7lk1hHl6_pVE0f9cU-72gnkoSm4TO-CNZU,2318
4
4
  tests/test_cli.py,sha256=GhIFHi-_WIJpDgoGNRi0DnjbfwP1wHbklBMnkCM-P_4,5464
@@ -8,7 +8,7 @@ tests/test_exports.py,sha256=OMLio2uUhyqo8D8qB5xUwmk7Po2rMeAACRc8WYoxbj4,13147
8
8
  tests/test_integrations.py,sha256=6QgSh9n0J04RdUYz08VeVOnKmf4S5MDEQ0chzS7jo_c,6220
9
9
  tests/test_python.py,sha256=jhnN-Oie3euE3kfHzUqvnadkWOsQyvFmdmEcse9Rsto,29253
10
10
  tests/test_solutions.py,sha256=j_PZZ5tMR1Y5ararY-OTXZr1hYJ7vEVr8H3w4O1tbQs,14153
11
- ultralytics/__init__.py,sha256=KwZZj7Xtu6vobxB_lyrkS6fL2sUaqtClIKxSphI862U,1302
11
+ ultralytics/__init__.py,sha256=quJSeosC9v4SdVDehq6-tI552adfSYexL_DtUC6V-eM,1302
12
12
  ultralytics/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
13
13
  ultralytics/assets/bus.jpg,sha256=wCAZxJecGR63Od3ZRERe9Aja1Weayrb9Ug751DS_vGM,137419
14
14
  ultralytics/assets/zidane.jpg,sha256=Ftc4aeMmen1O0A3o6GCDO9FlfBslLpTAw0gnetx7bts,50427
@@ -126,7 +126,7 @@ ultralytics/engine/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXppv1-QU
126
126
  ultralytics/engine/exporter.py,sha256=OtNM6xeXu03hPtwePtsEyQn82fsTz8klwzmyryzpPR8,68210
127
127
  ultralytics/engine/model.py,sha256=s-exI_DPWaMkyba8oK6_UP0VUz0MT_52B7--r6wYf84,53186
128
128
  ultralytics/engine/predictor.py,sha256=eu0sVo3PTt4zKH6SntzdO1E8cgFj9PFOJrfQO6VNqCE,22698
129
- ultralytics/engine/results.py,sha256=j8MLEM4sgo1EDVTjkmLIag2MqfZbEBUMuzPJfYr7tWE,70906
129
+ ultralytics/engine/results.py,sha256=4LDg6HSW2xMSV6sp3ncgIe11U_3j3I2RUTDO1MeOfXA,70884
130
130
  ultralytics/engine/trainer.py,sha256=xzsouV6UX259WT3n_in8GoXblmmlrzyYpD6fQt_zBm0,45214
131
131
  ultralytics/engine/tuner.py,sha256=xooBE-urCbqK-FQIUtUTG5SC26GevKshDWn-HgIR3Ng,21548
132
132
  ultralytics/engine/validator.py,sha256=mG9u7atDw7mkCmoB_JjA4pM9m41vF5U7hPLRpBg8QFA,17528
@@ -147,14 +147,14 @@ ultralytics/models/nas/predict.py,sha256=4nbuo9nbvnvI3qVH1ylhLCjo-7oW39MumIesm-1
147
147
  ultralytics/models/nas/val.py,sha256=MIRym3LQNDIRxnYs5xcOiLkKOgv3enZFXh5_g9Pq2hA,1543
148
148
  ultralytics/models/rtdetr/__init__.py,sha256=F4NEQqtcVKFxj97Dh7rkn2Vu3JG4Ea_nxqrBB-9P1vc,225
149
149
  ultralytics/models/rtdetr/model.py,sha256=jJzSh_5E__rVQO7_IkmncpC4jIdu9xNiIxlTTIaFJVw,2269
150
- ultralytics/models/rtdetr/predict.py,sha256=YT0CzUc5Eq6de88zq36jrLX-4Zw0Bs0DuCQ14yITK9A,4256
150
+ ultralytics/models/rtdetr/predict.py,sha256=yXtyO6XenBpz0PPewxyGTH8padY-tddyS2NwIk8WTm4,4267
151
151
  ultralytics/models/rtdetr/train.py,sha256=b7FCFU_m0BWftVGvuYp6uPBJUG9RviKdWcMkQTLQDlE,3742
152
152
  ultralytics/models/rtdetr/val.py,sha256=O3lWCAhF2N0MI9RbcczUmat6uDpcFX8DSuxscsYtuyM,8928
153
153
  ultralytics/models/sam/__init__.py,sha256=p1BKLawQFvVxmdk7LomFVWX-67Kc-AP4PJBNPfU_Nuc,359
154
154
  ultralytics/models/sam/amg.py,sha256=aYvJ7jQMkTR3X9KV7SHi3qP3yNchQggWNUurTRZwxQg,11786
155
155
  ultralytics/models/sam/build.py,sha256=GdZ4tEgbfIo232SGucKL2qQtZH2yUZafYThBJNPH8yA,12663
156
156
  ultralytics/models/sam/model.py,sha256=lxzpLDuaY8yQKgoD3DL1J0wKv0DCHYOep8lB0DVtiek,7178
157
- ultralytics/models/sam/predict.py,sha256=6Lf4mGcHBgfd8He2RFWPKLWvMyGkNsUFknDk0LW_md8,104857
157
+ ultralytics/models/sam/predict.py,sha256=lnx0ULGKx-S2UfoSnjg2aMk7hm67a2oZDhtihL8IL8c,104868
158
158
  ultralytics/models/sam/modules/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXppv1-QUM,70
159
159
  ultralytics/models/sam/modules/blocks.py,sha256=Sd68iQxq33JjjjpImsJrDFo-UUDQf7E_JWhBqeS2DWI,45925
160
160
  ultralytics/models/sam/modules/decoders.py,sha256=Y1urLdfjUAztRkLpyf4W7JGPCXG2Ggrdtcu_kSolBro,25568
@@ -170,11 +170,11 @@ ultralytics/models/utils/ops.py,sha256=z-Ebjv_k14bWOoP6nszDzDBiy3yELcVtbj6M8PsRp
170
170
  ultralytics/models/yolo/__init__.py,sha256=YD407NDDiyjo0x_MR6usJaTpePKPgsfBUYehlCw7lRs,307
171
171
  ultralytics/models/yolo/model.py,sha256=MJoAohegonmXzTx8ouLvbUilwC2Qo7fHUqFhDXUGnhU,18742
172
172
  ultralytics/models/yolo/classify/__init__.py,sha256=9--HVaNOfI1K7rn_rRqclL8FUAnpfeBrRqEQIaQw2xM,383
173
- ultralytics/models/yolo/classify/predict.py,sha256=yyeYNeaVt44urIeoa_YKj-Xfh2JQTaQQ-lJMLlc_sJk,4126
173
+ ultralytics/models/yolo/classify/predict.py,sha256=wKICjwofH7-7QLJhX2vYSNJXWu2-5kWzjoXXmUPI0pU,4137
174
174
  ultralytics/models/yolo/classify/train.py,sha256=oODDfPwjgKzsbpO7NCYnOp_uwkWD7HNLhvsHxAJTA4g,8958
175
175
  ultralytics/models/yolo/classify/val.py,sha256=ZQusqW7s8Qbb6CZLFtAcsExNN9csUOfwr3SXI0Ag2Zw,10769
176
176
  ultralytics/models/yolo/detect/__init__.py,sha256=GIRsLYR-kT4JJx7lh4ZZAFGBZj0aebokuU0A7JbjDVA,257
177
- ultralytics/models/yolo/detect/predict.py,sha256=xzU-uAGRH5DWd2x20kLxBmmoj7kKNvT4x2VcL4Y4upw,5362
177
+ ultralytics/models/yolo/detect/predict.py,sha256=DhxIpvTcLAxSKuGxm7QWuTo-EKwmRhfL6yzUSaZHNRM,5373
178
178
  ultralytics/models/yolo/detect/train.py,sha256=5xDl8M_DrK7S8txW4IoRcdtiVaz-LvoMMr6VTWYFtyU,10477
179
179
  ultralytics/models/yolo/detect/val.py,sha256=b4swS4fEGEFkNzXAUD8OKwS9o0tBg9kU0UGPlTlYndU,22384
180
180
  ultralytics/models/yolo/obb/__init__.py,sha256=tQmpG8wVHsajWkZdmD6cjGohJ4ki64iSXQT8JY_dydo,221
@@ -198,7 +198,7 @@ ultralytics/models/yolo/yoloe/train.py,sha256=giX6zDu5Z3z48PCaBHzu7v9NH3BrpUaGAY
198
198
  ultralytics/models/yolo/yoloe/train_seg.py,sha256=0hRByMXsEJA-J2B1wXDMVhiW9f9MOTj3LlrGTibN6Ww,4919
199
199
  ultralytics/models/yolo/yoloe/val.py,sha256=utUFWeFKRFWZrPr1y3A8ztbTwdoWMYqzlwBN7CQ0tCA,9418
200
200
  ultralytics/nn/__init__.py,sha256=538LZPUKKvc3JCMgiQ4VLGqRN2ZAaVLFcQbeNNHFkEA,545
201
- ultralytics/nn/autobackend.py,sha256=OBlE1R4ZGBF4JBMqb-ImLgaBZebap0m02qV_uJWiQTA,42673
201
+ ultralytics/nn/autobackend.py,sha256=XdEWANgSpRhLm2t2aPvp4zaPDluS14-gF6_BPamg95I,42673
202
202
  ultralytics/nn/tasks.py,sha256=dkfIujXeSaR8FmLYyrhl5Pj2U1h22JMEOkv9T3pIIwc,70367
203
203
  ultralytics/nn/text_model.py,sha256=Nz7MJlIL4flNpOnwhS3qqINb_NfANSIOw4ex49yTFt0,16051
204
204
  ultralytics/nn/modules/__init__.py,sha256=5Sg_28MDfKwdu14Ty_WCaiIXZyjBSQ-xCNCwnoz_w-w,3198
@@ -257,9 +257,9 @@ ultralytics/utils/metrics.py,sha256=MTV8gHtMEKWr8XKskRjk6_oS7QyD5myhRQ39eM9yfLo,
257
257
  ultralytics/utils/nms.py,sha256=zv1rOzMF6WU8Kdk41VzNf1H1EMt_vZHcbDFbg3mnN2o,14248
258
258
  ultralytics/utils/ops.py,sha256=RAyISErSCXYWpXiAvR41Xnf2sIqXyCwyFDQf3K5bmFc,25661
259
259
  ultralytics/utils/patches.py,sha256=6WDGUokiND76iDbLeul_6Ny-bvvFcy6Bms5f9MkxhfQ,6506
260
- ultralytics/utils/plotting.py,sha256=FoGnXc52IvsVtlDvS8Ffee-SszwpepAvrYrusTn21Fs,48283
260
+ ultralytics/utils/plotting.py,sha256=GGaUYgF8OoxcmyMwNTr82ER7cJZ3CUOjYeq-7vpHDGQ,48432
261
261
  ultralytics/utils/tal.py,sha256=w7oi6fp0NmL6hHh-yvCCX1cBuuB4JuX7w1wiR4_SMZs,20678
262
- ultralytics/utils/torch_utils.py,sha256=o6KMukW6g-mUYrVMPHb5qkcGbQIk8aMMnVrOrsJoL1Q,40220
262
+ ultralytics/utils/torch_utils.py,sha256=uSy-ZRWsHo_43c-pdaar-GXQu9wwjkp2qZmEiJjChfI,40218
263
263
  ultralytics/utils/tqdm.py,sha256=sYKcXJDKCgOcMp7KBAB9cmCiJxk9tvoeoto6M8QRW24,16393
264
264
  ultralytics/utils/triton.py,sha256=2wZil1PfvOpaBymTzzP8Da6Aam-2MTLumO3uBmTE5FY,5406
265
265
  ultralytics/utils/tuner.py,sha256=rN8gFWnQOJFtrGlFcvOo0Eah9dEVFx0nFkpTGrlewZA,6861
@@ -279,8 +279,8 @@ ultralytics/utils/export/__init__.py,sha256=Cfh-PwVfTF_lwPp-Ss4wiX4z8Sm1XRPklsqd
279
279
  ultralytics/utils/export/engine.py,sha256=23-lC6dNsmz5vprSJzaN7UGNXrFlVedNcqhlOH_IXes,9956
280
280
  ultralytics/utils/export/imx.py,sha256=9UPA4CwTPADzvJx9dOsh_8fQ-LMeqG7eI9EYIn5ojkc,11621
281
281
  ultralytics/utils/export/tensorflow.py,sha256=PyAp0_rXSUcXiqV2RY0H9b_-oFaZ7hZBiSM42X53t0Q,9374
282
- dgenerate_ultralytics_headless-8.3.229.dist-info/METADATA,sha256=EZuPzZYXiTw3mKzgTLvOfh4ejdPuR5TlXHnKVgv21Xw,38965
283
- dgenerate_ultralytics_headless-8.3.229.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
284
- dgenerate_ultralytics_headless-8.3.229.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
285
- dgenerate_ultralytics_headless-8.3.229.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
286
- dgenerate_ultralytics_headless-8.3.229.dist-info/RECORD,,
282
+ dgenerate_ultralytics_headless-8.3.230.dist-info/METADATA,sha256=XxCa4ieudonAp9_svtSMVJEvCrgmYUFAEVclIfKnNxU,38834
283
+ dgenerate_ultralytics_headless-8.3.230.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
284
+ dgenerate_ultralytics_headless-8.3.230.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
285
+ dgenerate_ultralytics_headless-8.3.230.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
286
+ dgenerate_ultralytics_headless-8.3.230.dist-info/RECORD,,
ultralytics/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
2
2
 
3
- __version__ = "8.3.229"
3
+ __version__ = "8.3.230"
4
4
 
5
5
  import importlib
6
6
  import os
@@ -589,7 +589,7 @@ class Results(SimpleClass, DataExportMixin):
589
589
  if save:
590
590
  annotator.save(filename or f"results_{Path(self.path).name}")
591
591
 
592
- return annotator.im if pil else annotator.result()
592
+ return annotator.result(pil)
593
593
 
594
594
  def show(self, *args, **kwargs):
595
595
  """Display the image with annotated inference results.
@@ -55,7 +55,7 @@ class RTDETRPredictor(BasePredictor):
55
55
  bboxes, scores = preds[0].split((4, nd - 4), dim=-1)
56
56
 
57
57
  if not isinstance(orig_imgs, list): # input images are a torch.Tensor, not a list
58
- orig_imgs = ops.convert_torch2numpy_batch(orig_imgs)
58
+ orig_imgs = ops.convert_torch2numpy_batch(orig_imgs)[..., ::-1]
59
59
 
60
60
  results = []
61
61
  for bbox, score, orig_img, img_path in zip(bboxes, scores, orig_imgs, self.batch[0]): # (300, 4)
@@ -502,7 +502,7 @@ class Predictor(BasePredictor):
502
502
  names = dict(enumerate(str(i) for i in range(pred_masks.shape[0])))
503
503
 
504
504
  if not isinstance(orig_imgs, list): # input images are a torch.Tensor, not a list
505
- orig_imgs = ops.convert_torch2numpy_batch(orig_imgs)
505
+ orig_imgs = ops.convert_torch2numpy_batch(orig_imgs)[..., ::-1]
506
506
 
507
507
  results = []
508
508
  for masks, orig_img, img_path in zip([pred_masks], orig_imgs, self.batch[0]):
@@ -81,7 +81,7 @@ class ClassificationPredictor(BasePredictor):
81
81
  (list[Results]): List of Results objects containing classification results for each image.
82
82
  """
83
83
  if not isinstance(orig_imgs, list): # Input images are a torch.Tensor, not a list
84
- orig_imgs = ops.convert_torch2numpy_batch(orig_imgs)
84
+ orig_imgs = ops.convert_torch2numpy_batch(orig_imgs)[..., ::-1]
85
85
 
86
86
  preds = preds[0] if isinstance(preds, (list, tuple)) else preds
87
87
  return [
@@ -65,7 +65,7 @@ class DetectionPredictor(BasePredictor):
65
65
  )
66
66
 
67
67
  if not isinstance(orig_imgs, list): # input images are a torch.Tensor, not a list
68
- orig_imgs = ops.convert_torch2numpy_batch(orig_imgs)
68
+ orig_imgs = ops.convert_torch2numpy_batch(orig_imgs)[..., ::-1]
69
69
 
70
70
  if save_feats:
71
71
  obj_feats = self.get_obj_feats(self._feats, preds[1])
@@ -377,7 +377,7 @@ class AutoBackend(nn.Module):
377
377
  if is_input:
378
378
  if -1 in tuple(model.get_tensor_shape(name)):
379
379
  dynamic = True
380
- context.set_input_shape(name, tuple(model.get_tensor_profile_shape(name, 0)[1]))
380
+ context.set_input_shape(name, tuple(model.get_tensor_profile_shape(name, 0)[2]))
381
381
  if dtype == np.float16:
382
382
  fp16 = True
383
383
  else:
@@ -207,7 +207,7 @@ class Annotator:
207
207
  elif im.shape[2] > 3: # multispectral
208
208
  im = np.ascontiguousarray(im[..., :3])
209
209
  if self.pil: # use PIL
210
- self.im = im if input_is_pil else Image.fromarray(im)
210
+ self.im = im if input_is_pil else Image.fromarray(im) # stay in BGR since color palette is in BGR
211
211
  if self.im.mode not in {"RGB", "RGBA"}: # multispectral
212
212
  self.im = self.im.convert("RGB")
213
213
  self.draw = ImageDraw.Draw(self.im, "RGBA")
@@ -515,9 +515,10 @@ class Annotator:
515
515
  self.im = im if isinstance(im, Image.Image) else Image.fromarray(im)
516
516
  self.draw = ImageDraw.Draw(self.im)
517
517
 
518
- def result(self):
519
- """Return annotated image as array."""
520
- return np.asarray(self.im)
518
+ def result(self, pil=False):
519
+ """Return annotated image as array or PIL image."""
520
+ im = np.asarray(self.im) # self.im is in BGR
521
+ return Image.fromarray(im[..., ::-1]) if pil else im
521
522
 
522
523
  def show(self, title: str | None = None):
523
524
  """Show the annotated image."""
@@ -179,7 +179,7 @@ def select_device(device="", newline=False, verbose=True):
179
179
  cpu = device == "cpu"
180
180
  mps = device in {"mps", "mps:0"} # Apple Metal Performance Shaders (MPS)
181
181
  if cpu or mps:
182
- os.environ["CUDA_VISIBLE_DEVICES"] = "-1" # force torch.cuda.is_available() = False
182
+ os.environ["CUDA_VISIBLE_DEVICES"] = "" # force torch.cuda.is_available() = False
183
183
  elif device: # non-cpu device requested
184
184
  if device == "cuda":
185
185
  device = "0"