dgenerate-ultralytics-headless 8.3.177__py3-none-any.whl → 8.3.178__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.177
3
+ Version: 8.3.178
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>
@@ -1,4 +1,4 @@
1
- dgenerate_ultralytics_headless-8.3.177.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
1
+ dgenerate_ultralytics_headless-8.3.178.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
2
2
  tests/__init__.py,sha256=b4KP5_q-2IO8Br8YHOSLYnn7IwZS81l_vfEF2YPa2lM,894
3
3
  tests/conftest.py,sha256=LXtQJcFNWPGuzauTGkiXgsvVC3llJKfg22WcmhRzuQc,2593
4
4
  tests/test_cli.py,sha256=EMf5gTAopOnIz8VvzaM-Qb044o7D0flnUHYQ-2ffOM4,5670
@@ -8,7 +8,7 @@ tests/test_exports.py,sha256=CY-4xVZlVM16vdyIC0mSR3Ix59aiZm1qjFGIhSNmB20,11007
8
8
  tests/test_integrations.py,sha256=kl_AKmE_Qs1GB0_91iVwbzNxofm_hFTt0zzU6JF-pg4,6323
9
9
  tests/test_python.py,sha256=-qvdeg-hEcKU5mWSDEU24iFZ-i8FAwQRznSXpkp6WQ4,27928
10
10
  tests/test_solutions.py,sha256=tuf6n_fsI8KvSdJrnc-cqP2qYdiYqCWuVrx0z9dOz3Q,13213
11
- ultralytics/__init__.py,sha256=hBzrXExeyo-zxXKBW2PwzDCW5hndyDerj2NQCxQF5y4,730
11
+ ultralytics/__init__.py,sha256=jfnesIVlI3MP1Fu1VhXuCSl2_tHCed9GUcoR23EvLlI,730
12
12
  ultralytics/assets/bus.jpg,sha256=wCAZxJecGR63Od3ZRERe9Aja1Weayrb9Ug751DS_vGM,137419
13
13
  ultralytics/assets/zidane.jpg,sha256=Ftc4aeMmen1O0A3o6GCDO9FlfBslLpTAw0gnetx7bts,50427
14
14
  ultralytics/cfg/__init__.py,sha256=VIpPHImhjb0XLJquGZrG_LBGZchtOtBSXR7HYTYV2GU,39602
@@ -106,7 +106,7 @@ ultralytics/cfg/trackers/botsort.yaml,sha256=TpRaK5kH_-QbjCQ7ekM4s_7j8I8ti3q8Hs7
106
106
  ultralytics/cfg/trackers/bytetrack.yaml,sha256=6u-tiZlk16EqEwkNXaMrza6PAQmWj_ypgv26LGCtPDg,886
107
107
  ultralytics/data/__init__.py,sha256=nAXaL1puCc7z_NjzQNlJnhbVhT9Fla2u7Dsqo7q1dAc,644
108
108
  ultralytics/data/annotator.py,sha256=uAgd7K-yudxiwdNqHz0ubfFg5JsfNlae4cgxdvCMyuY,3030
109
- ultralytics/data/augment.py,sha256=lZhe2p8nrMrlfq1Y0FEXzDUAqLK0zROd2Heb7pJqn58,132420
109
+ ultralytics/data/augment.py,sha256=Ps1s-ug_oXdyAz4Jyur6OmxzRlyzwP3VP-3hDalSxj8,132959
110
110
  ultralytics/data/base.py,sha256=mRcuehK1thNuuzQGL6D1AaZkod71oHRdYTod_zdQZQg,19688
111
111
  ultralytics/data/build.py,sha256=TfMLSPMbE2hGZVMLl178NTFrihC1-50jNOt1ex9elxw,11480
112
112
  ultralytics/data/converter.py,sha256=dExElV0vWd4EmDtZaFMC0clEmLdjRDIdFiXf01PUvQA,27134
@@ -120,7 +120,7 @@ ultralytics/data/scripts/get_coco.sh,sha256=UuJpJeo3qQpTHVINeOpmP0NYmg8PhEFE3A8J
120
120
  ultralytics/data/scripts/get_coco128.sh,sha256=qmRQl_hOKrsdHrTrnyQuFIH01oDz3lfaz138OgGfLt8,650
121
121
  ultralytics/data/scripts/get_imagenet.sh,sha256=hr42H16bM47iT27rgS7MpEo-GeOZAYUQXgr0B2cwn48,1705
122
122
  ultralytics/engine/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXppv1-QUM,70
