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.
Files changed (204) hide show
  1. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/PKG-INFO +1 -1
  2. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/matrice_analytics.egg-info/PKG-INFO +1 -1
  3. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/matrice_analytics.egg-info/SOURCES.txt +3 -0
  4. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/core/base.py +1 -1
  5. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/face_reg/embedding_manager.py +77 -12
  6. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/face_reg/face_recognition.py +926 -154
  7. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/face_reg/face_recognition_client.py +89 -8
  8. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/customer_service.py +356 -9
  9. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/fire_detection.py +108 -0
  10. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/license_plate_monitoring.py +632 -131
  11. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/weapon_detection.py +98 -22
  12. matrice_analytics-0.1.82/src/matrice_analytics/post_processing/utils/alert_instance_utils.py +950 -0
  13. matrice_analytics-0.1.82/src/matrice_analytics/post_processing/utils/business_metrics_manager_utils.py +1112 -0
  14. matrice_analytics-0.1.82/src/matrice_analytics/post_processing/utils/incident_manager_utils.py +1444 -0
  15. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/LICENSE.txt +0 -0
  16. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/README.md +0 -0
  17. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/matrice_analytics.egg-info/dependency_links.txt +0 -0
  18. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/matrice_analytics.egg-info/not-zip-safe +0 -0
  19. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/matrice_analytics.egg-info/top_level.txt +0 -0
  20. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/pyproject.toml +0 -0
  21. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/setup.cfg +0 -0
  22. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/setup.py +0 -0
  23. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/__init__.py +0 -0
  24. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/README.md +0 -0
  25. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/__init__.py +0 -0
  26. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/boundary_drawing_internal.py +0 -0
  27. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/boundary_drawing_tool.py +0 -0
  28. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/boundary_tool_template.html +0 -0
  29. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/example_usage.py +0 -0
  30. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/usage/README.md +0 -0
  31. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/usage/boundary_drawer_launcher.py +0 -0
  32. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/boundary_drawing_internal/usage/simple_boundary_launcher.py +0 -0
  33. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/README.md +0 -0
  34. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/__init__.py +0 -0
  35. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/README.md +0 -0
  36. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/__init__.py +0 -0
  37. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/base.py +0 -0
  38. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/config.py +0 -0
  39. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/kalman_filter.py +0 -0
  40. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/matching.py +0 -0
  41. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/strack.py +0 -0
  42. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/advanced_tracker/tracker.py +0 -0
  43. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/config.py +0 -0
  44. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/core/__init__.py +0 -0
  45. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/core/config.py +0 -0
  46. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/core/config_utils.py +0 -0
  47. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/face_reg/__init__.py +0 -0
  48. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/face_reg/compare_similarity.py +0 -0
  49. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/face_reg/people_activity_logging.py +0 -0
  50. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/__init__.py +0 -0
  51. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/easyocr_extractor.py +0 -0
  52. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/__init__.py +0 -0
  53. {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
  54. {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
  55. {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
  56. {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
  57. {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
  58. {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
  59. {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
  60. {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
  61. {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
  62. {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
  63. {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
  64. {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
  65. {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
  66. {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
  67. {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
  68. {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
  69. {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
  70. {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
  71. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/py.typed +0 -0
  72. {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
  73. {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
  74. {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
  75. {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
  76. {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
  77. {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
  78. {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
  79. {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
  80. {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
  81. {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
  82. {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
  83. {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
  84. {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
  85. {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
  86. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/postprocessing.py +0 -0
  87. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/ocr/preprocessing.py +0 -0
  88. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/post_processor.py +0 -0
  89. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/__init__.py +0 -0
  90. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/run_tests.py +0 -0
  91. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_advanced_customer_service.py +0 -0
  92. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_basic_counting_tracking.py +0 -0
  93. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_comprehensive.py +0 -0
  94. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_config.py +0 -0
  95. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_customer_service.py +0 -0
  96. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_data_generators.py +0 -0
  97. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_people_counting.py +0 -0
  98. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_processor.py +0 -0
  99. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_usecases.py +0 -0
  100. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_utilities.py +0 -0
  101. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/test_cases/test_utils.py +0 -0
  102. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/Histopathological_Cancer_Detection_img.py +0 -0
  103. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/__init__.py +0 -0
  104. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/abandoned_object_detection.py +0 -0
  105. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/advanced_customer_service.py +0 -0
  106. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/age_detection.py +0 -0
  107. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/age_gender_detection.py +0 -0
  108. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/anti_spoofing_detection.py +0 -0
  109. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/assembly_line_detection.py +0 -0
  110. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/banana_defect_detection.py +0 -0
  111. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/basic_counting_tracking.py +0 -0
  112. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/blood_cancer_detection_img.py +0 -0
  113. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/car_damage_detection.py +0 -0
  114. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/car_part_segmentation.py +0 -0
  115. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/car_service.py +0 -0
  116. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/cardiomegaly_classification.py +0 -0
  117. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/cell_microscopy_segmentation.py +0 -0
  118. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/chicken_pose_detection.py +0 -0
  119. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/child_monitoring.py +0 -0
  120. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/clip.py +0 -0
  121. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/clip_processor/merges.txt +0 -0
  122. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/clip_processor/preprocessor_config.json +0 -0
  123. {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
  124. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/clip_processor/tokenizer.json +0 -0
  125. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/clip_processor/tokenizer_config.json +0 -0
  126. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/clip_processor/vocab.json +0 -0
  127. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/color_map_utils.py +0 -0
  128. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color/color_mapper.py +0 -0
  129. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color_detection.py +0 -0
  130. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/color_map_utils.py +0 -0
  131. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/concrete_crack_detection.py +0 -0
  132. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/crop_weed_detection.py +0 -0
  133. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/defect_detection_products.py +0 -0
  134. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/distracted_driver_detection.py +0 -0
  135. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/drone_traffic_monitoring.py +0 -0
  136. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/drowsy_driver_detection.py +0 -0
  137. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/dwell_detection.py +0 -0
  138. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/emergency_vehicle_detection.py +0 -0
  139. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/face_emotion.py +0 -0
  140. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/face_recognition.py +0 -0
  141. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/fashion_detection.py +0 -0
  142. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/field_mapping.py +0 -0
  143. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/flare_analysis.py +0 -0
  144. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/flower_segmentation.py +0 -0
  145. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/gas_leak_detection.py +0 -0
  146. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/gender_detection.py +0 -0
  147. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/human_activity_recognition.py +0 -0
  148. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/intrusion_detection.py +0 -0
  149. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/leaf.py +0 -0
  150. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/leaf_disease.py +0 -0
  151. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/leak_detection.py +0 -0
  152. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/license_plate_detection.py +0 -0
  153. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/litter_monitoring.py +0 -0
  154. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/mask_detection.py +0 -0
  155. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/natural_disaster.py +0 -0
  156. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/parking.py +0 -0
  157. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/parking_space_detection.py +0 -0
  158. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/pcb_defect_detection.py +0 -0
  159. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/pedestrian_detection.py +0 -0
  160. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/people_counting.py +0 -0
  161. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/people_counting_bckp.py +0 -0
  162. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/people_tracking.py +0 -0
  163. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/pipeline_detection.py +0 -0
  164. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/plaque_segmentation_img.py +0 -0
  165. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/pothole_segmentation.py +0 -0
  166. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/ppe_compliance.py +0 -0
  167. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/price_tag_detection.py +0 -0
  168. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/proximity_detection.py +0 -0
  169. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/road_lane_detection.py +0 -0
  170. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/road_traffic_density.py +0 -0
  171. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/road_view_segmentation.py +0 -0
  172. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/shelf_inventory_detection.py +0 -0
  173. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/shoplifting_detection.py +0 -0
  174. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/shopping_cart_analysis.py +0 -0
  175. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/skin_cancer_classification_img.py +0 -0
  176. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/smoker_detection.py +0 -0
  177. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/solar_panel.py +0 -0
  178. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/suspicious_activity_detection.py +0 -0
  179. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/template_usecase.py +0 -0
  180. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/theft_detection.py +0 -0
  181. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/traffic_sign_monitoring.py +0 -0
  182. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/underground_pipeline_defect_detection.py +0 -0
  183. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/underwater_pollution_detection.py +0 -0
  184. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/vehicle_monitoring.py +0 -0
  185. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/warehouse_object_segmentation.py +0 -0
  186. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/waterbody_segmentation.py +0 -0
  187. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/weld_defect_detection.py +0 -0
  188. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/wildlife_monitoring.py +0 -0
  189. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/windmill_maintenance.py +0 -0
  190. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/usecases/wound_segmentation.py +0 -0
  191. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/__init__.py +0 -0
  192. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/advanced_counting_utils.py +0 -0
  193. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/advanced_helper_utils.py +0 -0
  194. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/advanced_tracking_utils.py +0 -0
  195. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/alerting_utils.py +0 -0
  196. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/category_mapping_utils.py +0 -0
  197. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/color_utils.py +0 -0
  198. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/counting_utils.py +0 -0
  199. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/filter_utils.py +0 -0
  200. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/format_utils.py +0 -0
  201. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/geometry_utils.py +0 -0
  202. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/smoothing_utils.py +0 -0
  203. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/post_processing/utils/tracking_utils.py +0 -0
  204. {matrice_analytics-0.1.56 → matrice_analytics-0.1.82}/src/matrice_analytics/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrice_analytics
3
- Version: 0.1.56
3
+ Version: 0.1.82
4
4
  Summary: Common server utilities for Matrice.ai services
5
5
  Author-email: "Matrice.ai" <dipendra@matrice.ai>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrice_analytics
3
- Version: 0.1.56
3
+ Version: 0.1.82
4
4
  Summary: Common server utilities for Matrice.ai services
5
5
  Author-email: "Matrice.ai" <dipendra@matrice.ai>
6
6
  License-Expression: MIT
@@ -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 @ {timestamp} [Severity Level: {severity_level}]",
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
- """Manages face embeddings, search operations, and caching."""
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
- # Start background refresh if enabled
93
- if self.config.enable_background_refresh and self.face_client:
94
- self.start_background_refresh()
95
- self.logger.info(f"Background embedding refresh enabled - interval: {self.config.background_refresh_interval}s")
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: