matrice 1.0.99145__py3-none-any.whl → 1.0.99147__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.
@@ -71,11 +71,13 @@ from .usecases.license_plate_detection import LicensePlateConfig
71
71
  from .usecases.pothole_segmentation import PotholeConfig
72
72
  from .usecases.wound_segmentation import WoundConfig, WoundSegmentationUseCase
73
73
  from .usecases.face_emotion import FaceEmotionConfig
74
+ from .usecases.pipeline_detection import PipelineDetectionUseCase
74
75
  from .usecases.parking_space_detection import ParkingSpaceConfig
75
76
  from .usecases.underwater_pollution_detection import UnderwaterPlasticConfig
76
77
  from .usecases.pedestrian_detection import PedestrianDetectionConfig
77
78
  from .usecases.age_detection import AgeDetectionConfig
78
79
  from .usecases.mask_detection import MaskDetectionConfig
80
+ from .usecases.pipeline_detection import PipelineDetectionConfig
79
81
  from .usecases.chicken_pose_detection import ChickenPoseDetectionConfig
80
82
  from .usecases.field_mapping import FieldMappingConfig, FieldMappingUseCase
81
83
  from .usecases.leaf_disease import LeafDiseaseDetectionConfig, LeafDiseaseDetectionUseCase
@@ -117,6 +119,7 @@ from .usecases.leaf import LeafConfig, LeafUseCase
117
119
  from .usecases.blood_cancer_detection_img import BloodCancerDetectionConfig, BloodCancerDetectionUseCase
118
120
  from .usecases.skin_cancer_classification_img import SkinCancerClassificationConfig, SkinCancerClassificationUseCase
119
121
  from .usecases.plaque_segmentation_img import PlaqueSegmentationConfig, PlaqueSegmentationUseCase
122
+ from .usecases.smoker_detection import SmokerDetectionUseCase, SmokerDetectionConfig
120
123
 
121
124
  # Use case implementations
