matrice-analytics 0.1.33__tar.gz → 0.1.35__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.

Potentially problematic release.


This version of matrice-analytics might be problematic. Click here for more details.

Files changed (200) hide show
  1. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/PKG-INFO +1 -1
  2. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/matrice_analytics.egg-info/PKG-INFO +1 -1
  3. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/face_reg/face_recognition_client.py +1 -1
  4. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/license_plate_monitoring.py +159 -51
  5. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/LICENSE.txt +0 -0
  6. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/README.md +0 -0
  7. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/matrice_analytics.egg-info/SOURCES.txt +0 -0
  8. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/matrice_analytics.egg-info/dependency_links.txt +0 -0
  9. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/matrice_analytics.egg-info/not-zip-safe +0 -0
  10. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/matrice_analytics.egg-info/top_level.txt +0 -0
  11. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/pyproject.toml +0 -0
  12. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/setup.cfg +0 -0
  13. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/setup.py +0 -0
  14. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/__init__.py +0 -0
  15. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/boundary_drawing_internal/README.md +0 -0
  16. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/boundary_drawing_internal/__init__.py +0 -0
  17. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/boundary_drawing_internal/boundary_drawing_internal.py +0 -0
  18. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/boundary_drawing_internal/boundary_drawing_tool.py +0 -0
  19. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/boundary_drawing_internal/boundary_tool_template.html +0 -0
  20. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/boundary_drawing_internal/example_usage.py +0 -0
  21. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/boundary_drawing_internal/usage/README.md +0 -0
  22. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/boundary_drawing_internal/usage/boundary_drawer_launcher.py +0 -0
  23. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/boundary_drawing_internal/usage/simple_boundary_launcher.py +0 -0
  24. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/README.md +0 -0
  25. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/__init__.py +0 -0
  26. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/advanced_tracker/README.md +0 -0
  27. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/advanced_tracker/__init__.py +0 -0
  28. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/advanced_tracker/base.py +0 -0
  29. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/advanced_tracker/config.py +0 -0
  30. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/advanced_tracker/kalman_filter.py +0 -0
  31. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/advanced_tracker/matching.py +0 -0
  32. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/advanced_tracker/strack.py +0 -0
  33. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/advanced_tracker/tracker.py +0 -0
  34. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/config.py +0 -0
  35. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/core/__init__.py +0 -0
  36. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/core/base.py +0 -0
  37. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/core/config.py +0 -0
  38. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/core/config_utils.py +0 -0
  39. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/face_reg/__init__.py +0 -0
  40. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/face_reg/compare_similarity.py +0 -0
  41. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/face_reg/embedding_manager.py +0 -0
  42. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/face_reg/face_recognition.py +0 -0
  43. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/face_reg/people_activity_logging.py +0 -0
  44. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/__init__.py +0 -0
  45. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/easyocr_extractor.py +0 -0
  46. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/__init__.py +0 -0
  47. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/__init__.py +0 -0
  48. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/cli.py +0 -0
  49. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/dataset_stats.py +0 -0
  50. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/export.py +0 -0
  51. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/train.py +0 -0
  52. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/utils.py +0 -0
  53. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/valid.py +0 -0
  54. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/validate_dataset.py +0 -0
  55. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/visualize_augmentation.py +0 -0
  56. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/cli/visualize_predictions.py +0 -0
  57. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/core/__init__.py +0 -0
  58. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/core/process.py +0 -0
  59. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/core/types.py +0 -0
  60. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/core/utils.py +0 -0
  61. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/inference/__init__.py +0 -0
  62. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/inference/config.py +0 -0
  63. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/inference/hub.py +0 -0
  64. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/inference/plate_recognizer.py +0 -0
  65. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/py.typed +0 -0
  66. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/__init__.py +0 -0
  67. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/data/__init__.py +0 -0
  68. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/data/augmentation.py +0 -0
  69. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/data/dataset.py +0 -0
  70. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/model/__init__.py +0 -0
  71. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/model/config.py +0 -0
  72. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/model/layers.py +0 -0
  73. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/model/loss.py +0 -0
  74. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/model/metric.py +0 -0
  75. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/model/model_builders.py +0 -0
  76. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/model/model_schema.py +0 -0
  77. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/utilities/__init__.py +0 -0
  78. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/utilities/backend_utils.py +0 -0
  79. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/fast_plate_ocr_py38/train/utilities/utils.py +0 -0
  80. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/postprocessing.py +0 -0
  81. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/ocr/preprocessing.py +0 -0
  82. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/post_processor.py +0 -0
  83. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/test_cases/__init__.py +0 -0
  84. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/test_cases/run_tests.py +0 -0
  85. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/test_cases/test_advanced_customer_service.py +0 -0
  86. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/test_cases/test_basic_counting_tracking.py +0 -0
  87. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/test_cases/test_comprehensive.py +0 -0
  88. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/test_cases/test_config.py +0 -0
  89. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/test_cases/test_customer_service.py +0 -0
  90. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/test_cases/test_data_generators.py +0 -0
  91. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/test_cases/test_people_counting.py +0 -0
  92. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/test_cases/test_processor.py +0 -0
  93. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/test_cases/test_utilities.py +0 -0
  94. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/test_cases/test_utils.py +0 -0
  95. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/Histopathological_Cancer_Detection_img.py +0 -0
  96. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/__init__.py +0 -0
  97. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/abandoned_object_detection.py +0 -0
  98. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/advanced_customer_service.py +0 -0
  99. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/age_detection.py +0 -0
  100. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/age_gender_detection.py +0 -0
  101. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/anti_spoofing_detection.py +0 -0
  102. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/assembly_line_detection.py +0 -0
  103. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/banana_defect_detection.py +0 -0
  104. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/basic_counting_tracking.py +0 -0
  105. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/blood_cancer_detection_img.py +0 -0
  106. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/car_damage_detection.py +0 -0
  107. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/car_part_segmentation.py +0 -0
  108. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/car_service.py +0 -0
  109. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/cardiomegaly_classification.py +0 -0
  110. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/cell_microscopy_segmentation.py +0 -0
  111. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/chicken_pose_detection.py +0 -0
  112. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/child_monitoring.py +0 -0
  113. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/color/clip.py +0 -0
  114. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/color/clip_processor/merges.txt +0 -0
  115. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/color/clip_processor/preprocessor_config.json +0 -0
  116. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/color/clip_processor/special_tokens_map.json +0 -0
  117. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/color/clip_processor/tokenizer.json +0 -0
  118. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/color/clip_processor/tokenizer_config.json +0 -0
  119. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/color/clip_processor/vocab.json +0 -0
  120. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/color/color_map_utils.py +0 -0
  121. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/color/color_mapper.py +0 -0
  122. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/color_detection.py +0 -0
  123. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/color_map_utils.py +0 -0
  124. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/concrete_crack_detection.py +0 -0
  125. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/crop_weed_detection.py +0 -0
  126. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/customer_service.py +0 -0
  127. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/defect_detection_products.py +0 -0
  128. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/distracted_driver_detection.py +0 -0
  129. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/drone_traffic_monitoring.py +0 -0
  130. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/drowsy_driver_detection.py +0 -0
  131. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/dwell_detection.py +0 -0
  132. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/emergency_vehicle_detection.py +0 -0
  133. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/face_emotion.py +0 -0
  134. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/face_recognition.py +0 -0
  135. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/fashion_detection.py +0 -0
  136. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/field_mapping.py +0 -0
  137. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/fire_detection.py +0 -0
  138. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/flare_analysis.py +0 -0
  139. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/flower_segmentation.py +0 -0
  140. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/gas_leak_detection.py +0 -0
  141. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/gender_detection.py +0 -0
  142. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/human_activity_recognition.py +0 -0
  143. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/intrusion_detection.py +0 -0
  144. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/leaf.py +0 -0
  145. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/leaf_disease.py +0 -0
  146. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/leak_detection.py +0 -0
  147. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/license_plate_detection.py +0 -0
  148. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/litter_monitoring.py +0 -0
  149. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/mask_detection.py +0 -0
  150. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/natural_disaster.py +0 -0
  151. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/parking.py +0 -0
  152. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/parking_space_detection.py +0 -0
  153. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/pcb_defect_detection.py +0 -0
  154. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/pedestrian_detection.py +0 -0
  155. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/people_counting.py +0 -0
  156. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/people_counting_bckp.py +0 -0
  157. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/people_tracking.py +0 -0
  158. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/pipeline_detection.py +0 -0
  159. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/plaque_segmentation_img.py +0 -0
  160. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/pothole_segmentation.py +0 -0
  161. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/ppe_compliance.py +0 -0
  162. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/price_tag_detection.py +0 -0
  163. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/proximity_detection.py +0 -0
  164. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/road_lane_detection.py +0 -0
  165. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/road_traffic_density.py +0 -0
  166. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/road_view_segmentation.py +0 -0
  167. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/shelf_inventory_detection.py +0 -0
  168. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/shoplifting_detection.py +0 -0
  169. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/shopping_cart_analysis.py +0 -0
  170. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/skin_cancer_classification_img.py +0 -0
  171. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/smoker_detection.py +0 -0
  172. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/solar_panel.py +0 -0
  173. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/suspicious_activity_detection.py +0 -0
  174. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/template_usecase.py +0 -0
  175. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/theft_detection.py +0 -0
  176. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/traffic_sign_monitoring.py +0 -0
  177. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/underground_pipeline_defect_detection.py +0 -0
  178. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/underwater_pollution_detection.py +0 -0
  179. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/vehicle_monitoring.py +0 -0
  180. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/warehouse_object_segmentation.py +0 -0
  181. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/waterbody_segmentation.py +0 -0
  182. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/weapon_detection.py +0 -0
  183. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/weld_defect_detection.py +0 -0
  184. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/wildlife_monitoring.py +0 -0
  185. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/windmill_maintenance.py +0 -0
  186. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/usecases/wound_segmentation.py +0 -0
  187. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/utils/__init__.py +0 -0
  188. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/utils/advanced_counting_utils.py +0 -0
  189. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/utils/advanced_helper_utils.py +0 -0
  190. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/utils/advanced_tracking_utils.py +0 -0
  191. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/utils/alerting_utils.py +0 -0
  192. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/utils/category_mapping_utils.py +0 -0
  193. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/utils/color_utils.py +0 -0
  194. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/utils/counting_utils.py +0 -0
  195. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/utils/filter_utils.py +0 -0
  196. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/utils/format_utils.py +0 -0
  197. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/utils/geometry_utils.py +0 -0
  198. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/utils/smoothing_utils.py +0 -0
  199. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/src/matrice_analytics/post_processing/utils/tracking_utils.py +0 -0
  200. {matrice_analytics-0.1.33 → matrice_analytics-0.1.35}/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.33
