matrice 1.0.99284__py3-none-any.whl → 1.0.99286__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.
@@ -122,11 +122,16 @@ class CropWeedDetectionUseCase(BaseProcessor):
122
122
 
123
123
  # DEBUG
124
124
  print(f"Detected data: {data}")
125
+
125
126
 
126
-
127
127
  context.input_format = input_format
128
128
  context.confidence_threshold = config.confidence_threshold
129
129
 
130
+ processed_data = [
131
+ {**d, 'category': self._normalize_category(d.get('category'))}
132
+ for d in data
133
+ ]
134
+
130
135
  if config.confidence_threshold is not None:
131
136
  processed_data = filter_by_confidence(data, config.confidence_threshold)
132
137
  self.logger.debug(f"Applied confidence filtering with threshold {config.confidence_threshold}")
@@ -322,6 +322,7 @@ class FireSmokeUseCase(BaseProcessor):
322
322
  count_thresholds = config.alert_config.count_thresholds or {}
323
323
 
324
324
  for category, threshold in count_thresholds.items():
325
+ alert_id = 1
325
326
  if category == "all" and total > threshold:
326
327
 
327
328
  alerts.append({
@@ -486,7 +487,7 @@ class FireSmokeUseCase(BaseProcessor):
486
487
  start_timestamp = self.id_timing_list[-1]
487
488
  if len(self.id_timing_list)>0 and len(self.id_timing_list)>4 and level=='critical':
488
489
  start_timestamp = self.id_timing_list[-1]
489
-
490
+ incident_id = 1
490
491
  alert_settings=[]
491
492
  if config.alert_config and hasattr(config.alert_config, 'alert_type'):
492
493
  alert_settings.append({
@@ -647,7 +648,7 @@ class FireSmokeUseCase(BaseProcessor):
647
648
  if last_ending_id==5:
648
649
  alerts=[{
649
650
  "alert_type": getattr(config.alert_config, 'alert_type', ['Default']) if hasattr(config.alert_config, 'alert_type') else ['Default'],
650
- "alert_id": "alert_"+'Event_Ended'+'_'+str(last_ending_id),
651
+ "alert_id": "alert_"+'Event_Ended'+'_'+str(1),
651
652
  "incident_category": self.CASE_TYPE,
652
653
  "threshold_level": 0,
653
654
  "ascending": False,
@@ -656,7 +657,7 @@ class FireSmokeUseCase(BaseProcessor):
656
657
  }
657
658
  }]
658
659
  tracking_stats.append(alerts)
659
- tracking_stats.append(self.create_incident(incident_id=self.CASE_TYPE+'_'+str(last_ending_id), incident_type=self.CASE_TYPE,
660
+ tracking_stats.append(self.create_incident(incident_id=self.CASE_TYPE+'_'+str(1), incident_type=self.CASE_TYPE,
660
661
  severity_level='info', human_text='Event Over', camera_info=camera_info, alerts=alerts, alert_settings=alert_settings,
661
662
  start_time=start_timestamp, end_time='Incident still active',
662
663
  level_settings= {"low": 3, "medium": 5, "significant":15, "critical": 30}))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrice
3
- Version: 1.0.99284
3
+ Version: 1.0.99286
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
@@ -173,7 +173,7 @@ matrice/deploy/utils/post_processing/usecases/child_monitoring.py,sha256=z3oymoq
173
173
  matrice/deploy/utils/post_processing/usecases/color_detection.py,sha256=Z8-akjy8a7f8YyiOzXu_Zi1Km30v-TRrymDqQOPpJ_8,43277
174
174
  matrice/deploy/utils/post_processing/usecases/color_map_utils.py,sha256=SP-AEVcjLmL8rxblu-ixqUJC2fqlcr7ab4hWo4Fcr_k,2677
175
175
  matrice/deploy/utils/post_processing/usecases/concrete_crack_detection.py,sha256=pxhOH_hG4hq9yytNepbGMdk2W_lTG8D1_2RAagaPBkg,40252
176
- matrice/deploy/utils/post_processing/usecases/crop_weed_detection.py,sha256=BUN04tq3hvWLLiWOLJGbEVRreScZ5NZoT9FVJs2IWrM,40554
176
+ matrice/deploy/utils/post_processing/usecases/crop_weed_detection.py,sha256=GUfbdZmaZfBAwceaSBwJaXzIVlIo3KMqry8LHO4diLU,40697
177
177
  matrice/deploy/utils/post_processing/usecases/customer_service.py,sha256=UWS83qxguyAyhh8a0JF5QH9DtKxO8I-gI2BPOjLPxBw,44642
178
178
  matrice/deploy/utils/post_processing/usecases/defect_detection_products.py,sha256=blvo4wmak-wlvPSZOcmRsV1FoZSeGX_dUAX5A1WheBE,45949
179
179
  matrice/deploy/utils/post_processing/usecases/distracted_driver_detection.py,sha256=rkyYHbmcYUAfKbmmKyKxHlk47vJ_fogHWKhQjrERsok,40316
@@ -183,7 +183,7 @@ matrice/deploy/utils/post_processing/usecases/face_emotion.py,sha256=eRfqBdryB0u
183
183
  matrice/deploy/utils/post_processing/usecases/face_recognition.py,sha256=T5xAuv6b9OrkmTmoXgZs4LZ5XUsbvp9xCpeLBwdu7eI,40231
184
184
  matrice/deploy/utils/post_processing/usecases/fashion_detection.py,sha256=f9gpzMDhIW-gyn46k9jgf8nY7YeoqAnTxGOzksabFbE,40457
185
185
  matrice/deploy/utils/post_processing/usecases/field_mapping.py,sha256=JDwYX8pd2W-waDvBh98Y_o_uchJu7wEYbFxOliA4Iq4,39822
186
- matrice/deploy/utils/post_processing/usecases/fire_detection.py,sha256=LQkb9NXk6WAiHJfUlW0O9fuLq3HZQy7aBg4kD08APvg,49626
186
+ matrice/deploy/utils/post_processing/usecases/fire_detection.py,sha256=G1aB4trwc-nnMxBsg34jkFU70QmTQAuxK1mY6nuTabs,49664
187
187
  matrice/deploy/utils/post_processing/usecases/flare_analysis.py,sha256=-egmS3Hs_iGOLeCMfapbkfQ04EWtZx97QRuUcDa-jMU,45340
188
188
  matrice/deploy/utils/post_processing/usecases/flower_segmentation.py,sha256=4I7qMx9Ztxg_hy9KTVX-3qBhAN-QwDt_Yigf9fFjLus,52017
189
189
  matrice/deploy/utils/post_processing/usecases/gas_leak_detection.py,sha256=KL2ft7fXvjTas-65-QgcJm3W8KBsrwF44qibSXjfaLc,40557
@@ -244,8 +244,8 @@ matrice/deployment/camera_manager.py,sha256=e1Lc81RJP5wUWRdTgHO6tMWF9BkBdHOSVyx3
244
244
  matrice/deployment/deployment.py,sha256=HFt151eWq6iqIAMsQvurpV2WNxW6Cx_gIUVfnVy5SWE,48093
245
245
  matrice/deployment/inference_pipeline.py,sha256=6b4Mm3-qt-Zy0BeiJfFQdImOn3FzdNCY-7ET7Rp8PMk,37911
246
246
  matrice/deployment/streaming_gateway_manager.py,sha256=ifYGl3g25wyU39HwhPQyI2OgF3M6oIqKMWt8RXtMxY8,21401
247
- matrice-1.0.99284.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
248
- matrice-1.0.99284.dist-info/METADATA,sha256=PoB6MxYWe572xqL_-ebMRdL986GhB0mBqHiodyeNHj4,14624
249
- matrice-1.0.99284.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
250
- matrice-1.0.99284.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
251
- matrice-1.0.99284.dist-info/RECORD,,
247
+ matrice-1.0.99286.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
248
+ matrice-1.0.99286.dist-info/METADATA,sha256=2cKToW_ZvMOC-aDa_ZyzU05PYxIEWJeAfoZJIx-Khu4,14624
249
+ matrice-1.0.99286.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
250
+ matrice-1.0.99286.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
251
+ matrice-1.0.99286.dist-info/RECORD,,