123
- ultralytics/engine/exporter.py,sha256=8H5FRyBNC6tpVMHk1iBXVyq9CLVA9rrkqY5lHT6-IR8,75068
123
+ ultralytics/engine/exporter.py,sha256=Vr7K8Yf3wyf91ZvDpRosAohwa_W0oe4qW-JvqigCPfk,75190
124
124
  ultralytics/engine/model.py,sha256=877u2n0ISz2COOYtEMUqQe0E-HHB4Atb2DuH1XCE98k,53530
125
125
  ultralytics/engine/predictor.py,sha256=iXnUB-tvBHtVpKbB-5EKs1wSREBIerdUxWx39MaFYuk,22485
126
126
  ultralytics/engine/results.py,sha256=QcHcbPVlLBiy_APwABr-T5K65HR8Bl1rRzxawjjP76E,71873
@@ -195,7 +195,7 @@ ultralytics/models/yolo/yoloe/train.py,sha256=XYpQYSnSD8vi_9VSj_S5oIsNUEqm3e66vP
195
195
  ultralytics/models/yolo/yoloe/train_seg.py,sha256=aCV7M8oQOvODFnU4piZdJh3tIrBJYAzZfRVRx1vRgxo,4956
196
196
  ultralytics/models/yolo/yoloe/val.py,sha256=yebPkxwKKt__cY05Zbh1YXg4_BKzzpcDc3Cv3FJ5SAA,9769
197
197
  ultralytics/nn/__init__.py,sha256=rjociYD9lo_K-d-1s6TbdWklPLjTcEHk7OIlRDJstIE,615
198
- ultralytics/nn/autobackend.py,sha256=wnIhA0tsgCn7berelnRvBRVLSV9Kz6ZPiryHavTkQNw,41789
198
+ ultralytics/nn/autobackend.py,sha256=UM9ObXeLB0lgak1Q5oSi2IA-R_Owr6NdJNBAsA3mSbo,41790
199
199
  ultralytics/nn/tasks.py,sha256=vw_TNacAv-RN24rusFzKuYL6qRBD7cve8EpB7gOlU_8,72505
200
200
  ultralytics/nn/text_model.py,sha256=cYwD-0el4VeToDBP4iPFOQGqyEQatJOBHrVyONL3K_s,15282
201
201
  ultralytics/nn/modules/__init__.py,sha256=2nY0X69Z5DD5SWt6v3CUTZa5gXSzC9TQr3VTVqhyGho,3158
@@ -266,8 +266,8 @@ ultralytics/utils/callbacks/neptune.py,sha256=j8pecmlcsM8FGzLKWoBw5xUsi5t8E5HuxY
266
266
  ultralytics/utils/callbacks/raytune.py,sha256=S6Bq16oQDQ8BQgnZzA0zJHGN_BBr8iAM_WtGoLiEcwg,1283
267
267
  ultralytics/utils/callbacks/tensorboard.py,sha256=MDPBW7aDes-66OE6YqKXXvqA_EocjzEMHWGM-8z9vUQ,5281
268
268
  ultralytics/utils/callbacks/wb.py,sha256=Tm_-aRr2CN32MJkY9tylpMBJkb007-MSRNSQ7rDJ5QU,7521
269
- dgenerate_ultralytics_headless-8.3.177.dist-info/METADATA,sha256=Ab4i3TVa7FICqy7bwVSdYFGNcqfu6Tg2QaOetQ1j7u0,38716
270
- dgenerate_ultralytics_headless-8.3.177.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
271
- dgenerate_ultralytics_headless-8.3.177.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
272
- dgenerate_ultralytics_headless-8.3.177.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
273
- dgenerate_ultralytics_headless-8.3.177.dist-info/RECORD,,
269
+ dgenerate_ultralytics_headless-8.3.178.dist-info/METADATA,sha256=qF1t4-NTjrCC-2ur8_Ay4sbps_4hp85OJEY4tgH_ZDM,38716
270
+ dgenerate_ultralytics_headless-8.3.178.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
271
+ dgenerate_ultralytics_headless-8.3.178.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
272
+ dgenerate_ultralytics_headless-8.3.178.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
273
+ dgenerate_ultralytics_headless-8.3.178.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.177"
3
+ __version__ = "8.3.178"
4
4
 
5
5
  import os
6
6
 
@@ -1621,6 +1621,8 @@ class LetterBox:
1621
1621
  scaleup: bool = True,
1622
1622
  center: bool = True,
1623
1623
  stride: int = 32,
1624
+ padding_value: int = 114,
1625
+ interpolation: int = cv2.INTER_LINEAR,
1624
1626
  ):
