ultralytics 8.2.77__py3-none-any.whl → 8.2.79__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.
Potentially problematic release.
This version of ultralytics might be problematic. Click here for more details.
- tests/test_cli.py +1 -3
- ultralytics/__init__.py +1 -1
- ultralytics/data/augment.py +0 -2
- ultralytics/engine/model.py +1 -0
- ultralytics/nn/modules/head.py +5 -1
- {ultralytics-8.2.77.dist-info → ultralytics-8.2.79.dist-info}/METADATA +2 -2
- {ultralytics-8.2.77.dist-info → ultralytics-8.2.79.dist-info}/RECORD +11 -11
- {ultralytics-8.2.77.dist-info → ultralytics-8.2.79.dist-info}/LICENSE +0 -0
- {ultralytics-8.2.77.dist-info → ultralytics-8.2.79.dist-info}/WHEEL +0 -0
- {ultralytics-8.2.77.dist-info → ultralytics-8.2.79.dist-info}/entry_points.txt +0 -0
- {ultralytics-8.2.77.dist-info → ultralytics-8.2.79.dist-info}/top_level.txt +0 -0
tests/test_cli.py
CHANGED
|
@@ -84,9 +84,7 @@ def test_fastsam(task="segment", model=WEIGHTS_DIR / "FastSAM-s.pt", data="coco8
|
|
|
84
84
|
new_masks, _ = Predictor.remove_small_regions(everything_results[0].masks.data, min_area=20)
|
|
85
85
|
|
|
86
86
|
# Run inference with bboxes and points and texts prompt at the same time
|
|
87
|
-
|
|
88
|
-
source, bboxes=[439, 437, 524, 709], points=[[200, 200]], labels=[1], texts="a photo of a dog"
|
|
89
|
-
)
|
|
87
|
+
sam_model(source, bboxes=[439, 437, 524, 709], points=[[200, 200]], labels=[1], texts="a photo of a dog")
|
|
90
88
|
|
|
91
89
|
|
|
92
90
|
def test_mobilesam():
|
ultralytics/__init__.py
CHANGED
ultralytics/data/augment.py
CHANGED
|
@@ -539,7 +539,6 @@ class Mosaic(BaseMixTransform):
|
|
|
539
539
|
assert 0 <= p <= 1.0, f"The probability should be in range [0, 1], but got {p}."
|
|
540
540
|
assert n in {4, 9}, "grid must be equal to 4 or 9."
|
|
541
541
|
super().__init__(dataset=dataset, p=p)
|
|
542
|
-
self.dataset = dataset
|
|
543
542
|
self.imgsz = imgsz
|
|
544
543
|
self.border = (-imgsz // 2, -imgsz // 2) # width, height
|
|
545
544
|
self.n = n
|
|
@@ -1692,7 +1691,6 @@ class CopyPaste:
|
|
|
1692
1691
|
instances.convert_bbox(format="xyxy")
|
|
1693
1692
|
instances.denormalize(w, h)
|
|
1694
1693
|
if self.p and len(instances.segments):
|
|
1695
|
-
n = len(instances)
|
|
1696
1694
|
_, w, _ = im.shape # height, width, channels
|
|
1697
1695
|
im_new = np.zeros(im.shape, np.uint8)
|
|
1698
1696
|
|
ultralytics/engine/model.py
CHANGED
|
@@ -381,6 +381,7 @@ class Model(nn.Module):
|
|
|
381
381
|
"""
|
|
382
382
|
self._check_is_pytorch_model()
|
|
383
383
|
if isinstance(weights, (str, Path)):
|
|
384
|
+
self.overrides["pretrained"] = weights # remember the weights for DDP training
|
|
384
385
|
weights, self.ckpt = attempt_load_one_weight(weights)
|
|
385
386
|
self.model.load(weights)
|
|
386
387
|
return self
|
ultralytics/nn/modules/head.py
CHANGED
|
@@ -8,6 +8,7 @@ import torch
|
|
|
8
8
|
import torch.nn as nn
|
|
9
9
|
from torch.nn.init import constant_, xavier_uniform_
|
|
10
10
|
|
|
11
|
+
from ultralytics.utils import MACOS
|
|
11
12
|
from ultralytics.utils.tal import TORCH_1_10, dist2bbox, dist2rbox, make_anchors
|
|
12
13
|
|
|
13
14
|
from .block import DFL, BNContrastiveHead, ContrastiveHead, Proto
|
|
@@ -151,13 +152,16 @@ class Detect(nn.Module):
|
|
|
151
152
|
boxes = torch.gather(boxes, dim=1, index=index.repeat(1, 1, boxes.shape[-1]))
|
|
152
153
|
scores = torch.gather(scores, dim=1, index=index.repeat(1, 1, scores.shape[-1]))
|
|
153
154
|
|
|
154
|
-
# NOTE: simplify but
|
|
155
|
+
# NOTE: simplify result but slightly lower mAP
|
|
155
156
|
# scores, labels = scores.max(dim=-1)
|
|
156
157
|
# return torch.cat([boxes, scores.unsqueeze(-1), labels.unsqueeze(-1)], dim=-1)
|
|
157
158
|
|
|
158
159
|
scores, index = torch.topk(scores.flatten(1), max_det, axis=-1)
|
|
159
160
|
labels = index % nc
|
|
160
161
|
index = index // nc
|
|
162
|
+
# Set int64 dtype for MPS and CoreML compatibility to avoid 'gather_along_axis' ops error
|
|
163
|
+
if MACOS:
|
|
164
|
+
index = index.to(torch.int64)
|
|
161
165
|
boxes = boxes.gather(dim=1, index=index.unsqueeze(-1).repeat(1, 1, boxes.shape[-1]))
|
|
162
166
|
|
|
163
167
|
return torch.cat([boxes, scores.unsqueeze(-1), labels.unsqueeze(-1).to(boxes.dtype)], dim=-1)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ultralytics
|
|
3
|
-
Version: 8.2.
|
|
3
|
+
Version: 8.2.79
|
|
4
4
|
Summary: Ultralytics YOLOv8 for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
|
|
5
5
|
Author: Glenn Jocher, Ayush Chaurasia, Jing Qiu
|
|
6
6
|
Maintainer: Glenn Jocher, Ayush Chaurasia, Jing Qiu
|
|
@@ -84,7 +84,7 @@ Requires-Dist: dvclive>=2.12.0; extra == "logging"
|
|
|
84
84
|
|
|
85
85
|
<div align="center">
|
|
86
86
|
<p>
|
|
87
|
-
<a href="https://
|
|
87
|
+
<a href="https://www.ultralytics.com/events/yolovision" target="_blank">
|
|
88
88
|
<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/yolov8/banner-yolov8.png" alt="YOLO Vision banner"></a>
|
|
89
89
|
</p>
|
|
90
90
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
tests/__init__.py,sha256=9evx3lOdKZeY1iWXvH-FkMkgf8jLucWICoabzeD6aYg,626
|
|
2
2
|
tests/conftest.py,sha256=3ZtD4VlMKK5jVJwIPCrNAcG63vywJzdLq7U2AfYR2VI,2919
|
|
3
|
-
tests/test_cli.py,sha256=
|
|
3
|
+
tests/test_cli.py,sha256=as6cuNdDF2s_h3DxVXKmy45V3DXWB6y40xect93TKHc,4810
|
|
4
4
|
tests/test_cuda.py,sha256=uD-ddNEcBMFQmQ9iE4fIGh0EIcGwEoDEUNVCEHicaWE,5133
|
|
5
5
|
tests/test_engine.py,sha256=xW-UT9_9xZp-7-hSnbJgMw_ezTk6NqTOIiA59XZDmxA,4934
|
|
6
6
|
tests/test_explorer.py,sha256=NcxSJeB6FxwkN09hQl7nnQL--HjfHB_WcZk0mEmBNHI,2215
|
|
@@ -8,7 +8,7 @@ tests/test_exports.py,sha256=Uezf3OatpPHlo5qoPw-2kqkZxuMCF9L4XF2riD4vmII,8225
|
|
|
8
8
|
tests/test_integrations.py,sha256=xglcfMPjfVh346PV8WTpk6tBxraCXEFJEQyyJMr5tyU,6064
|
|
9
9
|
tests/test_python.py,sha256=SxBf5GNu7vXQP8QxTlSOzCzcQNN0PLA6EX8M33VDHsU,21927
|
|
10
10
|
tests/test_solutions.py,sha256=EACnPXbeJe2aVTOKfqMk5jclKKCWCVgFEzjpR6y7Sh8,3304
|
|
11
|
-
ultralytics/__init__.py,sha256=
|
|
11
|
+
ultralytics/__init__.py,sha256=uGadV7MY7aBx3TYM3LLtCY5JjfbdCa06UOh8N1DHmRg,694
|
|
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=oLjAiJXnxs1bsAB-nojG6evr0w1Ns9Ry5Js23ueiX9Y,33029
|
|
@@ -84,7 +84,7 @@ ultralytics/cfg/trackers/botsort.yaml,sha256=8B0xNbnG_E-9DCUpap72PWkUgBb1AjuApEn
|
|
|
84
84
|
ultralytics/cfg/trackers/bytetrack.yaml,sha256=8vpTZ2x9mhRXJymoJvs1G8kTXo_HxbSwHup2FQALT3A,721
|
|
85
85
|
ultralytics/data/__init__.py,sha256=VGe-ATG7j35F4A4r8Jmzffjlhve4JAJPgRa5ahKTU18,616
|
|
86
86
|
ultralytics/data/annotator.py,sha256=1Hyu6ubrBL8KmRrt1keGn-K4XTqQdAVyIwTsQiBtzLU,2489
|
|
87
|
-
ultralytics/data/augment.py,sha256=
|
|
87
|
+
ultralytics/data/augment.py,sha256=arP39tesJAmQdMZIb0mbKkYGzLtZN-Tx0aKMyC2aTv8,119247
|
|
88
88
|
ultralytics/data/base.py,sha256=C3teLnw97ZTbpJHT9P7yYWosAKocMzgJjRe1rxgfpls,13524
|
|
89
89
|
ultralytics/data/build.py,sha256=AfMmz0sHIYmwry_90tEJFRk_kz0S3SolScVXqYHiT08,7261
|
|
90
90
|
ultralytics/data/converter.py,sha256=k6pUI86sVn4rmBglyDNWS3jgowoMRFDpKYO3ovRU15w,21501
|
|
@@ -99,7 +99,7 @@ ultralytics/data/explorer/gui/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2
|
|
|
99
99
|
ultralytics/data/explorer/gui/dash.py,sha256=vZ476NaUH4FKU08rAJ1K9WNyKtg0soMyJJxqg176yWc,10498
|
|
100
100
|
ultralytics/engine/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7JI8grmQDTs,42
|
|
101
101
|
ultralytics/engine/exporter.py,sha256=EM35MOPWbIKE2ShJsPzdrEmrjzwZSp9gW-rO8GEFal0,58905
|
|
102
|
-
ultralytics/engine/model.py,sha256=
|
|
102
|
+
ultralytics/engine/model.py,sha256=jmiIZWjiJ65fFWhSReaxfX6V3nzy1KpZHhrDpiYz-dY,52139
|
|
103
103
|
ultralytics/engine/predictor.py,sha256=W58kDCFH2AfoFzpGbos3k8zUEVsLunBuM8sc2B64rPY,17449
|
|
104
104
|
ultralytics/engine/results.py,sha256=7KeqJ9GsFMpdSrEx5HWSgDSnX7p1MYa7qwn72QZwG8o,70512
|
|
105
105
|
ultralytics/engine/trainer.py,sha256=KJ0FohkKsAOgkrU-Fawh1QwBuhalsuvf8NNEo5dkLSc,35591
|
|
@@ -174,7 +174,7 @@ ultralytics/nn/modules/__init__.py,sha256=mARjWk83WPYF5phXhXfPbAu2ZohtdbHdi5zzox
|
|
|
174
174
|
ultralytics/nn/modules/activation.py,sha256=RS0DRDm9r56tojN79X8UBVtiktde9Wasw7GIbiopSMk,945
|
|
175
175
|
ultralytics/nn/modules/block.py,sha256=jLXQerl4nXfr4MEGMp9S3YgdTqOJzas1GBxryyXyLV0,34582
|
|
176
176
|
ultralytics/nn/modules/conv.py,sha256=Ywe87IhuaS22mR2JJ9xjnW8Sb-m7WTjxuqIxV_Dv8lI,12722
|
|
177
|
-
ultralytics/nn/modules/head.py,sha256=
|
|
177
|
+
ultralytics/nn/modules/head.py,sha256=ufw2PvzfH2XBz7bcyV8_P8npZLybl9-UpeuFLcJwgmc,27047
|
|
178
178
|
ultralytics/nn/modules/transformer.py,sha256=Lu4WAoIsb8ncM_1-04KSgxFf7oOlQU7RgNfSSmsehr0,18070
|
|
179
179
|
ultralytics/nn/modules/utils.py,sha256=779QnnKp9v8jv251ESduTXJ0ol8HkIOLbGQWwEGQjhU,3196
|
|
180
180
|
ultralytics/solutions/__init__.py,sha256=O_G9jh34NnFsHKSA8zcJH0CHtg1Q01JEiRWGwX3vGJY,631
|
|
@@ -225,9 +225,9 @@ ultralytics/utils/callbacks/neptune.py,sha256=5Z3ua5YBTUS56FH8VQKQG1aaIo9fH8GEyz
|
|
|
225
225
|
ultralytics/utils/callbacks/raytune.py,sha256=ODVYzy-CoM4Uge0zjkh3Hnh9nF2M0vhDrSenXnvcizw,705
|
|
226
226
|
ultralytics/utils/callbacks/tensorboard.py,sha256=QEgOVhUqY9akOs5TJIwz1Rvn6l32xWLpOxlwEyWF0B8,4136
|
|
227
227
|
ultralytics/utils/callbacks/wb.py,sha256=9-fjQIdLjr3b73DTE3rHO171KvbH1VweJ-bmbv-rqTw,6747
|
|
228
|
-
ultralytics-8.2.
|
|
229
|
-
ultralytics-8.2.
|
|
230
|
-
ultralytics-8.2.
|
|
231
|
-
ultralytics-8.2.
|
|
232
|
-
ultralytics-8.2.
|
|
233
|
-
ultralytics-8.2.
|
|
228
|
+
ultralytics-8.2.79.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
|
229
|
+
ultralytics-8.2.79.dist-info/METADATA,sha256=3ARfZH7BJO7y2zddt_lGQBYL9CKXGhIk2tjsZSq3jHk,41321
|
|
230
|
+
ultralytics-8.2.79.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
|
|
231
|
+
ultralytics-8.2.79.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
|
|
232
|
+
ultralytics-8.2.79.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
|
|
233
|
+
ultralytics-8.2.79.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|