matrice 1.0.99247__py3-none-any.whl → 1.0.99249__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.
@@ -47,7 +47,7 @@ APP_NAME_TO_USECASE = {
47
47
  "waterbody_segmentation": "waterbody_segmentation",
48
48
  "litter_detection" : "litter_detection",
49
49
  "leak_detection": "leak_detection",
50
- "fire_smoke_detection": "fire_smoke_detection",
50
+ "Fire Safety Monitoring": "fire_smoke_detection",
51
51
  "human_activity_recognition": "human_activity_recognition",
52
52
  "abandoned_object_detection" : "abandoned_object_detection",
53
53
  "gas_leak_detection": "gas_leak_detection",
@@ -102,7 +102,7 @@ APP_NAME_TO_CATEGORY = {
102
102
  "waterbody_segmentation": "agriculture",
103
103
  "litter_detection" : "litter_detection",
104
104
  "leak_detection": "oil_gas",
105
- "fire_smoke_detection": "hazard",
105
+ "Fire Safety Monitoring": "hazard",
106
106
  "human_activity_recognition": "general",
107
107
  "abandoned_object_detection" : "security",
108
108
  "gas_leak_detection": "oil_gas",
@@ -511,6 +511,7 @@ class ProximityUseCase(BaseProcessor):
511
511
  detection_obj = self.create_detection_object(category, bbox)
512
512
  detections.append(detection_obj)
513
513
 
514
+ print(detections)
514
515
  # Build alerts and alert_settings arrays
515
516
  alert_settings = []
516
517
  if config.alert_config and hasattr(config.alert_config, 'alert_type'):
@@ -573,6 +574,25 @@ class ProximityUseCase(BaseProcessor):
573
574
 
574
575
  return [tracking_stat]
575
576
 
577
+ def _check_proximity(self, detections):
578
+ """Check if any two detections are within proximity threshold."""
579
+ proximity_threshold = 0.5
580
+ for i in range(len(detections)):
581
+ for j in range(i + 1, len(detections)):
582
+ bbox1 = detections[i].get("bounding_box", {})
583
+ bbox2 = detections[j].get("bounding_box", {})
584
+
585
+ if not bbox1 or not bbox2:
586
+ continue
587
+
588
+ center1 = get_bbox_center(bbox1)
589
+ center2 = get_bbox_center(bbox2)
590
+
591
+ if center1 and center2:
592
+ distance = ((center1[0] - center2[0]) ** 2 + (center1[1] - center2[1]) ** 2) ** 0.5
593
+ if distance < proximity_threshold:
594
+ return True
595
+
576
596
  def _generate_human_text_for_tracking(self, total_people: int, total_unique_count: int, config: ProximityConfig, frame_id: str, alerts:Any=[], stream_info: Optional[Dict[str, Any]] = None) -> str:
577
597
  """Generate human-readable text for tracking stats in old format."""
578
598
  from datetime import datetime, timezone
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrice
3
- Version: 1.0.99247
3
+ Version: 1.0.99249
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
@@ -129,7 +129,7 @@ matrice/deploy/utils/boundary_drawing_internal/boundary_drawing_internal.py,sha2
129
129
  matrice/deploy/utils/boundary_drawing_internal/boundary_drawing_tool.py,sha256=eY0VQGZ8BfTmR4_ThIAXaumBjh8_c7w69w-d3kta8p0,15421
130
130
  matrice/deploy/utils/boundary_drawing_internal/example_usage.py,sha256=cUBhxxsVdTQWIPvIOjCUGrhqon7ZBr5N6qNewjrTIuk,6434
131
131
  matrice/deploy/utils/post_processing/__init__.py,sha256=a2gUxjLmmc5CF4ik9vXWCI2LQAbqvA6B8pFsBa1kMic,25727
132
- matrice/deploy/utils/post_processing/config.py,sha256=lGcWxWaFr4TlEJbL8UEC8gB-CPfe9OOd9SUMHyztuDw,5347
132
+ matrice/deploy/utils/post_processing/config.py,sha256=tLt0FbBX7lCMfxABmJbTV_KWwoi-N1pqKbXF1IXYGII,5351
133
133
  matrice/deploy/utils/post_processing/processor.py,sha256=QJehlljMDmlYNpun5dUnkPorijHs17BNQv6aPZZqgag,34907
134
134
  matrice/deploy/utils/post_processing/advanced_tracker/__init__.py,sha256=tAPFzI_Yep5TLX60FDwKqBqppc-EbxSr0wNsQ9DGI1o,423
135
135
  matrice/deploy/utils/post_processing/advanced_tracker/base.py,sha256=VqWy4dd5th5LK-JfueTt2_GSEoOi5QQfQxjTNhmQoLc,3580
@@ -204,7 +204,7 @@ matrice/deploy/utils/post_processing/usecases/plaque_segmentation_img.py,sha256=
204
204
  matrice/deploy/utils/post_processing/usecases/pothole_segmentation.py,sha256=jXTb8ZqInp5xJ-O3Zp3zQBiryFVD0-WBbhW6Kux_NDo,44905
205
205
  matrice/deploy/utils/post_processing/usecases/ppe_compliance.py,sha256=G9P9j9E9nfNJInHJxmK1Lb4daFBlG5hq0aqotTLvFFE,30146
206
206
  matrice/deploy/utils/post_processing/usecases/price_tag_detection.py,sha256=09Tp6MGAHh95s-NSAp-4WC9iCc20sajWApuUBAvgXiQ,39880
207
- matrice/deploy/utils/post_processing/usecases/proximity_detection.py,sha256=MDCPQ7_AScJQUcTNzv5FOgf5tQssFN5c4X3WYEFW1FI,76582
207
+ matrice/deploy/utils/post_processing/usecases/proximity_detection.py,sha256=eLs_C2-XeNH-XwTOKeXxDZHafvwmYQqSkf8pyTO3Jl0,77438
208
208
  matrice/deploy/utils/post_processing/usecases/road_lane_detection.py,sha256=V_KxwBtAHSNkyoH8sXw-U-P3J8ToXtX3ncc69gn6Tds,31591
209
209
  matrice/deploy/utils/post_processing/usecases/road_traffic_density.py,sha256=YiHQ0kKhXglagHPvygywxMqZAw8s0WharrBQqLQj2q4,40311
210
210
  matrice/deploy/utils/post_processing/usecases/road_view_segmentation.py,sha256=BcBbOOg5622KuvzKrzs9cJW1wkRoIIcOab0N7BONQKQ,44986
@@ -243,8 +243,8 @@ matrice/deployment/camera_manager.py,sha256=e1Lc81RJP5wUWRdTgHO6tMWF9BkBdHOSVyx3
243
243
  matrice/deployment/deployment.py,sha256=HFt151eWq6iqIAMsQvurpV2WNxW6Cx_gIUVfnVy5SWE,48093
244
244
  matrice/deployment/inference_pipeline.py,sha256=6b4Mm3-qt-Zy0BeiJfFQdImOn3FzdNCY-7ET7Rp8PMk,37911
245
245
  matrice/deployment/streaming_gateway_manager.py,sha256=ifYGl3g25wyU39HwhPQyI2OgF3M6oIqKMWt8RXtMxY8,21401
246
- matrice-1.0.99247.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
247
- matrice-1.0.99247.dist-info/METADATA,sha256=rUQoXgEKDySLF9XBgJOanIy8t2VvjpZt1HRyoLpBtvs,14624
248
- matrice-1.0.99247.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
249
- matrice-1.0.99247.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
250
- matrice-1.0.99247.dist-info/RECORD,,
246
+ matrice-1.0.99249.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
247
+ matrice-1.0.99249.dist-info/METADATA,sha256=lqoVX_xeHrWV65FNXH7oHyADPM6oPg-IZyThL0y_Cgs,14624
248
+ matrice-1.0.99249.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
249
+ matrice-1.0.99249.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
250
+ matrice-1.0.99249.dist-info/RECORD,,