3
+ Version: 0.1.35
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.33
3
+ Version: 0.1.35
4
4
  Summary: Common server utilities for Matrice.ai services
5
5
  Author-email: "Matrice.ai" <dipendra@matrice.ai>
6
6
  License-Expression: MIT
@@ -90,7 +90,7 @@ class FacialRecognitionClient:
90
90
  self.server_base_url = f"http://localhost:{server_port}"
91
91
  self.logger.warning(f"Server host matches public IP, using localhost: {self.server_base_url}")
92
92
  else:
93
- self.server_base_url = f"https://{server_host}:{server_port}"
93
+ self.server_base_url = f"http://{server_host}:{server_port}"
94
94
  self.logger.warning(f"Facial recognition server base URL: {self.server_base_url}")
95
95
 
96
96
  self.session.update(self.server_info.get('projectID', ''))
@@ -60,9 +60,9 @@ from ..core.config import BaseConfig, AlertConfig, ZoneConfig
60
60
 
61
61
  # (Catch import errors early in the logs)
62
62
  try:
63
- _ = LicensePlateRecognizer # noqa: B018reference to quiet linters
63
+ _ = LicensePlateRecognizer # noqa: B018 reference to quiet linters
64
64
  except Exception as _e:
65
- print(f"Warning: fast_plate_ocr could not be imported{_e}")
65
+ print(f"Warning: fast_plate_ocr could not be imported {_e}")
66
66
 
67
67
  try:
68
68
  from matrice_common.session import Session
@@ -123,60 +123,88 @@ class LicensePlateMonitorLogger:
123
123
 
124
124
  def initialize_session(self, config: LicensePlateMonitorConfig) -> None:
125
125
  """Initialize session and fetch server connection info if lpr_server_id is provided."""
126
- self.logger.info("Initializing LicensePlateMonitorLogger session...")
126
+ self.logger.info("[LP_LOGGING] ===== INITIALIZING LP LOGGER SESSION =====")
127
+ self.logger.info(f"[LP_LOGGING] Config lpr_server_id: {config.lpr_server_id}")
127
128
 
128
129
  # Use existing session if provided, otherwise create new one
129
- if self.session:
130
- self.logger.info("Session already initialized, skipping initialization")
130
+ if self.session and self.server_info and self.server_base_url:
131
+ self.logger.info("[LP_LOGGING] Session already initialized with server info, skipping re-initialization")
132
+ self.logger.info(f"[LP_LOGGING] Using existing server: {self.server_base_url}")
131
133
  return
134
+ elif self.session:
135
+ self.logger.info("[LP_LOGGING] Session exists but server info missing, continuing initialization...")
136
+ else:
137
+ self.logger.info("[LP_LOGGING] No existing session, initializing from scratch...")
138
+
132
139
  if config.session:
133
140
  self.session = config.session
134
- self.logger.info("Using provided session from config")
141
+ self.logger.info("[LP_LOGGING] Using provided session from config")
142
+
135
143
  if not self.session:
136
144
  # Initialize Matrice session
137
145
  if not HAS_MATRICE_SESSION:
138
- self.logger.error("Matrice session module not available")
146
+ self.logger.error("[LP_LOGGING] Matrice session module not available")
139
147
  raise ImportError("Matrice session is required for License Plate Monitoring")
140
148
  try:
