matrice 1.0.99294__py3-none-any.whl → 1.0.99295__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.
@@ -23,6 +23,7 @@ from ..core.config import BaseConfig, AlertConfig, ZoneConfig
23
23
  class AbandonedObjectConfig(BaseConfig):
24
24
  """Configuration for abandoned object detection use case."""
25
25
  enable_smoothing: bool = True
26
+ centroid_threshold: float = 10.0
26
27
  smoothing_algorithm: str = "observability"
27
28
  smoothing_window_size: int = 20
28
29
  smoothing_cooldown_frames: int = 5
@@ -193,7 +194,7 @@ class AbandonedObjectDetectionUseCase(BaseProcessor):
193
194
  track_info['bbox'] = bbox
194
195
 
195
196
  # Check if centroid has moved significantly
196
- if self._is_centroid_stationary(centroid, prev_centroid):
197
+ if self._is_centroid_stationary(centroid, prev_centroid, config.centroid_threshold):
197
198
  if track_info['frame_count'] >= config.stationary_threshold_frames:
198
199
  # Check for overlap with person
199
200
  if not self._overlaps_with_person(bbox):
@@ -222,6 +223,7 @@ class AbandonedObjectDetectionUseCase(BaseProcessor):
222
223
 
223
224
  def _is_centroid_stationary(self, centroid: tuple, prev_centroid: tuple, threshold: float = 5.0) -> bool:
224
225
  """Check if centroid movement is within threshold."""
226
+ threshold = threshold or self.config.centroid_threshold
225
227
  x1, y1 = centroid
226
228
  x2, y2 = prev_centroid
227
229
  distance = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5
@@ -230,7 +232,7 @@ class AbandonedObjectDetectionUseCase(BaseProcessor):
230
232
  def _overlaps_with_person(self, bbox: Dict) -> bool:
231
233
  """Check if bbox overlaps with any person bbox."""
232
234
  for person_bbox in self._person_bboxes:
233
- if person_bbox and self._compute_iou(bbox, person_bbox) > 0.1:
235
+ if person_bbox and self._compute_iou(bbox, person_bbox) > 0.5:
234
236
  return True
235
237
  return False
236
238
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrice
3
- Version: 1.0.99294
3
+ Version: 1.0.99295
4
4
  Summary: SDK for connecting to matrice.ai services
5
5
  Home-page: https://github.com/matrice-ai/python-sdk
6
6
  Author: Matrice.ai
@@ -157,7 +157,7 @@ matrice/deploy/utils/post_processing/test_cases/test_utilities.py,sha256=lmT5bp5
157
157
  matrice/deploy/utils/post_processing/test_cases/test_utils.py,sha256=bfmOT1rr9asv3jpr-p_UrjnnSZ1qEWM2LEqNKkyvJZ8,29370
158
158
  matrice/deploy/utils/post_processing/usecases/Histopathological_Cancer_Detection_img.py,sha256=bHDXxxG3QgWMFZbDuBaJWpkIvxTXsFMTqCPBCFm3SDs,30247
159
159
  matrice/deploy/utils/post_processing/usecases/__init__.py,sha256=aTVBEy8PnIEQdxFKpyB6_bYW5WWed6S2JBkYK57VT2s,9571
160
- matrice/deploy/utils/post_processing/usecases/abandoned_object_detection.py,sha256=W6thVUxNzZc2vDaXG69DNvENP8WVPQh-vE52YXtLEHU,31750
160
+ matrice/deploy/utils/post_processing/usecases/abandoned_object_detection.py,sha256=l0s0BZKuK6XpfD85zJSb-cgbfLxWnP9Mzb5JwAFPX7k,31878
161
161
  matrice/deploy/utils/post_processing/usecases/advanced_customer_service.py,sha256=ELt5euxr6P4X2s8-YGngmj27QscOHefjOsx3774sNFk,75914
162
162
  matrice/deploy/utils/post_processing/usecases/age_detection.py,sha256=yn1LXOgbnOWSMDnsCds6-uN6W-I1Hy4_-AMrjbT5PtY,41318
163
163
  matrice/deploy/utils/post_processing/usecases/anti_spoofing_detection.py,sha256=XdtDdXGzZMLQdWcoOoiE5t4LPYHhgOtJ7tZCNlq1A2E,31329
@@ -244,8 +244,8 @@ matrice/deployment/camera_manager.py,sha256=e1Lc81RJP5wUWRdTgHO6tMWF9BkBdHOSVyx3
244
244
  matrice/deployment/deployment.py,sha256=HFt151eWq6iqIAMsQvurpV2WNxW6Cx_gIUVfnVy5SWE,48093
245
245
  matrice/deployment/inference_pipeline.py,sha256=6b4Mm3-qt-Zy0BeiJfFQdImOn3FzdNCY-7ET7Rp8PMk,37911
246
246
  matrice/deployment/streaming_gateway_manager.py,sha256=ifYGl3g25wyU39HwhPQyI2OgF3M6oIqKMWt8RXtMxY8,21401
247
- matrice-1.0.99294.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
248
- matrice-1.0.99294.dist-info/METADATA,sha256=lXvLsYMYQbH8vQxZlhIDVAdn4rKiem6xy5gtVfRVaig,14624
249
- matrice-1.0.99294.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
250
- matrice-1.0.99294.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
251
- matrice-1.0.99294.dist-info/RECORD,,
247
+ matrice-1.0.99295.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
248
+ matrice-1.0.99295.dist-info/METADATA,sha256=ZdeolA_TMO2WIHB1CSLTPNWywK-uF3t4IP4QZAiMA-Q,14624
249
+ matrice-1.0.99295.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
250
+ matrice-1.0.99295.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
251
+ matrice-1.0.99295.dist-info/RECORD,,