122
125
  from .usecases import (
@@ -168,6 +171,7 @@ from .usecases import (
168
171
  WindmillMaintenanceUseCase,
169
172
  CarPartSegmentationUseCase,
170
173
  FlowerUseCase,
174
+ SmokerDetectionUseCase,
171
175
 
172
176
  #Put all IMAGE based usecases here
173
177
  BloodCancerDetectionUseCase,
@@ -193,6 +197,7 @@ _underwater_pollution_detection = UnderwaterPlasticUseCase()
193
197
  _pedestrian_detection = PedestrianDetectionUseCase()
194
198
  _age_detection = AgeDetectionUseCase()
195
199
  _mask_detection = MaskDetectionUseCase()
200
+ _pipeline_detection = PipelineDetectionUseCase()
196
201
  _banana_defect_detection = BananaMonitoringUseCase()
197
202
  _chicken_pose_detection = ChickenPoseDetectionUseCase()
198
203
  _theft_detection = TheftDetectionUseCase()
@@ -230,6 +235,7 @@ _wound_segmentation = WoundSegmentationUseCase()
230
235
  _leaf_disease = LeafDiseaseDetectionUseCase()
231
236
  _flower_segmentation = FlowerUseCase()
232
237
  _leaf_det = LeafUseCase()
238
+ _smoker_detection = SmokerDetectionUseCase()
233
239
 
234
240
  #Put all IMAGE based usecases here
235
241
  _blood_cancer_detection = BloodCancerDetectionUseCase()
@@ -256,6 +262,7 @@ registry.register_use_case(_age_detection.category, _age_detection.name, AgeDete
256
262
  registry.register_use_case(_pricetag_detection.category, _pricetag_detection.name, PriceTagUseCase)
257
263
  registry.register_use_case(_weld_defect_detection.category, _weld_defect_detection.name, WeldDefectUseCase )
258
264
  registry.register_use_case(_mask_detection.category, _mask_detection.name, MaskDetectionUseCase)
265
+ registry.register_use_case(_pipeline_detection.category, _pipeline_detection.name, PipelineDetectionUseCase)
259
266
  registry.register_use_case(_banana_defect_detection.category, _banana_defect_detection.name, BananaMonitoringUseCase)
260
267
  registry.register_use_case(_chicken_pose_detection.category, _chicken_pose_detection.name, ChickenPoseDetectionUseCase)
261
268
  registry.register_use_case(_theft_detection.category, _theft_detection.name, TheftDetectionUseCase)
@@ -293,6 +300,7 @@ registry.register_use_case(_leaf_disease.category, _leaf_disease.name, LeafDisea
293
300
  registry.register_use_case(_flower_segmentation.category, _flower_segmentation.name, FlowerUseCase)
294
301
  registry.register_use_case(_parking_det.category, _parking_det.name, ParkingUseCase)
295
302
  registry.register_use_case(_leaf_det.category, _leaf_det.name, LeafUseCase)
303
+ registry.register_use_case(_smoker_detection.category, _smoker_detection.name, SmokerDetectionUseCase)
296
304
 
297
305
  #Put all IMAGE based usecases here
298
306
  registry.register_use_case(_blood_cancer_detection.category, _blood_cancer_detection.name, BloodCancerDetectionUseCase)
@@ -479,6 +487,7 @@ __all__ = [
479
487
  'LaneDetectionConfig',
480
488
  'WindmillMaintenanceConfig',
481
489
  'FlowerConfig',
490
+ 'SmokerDetectionConfig',
482
491
 
483
492
  #Put all IMAGE based usecase CONFIGS here
484
493
  'BloodCancerDetectionConfig',
@@ -536,6 +545,7 @@ __all__ = [
536
545
  'LaneDetectionUseCase',
537
546
  'WindmillMaintenanceUseCase',
538
547
  'FlowerUseCase',
548
+ 'SmokerDetectionUseCase',
539
549
 
540
550
  #Put all IMAGE based usecases here
541
551
  'BloodCancerDetectionUseCase',
@@ -1,6 +1,7 @@
1
1
  APP_NAME_TO_USECASE = {
2
2
  "people_counting": "people_counting",
3
3
  "mask_detection": "mask_detection",
4
+ "pipeline_detection": "pipeline_detection",
4
5
  "vehicle_monitoring": "vehicle_monitoring",
5
6
  "vehicle_type_monitoring": "vehicle_monitoring",
6
7
  "weapon_detection": "weapon_detection",
@@ -28,11 +29,13 @@ APP_NAME_TO_USECASE = {
28
29
  "concrete_crack_detection": "concrete_crack_detection",
29
30
  "lane_detection" : "lane_detection",
30
31
  "shelf_inventory" :"shelf_inventory",
32
+ "smoker_detection": "smoker_detection"
31
33
  }
32
34
 
33
35
  APP_NAME_TO_CATEGORY = {
34
36
  "people_counting": "general",
35
37
  "mask_detection": "mask_detection",
38
+ "pipeline_detection": "pipeline_detection",
36
39
  "vehicle_monitoring": "traffic",
37
40
  "vehicle_type_monitoring": "traffic",
38
41
  "weapon_detection": "security",
@@ -60,6 +63,7 @@ APP_NAME_TO_CATEGORY = {
60
63
  "concrete_crack_detection": "general",
61
64
  "lane_detection" : "traffic",
62
65
  "shelf_inventory" : "retail",
66
+ "smoker_detection": "general"
63
67
  }
64
68
 
65
69
  def get_usecase_from_app_name(app_name: str) -> str:
@@ -415,6 +415,7 @@ class ConfigManager:
415
415
  "fire_smoke_detection": None,
416
416
  "flare_analysis" : None,
417
417
  "mask_detection": None,
418
+ "pipeline_detection": None,
418
419
  "parking_space_detection": None,
419
420
  "car_damage_detection":None,
420
421
  "weld_defect_detection" : None,
@@ -447,6 +448,7 @@ class ConfigManager:
447
448
  'windmill_maintenance': None,
448
449
  'face_emotion': None,
449
450
  'flower_segmentation': None,
451
+ 'smoker_detection': None,
450
452
 
451
453
  #Put all image based usecases here::
452
454
  'blood_cancer_detection_img': None,
@@ -592,6 +594,7 @@ class ConfigManager:
592
594
  return ParkingSpaceConfig
593
595
  except ImportError:
594
596
  return None
597
+
595
598
  def _get_mask_detection_config_class(self):
596
599
  """Register a configuration class for a use case."""
597
600
  try:
@@ -600,6 +603,14 @@ class ConfigManager:
600
603
  except ImportError:
601
604
  return None
602
605
 
606
+ def _get_pipeline_detection_config_class(self):
607
+ """Register a configuration class for a use case."""
608
+ try:
609
+ from ..usecases.pipeline_detection import PipelineDetectionConfig
610
+ return PipelineDetectionConfig
611
+ except ImportError:
612
+ return None
613
+
603
614
  def _get_pothole_segmentation_config_class(self):
604
615
  """Register a configuration class for a use case."""
605
616
  try:
@@ -784,6 +795,14 @@ class ConfigManager:
784
795
  except ImportError:
785
796
  return None
786
797
 
798
+ def smoker_detection_config_class(self):
799
+ """Register a configuration class for a use case."""
800
+ try:
801
+ from ..usecases.smoker_detection import SmokerDetectionConfig
802
+ return SmokerDetectionConfig
803
+ except ImportError:
804
+ return None
805
+
787
806
  #put all image based usecases here::
788
807
  def blood_cancer_detection_config_class(self):
789
808
  """Register a configuration class for a use case."""
@@ -972,6 +991,19 @@ class ConfigManager:
972
991
  alert_config=alert_config,
973
992
  **kwargs
974
993
  )
994
+ elif usecase == "pipeline_detection":
995
+ from ..usecases.pipeline_detection import PipelineDetectionConfig
996
+
997
+ alert_config = kwargs.pop("alert_config", None)
998
+ if alert_config and isinstance(alert_config, dict):
999
+ alert_config = AlertConfig(**alert_config)
1000
+
1001
+ config = PipelineDetectionConfig(
1002
+ category=category or "pipeline_detection",
1003
+ usecase=usecase,
1004
+ alert_config=alert_config,
1005
+ **kwargs
1006
+ )
975
1007
  elif usecase == "shoplifting_detection":
976
1008
  # Import here to avoid circular import
977
1009
  from ..usecases.shoplifting_detection import ShopliftingDetectionConfig
@@ -1595,6 +1627,22 @@ class ConfigManager:
1595
1627
  alert_config=alert_config,
1596
1628
  **kwargs
1597
1629
  )
1630
+
1631
+ elif usecase == "smoker_detection":
1632
+ # Import here to avoid circular import
1633
+ from ..usecases.smoker_detection import SmokerDetectionConfig
1634
+
1635
+ # Handle nested configurations
1636
+ alert_config = kwargs.pop("alert_config", None)
1637
+ if alert_config and isinstance(alert_config, dict):
1638
+ alert_config = AlertConfig(**alert_config)
1639
+
1640
+ config = SmokerDetectionConfig(
1641
+ category=category or "general",
1642
+ usecase=usecase,
1643
+ alert_config=alert_config,
1644
+ **kwargs
1645
+ )
1598
1646
 
1599
1647
 
1600
1648
  #Add IMAGE based usecases here::
@@ -1759,6 +1807,11 @@ class ConfigManager:
1759
1807
  from ..usecases.mask_detection import MaskDetectionConfig
1760
1808
  default_config = MaskDetectionConfig()
1761
1809
  return default_config.to_dict()
1810
+
1811
+ elif usecase == "pipeline_detection":
1812
+ from ..usecases.pipeline_detection import PipelineDetectionConfig
1813
+ default_config = PipelineDetectionConfig()
1814
+ return default_config.to_dict()
1762
1815
 
1763
1816
  elif usecase == "fire_smoke_detection":
1764
1817
  # Import here to avoid circular import
@@ -1975,6 +2028,11 @@ class ConfigManager:
1975
2028
  from ..usecases.flower_segmentation import FlowerConfig
1976
2029
  default_config = FlowerConfig()
1977
2030
  return default_config.to_dict()
2031
+ elif usecase == "smoker_detection":
2032
+ # Import here to avoid circular import
2033
+ from ..usecases.smoker_detection import SmokerDetectionConfig
2034
+ default_config = SmokerDetectionConfig()
2035
+ return default_config.to_dict()
1978
2036
 
1979
2037
  #Add all image based usecases here
1980
2038
  elif usecase == "blood_cancer_detection_img":
@@ -51,6 +51,7 @@ from .usecases import (
51
51
  ParkingUseCase,
52
52
  FaceEmotionUseCase,
53
53
  UnderwaterPlasticUseCase,
54
+ PipelineDetectionUseCase,
54
55
  PedestrianDetectionUseCase,
55
56
  ChickenPoseDetectionUseCase,
56
57
  TheftDetectionUseCase,
@@ -82,6 +83,7 @@ from .usecases import (
82
83
  CarPartSegmentationUseCase,
83
84
  WindmillMaintenanceUseCase,
84
85
  FlowerUseCase,
86
+ SmokerDetectionUseCase,
85
87
 
86
88
  #Put all IMAGE based usecases here
87
89
  BloodCancerDetectionUseCase,
@@ -175,6 +177,7 @@ class PostProcessor:
175
177
  registry.register_use_case("weld", "weld_defect_detection", WeldDefectUseCase)
176
178
  registry.register_use_case("price_tag", "price_tag_detection", PriceTagUseCase)
177
179
  registry.register_use_case("mask_detection", "mask_detection", MaskDetectionUseCase)
180
+ registry.register_use_case("pipeline_detection", "pipeline_detection", PipelineDetectionUseCase)
178
181
  registry.register_use_case("automobile", "distracted_driver_detection", DistractedDriverUseCase)
179
182
  registry.register_use_case("traffic", "emergency_vehicle_detection", EmergencyVehicleUseCase)
180
183
  registry.register_use_case("energy", "solar_panel", SolarPanelUseCase)
@@ -202,6 +205,7 @@ class PostProcessor:
202
205
  registry.register_use_case("agriculture", "flower_segmentation", FlowerUseCase)
203
206
  registry.register_use_case("general", "parking_det", ParkingUseCase)
204
207
  registry.register_use_case("agriculture", "leaf_det", LeafUseCase)
208
+ registry.register_use_case("general", "smoker_detection", SmokerDetectionUseCase)
205
209
 
206
210
  #Put all IMAGE based usecases here
207
211
  registry.register_use_case("healthcare", "bloodcancer_img_detection", BloodCancerDetectionUseCase)
@@ -352,8 +356,8 @@ class PostProcessor:
352
356
  result = use_case.process(data, parsed_config, context, stream_info)
353
357
  elif isinstance(use_case, LeafUseCase):
354
358
  result = use_case.process(data, parsed_config, context, stream_info)
355
-
356
-
359
+ elif isinstance(use_case, SmokerDetectionUseCase):
360
+ result = use_case.process(data, parsed_config, context, stream_info)
357
361
 
358
362
 
359
363
  #Put all IMAGE based usecases here
@@ -28,6 +28,7 @@ from .banana_defect_detection import BananaMonitoringUseCase,BananaMonitoringCon
28
28
  from .car_damage_detection import CarDamageConfig, CarDamageDetectionUseCase
29
29
  from .price_tag_detection import PriceTagConfig, PriceTagUseCase
30
30
  from .mask_detection import MaskDetectionConfig, MaskDetectionUseCase
31
+ from .pipeline_detection import PipelineDetectionConfig, PipelineDetectionUseCase
31
32
  from .distracted_driver_detection import DistractedDriverUseCase, DistractedDriverConfig
32
33
  from .emergency_vehicle_detection import EmergencyVehicleUseCase, EmergencyVehicleConfig
33
34
  from .solar_panel import SolarPanelUseCase, SolarPanelConfig
@@ -65,6 +66,7 @@ from .leaf import LeafConfig, LeafUseCase
65
66
  from .blood_cancer_detection_img import BloodCancerDetectionConfig, BloodCancerDetectionUseCase
66
67
  from .skin_cancer_classification_img import SkinCancerClassificationConfig, SkinCancerClassificationUseCase
67
68
  from .plaque_segmentation_img import PlaqueSegmentationConfig, PlaqueSegmentationUseCase
69
+ from .smoker_detection import SmokerDetectionConfig, SmokerDetectionUseCase
68
70
 
69
71
  __all__ = [
70
72
  'PeopleCountingUseCase',
@@ -116,6 +118,7 @@ __all__ = [
116
118
  'LaneDetectionUseCase',
117
119
  'WindmillMaintenanceUseCase',
118
120
  'FlowerUseCase',
121
+ 'SmokerDetectionUseCase',
119
122
 
120
123
  #Put all IMAGE based usecases here
121
124
  'BloodCancerDetectionUseCase',
@@ -172,6 +175,7 @@ __all__ = [
172
175
  'LaneDetectionConfig',
173
176
  'WindmillMaintenanceConfig',
174
177
  'FlowerConfig',
178
+ 'SmokerDetectionConfig',
175
179
 
176
180
 
177
181