ultralytics 8.2.100__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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ultralytics YOLO 🚀, AGPL-3.0 license
2
2
 
3
- __version__ = "8.2.100"
3
+ __version__ = "8.2.102"
4
4
 
5
5
 
6
6
  import os
@@ -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
@@ -127,7 +127,7 @@ class Model(nn.Module):
127
127
  # Check if Ultralytics HUB model from https://hub.ultralytics.com
128
128
  if self.is_hub_model(model):
129
129
  # Fetch model from HUB
130
- checks.check_requirements("hub-sdk>=0.0.8")
130
+ checks.check_requirements("hub-sdk>=0.0.12")
131
131
  session = HUBTrainingSession.create_session(model)
132
132
  model = session.model_file
133
133
  if session.train_args: # training sent from HUB
@@ -38,7 +38,7 @@ def login(api_key: str = None, save=True) -> bool:
38
38
  Returns:
39
39
  (bool): True if authentication is successful, False otherwise.
40
40
  """
41
- checks.check_requirements("hub-sdk>=0.0.8")
41
+ checks.check_requirements("hub-sdk>=0.0.12")
42
42
  from hub_sdk import HUBClient
43
43
 
44
44
  api_key_url = f"{HUB_WEB_ROOT}/settings?tab=api+keys" # set the redirect URL
@@ -63,22 +63,24 @@ class HUBTrainingSession:
63
63
  # Initialize client
64
64
  self.client = HUBClient(credentials)
65
65
 
66
- # Load models if authenticated
67
- if self.client.authenticated:
66
+ # Load models
67
+ try:
68
68
  if model_id:
69
69
  self.load_model(model_id) # load existing model
70
70
  else:
71
71
  self.model = self.client.model() # load empty model
72
+ except Exception:
73
+ if identifier.startswith(f"{HUB_WEB_ROOT}/models/") and not self.client.authenticated:
74
+ LOGGER.warning(
75
+ f"{PREFIX}WARNING ⚠️ Please log in using 'yolo login API_KEY'. "
76
+ "You can find your API Key at: https://hub.ultralytics.com/settings?tab=api+keys."
77
+ )
72
78
 
73
79
  @classmethod
74
80
  def create_session(cls, identifier, args=None):
75
81
  """Class method to create an authenticated HUBTrainingSession or return None."""
76
82
  try:
77
83
  session = cls(identifier)
78
- if not session.client.authenticated:
79
- if identifier.startswith(f"{HUB_WEB_ROOT}/models/"):
80
- LOGGER.warning(f"{PREFIX}WARNING ⚠️ Login to Ultralytics HUB with 'yolo hub login API_KEY'.")
81
- return None
82
84
  if args and not identifier.startswith(f"{HUB_WEB_ROOT}/models/"): # not a HUB model URL
83
85
  session.create_model(args)
84
86
  assert session.model.id, "HUB model not loaded correctly"
@@ -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
- pix_feat = current_vision_feats[-1].permute(1, 2, 0).view(B, C, H, W)
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 prev_position is not None and track_id not in self.count_ids:
180
- # Check if the object's movement segment intersects the counting line
181
- if LineString([(prev_position[0], prev_position[1]), (box[0], box[1])]).intersects(
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
- self.count_ids.append(track_id)
185
-
186
- # Determine the direction of movement (IN or OUT)
187
- dx = (box[0] - prev_position[0]) * (self.counting_region.centroid.x - prev_position[0])
188
- dy = (box[1] - prev_position[1]) * (self.counting_region.centroid.y - prev_position[1])
189
- if dx > 0 and dy > 0:
190
- self.in_counts += 1
191
- self.class_wise_count[self.names[cls]]["IN"] += 1
192
- else:
193
- self.out_counts += 1
194
- self.class_wise_count[self.names[cls]]["OUT"] += 1
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 = [] # rescaled box list
132
- for x, y in box:
133
- rs_box.append(
134
- (
135
- int(x * self.imgw / self.canvas.winfo_width()), # width scaling
136
- int(y * self.imgh / self.canvas.winfo_height()),
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)
@@ -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.100
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>
@@ -77,7 +77,7 @@ Requires-Dist: h5py!=3.11.0; platform_machine == "aarch64" and extra == "export"
77
77
  Requires-Dist: tensorstore>=0.1.63; (platform_machine == "aarch64" and python_version >= "3.9") and extra == "export"
78
78
  Requires-Dist: coremltools>=7.0; (platform_system != "Windows" and python_version <= "3.11") and extra == "export"
79
79
  Provides-Extra: extra
80
- Requires-Dist: hub-sdk>=0.0.8; extra == "extra"
80
+ Requires-Dist: hub-sdk>=0.0.12; extra == "extra"
81
81
  Requires-Dist: ipython; extra == "extra"
82
82
  Requires-Dist: albumentations>=1.4.6; extra == "extra"
83
83
  Requires-Dist: pycocotools>=2.0.7; extra == "extra"
@@ -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=UlxVV--AJ6sJhG11jdIX2CJVK3V5_0EMBxSzvi5V8HU,696
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
@@ -99,15 +100,15 @@ ultralytics/data/explorer/gui/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2
99
100
  ultralytics/data/explorer/gui/dash.py,sha256=vZ476NaUH4FKU08rAJ1K9WNyKtg0soMyJJxqg176yWc,10498
100
101
  ultralytics/engine/__init__.py,sha256=mHtJuK4hwF8cuV-VHDc7tp6u6D1gHz2Z7JI8grmQDTs,42
101
102
  ultralytics/engine/exporter.py,sha256=BFYvv763kbEm5q0-AYIh979vL0ccU4RNvON2w8qtm1s,57019
102
- ultralytics/engine/model.py,sha256=1sWOBvLL2JIH8JuHoxwvr1MPfKFww0ORyLESx3Fs2c8,51582
103
+ ultralytics/engine/model.py,sha256=RDxuxKMTkO2_zTwZDxd474dhNeRSo-7WvvqO_Ahjz5c,51583
103
104
  ultralytics/engine/predictor.py,sha256=MgMWHUJdRcVCaVmOyvdy2Gjk_EyRHv-ar0SSGxQe8F4,17471
104
105
  ultralytics/engine/results.py,sha256=8RJlN8J-_9w-mrDZm9wC-DZJTPBS7v1c_r_R173QyRM,75043
105
106
  ultralytics/engine/trainer.py,sha256=VOuR9WpDgYILevpWnWAtKLEIcJ4iFG41HxOCSbOy0YA,36657
106
107
  ultralytics/engine/tuner.py,sha256=gPqDTHH7vRB2O3YyH26m1BjVKbXxuA2XAlPRzTKFZsc,11838
107
108
  ultralytics/engine/validator.py,sha256=483Ad87Irk7IBlJNLu2SQAJsb7YriALTX9GIgriCmRg,14650
108
- ultralytics/hub/__init__.py,sha256=5jgMARywvUPDy-fS_Eb3e8ksd_1tAloP15pbNRKtxtg,5643
109
+ ultralytics/hub/__init__.py,sha256=3SKvZ5aRina3h94xMPQIB3D4maF62qFcyIqPPHRHNAc,5644
109
110
  ultralytics/hub/auth.py,sha256=kDLakGa2NbzvMAeXc2UdzZ65r0AH-XeM_JfsDY97WGk,5545
110
- ultralytics/hub/session.py,sha256=xD4oBiWfeIMReNxSIPE-VK5xVdUHEjS8WrpBvjlRfnU,16350
111
+ ultralytics/hub/session.py,sha256=2KznO5kX14HFZ2-Ct9LoG312sdHuigQSLZb58MGvbJY,16411
111
112
  ultralytics/hub/utils.py,sha256=I7NATG6O_QRw7EU7EHkdTVvbCkwKCyUe54BP60To_so,9715
112
113
  ultralytics/hub/google/__init__.py,sha256=uclNs-_5vAzQMgQKgl8eBvml1cx6IZYXRUhrF57v6_k,7504
113
114
  ultralytics/models/__init__.py,sha256=TT9iLCL_n9Y80dcUq0Fo-p-GRZCSU2vrWXM3CoMwqqE,265
@@ -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=_C6tmlseAHA5U3eu4v_LDRTY8yyVv0Q4DCL2G2_2TVA,50036
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=5C6I1QTyHWuLr96jsr6Zpawk1HxAaoUI1qL3Wwf-omM,10044
186
- ultralytics/solutions/parking_management.py,sha256=tGD1dglpIu5KhDWF7xaIRwbqETfpxCfvyvlUsNEsjUQ,9119
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=JtUCGKZp2rW7pXwGPRCiN8QTovnM8hlgW6XLvp9yGTs,48007
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.100.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
229
- ultralytics-8.2.100.dist-info/METADATA,sha256=QD9H-onZkaZ4tSh_tzEVY2ZYn_wwqqWNG43QrDfSBpE,39711
230
- ultralytics-8.2.100.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
231
- ultralytics-8.2.100.dist-info/entry_points.txt,sha256=YM_wiKyTe9yRrsEfqvYolNO5ngwfoL4-NwgKzc8_7sI,93
232
- ultralytics-8.2.100.dist-info/top_level.txt,sha256=XP49TwiMw4QGsvTLSYiJhz1xF_k7ev5mQ8jJXaXi45Q,12
233
- ultralytics-8.2.100.dist-info/RECORD,,
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,,