matrice 1.0.99134__py3-none-any.whl → 1.0.99135__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.
@@ -31,7 +31,7 @@ class ConcreteCrackConfig(BaseConfig):
31
31
  smoothing_confidence_range_factor: float = 0.5
32
32
 
33
33
  #confidence thresholds
34
- confidence_threshold: float = 0.6
34
+ confidence_threshold: float = 0.2
35
35
 
36
36
  usecase_categories: List[str] = field(
37
37
  default_factory=lambda: ['Cracks']
@@ -55,6 +55,7 @@ class ConcreteCrackUseCase(BaseProcessor):
55
55
  CATEGORY_DISPLAY = {
56
56
  "Cracks": "Cracks",
57
57
  }
58
+
58
59
  def __init__(self):
59
60
  super().__init__("concrete_crack_detection")
60
61
  self.category = "general"
@@ -63,7 +64,7 @@ class ConcreteCrackUseCase(BaseProcessor):
63
64
  self.CASE_VERSION: Optional[str] = '1.3'
64
65
 
65
66
  # List of categories to track
66
- self.target_categories = ["Cracks"]
67
+ self.target_categories = ['Cracks']
67
68
 
68
69
  # Initialize smoothing tracker
69
70
  self.smoothing_tracker = None
@@ -106,6 +107,8 @@ class ConcreteCrackUseCase(BaseProcessor):
106
107
  input_format = match_results_structure(data)
107
108
  context.input_format = input_format
108
109
  context.confidence_threshold = config.confidence_threshold
110
+
111
+
109
112
 
110
113
  if config.confidence_threshold is not None:
111
114
  processed_data = filter_by_confidence(data, config.confidence_threshold)
@@ -114,15 +117,17 @@ class ConcreteCrackUseCase(BaseProcessor):
114
117
  processed_data = data
115
118
 
116
119
  self.logger.debug(f"Did not apply confidence filtering with threshold since nothing was provided")
117
-
120
+ print(processed_data)
118
121
  # Step 2: Apply category mapping if provided
119
122
  if config.index_to_category:
120
123
  processed_data = apply_category_mapping(processed_data, config.index_to_category)
121
124
  self.logger.debug("Applied category mapping")
122
-
125
+ print(processed_data)
123
126
  if config.target_categories:
124
127
  processed_data = [d for d in processed_data if d.get('category') in self.target_categories]
125
128
  self.logger.debug(f"Applied category filtering")
129
+
130
+ print(processed_data)
126
131
 
127
132
  # Apply bbox smoothing if enabled
128
133
  if config.enable_smoothing:
@@ -203,6 +208,7 @@ class ConcreteCrackUseCase(BaseProcessor):
203
208
  "human_text": summary}
204
209
  }
205
210
 
211
+
206
212
  context.mark_completed()
207
213
 
208
214
  # Build result object following the new pattern
@@ -348,7 +354,7 @@ class ConcreteCrackUseCase(BaseProcessor):
348
354
  human_text_lines.append(f"\tSeverity Level: {(self.CASE_TYPE,level)}")
349
355
  human_text = "\n".join(human_text_lines)
350
356
 
351
- alert_settings=[]
357
+ alert_settings = []
352
358
  if config.alert_config and hasattr(config.alert_config, 'alert_type'):
353
359
  alert_settings.append({
354
360
  "alert_type": getattr(config.alert_config, 'alert_type', ['Default']) if hasattr(config.alert_config, 'alert_type') else ['Default'],
@@ -369,7 +375,7 @@ class ConcreteCrackUseCase(BaseProcessor):
369
375
  else:
370
376
  self._ascending_alert_list.append(0)
371
377
  incidents.append({})
372
-
378
+
373
379
  return incidents
374
380
 
375
381
  def _generate_tracking_stats(
@@ -399,7 +405,7 @@ class ConcreteCrackUseCase(BaseProcessor):
399
405
  # Create high precision timestamps for input_timestamp and reset_timestamp
400
406
  high_precision_start_timestamp = self._get_current_timestamp_str(stream_info, precision=True)
401
407
  high_precision_reset_timestamp = self._get_start_timestamp_str(stream_info, precision=True)
402
- print(counting_summary)
408
+
403
409
 
404
410
  # Build total_counts array in expected format
405
411
  total_counts = []
@@ -409,7 +415,7 @@ class ConcreteCrackUseCase(BaseProcessor):
409
415
  "category": cat,
410
416
  "count": count
411
417
  })
412
- print(total_counts)
418
+
413
419
  # Build current_counts array in expected format
414
420
  current_counts = []
415
421
  for cat, count in per_category_count.items():
@@ -418,7 +424,7 @@ class ConcreteCrackUseCase(BaseProcessor):
418
424
  "category": cat,
419
425
  "count": count
420
426
  })
