ultralytics 8.3.121__py3-none-any.whl → 8.3.123__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.
- tests/test_cuda.py +1 -1
- tests/test_python.py +3 -3
- ultralytics/__init__.py +1 -1
- ultralytics/cfg/__init__.py +1 -1
- ultralytics/cfg/trackers/botsort.yaml +1 -1
- ultralytics/data/split_dota.py +1 -1
- ultralytics/engine/exporter.py +9 -5
- ultralytics/engine/results.py +4 -7
- ultralytics/models/yolo/detect/predict.py +1 -1
- ultralytics/nn/autobackend.py +1 -1
- ultralytics/solutions/solutions.py +1 -1
- ultralytics/solutions/speed_estimation.py +48 -52
- ultralytics/trackers/bot_sort.py +2 -0
- ultralytics/trackers/track.py +3 -3
- ultralytics/utils/autobatch.py +2 -2
- ultralytics/utils/benchmarks.py +5 -5
- ultralytics/utils/torch_utils.py +4 -4
- {ultralytics-8.3.121.dist-info → ultralytics-8.3.123.dist-info}/METADATA +3 -3
- {ultralytics-8.3.121.dist-info → ultralytics-8.3.123.dist-info}/RECORD +23 -23
- {ultralytics-8.3.121.dist-info → ultralytics-8.3.123.dist-info}/WHEEL +1 -1
- {ultralytics-8.3.121.dist-info → ultralytics-8.3.123.dist-info}/entry_points.txt +0 -0
- {ultralytics-8.3.121.dist-info → ultralytics-8.3.123.dist-info}/licenses/LICENSE +0 -0
- {ultralytics-8.3.121.dist-info → ultralytics-8.3.123.dist-info}/top_level.txt +0 -0
tests/test_cuda.py
CHANGED
@@ -115,7 +115,7 @@ def test_utils_benchmarks():
|
|
115
115
|
|
116
116
|
# Pre-export a dynamic engine model to use dynamic inference
|
117
117
|
YOLO(MODEL).export(format="engine", imgsz=32, dynamic=True, batch=1)
|
118
|
-
ProfileModels([MODEL], imgsz=32, half=False, min_time=1, num_timed_runs=3, num_warmup_runs=1).
|
118
|
+
ProfileModels([MODEL], imgsz=32, half=False, min_time=1, num_timed_runs=3, num_warmup_runs=1).run()
|
119
119
|
|
120
120
|
|
121
121
|
@pytest.mark.skipif(not CUDA_IS_AVAILABLE, reason="CUDA is not available")
|
tests/test_python.py
CHANGED
@@ -399,18 +399,18 @@ def test_utils_benchmarks():
|
|
399
399
|
"""Benchmark model performance using 'ProfileModels' from 'ultralytics.utils.benchmarks'."""
|
400
400
|
from ultralytics.utils.benchmarks import ProfileModels
|
401
401
|
|
402
|
-
ProfileModels(["yolo11n.yaml"], imgsz=32, min_time=1, num_timed_runs=3, num_warmup_runs=1).
|
402
|
+
ProfileModels(["yolo11n.yaml"], imgsz=32, min_time=1, num_timed_runs=3, num_warmup_runs=1).run()
|
403
403
|
|
404
404
|
|
405
405
|
def test_utils_torchutils():
|
406
406
|
"""Test Torch utility functions including profiling and FLOP calculations."""
|
407
407
|
from ultralytics.nn.modules.conv import Conv
|
408
|
-
from ultralytics.utils.torch_utils import get_flops_with_torch_profiler,
|
408
|
+
from ultralytics.utils.torch_utils import get_flops_with_torch_profiler, profile_ops, time_sync
|
409
409
|
|
410
410
|
x = torch.randn(1, 64, 20, 20)
|
411
411
|
m = Conv(64, 64, k=1, s=2)
|
412
412
|
|
413
|
-
|
413
|
+
profile_ops(x, [m], n=3)
|
414
414
|
get_flops_with_torch_profiler(m)
|
415
415
|
time_sync()
|
416
416
|
|
ultralytics/__init__.py
CHANGED
ultralytics/cfg/__init__.py
CHANGED
@@ -701,7 +701,7 @@ def handle_yolo_solutions(args: List[str]) -> None:
|
|
701
701
|
solution_name = "count" # Default for invalid solution
|
702
702
|
|
703
703
|
if solution_name == "inference":
|
704
|
-
checks.check_requirements("streamlit>=1.29.0
|
704
|
+
checks.check_requirements("streamlit>=1.29.0")
|
705
705
|
LOGGER.info("💡 Loading Ultralytics live inference app...")
|
706
706
|
subprocess.run(
|
707
707
|
[ # Run subprocess with Streamlit custom argument
|
@@ -17,6 +17,6 @@ fuse_score: True # Whether to fuse confidence scores with the iou distances befo
|
|
17
17
|
gmc_method: sparseOptFlow # method of global motion compensation
|
18
18
|
# ReID model related thresh
|
19
19
|
proximity_thresh: 0.5 # minimum IoU for valid match with ReID
|
20
|
-
appearance_thresh: 0.
|
20
|
+
appearance_thresh: 0.8 # minimum appearance similarity for ReID
|
21
21
|
with_reid: False
|
22
22
|
model: auto # uses native features if detector is YOLO else yolo11n-cls.pt
|
ultralytics/data/split_dota.py
CHANGED
@@ -30,7 +30,7 @@ def bbox_iof(polygon1, bbox2, eps=1e-6):
|
|
30
30
|
Polygon format: [x1, y1, x2, y2, x3, y3, x4, y4].
|
31
31
|
Bounding box format: [x_min, y_min, x_max, y_max].
|
32
32
|
"""
|
33
|
-
check_requirements("shapely")
|
33
|
+
check_requirements("shapely>=2.0.0")
|
34
34
|
from shapely.geometry import Polygon
|
35
35
|
|
36
36
|
polygon1 = polygon1.reshape(-1, 4, 2)
|
ultralytics/engine/exporter.py
CHANGED
@@ -140,7 +140,7 @@ def export_formats():
|
|
140
140
|
["MNN", "mnn", ".mnn", True, True, ["batch", "half", "int8"]],
|
141
141
|
["NCNN", "ncnn", "_ncnn_model", True, True, ["batch", "half"]],
|
142
142
|
["IMX", "imx", "_imx_model", True, True, ["int8", "fraction"]],
|
143
|
-
["RKNN", "rknn", "_rknn_model", False, False, ["batch", "name"]],
|
143
|
+
["RKNN", "rknn", "_rknn_model", False, False, ["batch", "name", "int8"]],
|
144
144
|
]
|
145
145
|
return dict(zip(["Format", "Argument", "Suffix", "CPU", "GPU", "Arguments"], zip(*x)))
|
146
146
|
|
@@ -851,6 +851,9 @@ class Exporter:
|
|
851
851
|
ct_model.license = m.pop("license")
|
852
852
|
ct_model.version = m.pop("version")
|
853
853
|
ct_model.user_defined_metadata.update({k: str(v) for k, v in m.items()})
|
854
|
+
if self.model.task == "classify":
|
855
|
+
ct_model.user_defined_metadata.update({"com.apple.coreml.model.preview.type": "imageClassifier"})
|
856
|
+
|
854
857
|
try:
|
855
858
|
ct_model.save(str(f)) # save *.mlpackage
|
856
859
|
except Exception as e:
|
@@ -967,8 +970,9 @@ class Exporter:
|
|
967
970
|
output_integer_quantized_tflite=self.args.int8,
|
968
971
|
quant_type="per-tensor", # "per-tensor" (faster) or "per-channel" (slower but more accurate)
|
969
972
|
custom_input_op_name_np_data_path=np_data,
|
970
|
-
|
971
|
-
|
973
|
+
enable_batchmatmul_unfold=True, # fix lower no. of detected objects on GPU delegate
|
974
|
+
output_signaturedefs=True, # fix error with Attention block group convolution
|
975
|
+
optimization_for_gpu_delegate=True,
|
972
976
|
)
|
973
977
|
yaml_save(f / "metadata.yaml", self.metadata) # add metadata.yaml
|
974
978
|
|
@@ -1107,8 +1111,8 @@ class Exporter:
|
|
1107
1111
|
rknn = RKNN(verbose=False)
|
1108
1112
|
rknn.config(mean_values=[[0, 0, 0]], std_values=[[255, 255, 255]], target_platform=self.args.name)
|
1109
1113
|
rknn.load_onnx(model=f)
|
1110
|
-
rknn.build(do_quantization=
|
1111
|
-
f = f.replace(".onnx", f"-{self.args.name}.rknn")
|
1114
|
+
rknn.build(do_quantization=self.args.int8)
|
1115
|
+
f = f.replace(".onnx", f"-{self.args.name}-int8.rknn" if self.args.int8 else f"-{self.args.name}-fp16.rknn")
|
1112
1116
|
rknn.export_rknn(f"{export_path / f}")
|
1113
1117
|
yaml_save(export_path / "metadata.yaml", self.metadata)
|
1114
1118
|
return export_path, None
|
ultralytics/engine/results.py
CHANGED
@@ -662,17 +662,14 @@ class Results(SimpleClass):
|
|
662
662
|
- For classification tasks, it returns the top 5 class probabilities and their corresponding class names.
|
663
663
|
- The returned string is comma-separated and ends with a comma and a space.
|
664
664
|
"""
|
665
|
-
log_string = ""
|
666
665
|
probs = self.probs
|
667
666
|
if len(self) == 0:
|
668
|
-
return
|
667
|
+
return "" if probs is not None else "(no detections), "
|
669
668
|
if probs is not None:
|
670
|
-
|
669
|
+
return f"{', '.join(f'{self.names[j]} {probs.data[j]:.2f}' for j in probs.top5)}, "
|
671
670
|
if boxes := self.boxes:
|
672
|
-
|
673
|
-
|
674
|
-
log_string += f"{n} {self.names[int(c)]}{'s' * (n > 1)}, "
|
675
|
-
return log_string
|
671
|
+
counts = boxes.cls.int().bincount()
|
672
|
+
return "".join(f"{n} {self.names[i]}{'s' * (n > 1)}, " for i, n in enumerate(counts) if n > 0)
|
676
673
|
|
677
674
|
def save_txt(self, txt_file, save_conf=False):
|
678
675
|
"""
|
@@ -90,7 +90,7 @@ class DetectionPredictor(BasePredictor):
|
|
90
90
|
obj_feats = torch.cat(
|
91
91
|
[x.permute(0, 2, 3, 1).reshape(x.shape[0], -1, s, x.shape[1] // s).mean(dim=-1) for x in feat_maps], dim=1
|
92
92
|
) # mean reduce all vectors to same length
|
93
|
-
return [feats[idx] for feats, idx in zip(obj_feats, idxs)] # for each
|
93
|
+
return [feats[idx] if len(idx) else [] for feats, idx in zip(obj_feats, idxs)] # for each img in batch
|
94
94
|
|
95
95
|
def construct_results(self, preds, img, orig_imgs):
|
96
96
|
"""
|
ultralytics/nn/autobackend.py
CHANGED
@@ -725,7 +725,7 @@ class AutoBackend(nn.Module):
|
|
725
725
|
else:
|
726
726
|
im = im.cpu().numpy()
|
727
727
|
if self.saved_model: # SavedModel
|
728
|
-
y = self.model(im, training=False) if self.keras else self.model(im)
|
728
|
+
y = self.model(im, training=False) if self.keras else self.model.serving_default(im)
|
729
729
|
if not isinstance(y, list):
|
730
730
|
y = [y]
|
731
731
|
elif self.pb: # GraphDef
|
@@ -53,7 +53,7 @@ class BaseSolution:
|
|
53
53
|
is_cli (bool): Enables CLI mode if set to True.
|
54
54
|
**kwargs (Any): Additional configuration parameters that override defaults.
|
55
55
|
"""
|
56
|
-
check_requirements("shapely>=2.0.0
|
56
|
+
check_requirements("shapely>=2.0.0")
|
57
57
|
from shapely.geometry import LineString, Point, Polygon
|
58
58
|
from shapely.prepared import prep
|
59
59
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
2
2
|
|
3
|
-
from
|
3
|
+
from collections import deque
|
4
|
+
from math import sqrt
|
4
5
|
|
5
6
|
from ultralytics.solutions.solutions import BaseSolution, SolutionAnnotator, SolutionResults
|
6
7
|
from ultralytics.utils.plotting import colors
|
@@ -15,12 +16,10 @@ class SpeedEstimator(BaseSolution):
|
|
15
16
|
|
16
17
|
Attributes:
|
17
18
|
spd (Dict[int, float]): Dictionary storing speed data for tracked objects.
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
track_line (List[Tuple[float, float]]): List of points representing the object's track.
|
23
|
-
r_s (LineString): LineString object representing the speed estimation region.
|
19
|
+
trk_hist (Dict[int, float]): Dictionary storing the object tracking data.
|
20
|
+
max_hist (int): maximum track history before computing speed
|
21
|
+
meters_per_pixel (float): Real-world meters represented by one pixel (e.g., 0.04 for 4m over 100px).
|
22
|
+
max_speed (int): Maximum allowed object speed; values above this will be capped at 120 km/h.
|
24
23
|
|
25
24
|
Methods:
|
26
25
|
initialize_region: Initializes the speed estimation region.
|
@@ -45,12 +44,15 @@ class SpeedEstimator(BaseSolution):
|
|
45
44
|
"""
|
46
45
|
super().__init__(**kwargs)
|
47
46
|
|
48
|
-
self.
|
49
|
-
|
50
|
-
self.
|
51
|
-
self.
|
52
|
-
self.
|
53
|
-
self.
|
47
|
+
self.fps = kwargs.get("fps", 30) # assumed video FPS
|
48
|
+
self.frame_count = 0 # global frame count
|
49
|
+
self.trk_frame_ids = {} # Track ID → first frame index
|
50
|
+
self.spd = {} # Final speed per object (km/h), once locked
|
51
|
+
self.trk_hist = {} # Track ID → deque of (time, position)
|
52
|
+
self.locked_ids = set() # Track IDs whose speed has been finalized
|
53
|
+
self.max_hist = kwargs.get("max_hist", 5) # Required frame history before computing speed
|
54
|
+
self.meter_per_pixel = kwargs.get("meter_per_pixel", 0.05) # Scene scale, depends on camera details
|
55
|
+
self.max_speed = kwargs.get("max_speed", 120) # max_speed adjustment
|
54
56
|
|
55
57
|
def process(self, im0):
|
56
58
|
"""
|
@@ -67,45 +69,39 @@ class SpeedEstimator(BaseSolution):
|
|
67
69
|
>>> image = np.random.randint(0, 255, (480, 640, 3), dtype=np.uint8)
|
68
70
|
>>> results = estimator.process(image)
|
69
71
|
"""
|
70
|
-
self.
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
self.
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
# Calculate speed based on vertical displacement and time
|
104
|
-
self.spd[track_id] = abs(self.track_line[-1][1] - self.trk_pp[track_id][1]) / time_difference
|
105
|
-
|
106
|
-
# Update tracking data for next frame
|
107
|
-
self.trk_pt[track_id] = time()
|
108
|
-
self.trk_pp[track_id] = self.track_line[-1]
|
72
|
+
self.frame_count += 1
|
73
|
+
self.extract_tracks(im0)
|
74
|
+
annotator = SolutionAnnotator(im0, line_width=self.line_width)
|
75
|
+
|
76
|
+
for box, track_id, _, _ in zip(self.boxes, self.track_ids, self.clss, self.confs):
|
77
|
+
self.store_tracking_history(track_id, box)
|
78
|
+
|
79
|
+
if track_id not in self.trk_hist: # Initialize history if new track found
|
80
|
+
self.trk_hist[track_id] = deque(maxlen=self.max_hist)
|
81
|
+
self.trk_frame_ids[track_id] = self.frame_count
|
82
|
+
|
83
|
+
if track_id not in self.locked_ids: # Update history until speed is locked
|
84
|
+
trk_hist = self.trk_hist[track_id]
|
85
|
+
trk_hist.append(self.track_line[-1])
|
86
|
+
|
87
|
+
# Compute and lock speed once enough history is collected
|
88
|
+
if len(trk_hist) == self.max_hist:
|
89
|
+
p0, p1 = trk_hist[0], trk_hist[-1] # First and last points of track
|
90
|
+
dt = (self.frame_count - self.trk_frame_ids[track_id]) / self.fps # Time in seconds
|
91
|
+
if dt > 0:
|
92
|
+
dx, dy = p1[0] - p0[0], p1[1] - p0[1] # pixel displacement
|
93
|
+
pixel_distance = sqrt(dx * dx + dy * dy) # get pixel distance
|
94
|
+
meters = pixel_distance * self.meter_per_pixel # convert to meters
|
95
|
+
self.spd[track_id] = int(
|
96
|
+
min((meters / dt) * 3.6, self.max_speed)
|
97
|
+
) # convert to km/h and store final speed
|
98
|
+
self.locked_ids.add(track_id) # prevent further updates
|
99
|
+
self.trk_hist.pop(track_id, None) # free memory
|
100
|
+
self.trk_frame_ids.pop(track_id, None) # optional: remove frame start too
|
101
|
+
|
102
|
+
if track_id in self.spd:
|
103
|
+
speed_label = f"{self.spd[track_id]} km/h"
|
104
|
+
annotator.box_label(box, label=speed_label, color=colors(track_id, True)) # Draw bounding box
|
109
105
|
|
110
106
|
plot_im = annotator.result()
|
111
107
|
self.display_output(plot_im) # Display output with base class function
|
ultralytics/trackers/bot_sort.py
CHANGED
@@ -255,4 +255,6 @@ class ReID:
|
|
255
255
|
def __call__(self, img, dets):
|
256
256
|
"""Extract embeddings for detected objects."""
|
257
257
|
feats = self.model([save_one_box(det, img, save=False) for det in xywh2xyxy(torch.from_numpy(dets[:, :4]))])
|
258
|
+
if feats.shape[0] != dets.shape[0] and feats[0].shape[0] == dets.shape[0]:
|
259
|
+
feats = feats[0] # batched prediction with non-PyTorch backend
|
258
260
|
return [f.cpu().numpy() for f in feats]
|
ultralytics/trackers/track.py
CHANGED
@@ -58,10 +58,10 @@ def on_predict_start(predictor: object, persist: bool = False) -> None:
|
|
58
58
|
predictor._feats = None
|
59
59
|
|
60
60
|
# Register hook to extract input of Detect layer
|
61
|
-
def
|
62
|
-
predictor._feats = input[0]
|
61
|
+
def pre_hook(module, input):
|
62
|
+
predictor._feats = [t.clone() for t in input[0]]
|
63
63
|
|
64
|
-
predictor.model.model.model[-1].
|
64
|
+
predictor.model.model.model[-1].register_forward_pre_hook(pre_hook)
|
65
65
|
|
66
66
|
trackers = []
|
67
67
|
for _ in range(predictor.dataset.bs):
|
ultralytics/utils/autobatch.py
CHANGED
@@ -8,7 +8,7 @@ import numpy as np
|
|
8
8
|
import torch
|
9
9
|
|
10
10
|
from ultralytics.utils import DEFAULT_CFG, LOGGER, colorstr
|
11
|
-
from ultralytics.utils.torch_utils import autocast,
|
11
|
+
from ultralytics.utils.torch_utils import autocast, profile_ops
|
12
12
|
|
13
13
|
|
14
14
|
def check_train_batch_size(model, imgsz=640, amp=True, batch=-1, max_num_obj=1):
|
@@ -74,7 +74,7 @@ def autobatch(model, imgsz=640, fraction=0.60, batch_size=DEFAULT_CFG.batch, max
|
|
74
74
|
batch_sizes = [1, 2, 4, 8, 16] if t < 16 else [1, 2, 4, 8, 16, 32, 64]
|
75
75
|
try:
|
76
76
|
img = [torch.empty(b, 3, imgsz, imgsz) for b in batch_sizes]
|
77
|
-
results =
|
77
|
+
results = profile_ops(img, model, n=1, device=device, max_num_obj=max_num_obj)
|
78
78
|
|
79
79
|
# Fit a solution
|
80
80
|
xy = [
|
ultralytics/utils/benchmarks.py
CHANGED
@@ -4,7 +4,7 @@ Benchmark a YOLO model formats for speed and accuracy.
|
|
4
4
|
|
5
5
|
Usage:
|
6
6
|
from ultralytics.utils.benchmarks import ProfileModels, benchmark
|
7
|
-
ProfileModels(['yolo11n.yaml', 'yolov8s.yaml']).
|
7
|
+
ProfileModels(['yolo11n.yaml', 'yolov8s.yaml']).run()
|
8
8
|
benchmark(model='yolo11n.pt', imgsz=160)
|
9
9
|
|
10
10
|
Format | `format=argument` | Model
|
@@ -378,7 +378,7 @@ class ProfileModels:
|
|
378
378
|
Profile models and print results
|
379
379
|
>>> from ultralytics.utils.benchmarks import ProfileModels
|
380
380
|
>>> profiler = ProfileModels(["yolo11n.yaml", "yolov8s.yaml"], imgsz=640)
|
381
|
-
>>> profiler.
|
381
|
+
>>> profiler.run()
|
382
382
|
"""
|
383
383
|
|
384
384
|
def __init__(
|
@@ -412,7 +412,7 @@ class ProfileModels:
|
|
412
412
|
Initialize and profile models
|
413
413
|
>>> from ultralytics.utils.benchmarks import ProfileModels
|
414
414
|
>>> profiler = ProfileModels(["yolo11n.yaml", "yolov8s.yaml"], imgsz=640)
|
415
|
-
>>> profiler.
|
415
|
+
>>> profiler.run()
|
416
416
|
"""
|
417
417
|
self.paths = paths
|
418
418
|
self.num_timed_runs = num_timed_runs
|
@@ -423,7 +423,7 @@ class ProfileModels:
|
|
423
423
|
self.trt = trt # run TensorRT profiling
|
424
424
|
self.device = device or torch.device(0 if torch.cuda.is_available() else "cpu")
|
425
425
|
|
426
|
-
def
|
426
|
+
def run(self):
|
427
427
|
"""
|
428
428
|
Profile YOLO models for speed and accuracy across various formats including ONNX and TensorRT.
|
429
429
|
|
@@ -434,7 +434,7 @@ class ProfileModels:
|
|
434
434
|
Profile models and print results
|
435
435
|
>>> from ultralytics.utils.benchmarks import ProfileModels
|
436
436
|
>>> profiler = ProfileModels(["yolo11n.yaml", "yolov8s.yaml"])
|
437
|
-
>>> results = profiler.
|
437
|
+
>>> results = profiler.run()
|
438
438
|
"""
|
439
439
|
files = self.get_files()
|
440
440
|
|
ultralytics/utils/torch_utils.py
CHANGED
@@ -378,7 +378,7 @@ def model_info_for_loggers(trainer):
|
|
378
378
|
if trainer.args.profile: # profile ONNX and TensorRT times
|
379
379
|
from ultralytics.utils.benchmarks import ProfileModels
|
380
380
|
|
381
|
-
results = ProfileModels([trainer.last], device=trainer.device).
|
381
|
+
results = ProfileModels([trainer.last], device=trainer.device).run()[0]
|
382
382
|
results.pop("model/name")
|
383
383
|
else: # only return PyTorch times from most recent validation
|
384
384
|
results = {
|
@@ -790,7 +790,7 @@ def cuda_memory_usage(device=None):
|
|
790
790
|
yield cuda_info
|
791
791
|
|
792
792
|
|
793
|
-
def
|
793
|
+
def profile_ops(input, ops, n=10, device=None, max_num_obj=0):
|
794
794
|
"""
|
795
795
|
Ultralytics speed, memory and FLOPs profiler.
|
796
796
|
|
@@ -805,11 +805,11 @@ def profile(input, ops, n=10, device=None, max_num_obj=0):
|
|
805
805
|
(list): Profile results for each operation.
|
806
806
|
|
807
807
|
Examples:
|
808
|
-
>>> from ultralytics.utils.torch_utils import
|
808
|
+
>>> from ultralytics.utils.torch_utils import profile_ops
|
809
809
|
>>> input = torch.randn(16, 3, 640, 640)
|
810
810
|
>>> m1 = lambda x: x * torch.sigmoid(x)
|
811
811
|
>>> m2 = nn.SiLU()
|
812
|
-
>>>
|
812
|
+
>>> profile_ops(input, [m1, m2], n=100) # profile over 100 iterations
|
813
813
|
"""
|
814
814
|
results = []
|
815
815
|
if not isinstance(device, torch.device):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ultralytics
|
3
|
-
Version: 8.3.
|
3
|
+
Version: 8.3.123
|
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>
|
@@ -68,8 +68,8 @@ Requires-Dist: tensorflowjs>=2.0.0; extra == "export"
|
|
68
68
|
Requires-Dist: tensorstore>=0.1.63; (platform_machine == "aarch64" and python_version >= "3.9") and extra == "export"
|
69
69
|
Requires-Dist: h5py!=3.11.0; platform_machine == "aarch64" and extra == "export"
|
70
70
|
Provides-Extra: solutions
|
71
|
-
Requires-Dist: shapely
|
72
|
-
Requires-Dist: streamlit
|
71
|
+
Requires-Dist: shapely>=2.0.0; extra == "solutions"
|
72
|
+
Requires-Dist: streamlit>=1.29.0; extra == "solutions"
|
73
73
|
Provides-Extra: logging
|
74
74
|
Requires-Dist: wandb; extra == "logging"
|
75
75
|
Requires-Dist: tensorboard; extra == "logging"
|
@@ -1,16 +1,16 @@
|
|
1
1
|
tests/__init__.py,sha256=xnMhv3O_DF1YrW4zk__ZywQzAaoTDjPKPoiI1Ktss1w,670
|
2
2
|
tests/conftest.py,sha256=rsIAipRKfrVNoTaJ1LdpYue8AbcJ_fr3d3WIlM_6uXY,2982
|
3
3
|
tests/test_cli.py,sha256=PtMFl5Lp_6ygBbYDJ1ndofz2k7ZYupMPEAiZw6aZVm8,5450
|
4
|
-
tests/test_cuda.py,sha256=
|
4
|
+
tests/test_cuda.py,sha256=vCpPMAkEUQrQMVe4oMwGZQVOiuujEAkZ2zturNXFF-4,6256
|
5
5
|
tests/test_engine.py,sha256=aGqZ8P7QO5C_nOa1b4FOyk92Ysdk5WiP-ST310Vyxys,4962
|
6
6
|
tests/test_exports.py,sha256=dhZn86LdbapW15RthQF870LGxDjC1MUZhlGdBgPmgIQ,9716
|
7
7
|
tests/test_integrations.py,sha256=dQteeRsRVuT_p5-T88-7jqT65Zm9iAXkyKg-KQ1_TQ8,6341
|
8
|
-
tests/test_python.py,sha256=
|
8
|
+
tests/test_python.py,sha256=NDIqkKt-awgjq45y29xopZLhX8kkknqYz81Wm7ixqXo,25495
|
9
9
|
tests/test_solutions.py,sha256=BIvg9zW0a_ggEmrPKgB_Y0MncveH-eYuN5KlqdJ6nHs,5726
|
10
|
-
ultralytics/__init__.py,sha256=
|
10
|
+
ultralytics/__init__.py,sha256=FzBnkV__4DhnrF8Rs0JzvAR9A3VOlusTeRBaIY30-Do,730
|
11
11
|
ultralytics/assets/bus.jpg,sha256=wCAZxJecGR63Od3ZRERe9Aja1Weayrb9Ug751DS_vGM,137419
|
12
12
|
ultralytics/assets/zidane.jpg,sha256=Ftc4aeMmen1O0A3o6GCDO9FlfBslLpTAw0gnetx7bts,50427
|
13
|
-
ultralytics/cfg/__init__.py,sha256=
|
13
|
+
ultralytics/cfg/__init__.py,sha256=ZXbvd-lyu0IIwVYAN6NH3KbQ5MLC5865Lh2c7IDkNSw,39675
|
14
14
|
ultralytics/cfg/default.yaml,sha256=zSiCmQp_HRlh0gZe_AZSjNQNe1aNDoX2vcNUo5oJs2Q,8306
|
15
15
|
ultralytics/cfg/datasets/Argoverse.yaml,sha256=_xlEDIJ9XkUo0v_iNL7FW079BoSeZtKSuLteKTtGbA8,3275
|
16
16
|
ultralytics/cfg/datasets/DOTAv1.5.yaml,sha256=SHND_CFkojxw5iQD5Mcgju2kCZIl0gW2ajuzv1cqoL0,1224
|
@@ -100,7 +100,7 @@ ultralytics/cfg/models/v9/yolov9m.yaml,sha256=WcKQ3xRsC1JMgA42Hx4xzr4FZmtE6B3wKv
|
|
100
100
|
ultralytics/cfg/models/v9/yolov9s.yaml,sha256=j_v3JWaPtiuM8aKJt15Z_4HPRCoHWn_G6Z07t8CZyjk,1391
|
101
101
|
ultralytics/cfg/models/v9/yolov9t.yaml,sha256=Q8GpSXE7fumhuJiQg4a2SkuS_UmnXqp-eoZxW_C0vEo,1375
|
102
102
|
ultralytics/cfg/solutions/default.yaml,sha256=c-9thwI7y7VmIoIM6AW70Z0r825SToH2h7gSCsUoAak,1664
|
103
|
-
ultralytics/cfg/trackers/botsort.yaml,sha256=
|
103
|
+
ultralytics/cfg/trackers/botsort.yaml,sha256=TpRaK5kH_-QbjCQ7ekM4s_7j8I8ti3q8Hs7WDz4rEwA,1215
|
104
104
|
ultralytics/cfg/trackers/bytetrack.yaml,sha256=6u-tiZlk16EqEwkNXaMrza6PAQmWj_ypgv26LGCtPDg,886
|
105
105
|
ultralytics/data/__init__.py,sha256=nAXaL1puCc7z_NjzQNlJnhbVhT9Fla2u7Dsqo7q1dAc,644
|
106
106
|
ultralytics/data/annotator.py,sha256=VEwb11FsEZm75qlEp8XDHFGKW0_rGsEaFDaBVd771Kw,2902
|
@@ -111,17 +111,17 @@ ultralytics/data/converter.py,sha256=znXH2XTdo0Q4NDHMny1ydVBvrxKn2kbbwI-X5bn1MlQ
|
|
111
111
|
ultralytics/data/dataset.py,sha256=hbsjhmZBO-T1_gkUAm128kKowdwsLNwnK2lhnzmxJB8,34826
|
112
112
|
ultralytics/data/loaders.py,sha256=o844tZlfZEhXop16t-hwaEQHhbfP3_bQMS0whF_NSos,28531
|
113
113
|
ultralytics/data/split.py,sha256=6LHB1z8woXurWjXfM-Zm2thRr1KXvzR18CFJA-SDUvE,4677
|
114
|
-
ultralytics/data/split_dota.py,sha256=
|
114
|
+
ultralytics/data/split_dota.py,sha256=ihG56YfNFZJDq1r7Zcgk8fKzde3gn21W0f67ub6nT68,11879
|
115
115
|
ultralytics/data/utils.py,sha256=HET4rbj4iUcjen0t8E_Qo_9S9RGPVQRYL-j0KI0qflI,35269
|
116
116
|
ultralytics/data/scripts/download_weights.sh,sha256=0y8XtZxOru7dVThXDFUXLHBuICgOIqZNUwpyL4Rh6lg,595
|
117
117
|
ultralytics/data/scripts/get_coco.sh,sha256=UuJpJeo3qQpTHVINeOpmP0NYmg8PhEFE3A8J3jKrnPw,1768
|
118
118
|
ultralytics/data/scripts/get_coco128.sh,sha256=qmRQl_hOKrsdHrTrnyQuFIH01oDz3lfaz138OgGfLt8,650
|
119
119
|
ultralytics/data/scripts/get_imagenet.sh,sha256=hr42H16bM47iT27rgS7MpEo-GeOZAYUQXgr0B2cwn48,1705
|
120
120
|
ultralytics/engine/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXppv1-QUM,70
|
121
|
-
ultralytics/engine/exporter.py,sha256=
|
121
|
+
ultralytics/engine/exporter.py,sha256=56PU45SvNhYym9JiJctZXO5NkW-cwzTu5o7yIqx13Fc,70251
|
122
122
|
ultralytics/engine/model.py,sha256=wS1cwgv0iyhsslMAZYMGlYDWitDIRW96d7MxwW-Sw5o,52817
|
123
123
|
ultralytics/engine/predictor.py,sha256=YJ5l-0qIpr6JAJxowswtZ0IqmXBqVTvAA9vR40v0sCM,21752
|
124
|
-
ultralytics/engine/results.py,sha256
|
124
|
+
ultralytics/engine/results.py,sha256=-JPBn_YMyZv6HhdlyhjRIZCcMf41LTyWID7JrEP64rc,79632
|
125
125
|
ultralytics/engine/trainer.py,sha256=fdB8H6brnnQAL-ZFP6nmNmKMze0_qy0OT3jJg1B5uhQ,38864
|
126
126
|
ultralytics/engine/tuner.py,sha256=IyFKsh4Q4a1DsjfK02DdN9cufAiBDhdhIq7F7ddguys,12646
|
127
127
|
ultralytics/engine/validator.py,sha256=jfV81wuFDgrVVXEcPzgOpxAPrAZn-1LgpKwu9l_1-ts,17050
|
@@ -169,7 +169,7 @@ ultralytics/models/yolo/classify/predict.py,sha256=JV9szginTQ9Lpob0FozhKMiEIu1vV
|
|
169
169
|
ultralytics/models/yolo/classify/train.py,sha256=rv2CJv9fzvtHf2q4l5g0RsjplWKeLpz637kKqjtrLNY,9737
|
170
170
|
ultralytics/models/yolo/classify/val.py,sha256=xk-YwSQdl_oqyCBV0OOAOcXFL6CchebFOc36AkRSyjE,9992
|
171
171
|
ultralytics/models/yolo/detect/__init__.py,sha256=GIRsLYR-kT4JJx7lh4ZZAFGBZj0aebokuU0A7JbjDVA,257
|
172
|
-
ultralytics/models/yolo/detect/predict.py,sha256=
|
172
|
+
ultralytics/models/yolo/detect/predict.py,sha256=n1-WmzkvW3dHglI7XrxDr4i0nZ236h6Wh37TAWXpFfo,5341
|
173
173
|
ultralytics/models/yolo/detect/train.py,sha256=YOEmUZkfJBq6hNbB_P10k-uy4_2fUgdPfVWzO4y8Egs,9538
|
174
174
|
ultralytics/models/yolo/detect/val.py,sha256=7AB_wZi7aQ9_V1pZQSWk5qiJYS34fuO3P5aX7_3eeFE,18471
|
175
175
|
ultralytics/models/yolo/obb/__init__.py,sha256=tQmpG8wVHsajWkZdmD6cjGohJ4ki64iSXQT8JY_dydo,221
|
@@ -193,7 +193,7 @@ ultralytics/models/yolo/yoloe/train.py,sha256=St3zw_XWRol9pODWU4lvKlJnWYr1lmWQNu
|
|
193
193
|
ultralytics/models/yolo/yoloe/train_seg.py,sha256=l0SOMQQd0Y_EBBHhTNekgrQsftqhYyK4oWTdCg1dLrE,4633
|
194
194
|
ultralytics/models/yolo/yoloe/val.py,sha256=oA8cVT3pBXF6aPZy7ITq0mDcktRuIgks8tTtqMRISyY,8431
|
195
195
|
ultralytics/nn/__init__.py,sha256=rjociYD9lo_K-d-1s6TbdWklPLjTcEHk7OIlRDJstIE,615
|
196
|
-
ultralytics/nn/autobackend.py,sha256=
|
196
|
+
ultralytics/nn/autobackend.py,sha256=ng6CUi82BrV6qGVsif_U_1E4foL19N7isB7tQGECTGE,39314
|
197
197
|
ultralytics/nn/tasks.py,sha256=EwRC70qA3eP8Xp-gGP8OuN-q8LCGDrq1iRue7ncRSV4,62916
|
198
198
|
ultralytics/nn/text_model.py,sha256=8_7SRejKZA4Pi-ha0gjcWrQDDCDMBhtwlg8pPMWgjDE,13145
|
199
199
|
ultralytics/nn/modules/__init__.py,sha256=dXLtIk9rt944WfsTdpgEdWOg3HQEHdwQztuZ6WNJygs,3144
|
@@ -216,23 +216,23 @@ ultralytics/solutions/parking_management.py,sha256=SiVxRl44OxxYUXIzNOxOBqtaFJSRR
|
|
216
216
|
ultralytics/solutions/queue_management.py,sha256=p1-cuI_rs4ygtlBryXjE65NYG2bnZXhp3ylggFnWcRs,4344
|
217
217
|
ultralytics/solutions/region_counter.py,sha256=Zn35YRXNzhBk27D9MLOHBYe2L1o6H2ey3mEwCXofB_E,5418
|
218
218
|
ultralytics/solutions/security_alarm.py,sha256=mbUtqoLgjAWz9k3pjMoEZY_PR-lhjiic1NK90FhEJkw,6250
|
219
|
-
ultralytics/solutions/solutions.py,sha256=
|
220
|
-
ultralytics/solutions/speed_estimation.py,sha256=
|
219
|
+
ultralytics/solutions/solutions.py,sha256=OZAmwmqCOK8SI5dpZFrzUkrPIUFGMcgPL5zV4ymzkzU,32688
|
220
|
+
ultralytics/solutions/speed_estimation.py,sha256=dbHzj9NWrcuMXYbBJAZNcQ3D9zjKV8PsNkU6orOqf7Q,5344
|
221
221
|
ultralytics/solutions/streamlit_inference.py,sha256=M0ppTFInqSPrdytZBLH8x-XoA7zFc7PaRQ51wHG9ppU,9846
|
222
222
|
ultralytics/solutions/trackzone.py,sha256=efko4U8zT8lyNLLo9zF543rTXHefeYthxf9GV3c2TiU,3860
|
223
223
|
ultralytics/solutions/vision_eye.py,sha256=DHf3pQzNqP71oYx3QXflvcGsg4nEYJCD1SOdSOxiWBk,2965
|
224
224
|
ultralytics/trackers/__init__.py,sha256=Zlu_Ig5osn7hqch_g5Be_e4pwZUkeeTQiesJCi0pFGI,255
|
225
225
|
ultralytics/trackers/basetrack.py,sha256=LYvWB5d7Woyrz_RlxaopjV07RQKH3sff_lZJfMcMxcA,4450
|
226
|
-
ultralytics/trackers/bot_sort.py,sha256=
|
226
|
+
ultralytics/trackers/bot_sort.py,sha256=rpaj7X8COT0Vi5GFR9z-CGSBgJ7gTfFx2wTSZFTnhco,11466
|
227
227
|
ultralytics/trackers/byte_tracker.py,sha256=D7JQ_6V8OUMQryxTrAr010UXMSaboQnI7T1xppzHXYg,20921
|
228
|
-
ultralytics/trackers/track.py,sha256=
|
228
|
+
ultralytics/trackers/track.py,sha256=wuja3-xceuhaTEJyD2VqRBJUodPEM7-4iK47MkxshjM,4830
|
229
229
|
ultralytics/trackers/utils/__init__.py,sha256=lm6MckFYCPTbqIoX7w0s_daxdjNeBeKW6DXppv1-QUM,70
|
230
230
|
ultralytics/trackers/utils/gmc.py,sha256=dz3I5LbIv7h1__Xg7rGHecQFE32VFTe54tUnxb8F0Z8,14466
|
231
231
|
ultralytics/trackers/utils/kalman_filter.py,sha256=A0CqOnnaKH6kr0XwuHzyHmIU6aJAjJYxF9jVlNBKZHo,21326
|
232
232
|
ultralytics/trackers/utils/matching.py,sha256=7eIufSdeN7cXuFMjvcfvz0Ldq84m4YKZl5IGxBR8IIo,7169
|
233
233
|
ultralytics/utils/__init__.py,sha256=qV5nw3ED1NuSCoYwW3WpT6BTLeCnoH7KJgbPZU_3Sbo,50422
|
234
|
-
ultralytics/utils/autobatch.py,sha256=
|
235
|
-
ultralytics/utils/benchmarks.py,sha256=
|
234
|
+
ultralytics/utils/autobatch.py,sha256=kg05q2qKg74y_Uq2vvr01i3KhLfpVR7sT0IXBt3_kyI,4921
|
235
|
+
ultralytics/utils/benchmarks.py,sha256=GXcatQqAUCBg3lSmzR5ZEZDYWdPREtFapHP-S4wj7G4,30357
|
236
236
|
ultralytics/utils/checks.py,sha256=5bkna--ZH4FJDZtgef_K4xgjiKOZqCarTqIE4Z0vwJU,32628
|
237
237
|
ultralytics/utils/dist.py,sha256=e-DK_YowV7D9rDGQyWR9Kaosxp2eWe2EogSWnnUMthc,4098
|
238
238
|
ultralytics/utils/downloads.py,sha256=IvHng2-bApoyi-QMvesGwMmFNqEFiXPIKiiW16Q-U4M,22220
|
@@ -246,7 +246,7 @@ ultralytics/utils/ops.py,sha256=YFwPrKlPcgEmgAWqnJVR0Ccx5NQgp5e3P-YYHwVSP0k,3477
|
|
246
246
|
ultralytics/utils/patches.py,sha256=6rVT-l8WDp_Py3O-gZdv9t3PnrYRRkrX_lF3mZ1XS8c,4928
|
247
247
|
ultralytics/utils/plotting.py,sha256=5QPK1y-gm4T1mK3sjfRZhIUJAyP05D1cJ7h9wHPTifU,46616
|
248
248
|
ultralytics/utils/tal.py,sha256=P5nPoR9qNnFuDIda0fsn8WP6m1V8r7EbvXUuhNRFFTA,20805
|
249
|
-
ultralytics/utils/torch_utils.py,sha256=
|
249
|
+
ultralytics/utils/torch_utils.py,sha256=iaf7aJaZUadjBRvOs0vN2iIEePXIE8024anUOVkxPqE,39036
|
250
250
|
ultralytics/utils/triton.py,sha256=xK9Db_ZUVDnIK1u76S2G-6ulIBsLfj9HN_YOaSrnMuU,5304
|
251
251
|
ultralytics/utils/tuner.py,sha256=0Bp7l5dWZe1RzdvAIa11wQoX6eoAaoNRcA-EAnpofbk,6755
|
252
252
|
ultralytics/utils/callbacks/__init__.py,sha256=hzL63Rce6VkZhP4Lcim9LKjadixaQG86nKqPhk7IkS0,242
|
@@ -260,9 +260,9 @@ ultralytics/utils/callbacks/neptune.py,sha256=JaI95Cj2kIjUhlEEOiDN0-Drc-fDelLhNI
|
|
260
260
|
ultralytics/utils/callbacks/raytune.py,sha256=A8amUGpux7dYES-L1iSeMoMXBySGWCD1aUqT7vcG-pU,1284
|
261
261
|
ultralytics/utils/callbacks/tensorboard.py,sha256=jgYnym3cUQFAgN1GzTyO7l3jINtfAh8zhrllDvnLuVQ,5339
|
262
262
|
ultralytics/utils/callbacks/wb.py,sha256=iDRFXI4IIDm8R5OI89DMTmjs8aHLo1HRCLkOFKdaMG4,7507
|
263
|
-
ultralytics-8.3.
|
264
|
-
ultralytics-8.3.
|
265
|
-
ultralytics-8.3.
|
266
|
-
ultralytics-8.3.
|
267
|
-
ultralytics-8.3.
|
268
|
-
ultralytics-8.3.
|
263
|
+
ultralytics-8.3.123.dist-info/licenses/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
264
|
+
ultralytics-8.3.123.dist-info/METADATA,sha256=kC_n3rFeiSOMo5st7xOemdh851cEtByxNnwucTt52_s,37180
|
265
|
+
ultralytics-8.3.123.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
|
266
|
+
ultralytics-8.3.123.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
|
267
|
+
ultralytics-8.3.123.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
|
268
|
+
ultralytics-8.3.123.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|