matrice 1.0.99160__py3-none-any.whl → 1.0.99162__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.
@@ -40,7 +40,10 @@ class FireSmokeConfig(BaseConfig):
40
40
 
41
41
  # Only fire and smoke categories included here (exclude normal)
42
42
  fire_smoke_categories: List[str] = field(
43
- default_factory=lambda: ["Fire", "Smoke"]
43
+ default_factory=lambda: ["fire", "smoke"]
44
+ )
45
+ target_categories: List[str] = field(
46
+ default_factory=lambda: ['fire']
44
47
  )
45
48
 
46
49
  alert_config: Optional[AlertConfig] = None
@@ -51,8 +54,8 @@ class FireSmokeConfig(BaseConfig):
51
54
  # Map only fire and smoke; ignore normal (index 1 not included)
52
55
  index_to_category: Optional[Dict[int, str]] = field(
53
56
  default_factory=lambda: {
54
- 0: "Fire",
55
- 1: "Smoke",
57
+ 0: "fire",
58
+ 1: "smoke",
56
59
  }
57
60
  )
58
61
 
@@ -72,6 +75,8 @@ class FireSmokeConfig(BaseConfig):
72
75
  self.fire_smoke_categories = [cat.lower() for cat in self.fire_smoke_categories]
73
76
  if self.index_to_category:
74
77
  self.index_to_category = {k: v.lower() for k, v in self.index_to_category.items()}
78
+ if self.target_categories:
79
+ self.target_categories = [cat.lower() for cat in self.target_categories]
75
80
 
76
81
 
77
82
 
@@ -87,6 +92,7 @@ class FireSmokeUseCase(BaseProcessor):
87
92
 
88
93
  self.smoothing_tracker = None # Required for bbox smoothing
89
94
  self._fire_smoke_recent_history = []
95
+ self.target_categories=['fire']
90
96
 
91
97
  self._ascending_alert_list: List[int] = []
92
98
  self.current_incident_end_timestamp: str = "N/A"
@@ -132,6 +138,10 @@ class FireSmokeUseCase(BaseProcessor):
132
138
  processed_data = apply_category_mapping(processed_data, config.index_to_category)
133
139
  self.logger.debug("Applied category mapping")
134
140
 
141
+ if self.target_categories:
142
+ processed_data = [d for d in processed_data if d.get('category').lower() in self.target_categories]
143
+ self.logger.debug(f"Applied category filtering")
144
+
135
145
  # Step 3.5: BBox smoothing for fire/smoke
136
146
  if config.enable_smoothing:
137
147
  if self.smoothing_tracker is None:
@@ -177,6 +187,8 @@ class FireSmokeUseCase(BaseProcessor):
177
187
  frame_number = start_frame
178
188
 
179
189
  # Step 7: alerts
190
+ print("-----------ALERT_PROCESSING_IPP-----------")
191
+ print(fire_smoke_summary)
180
192
  alerts = self._check_alerts(fire_smoke_summary, frame_number, config, stream_info)
181
193
 
182
194
 
@@ -587,7 +599,7 @@ class FireSmokeUseCase(BaseProcessor):
587
599
  ]
588
600
  counts = {}
589
601
  for det in detections:
590
- cat = det.get('category', 'unknown')
602
+ cat = det.get('category', 'unknown').lower()
591
603
  counts[cat] = counts.get(cat, 0) + 1
592
604
 
593
605
 
@@ -715,7 +727,7 @@ class FireSmokeUseCase(BaseProcessor):
715
727
  "fire_smoke_categories": {
716
728
  "type": "array",
717
729
  "items": {"type": "string"},
718
- "default": ["Fire", "Smoke"],
730
+ "default": ["fire", "smoke"],
719
731
  "description": "Category names that represent fire and smoke",
720
732
  },
