matrice 1.0.99273__py3-none-any.whl → 1.0.99274__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.
@@ -319,7 +319,7 @@ class OutputConfig:
319
319
  class _RealTimeJsonEventPicker:
320
320
  """Stateful helper that replicates the original logic but works one frame at a time."""
321
321
 
322
- def __init__(self, consecutive_threshold: int = 7, end_threshold: int = 120):
322
+ def __init__(self, consecutive_threshold: int = 7, end_threshold: int = 130):
323
323
  # Required sequence of severities
324
324
  self._base_sequence: List[str] = ["low", "medium", "significant", "critical", "low"]
325
325
  self._sequence: deque[str] = deque(self._base_sequence)
@@ -313,6 +313,8 @@ class FireSmokeUseCase(BaseProcessor):
313
313
  # Safely fetch the last recorded severity level as a **string** (empty if no history yet)
314
314
  last_level = self._ascending_alert_list[-1] if self._ascending_alert_list else "low"
315
315
  alert_id = self._get_alert_incident_ids(last_level)
316
+ if alert_id not in [1,2,3,4,5]:
317
+ alert_id = 4
316
318
 
317
319
  count_thresholds = {}
318
320
  if config.alert_config and hasattr(config.alert_config, "count_thresholds"):
@@ -443,6 +445,7 @@ class FireSmokeUseCase(BaseProcessor):
443
445
  elif intensity_pct >= 13:
444
446
  level = "significant"
445
447
  self._ascending_alert_list.append(level)
448
+ self.current_incident_end_timestamp='Incident still active'
446
449
  elif intensity_pct >= 3:
447
450
  level = "medium"
448
451
  self._ascending_alert_list.append(level)
@@ -457,6 +460,7 @@ class FireSmokeUseCase(BaseProcessor):
457
460
  elif intensity_pct > 12:
458
461
  level = "significant"
459
462
  intensity = 9.0
463
+ self.current_incident_end_timestamp='Incident still active'
460
464
  self._ascending_alert_list.append(level)
461
465
  elif intensity_pct > 2:
462
466
  level = "medium"
@@ -475,6 +479,8 @@ class FireSmokeUseCase(BaseProcessor):
475
479
  # Pass the last severity level **value** instead of a single-element list
476
480
  last_level = level if level else self._ascending_alert_list[-1]
477
481
  incident_id = self._get_alert_incident_ids(last_level)
482
+ if incident_id not in [1,2,3,4,5]:
483
+ incident_id = 4
478
484
 
479
485
  alert_settings=[]
480
486
  if config.alert_config and hasattr(config.alert_config, 'alert_type'):
@@ -632,16 +638,17 @@ class FireSmokeUseCase(BaseProcessor):
632
638
  last_ending_id = self._get_alert_incident_ids("")
633
639
  print('last_ending_id',last_ending_id)
634
640
  if last_ending_id==5:
635
- tracking_stats.append({
641
+ alerts={
636
642
  "alert_type": getattr(config.alert_config, 'alert_type', ['Default']) if hasattr(config.alert_config, 'alert_type') else ['Default'],
637
- "alert_id": "alert_"+category+'_'+str(last_ending_id),
643
+ "alert_id": "alert_"+'Event_Ended'+'_'+str(last_ending_id),
638
644
  "incident_category": self.CASE_TYPE,
639
645
  "threshold_level": 0,
640
646
  "ascending": False,
641
647
  "settings": {t: v for t, v in zip(getattr(config.alert_config, 'alert_type', ['Default']) if hasattr(config.alert_config, 'alert_type') else ['Default'],
642
648
  getattr(config.alert_config, 'alert_value', ['JSON']) if hasattr(config.alert_config, 'alert_value') else ['JSON'])
643
649
  }
644
- })
650
+ }
651
+ tracking_stats.append(alerts)
645
652
  tracking_stats.append(self.create_incident(incident_id=self.CASE_TYPE+'_'+str(last_ending_id), incident_type=self.CASE_TYPE,
646
653
  severity_level='info', human_text='Event Over', camera_info=camera_info, alerts=alerts, alert_settings=alert_settings,
647
654
  start_time=start_timestamp, end_time='Incident still active',
@@ -1016,7 +1023,7 @@ class FireSmokeUseCase(BaseProcessor):
1016
1023
  else:
1017
1024
  if len(self.id_hit_list)==1:
1018
1025
  self.id_hit_counter+=1
1019
- if self.id_hit_counter>120:
1026
+ if self.id_hit_counter>130:
1020
1027
  self.id_hit_list = ["low","medium","significant","critical","low"]
1021
1028
  self.id_hit_counter = 0
1022
1029
  self.latest_stack = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrice
3
- Version: 1.0.99273
3
+ Version: 1.0.99274
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
@@ -108,7 +108,7 @@ matrice/deploy/client/auto_streaming/auto_streaming.py,sha256=VRfy_EBFvhspN-hoN3
108
108
  matrice/deploy/client/auto_streaming/auto_streaming_utils.py,sha256=BuRUokLp3t43yzRF8YSX9p_RHQD94RoBwNEoldXFDQo,14995
109
109
  matrice/deploy/client/streaming_gateway/__init__.py,sha256=hkYC0qszaXZThquMuuI20Qkt_AHCB3pdy7jlJVeqPN4,1203
110
110
  matrice/deploy/client/streaming_gateway/streaming_gateway.py,sha256=r8Z5AXBom89n-8W5RTlB-nOeUaprxK-QBDsAb-E9gl8,19605
111
- matrice/deploy/client/streaming_gateway/streaming_gateway_utils.py,sha256=znNZkzG9W7VeZPKUxzgxHiW1GqvD-oA-McZSnMiBm1E,42144
111
+ matrice/deploy/client/streaming_gateway/streaming_gateway_utils.py,sha256=_fJl0ry2O8UkEwHpufNdJ68EAkWAAN7moGbBLJtPQeE,42144
112
112
  matrice/deploy/client/streaming_gateway/streaming_results_handler.py,sha256=OpHkdbnuqVN28tQm9CYwrfgAth3Qz40Uaq5Tg4bbxyo,15813
113
113
  matrice/deploy/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
114
114
  matrice/deploy/server/server.py,sha256=duki4KUU1tvW3Y7wkrlMRVvt7bAP2QqSIsrSogLxC4o,36799
@@ -182,7 +182,7 @@ matrice/deploy/utils/post_processing/usecases/face_emotion.py,sha256=eRfqBdryB0u
182
182
  matrice/deploy/utils/post_processing/usecases/face_recognition.py,sha256=T5xAuv6b9OrkmTmoXgZs4LZ5XUsbvp9xCpeLBwdu7eI,40231
183
183
  matrice/deploy/utils/post_processing/usecases/fashion_detection.py,sha256=f9gpzMDhIW-gyn46k9jgf8nY7YeoqAnTxGOzksabFbE,40457
184
184
  matrice/deploy/utils/post_processing/usecases/field_mapping.py,sha256=JDwYX8pd2W-waDvBh98Y_o_uchJu7wEYbFxOliA4Iq4,39822
185
- matrice/deploy/utils/post_processing/usecases/fire_detection.py,sha256=iGsTciE54AnuGf8tDmgIIAXpuCyFTcU_qOTRPsxo2gA,48549
185
+ matrice/deploy/utils/post_processing/usecases/fire_detection.py,sha256=8GMabLpVFWCSHULdjO8V_fCPqz9hf9pyAu2n-vuLg7A,48936
186
186
  matrice/deploy/utils/post_processing/usecases/flare_analysis.py,sha256=-egmS3Hs_iGOLeCMfapbkfQ04EWtZx97QRuUcDa-jMU,45340
187
187
  matrice/deploy/utils/post_processing/usecases/flower_segmentation.py,sha256=4I7qMx9Ztxg_hy9KTVX-3qBhAN-QwDt_Yigf9fFjLus,52017
188
188
  matrice/deploy/utils/post_processing/usecases/gas_leak_detection.py,sha256=KL2ft7fXvjTas-65-QgcJm3W8KBsrwF44qibSXjfaLc,40557
@@ -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.99273.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
247
- matrice-1.0.99273.dist-info/METADATA,sha256=Zu1ooyc7gmPiF9mrhwDdcRn2wewobwm1aXdxTN9ZKnk,14624
248
- matrice-1.0.99273.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
249
- matrice-1.0.99273.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
250
- matrice-1.0.99273.dist-info/RECORD,,
246
+ matrice-1.0.99274.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
247
+ matrice-1.0.99274.dist-info/METADATA,sha256=8l_cz4_KBhm5bJ3K9MQQBUyeQ-NuVS3UQU2A0I5oHTI,14624
248
+ matrice-1.0.99274.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
249
+ matrice-1.0.99274.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
250
+ matrice-1.0.99274.dist-info/RECORD,,