1625
1627
  """
1626
1628
  Initialize LetterBox object for resizing and padding images.
@@ -1635,6 +1637,8 @@ class LetterBox:
1635
1637
  scaleup (bool): If True, allow scaling up. If False, only scale down.
1636
1638
  center (bool): If True, center the placed image. If False, place image in top-left corner.
1637
1639
  stride (int): Stride of the model (e.g., 32 for YOLOv5).
1640
+ padding_value (int): Value for padding the image. Default is 114.
1641
+ interpolation (int): Interpolation method for resizing. Default is cv2.INTER_LINEAR.
1638
1642
 
1639
1643
  Attributes:
1640
1644
  new_shape (Tuple[int, int]): Target size for the resized image.
@@ -1642,6 +1646,8 @@ class LetterBox:
1642
1646
  scale_fill (bool): Flag for stretching image without padding.
1643
1647
  scaleup (bool): Flag for allowing upscaling.
1644
1648
  stride (int): Stride value for ensuring image size is divisible by stride.
1649
+ padding_value (int): Value used for padding the image.
1650
+ interpolation (int): Interpolation method used for resizing.
1645
1651
 
1646
1652
  Examples:
1647
1653
  >>> letterbox = LetterBox(new_shape=(640, 640), auto=False, scale_fill=False, scaleup=True, stride=32)
@@ -1653,6 +1659,8 @@ class LetterBox:
1653
1659
  self.scaleup = scaleup
1654
1660
  self.stride = stride
1655
1661
  self.center = center # Put the image in the middle or top-left
1662
+ self.padding_value = padding_value
1663
+ self.interpolation = interpolation
1656
1664
 
1657
1665
  def __call__(self, labels: Dict[str, Any] = None, image: np.ndarray = None) -> Union[Dict[str, Any], np.ndarray]:
1658
1666
  """
@@ -1705,7 +1713,7 @@ class LetterBox:
1705
1713
  dh /= 2
1706
1714
 
1707
1715
  if shape[::-1] != new_unpad: # resize
1708
- img = cv2.resize(img, new_unpad, interpolation=cv2.INTER_LINEAR)
1716
+ img = cv2.resize(img, new_unpad, interpolation=self.interpolation)
1709
1717
  if img.ndim == 2:
1710
1718
  img = img[..., None]
1711
1719
 
@@ -1713,9 +1721,11 @@ class LetterBox:
1713
1721
  left, right = int(round(dw - 0.1)) if self.center else 0, int(round(dw + 0.1))
1714
1722
  h, w, c = img.shape
1715
1723
  if c == 3:
1716
- img = cv2.copyMakeBorder(img, top, bottom, left, right, cv2.BORDER_CONSTANT, value=(114, 114, 114))
1724
+ img = cv2.copyMakeBorder(
1725
+ img, top, bottom, left, right, cv2.BORDER_CONSTANT, value=(self.padding_value,) * 3
1726
+ )
1717
1727
  else: # multispectral
1718
- pad_img = np.full((h + top + bottom, w + left + right, c), fill_value=114, dtype=img.dtype)
1728
+ pad_img = np.full((h + top + bottom, w + left + right, c), fill_value=self.padding_value, dtype=img.dtype)
1719
1729
  pad_img[top : top + h, left : left + w] = img
1720
1730
  img = pad_img
1721
1731
 
@@ -47,6 +47,7 @@ Inference:
47
47
  yolo11n.mnn # MNN
48
48
  yolo11n_ncnn_model # NCNN
49
49
  yolo11n_imx_model # IMX
50
+ yolo11n_rknn_model # RKNN
50
51
 
51
52
  TensorFlow.js:
52
53
  $ cd .. && git clone https://github.com/zldrobit/tfjs-yolov5-example.git && cd tfjs-yolov5-example
@@ -764,7 +765,7 @@ class Exporter:
764
765
  @try_export
765
766
  def export_ncnn(self, prefix=colorstr("NCNN:")):
766
767
  """Export YOLO model to NCNN format using PNNX https://github.com/pnnx/pnnx."""
767
- check_requirements("ncnn")
768
+ check_requirements("ncnn", cmds="--no-deps") # no deps to avoid installing opencv-python
768
769
  import ncnn # noqa
769
770
 
770
771
  LOGGER.info(f"\n{prefix} starting export with NCNN {ncnn.__version__}...")
@@ -534,7 +534,7 @@ class AutoBackend(nn.Module):
534
534
  # NCNN
535
535
  elif ncnn:
536
536
  LOGGER.info(f"Loading {w} for NCNN inference...")
537
- check_requirements("git+https://github.com/Tencent/ncnn.git" if ARM64 else "ncnn") # requires NCNN
537
+ check_requirements("git+https://github.com/Tencent/ncnn.git" if ARM64 else "ncnn", cmds="--no-deps")
538
538
  import ncnn as pyncnn
539
539
 
540
540
  net = pyncnn.Net()