matrice 1.0.99288__py3-none-any.whl → 1.0.99290__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.
@@ -374,6 +374,8 @@ class _RealTimeJsonEventPicker:
374
374
  """
375
375
  #incidents = frame_json.get("result").get("value").get("agg_summary")[str(frame_id)].get("incidents") or []
376
376
  incidents = frame_json.get("result").get("value").get("agg_apps")[0].get("agg_summary")[str(frame_id)].get("incidents") or []
377
+ if isinstance(incidents,list):
378
+ incidents = incidents[0]
377
379
  has_alerts = bool(incidents and incidents.get("alerts")[0])
378
380
 
379
381
  if has_alerts:
@@ -133,14 +133,14 @@ class CropWeedDetectionUseCase(BaseProcessor):
133
133
  input_format = match_results_structure(data)
134
134
 
135
135
  # DEBUG: Log raw input data
136
- print(f"Detected data: {data}")
136
+ # print(f"Detected data: {data}")
137
137
 
138
138
  # Normalize category names dynamically
139
139
  processed_data = [
140
140
  {**d, 'category': self._normalize_category(d.get('category'))}
141
141
  for d in data
142
142
  ]
143
- print(f"Data after category normalization: {processed_data}")
143
+ # print(f"Data after category normalization: {processed_data}")
144
144
 
145
145
  context.input_format = input_format
146
146
  context.confidence_threshold = config.confidence_threshold
@@ -157,13 +157,13 @@ class CropWeedDetectionUseCase(BaseProcessor):
157
157
  if config.index_to_category:
158
158
  processed_data = apply_category_mapping(processed_data, config.index_to_category)
159
159
  self.logger.debug("Applied category mapping")
160
- print(f"Detections after category mapping: {processed_data}")
160
+ # print(f"Detections after category mapping: {processed_data}")
161
161
 
162
162
  # Apply category filtering
163
163
  if config.target_categories:
164
164
  processed_data = [d for d in processed_data if d.get('category') in self.target_categories]
165
165
  self.logger.debug(f"Applied category filtering")
166
- print(f"Detections after category filtering: {processed_data}")
166
+ # print(f"Detections after category filtering: {processed_data}")
167
167
 
168
168
  # Apply bbox smoothing if enabled
169
169
  if config.enable_smoothing:
@@ -178,7 +178,7 @@ class CropWeedDetectionUseCase(BaseProcessor):
178
178
  )
179
179
  self.smoothing_tracker = BBoxSmoothingTracker(smoothing_config)
180
180
  processed_data = bbox_smoothing(processed_data, self.smoothing_tracker.config, self.smoothing_tracker)
181
- print(f"Processed data after smoothing: {processed_data}")
181
+ # print(f"Processed data after smoothing: {processed_data}")
182
182
 
183
183
  # Advanced tracking (BYTETracker-like)
184
184
  try:
@@ -200,7 +200,7 @@ class CropWeedDetectionUseCase(BaseProcessor):
200
200
  f"low={tracker_config.track_low_thresh}, new={tracker_config.new_track_thresh}"
201
201
  )
202
202
  processed_data = self.tracker.update(processed_data)
203
- print(f"Data after tracking: {processed_data}")
203
+ # print(f"Data after tracking: {processed_data}")
204
204
 
205
205
  except Exception as e:
206
206
  self.logger.warning(f"AdvancedTracker failed: {e}")
@@ -251,7 +251,7 @@ class CropWeedDetectionUseCase(BaseProcessor):
251
251
  context.mark_completed()
252
252
 
253
253
  # DEBUG: Log final summary
254
- print(f"Final aggregated summary: {agg_summary}")
254
+ # print(f"Final aggregated summary: {agg_summary}")
255
255
 
256
256
  result = self.create_result(
257
257
  data={"agg_summary": agg_summary},
@@ -1036,11 +1036,12 @@ class FireSmokeUseCase(BaseProcessor):
1036
1036
  self.id_hit_counter+=1
1037
1037
  if self.id_hit_counter>130:
1038
1038
  self.id_hit_list = ["low","medium","significant","critical","low"]
1039
+ pre_return_id = self.return_id_counter
1039
1040
  self.return_id_counter+=1
1040
1041
  self.id_hit_counter = 0
1041
1042
  self.latest_stack = None
1042
1043
  self.id_timing_list.append(self._get_current_timestamp_str(stream_info))
1043
- return (int(5),self.return_id_counter-1)
1044
+ return (int(5),pre_return_id)
1044
1045
  if sev_level==self.latest_stack:
1045
1046
  return (5-len(self.id_hit_list),self.return_id_counter)
1046
1047
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrice
3
- Version: 1.0.99288
3
+ Version: 1.0.99290
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
@@ -109,7 +109,7 @@ matrice/deploy/client/auto_streaming/auto_streaming.py,sha256=VRfy_EBFvhspN-hoN3
109
109
  matrice/deploy/client/auto_streaming/auto_streaming_utils.py,sha256=BuRUokLp3t43yzRF8YSX9p_RHQD94RoBwNEoldXFDQo,14995
110
110
  matrice/deploy/client/streaming_gateway/__init__.py,sha256=hkYC0qszaXZThquMuuI20Qkt_AHCB3pdy7jlJVeqPN4,1203
111
111
  matrice/deploy/client/streaming_gateway/streaming_gateway.py,sha256=r8Z5AXBom89n-8W5RTlB-nOeUaprxK-QBDsAb-E9gl8,19605
112
- matrice/deploy/client/streaming_gateway/streaming_gateway_utils.py,sha256=cFoKEf6iusht1GjuCV0ChESDKGwqVT99wAss-u85WJc,42623
112
+ matrice/deploy/client/streaming_gateway/streaming_gateway_utils.py,sha256=HhWHqFDTawmwDMV1wC7ircvUlDEASP-zq5O-EEg6kLg,42697
113
113
  matrice/deploy/client/streaming_gateway/streaming_results_handler.py,sha256=OpHkdbnuqVN28tQm9CYwrfgAth3Qz40Uaq5Tg4bbxyo,15813
114
114
  matrice/deploy/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
115
115
  matrice/deploy/server/server.py,sha256=duki4KUU1tvW3Y7wkrlMRVvt7bAP2QqSIsrSogLxC4o,36799
@@ -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=uATIX4ox7IfIkwhTXr8QGJHq45bJU7X33WKqewK1eJA,35680
176
+ matrice/deploy/utils/post_processing/usecases/crop_weed_detection.py,sha256=-K2d1YWrDsHIi0mk3fWvw5sVhqvS6zojsJCd3C2S2W4,35694
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=WL-SxVGHum7Pw6S_LzEQe_UE5ohhVpHcD-U19CKlpXo,50096
186
+ matrice/deploy/utils/post_processing/usecases/fire_detection.py,sha256=PDmpU9Rmd4b5f4umot2CmqLjGWVuFWhTDf7d9l_RDxY,50144
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.99288.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
248
- matrice-1.0.99288.dist-info/METADATA,sha256=aiw_WI8kYB5shpfV7viqMBdY7vql6EF2V6bjOLMWQhg,14624
249
- matrice-1.0.99288.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
250
- matrice-1.0.99288.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
251
- matrice-1.0.99288.dist-info/RECORD,,
247
+ matrice-1.0.99290.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
248
+ matrice-1.0.99290.dist-info/METADATA,sha256=Dh1rggztX-z8dOmPfxPM-QubxINQJWpKOAefOU_4vD0,14624
249
+ matrice-1.0.99290.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
250
+ matrice-1.0.99290.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
251
+ matrice-1.0.99290.dist-info/RECORD,,