141
- self.logger.info("Creating new Matrice session...")
149
+ self.logger.info("[LP_LOGGING] Creating new Matrice session from environment variables...")
150
+ account_number = os.getenv("MATRICE_ACCOUNT_NUMBER", "")
151
+ access_key_id = os.getenv("MATRICE_ACCESS_KEY_ID", "")
152
+ secret_key = os.getenv("MATRICE_SECRET_ACCESS_KEY", "")
153
+ project_id = os.getenv("MATRICE_PROJECT_ID", "")
154
+
155
+ self.logger.info(f"[LP_LOGGING] Account Number: {'SET' if account_number else 'NOT SET'}")
156
+ self.logger.info(f"[LP_LOGGING] Access Key ID: {'SET' if access_key_id else 'NOT SET'}")
157
+ self.logger.info(f"[LP_LOGGING] Secret Key: {'SET' if secret_key else 'NOT SET'}")
158
+ self.logger.info(f"[LP_LOGGING] Project ID: {'SET' if project_id else 'NOT SET'}")
159
+
142
160
  self.session = Session(
143
- account_number=os.getenv("MATRICE_ACCOUNT_NUMBER", ""),
144
- access_key=os.getenv("MATRICE_ACCESS_KEY_ID", ""),
145
- secret_key=os.getenv("MATRICE_SECRET_ACCESS_KEY", ""),
146
- project_id=os.getenv("MATRICE_PROJECT_ID", ""),
161
+ account_number=account_number,
162
+ access_key=access_key_id,
163
+ secret_key=secret_key,
164
+ project_id=project_id,
147
165
  )
148
- self.logger.info("Successfully initialized new Matrice session for License Plate Monitoring")
166
+ self.logger.info("[LP_LOGGING] Successfully initialized new Matrice session")
149
167
  except Exception as e:
150
- self.logger.error(f"Failed to initialize Matrice session: {e}", exc_info=True)
168
+ self.logger.error(f"[LP_LOGGING] Failed to initialize Matrice session: {e}", exc_info=True)
151
169
  raise
152
170
 
153
171
  # Fetch server connection info if lpr_server_id is provided
154
172
  if config.lpr_server_id:
155
173
  self.lpr_server_id = config.lpr_server_id
156
- self.logger.info(f"Fetching LPR server connection info for server ID: {self.lpr_server_id}")
174
+ self.logger.info(f"[LP_LOGGING] Fetching LPR server connection info for server ID: {self.lpr_server_id}")
157
175
  try:
158
176
  self.server_info = self.get_server_connection_info()
159
177
  if self.server_info:
160
- self.logger.info(f"Successfully fetched LPR server info: {self.server_info.get('name', 'Unknown')}")
178
+ self.logger.info(f"[LP_LOGGING] Successfully fetched LPR server info")
179
+ self.logger.info(f"[LP_LOGGING] - Name: {self.server_info.get('name', 'Unknown')}")
180
+ self.logger.info(f"[LP_LOGGING] - Host: {self.server_info.get('host', 'Unknown')}")
181
+ self.logger.info(f"[LP_LOGGING] - Port: {self.server_info.get('port', 'Unknown')}")
182
+ self.logger.info(f"[LP_LOGGING] - Status: {self.server_info.get('status', 'Unknown')}")
183
+ self.logger.info(f"[LP_LOGGING] - Project ID: {self.server_info.get('projectID', 'Unknown')}")
184
+
161
185
  # Compare server host with public IP to determine if it's localhost
162
186
  server_host = self.server_info.get('host', 'localhost')
163
187
  server_port = self.server_info.get('port', 8200)
164
188
 
165
189
  if server_host == self.public_ip:
166
190
  self.server_base_url = f"http://localhost:{server_port}"
167
- self.logger.info(f"Server host matches public IP ({self.public_ip}), using localhost: {self.server_base_url}")
191
+ self.logger.info(f"[LP_LOGGING] Server host matches public IP ({self.public_ip}), using localhost: {self.server_base_url}")
168
192
  else:
169
- self.server_base_url = f"https://{server_host}:{server_port}"
170
- self.logger.info(f"LPR server base URL configured: {self.server_base_url}")
193
+ self.server_base_url = f"http://{server_host}:{server_port}"
194
+ self.logger.info(f"[LP_LOGGING] LPR server base URL configured: {self.server_base_url}")
171
195
 
172
196
  self.session.update(self.server_info.get('projectID', ''))
173
- self.logger.info(f"Updated Matrice session with project ID: {self.server_info.get('projectID', '')}")
197
+ self.logger.info(f"[LP_LOGGING] Updated Matrice session with project ID: {self.server_info.get('projectID', '')}")
174
198
  else:
175
- self.logger.warning("Failed to fetch LPR server connection info - server_info is None")
199
+ self.logger.error("[LP_LOGGING] Failed to fetch LPR server connection info - server_info is None")
200
+ self.logger.error("[LP_LOGGING] This will prevent plate logging from working!")
176
201
  except Exception as e:
177
- self.logger.error(f"Error fetching LPR server connection info: {e}", exc_info=True)
202
+ self.logger.error(f"[LP_LOGGING] Error fetching LPR server connection info: {e}", exc_info=True)
203
+ self.logger.error("[LP_LOGGING] This will prevent plate logging from working!")
178
204
  else:
179
- self.logger.info("No lpr_server_id provided in config, skipping server connection info fetch")
205
+ self.logger.warning("[LP_LOGGING] No lpr_server_id provided in config, skipping server connection info fetch")
206
+
207
+ self.logger.info("[LP_LOGGING] ===== LP LOGGER SESSION INITIALIZATION COMPLETE =====")
180
208
 
181
209
  def _get_public_ip(self) -> str:
182
210
  """Get the public IP address of this machine."""
@@ -233,10 +261,10 @@ class LicensePlateMonitorLogger:
233
261
  time_since_last_log = current_time - last_log_time
234
262
 
235
263
  if time_since_last_log >= cooldown:
236
- self.logger.debug(f"Plate {plate_text} ready to log (last logged {time_since_last_log:.1f}s ago, cooldown={cooldown}s)")
264
+ self.logger.info(f"[LP_LOGGING] OK - Plate '{plate_text}' ready to log (last logged {time_since_last_log:.1f}s ago, cooldown={cooldown}s)")
237
265
  return True
238
266
  else:
239
- self.logger.debug(f"Plate {plate_text} in cooldown period ({time_since_last_log:.1f}s elapsed, {cooldown - time_since_last_log:.1f}s remaining)")
267
+ self.logger.info(f"[LP_LOGGING] SKIP - Plate '{plate_text}' in cooldown period ({time_since_last_log:.1f}s elapsed, {cooldown - time_since_last_log:.1f}s remaining)")
240
268
  return False
241
269
 
242
270
  def update_log_timestamp(self, plate_text: str) -> None:
@@ -297,11 +325,13 @@ class LicensePlateMonitorLogger:
297
325
  image_data: Base64-encoded JPEG image of the license plate crop
298
326
  cooldown: Cooldown period in seconds