421
- print(current_counts)
427
+
422
428
  # Prepare detections without confidence scores (as per eg.json)
423
429
  detections = []
424
430
  for detection in counting_summary.get("detections", []):
@@ -450,7 +456,7 @@ class ConcreteCrackUseCase(BaseProcessor):
450
456
  getattr(config.alert_config, 'alert_value', ['JSON']) if hasattr(config.alert_config, 'alert_value') else ['JSON'])
451
457
  }
452
458
  })
453
-
459
+
454
460
  # Generate human_text in expected format
455
461
  human_text_lines = [f"Tracking Statistics:"]
456
462
  human_text_lines.append(f"CURRENT FRAME @ {current_timestamp}")
@@ -470,7 +476,7 @@ class ConcreteCrackUseCase(BaseProcessor):
470
476
  human_text_lines.append("Alerts: None")
471
477
 
472
478
  human_text = "\n".join(human_text_lines)
473
- reset_settings=[
479
+ reset_settings = [
474
480
  {
475
481
  "interval_type": "daily",
476
482
  "reset_time": {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrice
3
- Version: 1.0.99134
3
+ Version: 1.0.99135
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
@@ -166,7 +166,7 @@ matrice/deploy/utils/post_processing/usecases/chicken_pose_detection.py,sha256=-
166
166
  matrice/deploy/utils/post_processing/usecases/child_monitoring.py,sha256=z3oymoqq4hDGwA8MkdEONZW_Vx5CAZmvzZaNLsqmCfw,39380
167
167
  matrice/deploy/utils/post_processing/usecases/color_detection.py,sha256=Z8-akjy8a7f8YyiOzXu_Zi1Km30v-TRrymDqQOPpJ_8,43277
168
168
  matrice/deploy/utils/post_processing/usecases/color_map_utils.py,sha256=SP-AEVcjLmL8rxblu-ixqUJC2fqlcr7ab4hWo4Fcr_k,2677
169
- matrice/deploy/utils/post_processing/usecases/concrete_crack_detection.py,sha256=gz6uNgxwyJiB26zMUW-QBWMrP848co_SKwR__16cZcc,39359
169
+ matrice/deploy/utils/post_processing/usecases/concrete_crack_detection.py,sha256=s3B_oHfW2FWS1cayh-WYQ5KinRYDjwFwg6F55i9ktjo,39386
170
170
  matrice/deploy/utils/post_processing/usecases/crop_weed_detection.py,sha256=i7BWhC-D7liOg9fzFHFg_upd1fdvXlVHYzDRyHL-AdM,40322
171
171
  matrice/deploy/utils/post_processing/usecases/customer_service.py,sha256=UWS83qxguyAyhh8a0JF5QH9DtKxO8I-gI2BPOjLPxBw,44642
172
172
  matrice/deploy/utils/post_processing/usecases/defect_detection_products.py,sha256=flvTWv6vxa3q4zXD8_e8TW0pqNE5z3LIuvU9ceVKuXg,34481
@@ -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.99134.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
229
- matrice-1.0.99134.dist-info/METADATA,sha256=IHazSp5z936-2IMgf_wZ5_FCRrZhYg2nOWESl39C2ok,14624
230
- matrice-1.0.99134.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
231
- matrice-1.0.99134.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
232
- matrice-1.0.99134.dist-info/RECORD,,
228
+ matrice-1.0.99135.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
229
+ matrice-1.0.99135.dist-info/METADATA,sha256=26E4_zThZGeUPboye1ZuJ5GeHG_hI7MrPMN3KTdUMgU,14624
230
+ matrice-1.0.99135.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
231
+ matrice-1.0.99135.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
232
+ matrice-1.0.99135.dist-info/RECORD,,