matrice 1.0.99391__py3-none-any.whl → 1.0.99393__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.
- matrice/deploy/optimize/transmission.py +18 -18
- matrice/deploy/utils/post_processing/usecases/vehicle_monitoring.py +13 -1
- {matrice-1.0.99391.dist-info → matrice-1.0.99393.dist-info}/METADATA +1 -1
- {matrice-1.0.99391.dist-info → matrice-1.0.99393.dist-info}/RECORD +7 -7
- {matrice-1.0.99391.dist-info → matrice-1.0.99393.dist-info}/WHEEL +0 -0
- {matrice-1.0.99391.dist-info → matrice-1.0.99393.dist-info}/licenses/LICENSE.txt +0 -0
- {matrice-1.0.99391.dist-info → matrice-1.0.99393.dist-info}/top_level.txt +0 -0
@@ -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
|
-
|
71
|
-
elif score >= self.threshold_b:
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
else:
|
82
|
-
|
83
|
-
|
84
|
-
|
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
|
@@ -95,6 +95,7 @@ class VehicleMonitoringUseCase(BaseProcessor):
|
|
95
95
|
self._ascending_alert_list: List[int] = []
|
96
96
|
self.current_incident_end_timestamp: str = "N/A"
|
97
97
|
self.start_timer = None
|
98
|
+
self._per_zone_total_track_ids = {}
|
98
99
|
|
99
100
|
def process(self, data: Any, config: ConfigProtocol, context: Optional[ProcessingContext] = None,
|
100
101
|
stream_info: Optional[Dict[str, Any]] = None) -> ProcessingResult:
|
@@ -208,6 +209,9 @@ class VehicleMonitoringUseCase(BaseProcessor):
|
|
208
209
|
zone_name: {cat: len(ids) for cat, ids in cat_map.items()}
|
209
210
|
for zone_name, cat_map in self._per_zone_total_track_ids.items()
|
210
211
|
}
|
212
|
+
print("----------------------------CS-------------------------------")
|
213
|
+
print(counting_summary)
|
214
|
+
print("----------------------------CS-------------------------------")
|
211
215
|
|
212
216
|
alerts = self._check_alerts(counting_summary, frame_number, config)
|
213
217
|
# predictions are not required in the current agg_summary; skip computing to avoid unused variable
|
@@ -217,6 +221,11 @@ class VehicleMonitoringUseCase(BaseProcessor):
|
|
217
221
|
business_analytics_list = self._generate_business_analytics(counting_summary, alerts, config, stream_info, is_empty=True)
|
218
222
|
summary_list = self._generate_summary(counting_summary, incidents_list, tracking_stats_list, business_analytics_list, alerts)
|
219
223
|
|
224
|
+
print("-----------------------------TS----------------------------------")
|
225
|
+
print(tracking_stats_list)
|
226
|
+
print("-----------------------------TS----------------------------------")
|
227
|
+
|
228
|
+
|
220
229
|
incidents = incidents_list[0] if incidents_list else {}
|
221
230
|
tracking_stats = tracking_stats_list[0] if tracking_stats_list else {}
|
222
231
|
business_analytics = business_analytics_list[0] if business_analytics_list else {}
|
@@ -229,6 +238,9 @@ class VehicleMonitoringUseCase(BaseProcessor):
|
|
229
238
|
"zone_analysis": zone_counts,
|
230
239
|
"human_text": summary}
|
231
240
|
}
|
241
|
+
print("--------------------------------agg_summary--------------------------------")
|
242
|
+
print(agg_summary)
|
243
|
+
print("--------------------------------agg_summary--------------------------------")
|
232
244
|
|
233
245
|
context.mark_completed()
|
234
246
|
result = self.create_result(
|
@@ -486,7 +498,7 @@ class VehicleMonitoringUseCase(BaseProcessor):
|
|
486
498
|
"threshold_level": config.alert_config.count_thresholds if hasattr(config.alert_config, 'count_thresholds') else {},
|
487
499
|
"ascending": True,
|
488
500
|
"settings": {t: v for t, v in zip(getattr(config.alert_config, 'alert_type', ['Default']),
|
489
|
-
|
501
|
+
getattr(config.alert_config, 'alert_value', ['JSON']))}
|
490
502
|
})
|
491
503
|
|
492
504
|
human_text_lines = [f"Tracking Statistics:"]
|
@@ -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=
|
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
|
@@ -236,7 +236,7 @@ matrice/deploy/utils/post_processing/usecases/template_usecase.py,sha256=6NC-bTn
|
|
236
236
|
matrice/deploy/utils/post_processing/usecases/theft_detection.py,sha256=Rs_zKn2z9YM10fGzTHR44Q3m8TIO1s5UMdiPWA03rbA,28671
|
237
237
|
matrice/deploy/utils/post_processing/usecases/traffic_sign_monitoring.py,sha256=nDlEzHgMlUjy_VtJ7usnEzMcdSs-jouqaoJpJ8DYUMw,34351
|
238
238
|
matrice/deploy/utils/post_processing/usecases/underwater_pollution_detection.py,sha256=jqP1ZKfDZe2-56Lyvgb2DxnbqRfvxm6pPL0Ck3esfBk,40356
|
239
|
-
matrice/deploy/utils/post_processing/usecases/vehicle_monitoring.py,sha256=
|
239
|
+
matrice/deploy/utils/post_processing/usecases/vehicle_monitoring.py,sha256=0puMZ3k_1vscgB7SJL2jIEjCZ4h3dwVleQUPNaMNGcw,45173
|
240
240
|
matrice/deploy/utils/post_processing/usecases/warehouse_object_segmentation.py,sha256=5uZXTJL_A3tUEN08T-_ZQpUoJ9gqbuuMc4z2mT4sMnQ,43753
|
241
241
|
matrice/deploy/utils/post_processing/usecases/waterbody_segmentation.py,sha256=JsCxDEMB8s4WDcezfJDr2zrjM-TCjB9hxOztzSvWmpY,45268
|
242
242
|
matrice/deploy/utils/post_processing/usecases/weapon_detection.py,sha256=gea-rjEHmP0hUjpcrcQIHOnhMMHQNqDI90cbpXHnlpI,31071
|
@@ -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.
|
265
|
-
matrice-1.0.
|
266
|
-
matrice-1.0.
|
267
|
-
matrice-1.0.
|
268
|
-
matrice-1.0.
|
264
|
+
matrice-1.0.99393.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
|
265
|
+
matrice-1.0.99393.dist-info/METADATA,sha256=0XiAKaevRgUqDUghFhVjQYgozLtAbO115t78n49gf-E,14624
|
266
|
+
matrice-1.0.99393.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
267
|
+
matrice-1.0.99393.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
|
268
|
+
matrice-1.0.99393.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|