matrice 1.0.99390__py3-none-any.whl → 1.0.99392__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.
@@ -64,24 +64,24 @@ class ClientTransmissionHandler:
64
64
  return "full", {"reason": "first_frame", "similarity_score": 0.0}
65
65
 
66
66
  ref = self.frame_cache[stream_key]
67
- is_similar, score = self.ssim_comparator.compare(ref, frame, stream_key)
68
-
69
- if score >= self.threshold_a:
70
- return "skip", {"similarity_score": float(score), "reason": "high_similarity"}
71
- elif score >= self.threshold_b:
72
- diff_data, diff_meta = self.difference_processor.calculate_frame_difference(ref, frame)
73
- if diff_meta.get("has_changes", False):
74
- return "difference", {
75
- "similarity_score": float(score),
76
- "difference_data": diff_data,
77
- "difference_metadata": diff_meta,
78
- "reason": "medium_similarity",
79
- }
80
- return "skip", {"similarity_score": float(score), "reason": "no_changes"}
81
- else:
82
- # Low similarity, update cache immediately
83
- self.frame_cache[stream_key] = frame.copy()
84
- return "full", {"similarity_score": float(score), "reason": "low_similarity"}
67
+ # is_similar, score = self.ssim_comparator.compare(ref, frame, stream_key)
68
+
69
+ # if score >= self.threshold_a:
70
+ # return "skip", {"similarity_score": float(score), "reason": "high_similarity"}
71
+ # elif score >= self.threshold_b:
72
+ # diff_data, diff_meta = self.difference_processor.calculate_frame_difference(ref, frame)
73
+ # if diff_meta.get("has_changes", False):
74
+ # return "difference", {
75
+ # "similarity_score": float(score),
76
+ # "difference_data": diff_data,
77
+ # "difference_metadata": diff_meta,
78
+ # "reason": "medium_similarity",
79
+ # }
80
+ # return "skip", {"similarity_score": float(score), "reason": "no_changes"}
81
+ # else:
82
+ # # Low similarity, update cache immediately
83
+ self.frame_cache[stream_key] = frame.copy()
84
+ return "full", {"similarity_score": 0, "reason": "low_similarity"}
85
85
  except Exception as exc:
86
86
  logger.warning("Transmission decision error: %s", str(exc))
87
87
  # Fallback to full frame to keep pipeline robust
