matrice-analytics 0.1.56__tar.gz → 0.1.82__tar.gz
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.
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/PKG-INFO +1 -1
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/matrice_analytics.egg-info/PKG-INFO +1 -1
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/matrice_analytics.egg-info/SOURCES.txt +3 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/core/base.py +1 -1
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/face_reg/embedding_manager.py +77 -12
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/face_reg/face_recognition.py +926 -154
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/face_reg/face_recognition_client.py +89 -8
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/customer_service.py +356 -9
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/fire_detection.py +108 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/license_plate_monitoring.py +632 -131
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/weapon_detection.py +98 -22
- matrice_analytics-0.1.82/src/matrice_analytics/post_processing/utils/alert_instance_utils.py +950 -0
- matrice_analytics-0.1.82/src/matrice_analytics/post_processing/utils/business_metrics_manager_utils.py +1112 -0
- matrice_analytics-0.1.82/src/matrice_analytics/post_processing/utils/incident_manager_utils.py +1444 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/LICENSE.txt +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/README.md +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/matrice_analytics.egg-info/dependency_links.txt +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/matrice_analytics.egg-info/not-zip-safe +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/matrice_analytics.egg-info/top_level.txt +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/pyproject.toml +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/setup.cfg +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/setup.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/README.md +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/boundary_drawing_internal.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/boundary_drawing_tool.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/boundary_tool_template.html +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/example_usage.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/usage/README.md +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/usage/boundary_drawer_launcher.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/usage/simple_boundary_launcher.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/README.md +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/README.md +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/base.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/config.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/kalman_filter.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/matching.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/strack.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/tracker.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/config.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/core/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/core/config.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/core/config_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/face_reg/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/face_reg/compare_similarity.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/face_reg/people_activity_logging.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/easyocr_extractor.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/cli.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/dataset_stats.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/export.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/train.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/valid.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/validate_dataset.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/visualize_augmentation.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/visualize_predictions.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/core/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/core/process.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/core/types.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/core/utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/inference/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/inference/config.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/inference/hub.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/inference/plate_recognizer.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/py.typed +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/data/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/data/augmentation.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/data/dataset.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/model/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/model/config.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/model/layers.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/model/loss.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/model/metric.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/model/model_builders.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/model/model_schema.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/utilities/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/utilities/backend_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/utilities/utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/postprocessing.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/preprocessing.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/post_processor.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/run_tests.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_advanced_customer_service.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_basic_counting_tracking.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_comprehensive.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_config.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_customer_service.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_data_generators.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_people_counting.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_processor.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_usecases.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_utilities.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/Histopathological_Cancer_Detection_img.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/abandoned_object_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/advanced_customer_service.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/age_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/age_gender_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/anti_spoofing_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/assembly_line_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/banana_defect_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/basic_counting_tracking.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/blood_cancer_detection_img.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/car_damage_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/car_part_segmentation.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/car_service.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/cardiomegaly_classification.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/cell_microscopy_segmentation.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/chicken_pose_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/child_monitoring.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/clip.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/clip_processor/merges.txt +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/clip_processor/preprocessor_config.json +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/clip_processor/special_tokens_map.json +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/clip_processor/tokenizer.json +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/clip_processor/tokenizer_config.json +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/clip_processor/vocab.json +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/color_map_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/color_mapper.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color_map_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/concrete_crack_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/crop_weed_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/defect_detection_products.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/distracted_driver_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/drone_traffic_monitoring.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/drowsy_driver_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/dwell_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/emergency_vehicle_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/face_emotion.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/face_recognition.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/fashion_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/field_mapping.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/flare_analysis.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/flower_segmentation.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/gas_leak_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/gender_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/human_activity_recognition.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/intrusion_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/leaf.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/leaf_disease.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/leak_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/license_plate_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/litter_monitoring.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/mask_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/natural_disaster.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/parking.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/parking_space_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/pcb_defect_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/pedestrian_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/people_counting.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/people_counting_bckp.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/people_tracking.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/pipeline_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/plaque_segmentation_img.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/pothole_segmentation.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/ppe_compliance.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/price_tag_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/proximity_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/road_lane_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/road_traffic_density.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/road_view_segmentation.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/shelf_inventory_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/shoplifting_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/shopping_cart_analysis.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/skin_cancer_classification_img.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/smoker_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/solar_panel.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/suspicious_activity_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/template_usecase.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/theft_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/traffic_sign_monitoring.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/underground_pipeline_defect_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/underwater_pollution_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/vehicle_monitoring.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/warehouse_object_segmentation.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/waterbody_segmentation.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/weld_defect_detection.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/wildlife_monitoring.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/windmill_maintenance.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/wound_segmentation.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/__init__.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/advanced_counting_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/advanced_helper_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/advanced_tracking_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/alerting_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/category_mapping_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/color_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/counting_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/filter_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/format_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/geometry_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/smoothing_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/tracking_utils.py +0 -0
- {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/py.typed +0 -0
{matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/matrice_analytics.egg-info/SOURCES.txt
RENAMED
|
@@ -188,12 +188,15 @@ src/matrice_analytics/post_processing/utils/__init__.py
|
|
|
188
188
|
src/matrice_analytics/post_processing/utils/advanced_counting_utils.py
|
|
189
189
|
src/matrice_analytics/post_processing/utils/advanced_helper_utils.py
|
|
190
190
|
src/matrice_analytics/post_processing/utils/advanced_tracking_utils.py
|
|
191
|
+
src/matrice_analytics/post_processing/utils/alert_instance_utils.py
|
|
191
192
|
src/matrice_analytics/post_processing/utils/alerting_utils.py
|
|
193
|
+
src/matrice_analytics/post_processing/utils/business_metrics_manager_utils.py
|
|
192
194
|
src/matrice_analytics/post_processing/utils/category_mapping_utils.py
|
|
193
195
|
src/matrice_analytics/post_processing/utils/color_utils.py
|
|
194
196
|
src/matrice_analytics/post_processing/utils/counting_utils.py
|
|
195
197
|
src/matrice_analytics/post_processing/utils/filter_utils.py
|
|
196
198
|
src/matrice_analytics/post_processing/utils/format_utils.py
|
|
197
199
|
src/matrice_analytics/post_processing/utils/geometry_utils.py
|
|
200
|
+
src/matrice_analytics/post_processing/utils/incident_manager_utils.py
|
|
198
201
|
src/matrice_analytics/post_processing/utils/smoothing_utils.py
|
|
199
202
|
src/matrice_analytics/post_processing/utils/tracking_utils.py
|
|
@@ -286,7 +286,7 @@ class BaseProcessor(ABC):
|
|
|
286
286
|
"incident_id": incident_id,
|
|
287
287
|
"incident_type": incident_type,
|
|
288
288
|
"severity_level": severity_level,
|
|
289
|
-
"human_text": human_text or f"{incident_type} detected
|
|
289
|
+
"human_text": human_text or f"{incident_type} detected. [Severity Level: {severity_level}]",
|
|
290
290
|
"start_time": timestamp,
|
|
291
291
|
"end_time": end_time or timestamp,
|
|
292
292
|
"camera_info": camera_info or self.get_default_camera_info(),
|
|
@@ -56,7 +56,26 @@ class EmbeddingConfig:
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
class EmbeddingManager:
|
|
59
|
-
"""
|
|
59
|
+
"""
|
|
60
|
+
Manages face embeddings, search operations, and caching.
|
|
61
|
+
|
|
62
|
+
CRITICAL INITIALIZATION FLOW:
|
|
63
|
+
1. __init__() creates the manager but does NOT load embeddings or start background refresh
|
|
64
|
+
2. External caller MUST call await _load_staff_embeddings() to load embeddings synchronously
|
|
65
|
+
3. After successful load, caller SHOULD call start_background_refresh() for periodic updates
|
|
66
|
+
4. The _embeddings_loaded flag tracks whether embeddings are ready for use
|
|
67
|
+
5. All search operations check _embeddings_loaded before proceeding
|
|
68
|
+
|
|
69
|
+
This design prevents race conditions where:
|
|
70
|
+
- Background thread tries to load while main thread is loading
|
|
71
|
+
- Search operations are called before embeddings are loaded
|
|
72
|
+
- Multiple threads compete for the embeddings_lock during initialization
|
|
73
|
+
|
|
74
|
+
Thread Safety:
|
|
75
|
+
- _embeddings_lock protects embeddings_matrix and embedding_metadata
|
|
76
|
+
- _cache_lock protects track_id_cache
|
|
77
|
+
- _embeddings_loaded is set only after successful load under lock
|
|
78
|
+
"""
|
|
60
79
|
|
|
61
80
|
def __init__(self, config: EmbeddingConfig, face_client: FacialRecognitionClient = None):
|
|
62
81
|
self.config = config
|
|
@@ -89,11 +108,47 @@ class EmbeddingManager:
|
|
|
89
108
|
self._is_running = False
|
|
90
109
|
self._stop_event = threading.Event()
|
|
91
110
|
|
|
92
|
-
#
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
111
|
+
# Initialization status flag
|
|
112
|
+
self._embeddings_loaded = False
|
|
113
|
+
|
|
114
|
+
# DON'T start background refresh yet - wait for initial load in initialize()
|
|
115
|
+
# This prevents race conditions where background thread interferes with main init
|
|
116
|
+
self.logger.info(f"EmbeddingManager created - background refresh will start after initial load (interval: {self.config.background_refresh_interval}s)")
|
|
96
117
|
|
|
118
|
+
def is_ready(self) -> bool:
|
|
119
|
+
"""
|
|
120
|
+
Check if embeddings are loaded and ready for use.
|
|
121
|
+
|
|
122
|
+
Returns:
|
|
123
|
+
True if embeddings are loaded and matrix is valid, False otherwise
|
|
124
|
+
"""
|
|
125
|
+
return (
|
|
126
|
+
self._embeddings_loaded
|
|
127
|
+
and self.embeddings_matrix is not None
|
|
128
|
+
and len(self.embedding_metadata) > 0
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
def get_status(self) -> Dict[str, Any]:
|
|
132
|
+
"""
|
|
133
|
+
Get detailed status of embedding manager for debugging and health checks.
|
|
134
|
+
|
|
135
|
+
Returns:
|
|
136
|
+
Dictionary with status information
|
|
137
|
+
"""
|
|
138
|
+
with self._embeddings_lock:
|
|
139
|
+
matrix_shape = self.embeddings_matrix.shape if self.embeddings_matrix is not None else None
|
|
140
|
+
|
|
141
|
+
return {
|
|
142
|
+
"embeddings_loaded": self._embeddings_loaded,
|
|
143
|
+
"embeddings_count": len(self.staff_embeddings),
|
|
144
|
+
"matrix_shape": matrix_shape,
|
|
145
|
+
"metadata_count": len(self.embedding_metadata),
|
|
146
|
+
"cache_size": len(self.track_id_cache),
|
|
147
|
+
"last_update": self.staff_embeddings_last_update,
|
|
148
|
+
"is_running": self._is_running,
|
|
149
|
+
"is_ready": self.is_ready(),
|
|
150
|
+
}
|
|
151
|
+
|
|
97
152
|
def set_face_client(self, face_client: FacialRecognitionClient):
|
|
98
153
|
"""Set the face recognition client."""
|
|
99
154
|
self.face_client = face_client
|
|
@@ -179,10 +234,10 @@ class EmbeddingManager:
|
|
|
179
234
|
return False
|
|
180
235
|
|
|
181
236
|
try:
|
|
182
|
-
self.logger.info("Loading staff embeddings from API...")
|
|
183
|
-
print("=============== LOADING STAFF EMBEDDINGS FROM API ===============")
|
|
237
|
+
#self.logger.info("Loading staff embeddings from API...")
|
|
238
|
+
#print("=============== LOADING STAFF EMBEDDINGS FROM API ===============")
|
|
184
239
|
response = await self.face_client.get_all_staff_embeddings()
|
|
185
|
-
print(f"API RESPONSE TYPE: {type(response)}, IS_LIST: {isinstance(response, list)}, LEN: {len(response) if isinstance(response, list) else 'N/A'}")
|
|
240
|
+
#print(f"API RESPONSE TYPE: {type(response)}, IS_LIST: {isinstance(response, list)}, LEN: {len(response) if isinstance(response, list) else 'N/A'}")
|
|
186
241
|
|
|
187
242
|
# Robust response handling: accept dict with data or raw list
|
|
188
243
|
embeddings_data: List[Dict[str, Any]] = []
|
|
@@ -272,14 +327,16 @@ class EmbeddingManager:
|
|
|
272
327
|
|
|
273
328
|
self.embedding_metadata = self.staff_embeddings.copy()
|
|
274
329
|
self.staff_embeddings_last_update = time.time()
|
|
330
|
+
self._embeddings_loaded = True # Mark as successfully loaded
|
|
331
|
+
|
|
275
332
|
self.logger.info(f"Successfully loaded and cached {len(self.staff_embeddings)} staff embeddings (dim={self.embeddings_matrix.shape[1]})")
|
|
276
|
-
print(f"=============== SUCCESS: LOADED {len(self.staff_embeddings)} EMBEDDINGS, MATRIX SHAPE: {self.embeddings_matrix.shape} ===============")
|
|
333
|
+
#print(f"=============== SUCCESS: LOADED {len(self.staff_embeddings)} EMBEDDINGS, MATRIX SHAPE: {self.embeddings_matrix.shape} ===============")
|
|
277
334
|
try:
|
|
278
335
|
# Quick sanity metrics
|
|
279
336
|
row0_sum = float(np.sum(self.embeddings_matrix[0])) if self.embeddings_matrix.shape[0] > 0 else 0.0
|
|
280
337
|
row0_norm = float(np.linalg.norm(self.embeddings_matrix[0])) if self.embeddings_matrix.shape[0] > 0 else 0.0
|
|
281
|
-
print(f"SANITY CHECK: row0_sum={row0_sum:.4f}, row0_norm={row0_norm:.4f} (should be ~1.0 after normalization)")
|
|
282
|
-
self.logger.debug(f"Embeddings matrix shape: {self.embeddings_matrix.shape}, dtype={self.embeddings_matrix.dtype}, row0_sum={row0_sum:.4f}")
|
|
338
|
+
#print(f"SANITY CHECK: row0_sum={row0_sum:.4f}, row0_norm={row0_norm:.4f} (should be ~1.0 after normalization)")
|
|
339
|
+
#self.logger.debug(f"Embeddings matrix shape: {self.embeddings_matrix.shape}, dtype={self.embeddings_matrix.dtype}, row0_sum={row0_sum:.4f}")
|
|
283
340
|
except Exception as e:
|
|
284
341
|
print(f"ERROR in sanity check: {e}")
|
|
285
342
|
return True
|
|
@@ -336,9 +393,16 @@ class EmbeddingManager:
|
|
|
336
393
|
|
|
337
394
|
def _find_best_local_match(self, query_embedding: List[float]) -> Optional[Tuple[StaffEmbedding, float]]:
|
|
338
395
|
"""Find best matching staff member using optimized matrix operations (thread-safe)."""
|
|
396
|
+
# Check if embeddings are loaded at all
|
|
397
|
+
if not self._embeddings_loaded:
|
|
398
|
+
#print(f"ERROR: _find_best_local_match called but embeddings not loaded yet (_embeddings_loaded={self._embeddings_loaded})")
|
|
399
|
+
self.logger.error("Embeddings not loaded - _find_best_local_match cannot proceed")
|
|
400
|
+
return None
|
|
401
|
+
|
|
339
402
|
with self._embeddings_lock:
|
|
340
403
|
if self.embeddings_matrix is None or len(self.embedding_metadata) == 0:
|
|
341
|
-
print(f"ERROR: _find_best_local_match - embeddings_matrix is None={self.embeddings_matrix is None}, metadata_len={len(self.embedding_metadata)}")
|
|
404
|
+
#print(f"ERROR: _find_best_local_match - embeddings_matrix is None={self.embeddings_matrix is None}, metadata_len={len(self.embedding_metadata)}, _embeddings_loaded={self._embeddings_loaded}")
|
|
405
|
+
self.logger.error(f"Embeddings matrix is None despite _embeddings_loaded={self._embeddings_loaded}")
|
|
342
406
|
return None
|
|
343
407
|
|
|
344
408
|
# Create local copies to avoid issues with concurrent modifications
|
|
@@ -346,6 +410,7 @@ class EmbeddingManager:
|
|
|
346
410
|
embedding_metadata = self.embedding_metadata.copy()
|
|
347
411
|
|
|
348
412
|
if embeddings_matrix is None:
|
|
413
|
+
print("ERROR: _find_best_local_match - embeddings_matrix copy is None")
|
|
349
414
|
return None
|
|
350
415
|
|
|
351
416
|
try:
|