matrice 1.0.99150__py3-none-any.whl → 1.0.99151__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.
@@ -272,7 +272,7 @@ class FireSmokeUseCase(BaseProcessor):
272
272
 
273
273
  for category, threshold in config.alert_config.count_thresholds.items():
274
274
  if category == "all" and total > threshold:
275
-
275
+ print("-----------ALERTS--INNN-----------")
276
276
  alerts.append({
277
277
  "alert_type": getattr(config.alert_config, 'alert_type', ['Default']) if hasattr(config.alert_config, 'alert_type') else ['Default'],
278
278
  "alert_id": "alert_"+category+'_'+frame_key,
@@ -284,6 +284,7 @@ class FireSmokeUseCase(BaseProcessor):
284
284
  }
285
285
  })
286
286
  elif category in summary.get("per_category_count", {}):
287
+ print("-----------ALERTS--INNN 2-----------")
287
288
  count = summary.get("per_category_count", {})[category]
288
289
  if count > threshold: # Fixed logic: alert when EXCEEDING threshold
289
290
  alerts.append({
@@ -333,6 +334,7 @@ class FireSmokeUseCase(BaseProcessor):
333
334
 
334
335
  for category, threshold in config.alert_config.count_thresholds.items():
335
336
  if category in summary.get("per_category_count", {}):
337
+ print("-----------INCIDENTSS--INNN-----------")
336
338
  #count = summary.get("per_category_count", {})[category]
337
339
  start_timestamp = self._get_start_timestamp_str(stream_info)
338
340
  if start_timestamp and self.current_incident_end_timestamp=='N/A':
@@ -581,11 +583,17 @@ class FireSmokeUseCase(BaseProcessor):
581
583
  det for det in data
582
584
  if det.get("category", "").lower() in valid_categories
583
585
  ]
586
+ counts = {}
587
+ for det in detections:
588
+ cat = det.get('category', 'unknown')
589
+ counts[cat] = counts.get(cat, 0) + 1
590
+
584
591
 
585
592
  summary = {
586
593
  "total_objects": len(detections),
587
594
  "by_category": {},
588
595
  "detections": detections,
596
+ "per_category_count": counts,
589
597
  }
590
598
 
591
599
  # Count by each category defined in config
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrice
3
- Version: 1.0.99150
3
+ Version: 1.0.99151
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
@@ -175,7 +175,7 @@ matrice/deploy/utils/post_processing/usecases/emergency_vehicle_detection.py,sha
175
175
  matrice/deploy/utils/post_processing/usecases/face_emotion.py,sha256=eRfqBdryB0uNoOlz_y-JMuZL1BhPWrI-odqgx_9LT7s,39132
176
176
  matrice/deploy/utils/post_processing/usecases/fashion_detection.py,sha256=f9gpzMDhIW-gyn46k9jgf8nY7YeoqAnTxGOzksabFbE,40457
177
177
  matrice/deploy/utils/post_processing/usecases/field_mapping.py,sha256=JDwYX8pd2W-waDvBh98Y_o_uchJu7wEYbFxOliA4Iq4,39822
178
- matrice/deploy/utils/post_processing/usecases/fire_detection.py,sha256=ztFoCNxEKyyLtQKp5c8qIH6nZUCvlMYQhppmvZvm9kk,39046
178
+ matrice/deploy/utils/post_processing/usecases/fire_detection.py,sha256=w0vCthr1adHpMgJNSh_b9Ej2s_17q6GGN90iCsKnaLI,39467
179
179
  matrice/deploy/utils/post_processing/usecases/flare_analysis.py,sha256=-egmS3Hs_iGOLeCMfapbkfQ04EWtZx97QRuUcDa-jMU,45340
180
180
  matrice/deploy/utils/post_processing/usecases/flower_segmentation.py,sha256=4I7qMx9Ztxg_hy9KTVX-3qBhAN-QwDt_Yigf9fFjLus,52017
181
181
  matrice/deploy/utils/post_processing/usecases/gender_detection.py,sha256=DEnCTRew6B7DtPcBQVCTtpd_IQMvMusBcu6nadUg2oM,40107
@@ -227,8 +227,8 @@ matrice/deployment/camera_manager.py,sha256=ReBZqm1CNXRImKcbcZ4uWAT3TUWkof1D28oB
227
227
  matrice/deployment/deployment.py,sha256=PLIUD-PxTaC2Zxb3Y12wUddsryV-OJetjCjLoSUh7S4,48103
228
228
  matrice/deployment/inference_pipeline.py,sha256=bXLgd29ViA7o0c7YWLFJl1otBUQfTPb61jS6VawQB0Y,37918
229
229
  matrice/deployment/streaming_gateway_manager.py,sha256=w5swGsuFVfZIdOm2ZuBHRHlRdYYJMLopLsf2gb91lQ8,20946
230
- matrice-1.0.99150.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
231
- matrice-1.0.99150.dist-info/METADATA,sha256=kKKCIinYcZumDM6ZDoUljBf0juk-dppjw3C5gc4NMRk,14624
232
- matrice-1.0.99150.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
233
- matrice-1.0.99150.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
234
- matrice-1.0.99150.dist-info/RECORD,,
230
+ matrice-1.0.99151.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
231
+ matrice-1.0.99151.dist-info/METADATA,sha256=j21l5NqylwMwfyVi3itwBvEHWkRIA5p08ZpWP5X80xA,14624
232
+ matrice-1.0.99151.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
233
+ matrice-1.0.99151.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
234
+ matrice-1.0.99151.dist-info/RECORD,,