ultralytics 8.2.101__py3-none-any.whl → 8.2.102__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.
- ultralytics/__init__.py +1 -1
- ultralytics/cfg/datasets/hand-keypoints.yaml +25 -0
- ultralytics/models/sam/modules/sam.py +1 -3
- ultralytics/solutions/object_counter.py +17 -15
- ultralytics/solutions/parking_management.py +7 -8
- ultralytics/utils/__init__.py +0 -1
- {ultralytics-8.2.101.dist-info → ultralytics-8.2.102.dist-info}/METADATA +1 -1
- {ultralytics-8.2.101.dist-info → ultralytics-8.2.102.dist-info}/RECORD +12 -11
- {ultralytics-8.2.101.dist-info → ultralytics-8.2.102.dist-info}/LICENSE +0 -0
- {ultralytics-8.2.101.dist-info → ultralytics-8.2.102.dist-info}/WHEEL +0 -0
- {ultralytics-8.2.101.dist-info → ultralytics-8.2.102.dist-info}/entry_points.txt +0 -0
- {ultralytics-8.2.101.dist-info → ultralytics-8.2.102.dist-info}/top_level.txt +0 -0
ultralytics/__init__.py
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
|
2
|
+
# Hand Keypoints dataset by Ultralytics
|
|
3
|
+
# Documentation: https://docs.ultralytics.com/datasets/pose/hand-keypoints/
|
|
4
|
+
# Example usage: yolo train data=hand-keypoints.yaml
|
|
5
|
+
# parent
|
|
6
|
+
# ├── ultralytics
|
|
7
|
+
# └── datasets
|
|
8
|
+
# └── hand-keypoints ← downloads here (369 MB)
|
|
9
|
+
|
|
10
|
+
# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
|
|
11
|
+
path: ../datasets/hand-keypoints # dataset root dir
|
|
12
|
+
train: train # train images (relative to 'path') 210 images
|
|
13
|
+
val: val # val images (relative to 'path') 53 images
|
|
14
|
+
|
|
15
|
+
# Keypoints
|
|
16
|
+
kpt_shape: [21, 3] # number of keypoints, number of dims (2 for x,y or 3 for x,y,visible)
|
|
17
|
+
flip_idx:
|
|
18
|
+
[0, 1, 2, 4, 3, 10, 11, 12, 13, 14, 5, 6, 7, 8, 9, 15, 16, 17, 18, 19, 20]
|
|
19
|
+
|
|
20
|
+
# Classes
|
|
21
|
+
names:
|
|
22
|
+
0: hand
|
|
23
|
+
|
|
24
|
+
# Download script/URL (optional)
|
|
25
|
+
download: https://github.com/ultralytics/assets/releases/download/v0.0.0/hand-keypoints.zip
|
|
@@ -645,9 +645,7 @@ class SAM2Model(torch.nn.Module):
|
|
|
645
645
|
# The case of `self.num_maskmem == 0` below is primarily used for reproducing SAM on images.
|
|
646
646
|
# In this case, we skip the fusion with any memory.
|
|
647
647
|
if self.num_maskmem == 0: # Disable memory and skip fusion
|
|
648
|
-
|
|
649
|
-
return pix_feat
|
|
650
|
-
|
|
648
|
+
return current_vision_feats[-1].permute(1, 2, 0).view(B, C, H, W)
|
|
651
649
|
num_obj_ptr_tokens = 0
|
|
652
650
|
# Step 1: condition the visual features of the current frame on previous memories
|
|
653
651
|
if not is_init_cond_frame:
|
|
@@ -176,22 +176,24 @@ class ObjectCounter:
|
|
|
176
176
|
|
|
177
177
|
# Count objects using line
|
|
178
178
|
elif len(self.reg_pts) == 2:
|
|
179
|
-
if
|
|
180
|
-
|
|
181
|
-
|
|
179
|
+
if (
|
|
180
|
+
prev_position is not None
|
|
181
|
+
and track_id not in self.count_ids
|
|
182
|
+
and LineString([(prev_position[0], prev_position[1]), (box[0], box[1])]).intersects(
|
|
182
183
|
self.counting_line_segment
|
|
183
|
-
)
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
184
|
+
)
|
|
185
|
+
):
|
|
186
|
+
self.count_ids.append(track_id)
|
|
187
|
+
|
|
188
|
+
# Determine the direction of movement (IN or OUT)
|
|
189
|
+
dx = (box[0] - prev_position[0]) * (self.counting_region.centroid.x - prev_position[0])
|
|
190
|
+
dy = (box[1] - prev_position[1]) * (self.counting_region.centroid.y - prev_position[1])
|
|
191
|
+
if dx > 0 and dy > 0:
|
|
192
|
+
self.in_counts += 1
|
|
193
|
+
self.class_wise_count[self.names[cls]]["IN"] += 1
|
|
194
|
+
else:
|
|
195
|
+
self.out_counts += 1
|
|
196
|
+
self.class_wise_count[self.names[cls]]["OUT"] += 1
|
|
195
197
|
|
|
196
198
|
labels_dict = {}
|
|
197
199
|
|
|
@@ -128,14 +128,13 @@ class ParkingPtsSelection:
|
|
|
128
128
|
|
|
129
129
|
rg_data = [] # regions data
|
|
130
130
|
for box in self.rg_data:
|
|
131
|
-
rs_box = [
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
(
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
) # height scaling
|
|
131
|
+
rs_box = [
|
|
132
|
+
(
|
|
133
|
+
int(x * self.imgw / self.canvas.winfo_width()), # width scaling
|
|
134
|
+
int(y * self.imgh / self.canvas.winfo_height()), # height scaling
|
|
135
|
+
)
|
|
136
|
+
for x, y in box
|
|
137
|
+
]
|
|
139
138
|
rg_data.append({"points": rs_box})
|
|
140
139
|
with open("bounding_boxes.json", "w") as f:
|
|
141
140
|
json.dump(rg_data, f, indent=4)
|
ultralytics/utils/__init__.py
CHANGED
|
@@ -111,7 +111,6 @@ torch.set_printoptions(linewidth=320, precision=4, profile="default")
|
|
|
111
111
|
np.set_printoptions(linewidth=320, formatter={"float_kind": "{:11.5g}".format}) # format short g, %precision=5
|
|
112
112
|
cv2.setNumThreads(0) # prevent OpenCV from multithreading (incompatible with PyTorch DataLoader)
|
|
113
113
|
os.environ["NUMEXPR_MAX_THREADS"] = str(NUM_THREADS) # NumExpr max threads
|
|
114
|
-
os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":4096:8" # for deterministic training
|
|
115
114
|
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" # suppress verbose TF compiler warnings in Colab
|
|
116
115
|
os.environ["TORCH_CPP_LOG_LEVEL"] = "ERROR" # suppress "NNPACK.cpp could not initialize NNPACK" warnings
|
|
117
116
|
os.environ["KINETO_LOG_LEVEL"] = "5" # suppress verbose PyTorch profiler output when computing FLOPs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ultralytics
|
|
3
|
-
Version: 8.2.
|
|
3
|
+
Version: 8.2.102
|
|
4
4
|
Summary: Ultralytics YOLO for SOTA object detection, multi-object tracking, instance segmentation, pose estimation and image classification.
|
|
5
5
|
Author: Ayush Chaurasia
|
|
6
6
|
Author-email: Glenn Jocher <glenn.jocher@ultralytics.com>, Jing Qiu <jing.qiu@ultralytics.com>
|
|
@@ -8,7 +8,7 @@ tests/test_exports.py,sha256=2NILfcHbCCpmbfgG6_3BSjHaa-QrTwspAVTBf8id5vY,8134
|
|
|
8
8
|
tests/test_integrations.py,sha256=iWuqcWThasLVQzacrAwkqgU0jP-8uRkONhNLxPg2wcg,6126
|
|
9
9
|
tests/test_python.py,sha256=vkA0F9XgOSpU1BxI2Lzq69f6g-vi8PtOfmb_7P96ZUk,23560
|
|
10
10
|
tests/test_solutions.py,sha256=p_2edhl96Ty3jwzSf02Q2m2mTu9skc0Z-eMcUuuXfLg,3300
|
|
11
|
-
ultralytics/__init__.py,sha256=
|
|
11
|
+
ultralytics/__init__.py,sha256=QooBdiZ2-_qRZIEeOzAw1S_9sWJLNnlq-1Wh6dGuIvk,696
|
|
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=dLbqNkfXWngwiibvrxH6wMe_oZG4OIsxhIiSvkrCbEk,33145
|
|
@@ -34,6 +34,7 @@ ultralytics/cfg/datasets/coco8-seg.yaml,sha256=sFMRTJa2ARpqAtr-50SS_RkB4KoczmAam
|
|
|
34
34
|
ultralytics/cfg/datasets/coco8.yaml,sha256=3_lNlMo40Rf52oxOnAIyaf7ZOdV0-z-Gcv-uMWmAE0s,1872
|
|
35
35
|
ultralytics/cfg/datasets/crack-seg.yaml,sha256=rJ2nbxclHjrEMZPwUCdHO2yjfuAZBoekuH40oP5HfNA,823
|
|
36
36
|
ultralytics/cfg/datasets/dota8.yaml,sha256=d65FTGCJzZPIVetfeS-_feshKjoYDsd1XqbWoC3u6tI,1044
|
|
37
|
+
ultralytics/cfg/datasets/hand-keypoints.yaml,sha256=rKlWvRNyufQkyC-yXY7oomgCcH7sR6YJQGoMyV6dqWQ,956
|
|
37
38
|
ultralytics/cfg/datasets/lvis.yaml,sha256=ryswcm32vDAZ3-8rWx0YWzUv4kdOEPYg2OhRt-UswpE,29691
|
|
38
39
|
ultralytics/cfg/datasets/open-images-v7.yaml,sha256=gsN0JXLSdQglio024p6NEegNbX06kJUNuj0bh9oEi-U,12493
|
|
39
40
|
ultralytics/cfg/datasets/package-seg.yaml,sha256=6iPpZOP0xgrTcO8DAZNPGFlJwrYn5bDgx-FpEnv2Ut8,833
|
|
@@ -135,7 +136,7 @@ ultralytics/models/sam/modules/blocks.py,sha256=Q-KwhFbdyZhl1tjG_kP2LcQkZbzoNt61
|
|
|
135
136
|
ultralytics/models/sam/modules/decoders.py,sha256=mODsqnTN_CjE3H0Sh9cd8PfTnHANPjGB1bjqHxfezSg,25830
|
|
136
137
|
ultralytics/models/sam/modules/encoders.py,sha256=Ay3sYeUonCf6URXBdB0dDwyngovevW8hUDgULRnNIoA,34824
|
|
137
138
|
ultralytics/models/sam/modules/memory_attention.py,sha256=XilWBnRfH8wZxIoL2-yEk-dRypCsS0Jf_9t8WJxXKg0,9722
|
|
138
|
-
ultralytics/models/sam/modules/sam.py,sha256=
|
|
139
|
+
ultralytics/models/sam/modules/sam.py,sha256=fatxjXoK4GD5U_lgwX-lb372a29v8fce35Z0lmS2KQA,50003
|
|
139
140
|
ultralytics/models/sam/modules/tiny_encoder.py,sha256=NyzeFMLnmqwcFQFs-JBM9PCWSsYoYZ_6h59Un1DeDV0,41332
|
|
140
141
|
ultralytics/models/sam/modules/transformer.py,sha256=nuhF_14LGrr5uYCAP9XCXps-zlVcT4OWO0evXWDxPwI,16081
|
|
141
142
|
ultralytics/models/sam/modules/utils.py,sha256=Y36V6BVy6GeaAvKE8gHmoDIa-f5LjJpmSVwywNkv2yk,12315
|
|
@@ -182,8 +183,8 @@ ultralytics/solutions/ai_gym.py,sha256=MgD_4DciCqXquM2Y6yjIIRkGWIg3rNfSuXrFqYzOC
|
|
|
182
183
|
ultralytics/solutions/analytics.py,sha256=bGuZes11D7DNiTsHdwu6PJ0QA0vCiqMMAtZ7NyEkshY,11568
|
|
183
184
|
ultralytics/solutions/distance_calculation.py,sha256=o_DAHk4JX8n2Vt7E68MX67mREOBZuy5skbXtVZ6iu_4,5228
|
|
184
185
|
ultralytics/solutions/heatmap.py,sha256=oEVivA4KAK6z0wA5Ca_a2qTckQN8tCt9MCpsPREeNnk,10375
|
|
185
|
-
ultralytics/solutions/object_counter.py,sha256=
|
|
186
|
-
ultralytics/solutions/parking_management.py,sha256=
|
|
186
|
+
ultralytics/solutions/object_counter.py,sha256=U66uvv_6QSol4-LY1E9JOZnYRYbek5Kz3N7Cgzh6FuA,9982
|
|
187
|
+
ultralytics/solutions/parking_management.py,sha256=VgYyhoSEo7fnPegIhNUqnFL0jlMEevALx0QQbzJ3vGI,9049
|
|
187
188
|
ultralytics/solutions/queue_management.py,sha256=yKPGc2-fN-lMpNddkxjN7xYGIJwMdoU-VIDRxQ1KPow,4869
|
|
188
189
|
ultralytics/solutions/speed_estimation.py,sha256=c9OPGpDU9x6Dj4SobNc-sO90EZTPTGeKkW5u6C6Zj7g,4623
|
|
189
190
|
ultralytics/solutions/streamlit_inference.py,sha256=MKf5P3O5oJwIKu2h_URvzaQjMWoSEMDMBwordplfRxo,5703
|
|
@@ -196,7 +197,7 @@ ultralytics/trackers/utils/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7J
|
|
|
196
197
|
ultralytics/trackers/utils/gmc.py,sha256=VcURuY041qGCeWUGMxHZBr10T16LtcMqyv7AmTfE1MY,14557
|
|
197
198
|
ultralytics/trackers/utils/kalman_filter.py,sha256=cH9zD3fwkuezP97H9mw8cSBN7a8hHKx_Sx1j7t3oYGs,21349
|
|
198
199
|
ultralytics/trackers/utils/matching.py,sha256=3Ie1WNNRZ4_q3365F03XD7Nr9juZB_08mw4yUKC3w74,7162
|
|
199
|
-
ultralytics/utils/__init__.py,sha256=
|
|
200
|
+
ultralytics/utils/__init__.py,sha256=a48pg4F8AaEJAKuzyqHsTOrTvZMjAK0dY85lwbX8rj0,47927
|
|
200
201
|
ultralytics/utils/autobatch.py,sha256=AXboYfNSnTGsYj5FmgGYPQd0crfkeleyms6QXQfZGQ4,4194
|
|
201
202
|
ultralytics/utils/benchmarks.py,sha256=D56aSdnuPzrUqGtOm077mJ7Timw7ekyLaavNodo2MMg,23809
|
|
202
203
|
ultralytics/utils/checks.py,sha256=PmdN42XJ7IIUNbeiY8zjPIfJceaxAO04nc780EoYxTc,28910
|
|
@@ -225,9 +226,9 @@ ultralytics/utils/callbacks/neptune.py,sha256=5Z3ua5YBTUS56FH8VQKQG1aaIo9fH8GEyz
|
|
|
225
226
|
ultralytics/utils/callbacks/raytune.py,sha256=ODVYzy-CoM4Uge0zjkh3Hnh9nF2M0vhDrSenXnvcizw,705
|
|
226
227
|
ultralytics/utils/callbacks/tensorboard.py,sha256=0kn4IR10no99UCIheojWRujgybmUHSx5fPI6Vsq6l_g,4135
|
|
227
228
|
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.
|
|
229
|
+
ultralytics-8.2.102.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
|
230
|
+
ultralytics-8.2.102.dist-info/METADATA,sha256=YxhNIOvoP1wykKdYLhNaBa_NJjoVKPHaAlDVpTb_Jdk,39712
|
|
231
|
+
ultralytics-8.2.102.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
232
|
+
ultralytics-8.2.102.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
|
|
233
|
+
ultralytics-8.2.102.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
|
|
234
|
+
ultralytics-8.2.102.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|