@@ -5,7 +5,7 @@ APP_NAME_TO_USECASE = {
5
5
  "mask_detection": "mask_detection",
6
6
  "pipeline_detection": "pipeline_detection",
7
7
  "vehicle_monitoring": "vehicle_monitoring",
8
- "vehicle_type_monitoring": "vehicle_monitoring",
8
+ "Vehicle Type Monitoring": "vehicle_monitoring",
9
9
  "weapon_detection": "weapon_detection",
10
10
  "traffic_sign_monitoring": "traffic_sign_monitoring",
11
11
  "flare_analysis": "flare_analysis",
@@ -52,7 +52,7 @@ APP_NAME_TO_USECASE = {
52
52
  "abandoned_object_detection" : "abandoned_object_detection",
53
53
  "gas_leak_detection": "gas_leak_detection",
54
54
  "color_detection": "color_detection",
55
- "license_plate_monitor" : "license_plate_monitor",
55
+ "License Plate Recognition" : "license_plate_monitor",
56
56
 
57
57
  }
58
58
 
@@ -63,7 +63,7 @@ APP_NAME_TO_CATEGORY = {
63
63
  "mask_detection": "mask_detection",
64
64
  "pipeline_detection": "pipeline_detection",
65
65
  "vehicle_monitoring": "traffic",
66
- "vehicle_type_monitoring": "traffic",
66
+ "Vehicle Type Monitoring": "traffic",
67
67
  "weapon_detection": "security",
68
68
  "traffic_sign_monitoring": "traffic",
69
69
  "flare_analysis": "flare_detection",
@@ -110,7 +110,7 @@ APP_NAME_TO_CATEGORY = {
110
110
  "abandoned_object_detection" : "security",
111
111
  "gas_leak_detection": "oil_gas",
112
112
  "color_detection": "visual_appearance",
113
- "license_plate_monitor" : "license_plate_monitor"
113
+ "License Plate Recognition" : "license_plate_monitor"
114
114
  }
115
115
 
116
116
  def get_usecase_from_app_name(app_name: str) -> str:
@@ -1206,6 +1206,8 @@ class PeopleCountingUseCase(BaseProcessor):
1206
1206
 
1207
1207
  def _get_current_timestamp_str(self, stream_info: Optional[Dict[str, Any]], precision=False, frame_id: Optional[str]=None) -> str:
1208
1208
  """Get formatted current timestamp based on stream type."""
1209
+ print('STREAM INFO-------------------------------')
1210
+ print(stream_info)
1209
1211
  if not stream_info:
1210
1212
  return "00:00:00.00"
1211
1213
  if precision:
@@ -1247,6 +1249,8 @@ class PeopleCountingUseCase(BaseProcessor):
1247
1249
  """Get formatted start timestamp for 'TOTAL SINCE' based on stream type."""
1248
1250
  if not stream_info:
1249
1251
  return "00:00:00"
1252
+ print('STARTTT STREAM INFO-------------------------------')
1253
+ print(stream_info)
1250
1254
 
1251
1255
  if precision:
1252
1256
  if self.start_timer is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrice
3
- Version: 1.0.99390
3
+ Version: 1.0.99392
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
@@ -114,7 +114,7 @@ matrice/deploy/optimize/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
114
114
  matrice/deploy/optimize/cache_manager.py,sha256=ebQ1Y3vGNW3--TCPnWijDK3ix5HuZ_zH7wjs8iHKkbU,1610
115
115
  matrice/deploy/optimize/frame_comparators.py,sha256=JEn4g599yN6Sodoo_0xVSu0wliWQyvYOiTrdp0XNCgk,20431
116
116
  matrice/deploy/optimize/frame_difference.py,sha256=2QNY6LCwEklXXNN2zAb-hYsX-pbr70IV5vXW70xXQNI,14153
117
- matrice/deploy/optimize/transmission.py,sha256=pCmOSgBLqwF4ALDbYiYsa6UFUGlr_ajmRaFp2gajSeY,18945
117
+ matrice/deploy/optimize/transmission.py,sha256=mbflX2UK-pckmS-THaBJkTjuwK0kgwGh1xWpGvVkZ9Q,18956
118
118
  matrice/deploy/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
119
119
  matrice/deploy/server/server.py,sha256=mvQqicAPPsWWPe_kau8wUJSBV_KpDDCdrWSfBpZyFeo,38789
120
120
  matrice/deploy/server/inference/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
@@ -141,7 +141,7 @@ matrice/deploy/utils/boundary_drawing_internal/boundary_drawing_internal.py,sha2
141
141
  matrice/deploy/utils/boundary_drawing_internal/boundary_drawing_tool.py,sha256=eY0VQGZ8BfTmR4_ThIAXaumBjh8_c7w69w-d3kta8p0,15421
142
142
  matrice/deploy/utils/boundary_drawing_internal/example_usage.py,sha256=cUBhxxsVdTQWIPvIOjCUGrhqon7ZBr5N6qNewjrTIuk,6434
143
143
  matrice/deploy/utils/post_processing/__init__.py,sha256=8qpwRZI05pAYvKXQZjmJucVllyhJzcb8MFHiKv2hX1c,26097
144
- matrice/deploy/utils/post_processing/config.py,sha256=2b3mYG62ckEVLPc1SHLjd0nX_a17sUeh1G9o6pyqalg,5551
144
+ matrice/deploy/utils/post_processing/config.py,sha256=uSSuWKe6YE-S__CL5NtqXzydNE4Sb--Ec5lkuygBc2s,5559
145
145
  matrice/deploy/utils/post_processing/processor.py,sha256=zWFwoXxXa7XQtH3dg893-w242eTQhcSefBu87KjqSVg,35219
146
146
  matrice/deploy/utils/post_processing/advanced_tracker/__init__.py,sha256=tAPFzI_Yep5TLX60FDwKqBqppc-EbxSr0wNsQ9DGI1o,423
147
147
  matrice/deploy/utils/post_processing/advanced_tracker/base.py,sha256=VqWy4dd5th5LK-JfueTt2_GSEoOi5QQfQxjTNhmQoLc,3580
@@ -216,7 +216,7 @@ matrice/deploy/utils/post_processing/usecases/mask_detection.py,sha256=MNpCcuefO
216
216
  matrice/deploy/utils/post_processing/usecases/parking.py,sha256=lqTGqcjUZZPFw3tu11Ha8BSsZ311K5--wEZnlVsXakU,34534
217
217
  matrice/deploy/utils/post_processing/usecases/parking_space_detection.py,sha256=xwhkJjGGKcT827URbasi3olYqhd95Sh0zsEIphwzcgY,39561
218
218
  matrice/deploy/utils/post_processing/usecases/pedestrian_detection.py,sha256=hPFtvpWXXEsbDavmuiXIhrosMNlOhGya--jukT-ZOHA,39288
219
- matrice/deploy/utils/post_processing/usecases/people_counting.py,sha256=5m6okm4rw-RPd0UoPGE9VzqVPlV4FGJkbn1uTB2wj88,78595
219
+ matrice/deploy/utils/post_processing/usecases/people_counting.py,sha256=9PIMToguNwd1deoBtJoPKRxW1olBjZ2Z7nOyHJUtf2c,78777
220
220
  matrice/deploy/utils/post_processing/usecases/pipeline_detection.py,sha256=VsLTXMAqx0tRw7Olrxqx7SBLolZR7p2aFOrdSXLS-kE,30796
221
221
  matrice/deploy/utils/post_processing/usecases/plaque_segmentation_img.py,sha256=d__a0PkkObYVoC-Q5-2bFVfeyKnQHtB5xVAKVOCeFyk,41925
222
222
  matrice/deploy/utils/post_processing/usecases/pothole_segmentation.py,sha256=jXTb8ZqInp5xJ-O3Zp3zQBiryFVD0-WBbhW6Kux_NDo,44905
@@ -261,8 +261,8 @@ matrice/deployment/camera_manager.py,sha256=e1Lc81RJP5wUWRdTgHO6tMWF9BkBdHOSVyx3
261
261
  matrice/deployment/deployment.py,sha256=HFt151eWq6iqIAMsQvurpV2WNxW6Cx_gIUVfnVy5SWE,48093
262
262
  matrice/deployment/inference_pipeline.py,sha256=6b4Mm3-qt-Zy0BeiJfFQdImOn3FzdNCY-7ET7Rp8PMk,37911
263
263
  matrice/deployment/streaming_gateway_manager.py,sha256=ifYGl3g25wyU39HwhPQyI2OgF3M6oIqKMWt8RXtMxY8,21401
264
- matrice-1.0.99390.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
265
- matrice-1.0.99390.dist-info/METADATA,sha256=eCj4VT4EWMgIb9rgNhvsmljkTuBROV7kfGeSsxNVqGM,14624
266
- matrice-1.0.99390.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
267
- matrice-1.0.99390.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
268
- matrice-1.0.99390.dist-info/RECORD,,
264
+ matrice-1.0.99392.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
265
+ matrice-1.0.99392.dist-info/METADATA,sha256=AF8yhoOaoOlO1d-jbJEqkzUkyJnFu-RGdOr4S9_vJQc,14624
266
+ matrice-1.0.99392.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
267
+ matrice-1.0.99392.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
268
+ matrice-1.0.99392.dist-info/RECORD,,