matrice 1.0.99115__py3-none-any.whl → 1.0.99116__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.
@@ -625,12 +625,14 @@ class PeopleCountingUseCase(BaseProcessor):
625
625
  if config.alert_config.occupancy_thresholds:
626
626
  for zone_name, threshold in config.alert_config.occupancy_thresholds.items():
627
627
  if zone_name in zone_analysis:
628
- zone_count = sum(zone_analysis[zone_name].values()) if isinstance(zone_analysis[zone_name], dict) else zone_analysis[zone_name]
628
+ # Calculate zone_count robustly (supports int, list, dict values)
629
+ print('ZONEEE',zone_name, zone_analysis[zone_name])
630
+ zone_count = self._robust_zone_total(zone_analysis[zone_name])
629
631
  if zone_count >= threshold:
630
632
  alerts.append({
631
633
  "alert_type": getattr(config.alert_config, 'alert_type', ['Default']) if hasattr(config.alert_config, 'alert_type') else ['Default'],
632
- "alert_id": "alert_"+category+'_zone_'+zone_name+'_'+frame_id,
633
- "incident_category": self.CASE_TYPE+'_'+zone_name,
634
+ "alert_id": f"alert_zone_{zone_name}_{frame_id}",
635
+ "incident_category": f"{self.CASE_TYPE}_{zone_name}",
634
636
  "threshold_level": threshold,
635
637
  "ascending": get_trend(self._ascending_alert_list, lookback=900, threshold=0.8),
636
638
  "settings": {t: v for t, v in zip(getattr(config.alert_config, 'alert_type', ['Default']) if hasattr(config.alert_config, 'alert_type') else ['Default'],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrice
3
- Version: 1.0.99115
3
+ Version: 1.0.99116
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
@@ -186,7 +186,7 @@ matrice/deploy/utils/post_processing/usecases/mask_detection.py,sha256=MNpCcuefO
186
186
  matrice/deploy/utils/post_processing/usecases/parking.py,sha256=lqTGqcjUZZPFw3tu11Ha8BSsZ311K5--wEZnlVsXakU,34534
187
187
  matrice/deploy/utils/post_processing/usecases/parking_space_detection.py,sha256=1bZaspmzvJAggyr4Lk_hPX79xm6NFpGakAxbuqDnHb8,34524
188
188
  matrice/deploy/utils/post_processing/usecases/pedestrian_detection.py,sha256=hPFtvpWXXEsbDavmuiXIhrosMNlOhGya--jukT-ZOHA,39288
189
- matrice/deploy/utils/post_processing/usecases/people_counting.py,sha256=XcxuVmeNI7z3KvId5eg6bEm5KuGU4XoglX3qbkO3Tzo,74460
189
+ matrice/deploy/utils/post_processing/usecases/people_counting.py,sha256=FWVSRZCZ8_I2zg3oYVltvRfYUN1zOVcvEfyLldDybg8,74543
190
190
  matrice/deploy/utils/post_processing/usecases/plaque_segmentation_img.py,sha256=d__a0PkkObYVoC-Q5-2bFVfeyKnQHtB5xVAKVOCeFyk,41925
191
191
  matrice/deploy/utils/post_processing/usecases/pothole_segmentation.py,sha256=6Mv8SoEE5CGItY7S0g-SY5Lb3DV-WWVMlpEp04a86a8,43197
192
192
  matrice/deploy/utils/post_processing/usecases/ppe_compliance.py,sha256=koLwrPtLerXM9vV-Lk_nj3BWVzZXcGtenpFm79Rl7l0,30147
@@ -225,8 +225,8 @@ matrice/deployment/camera_manager.py,sha256=ReBZqm1CNXRImKcbcZ4uWAT3TUWkof1D28oB
225
225
  matrice/deployment/deployment.py,sha256=PLIUD-PxTaC2Zxb3Y12wUddsryV-OJetjCjLoSUh7S4,48103
226
226
  matrice/deployment/inference_pipeline.py,sha256=bXLgd29ViA7o0c7YWLFJl1otBUQfTPb61jS6VawQB0Y,37918
227
227
  matrice/deployment/streaming_gateway_manager.py,sha256=w5swGsuFVfZIdOm2ZuBHRHlRdYYJMLopLsf2gb91lQ8,20946
228
- matrice-1.0.99115.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
229
- matrice-1.0.99115.dist-info/METADATA,sha256=npu_m-toCfZ1TH3mMUYwpKPva0LDz_WUI1Be7f6tV1w,14624
230
- matrice-1.0.99115.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
231
- matrice-1.0.99115.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
232
- matrice-1.0.99115.dist-info/RECORD,,
228
+ matrice-1.0.99116.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
229
+ matrice-1.0.99116.dist-info/METADATA,sha256=xLrl6qYa_4PC3YckxRKmXfG12kIBxkyi81QPVCimV5A,14624
230
+ matrice-1.0.99116.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
231
+ matrice-1.0.99116.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
232
+ matrice-1.0.99116.dist-info/RECORD,,