721
733
  "index_to_category": {
@@ -743,8 +755,8 @@ class FireSmokeUseCase(BaseProcessor):
743
755
  defaults = {
744
756
  "category": self.category,
745
757
  "usecase": self.name,
746
- "confidence_threshold": 0.5,
747
- "fire_smoke_categories": ["Fire", "Smoke"],
758
+ "confidence_threshold": 0.3,
759
+ "fire_smoke_categories": ["fire", "smoke"],
748
760
  }
749
761
  defaults.update(overrides)
750
762
  return FireSmokeConfig(**defaults)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrice
3
- Version: 1.0.99160
3
+ Version: 1.0.99162
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
@@ -175,7 +175,7 @@ matrice/deploy/utils/post_processing/usecases/emergency_vehicle_detection.py,sha
175
175
  matrice/deploy/utils/post_processing/usecases/face_emotion.py,sha256=eRfqBdryB0uNoOlz_y-JMuZL1BhPWrI-odqgx_9LT7s,39132
176
176
  matrice/deploy/utils/post_processing/usecases/fashion_detection.py,sha256=f9gpzMDhIW-gyn46k9jgf8nY7YeoqAnTxGOzksabFbE,40457
177
177
  matrice/deploy/utils/post_processing/usecases/field_mapping.py,sha256=JDwYX8pd2W-waDvBh98Y_o_uchJu7wEYbFxOliA4Iq4,39822
178
- matrice/deploy/utils/post_processing/usecases/fire_detection.py,sha256=KU-6LEC7TNxbpASzRTUs1i44GKKe2eMvxIR8x7bFQCc,41293
178
+ matrice/deploy/utils/post_processing/usecases/fire_detection.py,sha256=Tj4Ih19Res1-b5eA_nwjvHSDMrhIkdI3mzUlhfODhR8,41877
179
179
  matrice/deploy/utils/post_processing/usecases/flare_analysis.py,sha256=-egmS3Hs_iGOLeCMfapbkfQ04EWtZx97QRuUcDa-jMU,45340
180
180
  matrice/deploy/utils/post_processing/usecases/flower_segmentation.py,sha256=4I7qMx9Ztxg_hy9KTVX-3qBhAN-QwDt_Yigf9fFjLus,52017
181
181
  matrice/deploy/utils/post_processing/usecases/gender_detection.py,sha256=DEnCTRew6B7DtPcBQVCTtpd_IQMvMusBcu6nadUg2oM,40107
@@ -227,8 +227,8 @@ matrice/deployment/camera_manager.py,sha256=ReBZqm1CNXRImKcbcZ4uWAT3TUWkof1D28oB
227
227
  matrice/deployment/deployment.py,sha256=PLIUD-PxTaC2Zxb3Y12wUddsryV-OJetjCjLoSUh7S4,48103
228
228
  matrice/deployment/inference_pipeline.py,sha256=bXLgd29ViA7o0c7YWLFJl1otBUQfTPb61jS6VawQB0Y,37918
229
229
  matrice/deployment/streaming_gateway_manager.py,sha256=w5swGsuFVfZIdOm2ZuBHRHlRdYYJMLopLsf2gb91lQ8,20946
230
- matrice-1.0.99160.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
231
- matrice-1.0.99160.dist-info/METADATA,sha256=hsoq2uDW91xQqRhRCM0oV6esy5qMVpnjQZrcP1Myr34,14624
232
- matrice-1.0.99160.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
233
- matrice-1.0.99160.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
234
- matrice-1.0.99160.dist-info/RECORD,,
230
+ matrice-1.0.99162.dist-info/licenses/LICENSE.txt,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
231
+ matrice-1.0.99162.dist-info/METADATA,sha256=7pUyVwAcw_onkhGFXYkqjFhVnNrDhIWFRlLsXV-sZok,14624
232
+ matrice-1.0.99162.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
233
+ matrice-1.0.99162.dist-info/top_level.txt,sha256=P97js8ur6o5ClRqMH3Cjoab_NqbJ6sOQ3rJmVzKBvMc,8
234
+ matrice-1.0.99162.dist-info/RECORD,,