299
327
  """
300
- self.logger.info(f"Attempting to log plate: {plate_text} at {timestamp}")
328
+ self.logger.info(f"[LP_LOGGING] ===== PLATE LOG REQUEST START =====")
329
+ self.logger.info(f"[LP_LOGGING] Plate: '{plate_text}', Timestamp: {timestamp}")
301
330
 
302
331
  # Check cooldown
303
332
  if not self.should_log_plate(plate_text, cooldown):
304
- self.logger.info(f"Plate {plate_text} NOT SENT - skipped due to cooldown period")
333
+ self.logger.info(f"[LP_LOGGING] Plate '{plate_text}' NOT SENT - skipped due to cooldown period")
334
+ self.logger.info(f"[LP_LOGGING] ===== PLATE LOG REQUEST END (SKIPPED) =====")
305
335
  return False
306
336
 
307
337
  try:
@@ -310,11 +340,15 @@ class LicensePlateMonitorLogger:
310
340
  location = camera_info.get("location", "")
311
341
  frame_id = stream_info.get("frame_id", "")
312
342
 
343
+ self.logger.info(f"[LP_LOGGING] Stream Info - Camera: '{camera_name}', Location: '{location}', Frame ID: '{frame_id}'")
344
+
313
345
  # Get project ID from server_info
314
346
  project_id = self.server_info.get('projectID', '') if self.server_info else ''
347
+ self.logger.info(f"[LP_LOGGING] Project ID: '{project_id}'")
315
348
 
316
349
  # Format timestamp to RFC3339 format (2006-01-02T15:04:05Z)
317
350
  rfc3339_timestamp = self._format_timestamp_rfc3339(timestamp)
351
+ self.logger.info(f"[LP_LOGGING] Formatted timestamp: {timestamp} -> {rfc3339_timestamp}")
318
352
 
319
353
  payload = {
320
354
  'licensePlate': plate_text,
@@ -328,19 +362,23 @@ class LicensePlateMonitorLogger:
328
362
 
329
363
  # Add projectId as query parameter
330
364
  endpoint = f'/v1/lpr-server/detections?projectId={project_id}'
331
- self.logger.info(f"Sending POST request to {self.server_base_url}{endpoint} with plate: {plate_text}, imageData length: {len(image_data) if image_data else 0}")
365
+ full_url = f"{self.server_base_url}{endpoint}"
366
+ self.logger.info(f"[LP_LOGGING] Sending POST request to: {full_url}")
367
+ self.logger.info(f"[LP_LOGGING] Payload: licensePlate='{plate_text}', frameId='{frame_id}', location='{location}', camera='{camera_name}', imageData length={len(image_data) if image_data else 0}")
332
368
 
333
369
  response = await self.session.rpc.post_async(endpoint, payload=payload, base_url=self.server_base_url)
334
370
 
335
- self.logger.info(f"API Response received for plate {plate_text}: {response}")
371
+ self.logger.info(f"[LP_LOGGING] API Response received: {response}")
336
372
 
337
373
  # Update timestamp after successful log
338
374
  self.update_log_timestamp(plate_text)
339
- self.logger.info(f"Plate {plate_text} SUCCESSFULLY SENT and logged at {rfc3339_timestamp}")
375
+ self.logger.info(f"[LP_LOGGING] Plate '{plate_text}' SUCCESSFULLY SENT at {rfc3339_timestamp}")
376
+ self.logger.info(f"[LP_LOGGING] ===== PLATE LOG REQUEST END (SUCCESS) =====")
340
377
  return True
341
378
 
342
379
  except Exception as e:
343
- self.logger.error(f"Plate {plate_text} NOT SENT - Failed to log: {e}", exc_info=True)
380
+ self.logger.error(f"[LP_LOGGING] Plate '{plate_text}' NOT SENT - Exception occurred: {e}", exc_info=True)
381
+ self.logger.info(f"[LP_LOGGING] ===== PLATE LOG REQUEST END (FAILED) =====")
344
382
  return False
345
383
 
346
384
  class LicensePlateMonitorUseCase(BaseProcessor):
@@ -398,7 +436,7 @@ class LicensePlateMonitorUseCase(BaseProcessor):
398
436
  self.logger.error(f"Failed to initialize LicensePlateRecognizer: {e}", exc_info=True)
399
437
  LicensePlateMonitorUseCase._ocr_model = None
400
438
  self.ocr_model = LicensePlateMonitorUseCase._ocr_model
401
- # OCR text history for stability checks (textconsecutive frame count)
439
+ # OCR text history for stability checks (text consecutive frame count)
402
440
  self._text_history: Dict[str, int] = {}
403
441
 
404
442
  self.start_timer = None
@@ -415,6 +453,7 @@ class LicensePlateMonitorUseCase(BaseProcessor):
415
453
  # Initialize plate logger (optional, only used if lpr_server_id is provided)
416
454
  self.plate_logger: Optional[LicensePlateMonitorLogger] = None
417
455
  self._logging_enabled = True
456
+ self._plate_logger_initialized = False # Track if plate logger has been initialized
418
457
 
419
458
 
420
459
  def reset_tracker(self) -> None:
@@ -442,30 +481,57 @@ class LicensePlateMonitorUseCase(BaseProcessor):
442
481
  self.reset_plate_tracking()
443
482
  self.logger.info("All plate tracking state reset")
444
483
 
445
- def _initialize_plate_logger(self, config: LicensePlateMonitorConfig) -> None:
446
- """Initialize the plate logger if lpr_server_id is provided."""
484
+ def _initialize_plate_logger(self, config: LicensePlateMonitorConfig) -> bool:
485
+ """Initialize the plate logger if lpr_server_id is provided. Returns True if successful."""
486
+ self.logger.info(f"[LP_LOGGING] _initialize_plate_logger called with lpr_server_id: {config.lpr_server_id}")
487
+
447
488
  if not config.lpr_server_id:
448
489
  self._logging_enabled = False
449
- self.logger.info("Plate logging disabled: no lpr_server_id provided")
450
- return
490
+ self._plate_logger_initialized = False
491
+ self.logger.warning("[LP_LOGGING] Plate logging disabled: no lpr_server_id provided")
492
+ return False
451
493
 
452
494
  try:
453
495
  if self.plate_logger is None:
496
+ self.logger.info("[LP_LOGGING] Creating new LicensePlateMonitorLogger instance")
454
497
  self.plate_logger = LicensePlateMonitorLogger()
498
+ else:
499
+ self.logger.info("[LP_LOGGING] Using existing LicensePlateMonitorLogger instance")
455
500
 
501
+ self.logger.info("[LP_LOGGING] Initializing session for plate logger")
456
502
  self.plate_logger.initialize_session(config)
457
503
  self._logging_enabled = True
458
- self.logger.info(f"Plate logging enabled with server ID: {config.lpr_server_id}")
504
+ self._plate_logger_initialized = True
505
+ self.logger.info(f"[LP_LOGGING] SUCCESS - Plate logging ENABLED with server ID: {config.lpr_server_id}")
506
+ return True
459
507
  except Exception as e:
460
- self.logger.error(f"Failed to initialize plate logger: {e}", exc_info=True)
508
+ self.logger.error(f"[LP_LOGGING] ERROR - Failed to initialize plate logger: {e}", exc_info=True)
461
509
  self._logging_enabled = False
510
+ self._plate_logger_initialized = False
511
+ self.logger.error(f"[LP_LOGGING] Plate logging has been DISABLED due to initialization failure")
512
+ return False
462
513
 
463
514
  def _log_detected_plates(self, detections: List[Dict[str, Any]], config: LicensePlateMonitorConfig,
464
515
  stream_info: Optional[Dict[str, Any]], image_bytes: Optional[bytes] = None) -> None:
465
516
  """Log all detected plates to RPC server with cooldown."""
466
- if not self._logging_enabled or not self.plate_logger or not stream_info:
517
+ # Enhanced logging for diagnostics
518
+ self.logger.info(f"[LP_LOGGING] Starting plate logging check - detections count: {len(detections)}")
519
+ self.logger.info(f"[LP_LOGGING] Logging enabled: {self._logging_enabled}, Plate logger exists: {self.plate_logger is not None}, Stream info exists: {stream_info is not None}")
520
+
521
+ if not self._logging_enabled:
522
+ self.logger.warning("[LP_LOGGING] Plate logging is DISABLED - logging_enabled flag is False")
467
523
  return
468
524
 
525
+ if not self.plate_logger:
526
+ self.logger.warning("[LP_LOGGING] Plate logging SKIPPED - plate_logger is not initialized (lpr_server_id may not be configured)")
527
+ return
528
+
529
+ if not stream_info:
530
+ self.logger.warning("[LP_LOGGING] Plate logging SKIPPED - stream_info is None")
531
+ return
532
+
533
+ self.logger.info(f"[LP_LOGGING] All pre-conditions met, proceeding with plate logging")
534
+
469
535
  # Get current timestamp
470
536
  current_timestamp = self._get_current_timestamp_str(stream_info, precision=True)
471
537
 
@@ -483,20 +549,33 @@ class LicensePlateMonitorUseCase(BaseProcessor):
483
549
  if success:
484
550
  # Convert to base64
485
551
  image_data = base64.b64encode(jpeg_buffer.tobytes()).decode('utf-8')
486
- self.logger.debug(f"Encoded frame image as base64, length: {len(image_data)}")
552
+ self.logger.info(f"[LP_LOGGING] Encoded frame image as base64, length: {len(image_data)}")
553
+ else:
554
+ self.logger.warning(f"[LP_LOGGING] Failed to encode JPEG image")
555
+ else:
556
+ self.logger.warning(f"[LP_LOGGING] Failed to decode image bytes")
487
557
  except Exception as e:
488
- self.logger.error(f"Failed to encode frame image: {e}")
558
+ self.logger.error(f"[LP_LOGGING] Exception while encoding frame image: {e}", exc_info=True)
559
+ else:
560
+ self.logger.info(f"[LP_LOGGING] No image_bytes provided, sending without image")
489
561
 
490
562
  # Collect all unique plates from current detections
491
563
  plates_to_log = set()
564
+ detections_without_text = 0
492
565
  for det in detections:
493
566
  plate_text = det.get('plate_text')
494
567
  if not plate_text:
568
+ detections_without_text += 1
495
569
  continue
496
570
  plates_to_log.add(plate_text)
497
571
 
572
+ self.logger.info(f"[LP_LOGGING] Collected {len(plates_to_log)} unique plates to log: {plates_to_log}")
573
+ if detections_without_text > 0:
574
+ self.logger.warning(f"[LP_LOGGING] {detections_without_text} detections have NO plate_text (OCR may have failed or not run yet)")
575
+
498
576
  # Log each unique plate (respecting cooldown)
499
577
  if plates_to_log:
578
+ self.logger.info(f"[LP_LOGGING] Starting async logging for {len(plates_to_log)} plates with cooldown={config.plate_log_cooldown}s")
500
579
  try:
501
580
  # Run async logging tasks
502
581
  loop = asyncio.new_event_loop()
@@ -504,6 +583,7 @@ class LicensePlateMonitorUseCase(BaseProcessor):
504
583
  try:
505
584
  tasks = []
506
585
  for plate_text in plates_to_log:
586
+ self.logger.info(f"[LP_LOGGING] Creating task for plate: {plate_text}")
507
587
  task = self.plate_logger.log_plate(
508
588
  plate_text=plate_text,
509
589
  timestamp=current_timestamp,
@@ -514,11 +594,22 @@ class LicensePlateMonitorUseCase(BaseProcessor):
514
594
  tasks.append(task)
515
595
 
516
596
  # Run all logging tasks concurrently
517
- loop.run_until_complete(asyncio.gather(*tasks, return_exceptions=True))
597
+ self.logger.info(f"[LP_LOGGING] Executing {len(tasks)} async logging tasks")
598
+ results = loop.run_until_complete(asyncio.gather(*tasks, return_exceptions=True))
599
+
600
+ # Log results
601
+ for i, (plate, result) in enumerate(zip(plates_to_log, results)):
602
+ if isinstance(result, Exception):
603
+ self.logger.error(f"[LP_LOGGING] Task {i} for plate {plate} raised exception: {result}")
604
+ else:
605
+ self.logger.info(f"[LP_LOGGING] Task {i} for plate {plate} completed with result: {result}")
518
606
  finally:
519
607
  loop.close()
608
+ self.logger.info(f"[LP_LOGGING] Event loop closed")
520
609
  except Exception as e:
521
- self.logger.error(f"Error during plate logging: {e}", exc_info=True)
610
+ self.logger.error(f"[LP_LOGGING] CRITICAL ERROR during plate logging: {e}", exc_info=True)
611
+ else:
612
+ self.logger.info(f"[LP_LOGGING] No plates to log (plates_to_log is empty)")
522
613
 
523
614
  def process(self, data: Any, config: ConfigProtocol, input_bytes: Optional[bytes] = None,
524
615
  context: Optional[ProcessingContext] = None, stream_info: Optional[Dict[str, Any]] = None) -> ProcessingResult:
@@ -535,9 +626,19 @@ class LicensePlateMonitorUseCase(BaseProcessor):
535
626
  return self.create_error_result("input_bytes (video/image) is required for license plate monitoring",
536
627
  usecase=self.name, category=self.category, context=context)
537
628
 
538
- # Initialize plate logger if lpr_server_id is provided (optional flow)
539
- if config.lpr_server_id and self._logging_enabled:
540
- self._initialize_plate_logger(config)
629
+ # Initialize plate logger once if lpr_server_id is provided (optional flow)
630
+ if not self._plate_logger_initialized and config.lpr_server_id:
631
+ self.logger.info(f"[LP_LOGGING] First-time initialization - lpr_server_id: {config.lpr_server_id}")
632
+ success = self._initialize_plate_logger(config)
633
+ if success:
634
+ self.logger.info(f"[LP_LOGGING] Plate logger initialized successfully and ready to send plates")
635
+ else:
636
+ self.logger.error(f"[LP_LOGGING] Plate logger initialization FAILED - plates will NOT be sent")
637
+ elif self._plate_logger_initialized:
638
+ self.logger.debug(f"[LP_LOGGING] Plate logger already initialized, skipping re-initialization")
639
+ elif not config.lpr_server_id:
640
+ if self._total_frame_counter == 0: # Only log once at start
641
+ self.logger.warning(f"[LP_LOGGING] Plate logging will be DISABLED - no lpr_server_id provided in config")
541
642
 
542
643
  # Normalize alert_config if provided as a plain dict (JS JSON)
543
644
  if isinstance(getattr(config, 'alert_config', None), dict):
@@ -627,14 +728,21 @@ class LicensePlateMonitorUseCase(BaseProcessor):
627
728
  #print("---------DATA5--------------",processed_data)
628
729
  # Step 8: Perform OCR on media
629
730
  ocr_analysis = self._analyze_ocr_in_media(processed_data, input_bytes, config)
630
-
631
- #print("ocr_analysis", ocr_analysis)
731
+ self.logger.info(f"[LP_LOGGING] OCR analysis completed, found {len(ocr_analysis)} results")
732
+ ocr_plates_found = [r.get('plate_text') for r in ocr_analysis if r.get('plate_text')]
733
+ if ocr_plates_found:
734
+ self.logger.info(f"[LP_LOGGING] OCR detected plates: {ocr_plates_found}")
735
+ else:
736
+ self.logger.warning(f"[LP_LOGGING] OCR did not detect any valid plate texts")
632
737
 
633
738
  # Step 9: Update plate texts
634
- #print("---------DATA6--------------",processed_data)
635
739
  processed_data = self._update_detections_with_ocr(processed_data, ocr_analysis)
636
740
  self._update_plate_texts(processed_data)
637
741
 
742
+ # Log final detection state before sending
743
+ final_plates = [d.get('plate_text') for d in processed_data if d.get('plate_text')]
744
+ self.logger.info(f"[LP_LOGGING] After OCR update, {len(final_plates)} detections have plate_text: {final_plates}")
745
+
638
746
  # Step 9.5: Log detected plates to RPC (optional, only if lpr_server_id is provided)
639
747
  self._log_detected_plates(processed_data, config, stream_info, input_bytes)
640
748
 
@@ -926,7 +1034,7 @@ class LicensePlateMonitorUseCase(BaseProcessor):
926
1034
  if not dominant_text:
927
1035
  dominant_text = self.unique_plate_track.get(tid)
928
1036
 
929
- # Enforce length 5–6 and uniqueness per frame
1037
+ # Enforce length 56 and uniqueness per frame
930
1038
  if dominant_text and self._min_plate_len <= len(dominant_text) <= 6:
931
1039
  unique_texts.add(dominant_text)
932
1040
  valid_detections.append({
@@ -1373,7 +1481,7 @@ class LicensePlateMonitorUseCase(BaseProcessor):
1373
1481
  """Format a timestamp so that exactly two digits follow the decimal point (milliseconds).
1374
1482
 
1375
1483
  The input can be either:
1376
- 1. A numeric Unix timestamp (``float`` / ``int``)it will first be converted to a
1484
+ 1. A numeric Unix timestamp (``float`` / ``int``) it will first be converted to a
1377
1485
  string in the format ``YYYY-MM-DD-HH:MM:SS.ffffff UTC``.
1378
1486
  2. A string already following the same layout.
1379
1487