matrice 1.0.99132__tar.gz → 1.0.99134__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 (237) hide show
  1. {matrice-1.0.99132/src/matrice.egg-info → matrice-1.0.99134}/PKG-INFO +1 -1
  2. {matrice-1.0.99132 → matrice-1.0.99134}/setup.py +1 -1
  3. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/child_monitoring.py +21 -18
  4. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/flare_analysis.py +66 -29
  5. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/traffic_sign_monitoring.py +38 -16
  6. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/weapon_detection.py +38 -13
  7. {matrice-1.0.99132 → matrice-1.0.99134/src/matrice.egg-info}/PKG-INFO +1 -1
  8. {matrice-1.0.99132 → matrice-1.0.99134}/LICENSE.txt +0 -0
  9. {matrice-1.0.99132 → matrice-1.0.99134}/README.md +0 -0
  10. {matrice-1.0.99132 → matrice-1.0.99134}/setup.cfg +0 -0
  11. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/__init__.py +0 -0
  12. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/action.py +0 -0
  13. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/actionTracker.py +0 -0
  14. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/action_tracker.py +0 -0
  15. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/annotation.py +0 -0
  16. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/app_store.py +0 -0
  17. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/application.py +0 -0
  18. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/compute.py +0 -0
  19. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/compute_manager/__init__.py +0 -0
  20. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/compute_manager/action_instance.py +0 -0
  21. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/compute_manager/actions_manager.py +0 -0
  22. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/compute_manager/actions_scaledown_manager.py +0 -0
  23. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/compute_manager/instance_manager.py +0 -0
  24. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/compute_manager/instance_utils.py +0 -0
  25. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/compute_manager/prechecks.py +0 -0
  26. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/compute_manager/resources_tracker.py +0 -0
  27. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/compute_manager/scaling.py +0 -0
  28. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/compute_manager/shutdown_manager.py +0 -0
  29. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/compute_manager/task_utils.py +0 -0
  30. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/__init__.py +0 -0
  31. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/__init__.py +0 -0
  32. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/base.py +0 -0
  33. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/__init__.py +0 -0
  34. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/bit_depth_reduction.py +0 -0
  35. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/blur.py +0 -0
  36. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/brightness_contrast.py +0 -0
  37. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/color_jitter.py +0 -0
  38. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/compression_artifacts.py +0 -0
  39. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/downscale_upscale.py +0 -0
  40. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/film_grain.py +0 -0
  41. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/flip.py +0 -0
  42. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/fog.py +0 -0
  43. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/horizontal_flip.py +0 -0
  44. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/hsv.py +0 -0
  45. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/iso_noise.py +0 -0
  46. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/low_light.py +0 -0
  47. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/posterize.py +0 -0
  48. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/rain.py +0 -0
  49. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/random_affine.py +0 -0
  50. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/salt_pepper.py +0 -0
  51. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/shadows.py +0 -0
  52. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/snow.py +0 -0
  53. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/speckle.py +0 -0
  54. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/augmentation_utils/strategies/sunflare.py +0 -0
  55. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/client.py +0 -0
  56. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/client_utils.py +0 -0
  57. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/create_dataset.py +0 -0
  58. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_augmentation.py +0 -0
  59. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_augmentor.py +0 -0
  60. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/__init__.py +0 -0
  61. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/imagenet_classification.py +0 -0
  62. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/labelbox_classification.py +0 -0
  63. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/labelbox_detection.py +0 -0
  64. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/mscoco_detection.py +0 -0
  65. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/pascalvoc_detection.py +0 -0
  66. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/unlabelled.py +0 -0
  67. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/video_davis_segmentation.py +0 -0
  68. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/video_detection_mscoco.py +0 -0
  69. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/video_imagenet_classification.py +0 -0
  70. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/video_kinetics_activity_recognition.py +0 -0
  71. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/video_mot_tracking.py +0 -0
  72. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/video_mscoco_detection.py +0 -0
  73. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/video_youtube_bb_tracking.py +0 -0
  74. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_formats/yolo_detection.py +0 -0
  75. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_labelling.py +0 -0
  76. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_prep.py +0 -0
  77. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/data_processor.py +0 -0
  78. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/image_augmentations.py +0 -0
  79. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/image_data_augmentation.py +0 -0
  80. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/new_data_augmentation.py +0 -0
  81. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/pipeline.py +0 -0
  82. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/server.py +0 -0
  83. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/server_utils.py +0 -0
  84. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/data_processing/video_server.py +0 -0
  85. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/dataset.py +0 -0
  86. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/__init__.py +0 -0
  87. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/aggregator/__init__.py +0 -0
  88. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/aggregator/aggregator.py +0 -0
  89. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/aggregator/ingestor.py +0 -0
  90. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/aggregator/pipeline.py +0 -0
  91. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/aggregator/publisher.py +0 -0
  92. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/aggregator/synchronizer.py +0 -0
  93. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/client/__init__.py +0 -0
  94. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/client/auto_streaming/__init__.py +0 -0
  95. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/client/auto_streaming/auto_streaming.py +0 -0
  96. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/client/auto_streaming/auto_streaming_utils.py +0 -0
  97. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/client/client.py +0 -0
  98. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/client/client_stream_utils.py +0 -0
  99. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/client/client_utils.py +0 -0
  100. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/client/frame_comparators.py +0 -0
  101. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/client/streaming_gateway/__init__.py +0 -0
  102. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/client/streaming_gateway/streaming_gateway.py +0 -0
  103. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/client/streaming_gateway/streaming_gateway_utils.py +0 -0
  104. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/client/streaming_gateway/streaming_results_handler.py +0 -0
  105. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/server/__init__.py +0 -0
  106. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/server/inference/__init__.py +0 -0
  107. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/server/inference/batch_manager.py +0 -0
  108. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/server/inference/cache_manager.py +0 -0
  109. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/server/inference/inference_interface.py +0 -0
  110. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/server/inference/model_manager.py +0 -0
  111. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/server/inference/triton_utils.py +0 -0
  112. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/server/proxy/__init__.py +0 -0
  113. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/server/proxy/proxy_interface.py +0 -0
  114. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/server/proxy/proxy_utils.py +0 -0
  115. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/server/server.py +0 -0
  116. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/server/stream_worker.py +0 -0
  117. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/__init__.py +0 -0
  118. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/boundary_drawing_internal/__init__.py +0 -0
  119. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/boundary_drawing_internal/boundary_drawing_internal.py +0 -0
  120. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/boundary_drawing_internal/boundary_drawing_tool.py +0 -0
  121. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/boundary_drawing_internal/example_usage.py +0 -0
  122. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/kafka_utils.py +0 -0
  123. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/__init__.py +0 -0
  124. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/advanced_tracker/__init__.py +0 -0
  125. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/advanced_tracker/base.py +0 -0
  126. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/advanced_tracker/config.py +0 -0
  127. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/advanced_tracker/kalman_filter.py +0 -0
  128. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/advanced_tracker/matching.py +0 -0
  129. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/advanced_tracker/strack.py +0 -0
  130. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/advanced_tracker/tracker.py +0 -0
  131. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/config.py +0 -0
  132. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/core/__init__.py +0 -0
  133. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/core/base.py +0 -0
  134. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/core/config.py +0 -0
  135. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/core/config_utils.py +0 -0
  136. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/processor.py +0 -0
  137. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/test_cases/__init__.py +0 -0
  138. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/test_cases/run_tests.py +0 -0
  139. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/test_cases/test_advanced_customer_service.py +0 -0
  140. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/test_cases/test_basic_counting_tracking.py +0 -0
  141. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/test_cases/test_comprehensive.py +0 -0
  142. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/test_cases/test_config.py +0 -0
  143. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/test_cases/test_customer_service.py +0 -0
  144. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/test_cases/test_data_generators.py +0 -0
  145. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/test_cases/test_people_counting.py +0 -0
  146. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/test_cases/test_processor.py +0 -0
  147. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/test_cases/test_utilities.py +0 -0
  148. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/test_cases/test_utils.py +0 -0
  149. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/__init__.py +0 -0
  150. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/advanced_customer_service.py +0 -0
  151. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/age_detection.py +0 -0
  152. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/anti_spoofing_detection.py +0 -0
  153. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/assembly_line_detection.py +0 -0
  154. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/banana_defect_detection.py +0 -0
  155. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/basic_counting_tracking.py +0 -0
  156. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/blood_cancer_detection_img.py +0 -0
  157. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/car_damage_detection.py +0 -0
  158. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/car_part_segmentation.py +0 -0
  159. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/chicken_pose_detection.py +0 -0
  160. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/color_detection.py +0 -0
  161. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/color_map_utils.py +0 -0
  162. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/concrete_crack_detection.py +0 -0
  163. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/crop_weed_detection.py +0 -0
  164. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/customer_service.py +0 -0
  165. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/defect_detection_products.py +0 -0
  166. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/distracted_driver_detection.py +0 -0
  167. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/emergency_vehicle_detection.py +0 -0
  168. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/face_emotion.py +0 -0
  169. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/fashion_detection.py +0 -0
  170. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/field_mapping.py +0 -0
  171. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/fire_detection.py +0 -0
  172. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/flower_segmentation.py +0 -0
  173. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/gender_detection.py +0 -0
  174. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/leaf.py +0 -0
  175. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/leaf_disease.py +0 -0
  176. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/license_plate_detection.py +0 -0
  177. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/mask_detection.py +0 -0
  178. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/parking.py +0 -0
  179. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/parking_space_detection.py +0 -0
  180. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/pedestrian_detection.py +0 -0
  181. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/people_counting.py +0 -0
  182. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/plaque_segmentation_img.py +0 -0
  183. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/pothole_segmentation.py +0 -0
  184. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/ppe_compliance.py +0 -0
  185. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/price_tag_detection.py +0 -0
  186. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/road_lane_detection.py +0 -0
  187. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/shelf_inventory_detection.py +0 -0
  188. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/shoplifting_detection.py +0 -0
  189. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/shopping_cart_analysis.py +0 -0
  190. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/skin_cancer_classification_img.py +0 -0
  191. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/solar_panel.py +0 -0
  192. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/template_usecase.py +0 -0
  193. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/theft_detection.py +0 -0
  194. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/underwater_pollution_detection.py +0 -0
  195. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/vehicle_monitoring.py +0 -0
  196. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/warehouse_object_segmentation.py +0 -0
  197. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/weld_defect_detection.py +0 -0
  198. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/windmill_maintenance.py +0 -0
  199. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/usecases/wound_segmentation.py +0 -0
  200. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/utils/__init__.py +0 -0
  201. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/utils/advanced_counting_utils.py +0 -0
  202. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/utils/advanced_helper_utils.py +0 -0
  203. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/utils/advanced_tracking_utils.py +0 -0
  204. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/utils/alerting_utils.py +0 -0
  205. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/utils/category_mapping_utils.py +0 -0
  206. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/utils/color_utils.py +0 -0
  207. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/utils/counting_utils.py +0 -0
  208. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/utils/filter_utils.py +0 -0
  209. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/utils/format_utils.py +0 -0
  210. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/utils/geometry_utils.py +0 -0
  211. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/utils/smoothing_utils.py +0 -0
  212. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deploy/utils/post_processing/utils/tracking_utils.py +0 -0
  213. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deployment/__init__.py +0 -0
  214. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deployment/camera_manager.py +0 -0
  215. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deployment/deployment.py +0 -0
  216. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deployment/inference_pipeline.py +0 -0
  217. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/deployment/streaming_gateway_manager.py +0 -0
  218. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/docker_utils.py +0 -0
  219. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/drift_monitor.py +0 -0
  220. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/exported_model.py +0 -0
  221. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/local_test.py +0 -0
  222. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/metrics_calculator.py +0 -0
  223. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/metrics_calculator_oop.py +0 -0
  224. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/model_store.py +0 -0
  225. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/models.py +0 -0
  226. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/pipeline.py +0 -0
  227. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/projects.py +0 -0
  228. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/rpc.py +0 -0
  229. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/scaling.py +0 -0
  230. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/session.py +0 -0
  231. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/testing.py +0 -0
  232. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/token_auth.py +0 -0
  233. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice/utils.py +0 -0
  234. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice.egg-info/SOURCES.txt +0 -0
  235. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice.egg-info/dependency_links.txt +0 -0
  236. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice.egg-info/requires.txt +0 -0
  237. {matrice-1.0.99132 → matrice-1.0.99134}/src/matrice.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrice
3
- Version: 1.0.99132
3
+ Version: 1.0.99134
4
4
  Summary: SDK for connecting to matrice.ai services
5
5
  Home-page: https://github.com/matrice-ai/python-sdk
6
6
  Author: Matrice.ai
@@ -14,7 +14,7 @@ long_description = (here / "README.md").read_text(encoding="utf-8")
14
14
  setup(
15
15
  name="matrice",
16
16
 
17
- version = "1.0.99132",
17
+ version = "1.0.99134",
18
18
 
19
19
  description="SDK for connecting to matrice.ai services",
20
20
  long_description=long_description,
@@ -582,34 +582,40 @@ class ChildMonitoringUseCase(BaseProcessor):
582
582
  """Format timestamp for video chunks (HH:MM:SS.ms format)."""
583
583
  hours = int(timestamp // 3600)
584
584
  minutes = int((timestamp % 3600) // 60)
585
- seconds = timestamp % 60
586
- return f"{hours:02d}:{minutes:02d}:{seconds:06.2f}"
585
+ seconds = round(float(timestamp % 60),2)
586
+ return f"{hours:02d}:{minutes:02d}:{seconds:.1f}"
587
587
 
588
588
  def _format_timestamp_for_stream(self, timestamp: float) -> str:
589
589
  """Format timestamp for streams (YYYY:MM:DD HH:MM:SS format)."""
590
590
  dt = datetime.fromtimestamp(timestamp, tz=timezone.utc)
591
591
  return dt.strftime('%Y:%m:%d %H:%M:%S')
592
592
 
593
- def _get_current_timestamp_str(self, stream_info: Optional[Dict[str, Any]], precision=False) -> str:
593
+ def _get_current_timestamp_str(self, stream_info: Optional[Dict[str, Any]], precision=False, frame_id: Optional[str]=None) -> str:
594
594
  """Get formatted current timestamp based on stream type."""
595
595
  if not stream_info:
596
596
  return "00:00:00.00"
597
-
598
597
  # is_video_chunk = stream_info.get("input_settings", {}).get("is_video_chunk", False)
599
598
  if precision:
600
- if stream_info.get("input_settings", {}).get("stream_type", "video_file") == "video_file":
601
- stream_time_str = stream_info.get("video_timestamp", "")
602
- return stream_time_str[:8]
599
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
600
+ if frame_id:
601
+ start_time = int(frame_id)/stream_info.get("input_settings", {}).get("original_fps", 30)
602
+ else:
603
+ start_time = stream_info.get("input_settings", {}).get("start_frame", 30)/stream_info.get("input_settings", {}).get("original_fps", 30)
604
+ stream_time_str = self._format_timestamp_for_video(start_time)
605
+ return stream_time_str
603
606
  else:
604
607
  return datetime.now(timezone.utc).strftime("%Y-%m-%d-%H:%M:%S.%f UTC")
605
608
 
606
- if stream_info.get("input_settings", {}).get("stream_type", "video_file") == "video_file":
607
- # If video format, return video timestamp
608
- stream_time_str = stream_info.get("video_timestamp", "")
609
- return stream_time_str[:8]
609
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
610
+ if frame_id:
611
+ start_time = int(frame_id)/stream_info.get("input_settings", {}).get("original_fps", 30)
612
+ else:
613
+ start_time = stream_info.get("input_settings", {}).get("start_frame", 30)/stream_info.get("input_settings", {}).get("original_fps", 30)
614
+ stream_time_str = self._format_timestamp_for_video(start_time)
615
+ return stream_time_str
610
616
  else:
611
617
  # For streams, use stream_time from stream_info
612
- stream_time_str = stream_info.get("stream_time", "")
618
+ stream_time_str = stream_info.get("input_settings", {}).get("stream_info", {}).get("stream_time", "")
613
619
  if stream_time_str:
614
620
  # Parse the high precision timestamp string to get timestamp
615
621
  try:
@@ -628,23 +634,20 @@ class ChildMonitoringUseCase(BaseProcessor):
628
634
  """Get formatted start timestamp for 'TOTAL SINCE' based on stream type."""
629
635
  if not stream_info:
630
636
  return "00:00:00"
631
-
632
- is_video_chunk = stream_info.get("input_settings", {}).get("is_video_chunk", False)
633
637
  if precision:
634
- if stream_info.get("input_settings", {}).get("stream_type", "video_file") == "video_file":
638
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
635
639
  return "00:00:00"
636
640
  else:
637
641
  return datetime.now(timezone.utc).strftime("%Y-%m-%d-%H:%M:%S.%f UTC")
638
642
 
639
-
640
- if stream_info.get("input_settings", {}).get("stream_type", "video_file") == "video_file":
643
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
641
644
  # If video format, start from 00:00:00
642
645
  return "00:00:00"
643
646
  else:
644
647
  # For streams, use tracking start time or current time with minutes/seconds reset
645
648
  if self._tracking_start_time is None:
646
649
  # Try to extract timestamp from stream_time string
647
- stream_time_str = stream_info.get("stream_time", "")
650
+ stream_time_str = stream_info.get("input_settings", {}).get("stream_info", {}).get("stream_time", "")
648
651
  if stream_time_str:
649
652
  try:
650
653
  # Remove " UTC" suffix and parse
@@ -182,53 +182,90 @@ class FlareAnalysisUseCase(BaseProcessor):
182
182
  return {cat: len(ids) for cat, ids in self._per_category_total_track_ids.items()}
183
183
 
184
184
  def _format_timestamp_for_video(self, timestamp: float) -> str:
185
+ """Format timestamp for video chunks (HH:MM:SS.ms format)."""
185
186
  hours = int(timestamp // 3600)
186
187
  minutes = int((timestamp % 3600) // 60)
187
- seconds = timestamp % 60
188
- return f"{hours:02d}:{minutes:02d}:{seconds:06.2f}"
188
+ seconds = round(float(timestamp % 60),2)
189
+ return f"{hours:02d}:{minutes:02d}:{seconds:.1f}"
189
190
 
190
191
  def _format_timestamp_for_stream(self, timestamp: float, precision: bool = False) -> str:
191
192
  dt = datetime.fromtimestamp(timestamp, tz=timezone.utc)
192
193
  return dt.strftime("%Y-%m-%d-%H:%M:%S.%f UTC" if precision else "%Y:%m:%d %H:%M:%S")
193
194
 
194
- def _get_current_timestamp_str(self, stream_info: Optional[Dict[str, Any]], precision: bool = False) -> str:
195
+ def _get_current_timestamp_str(self, stream_info: Optional[Dict[str, Any]], precision=False, frame_id: Optional[str]=None) -> str:
196
+ """Get formatted current timestamp based on stream type."""
195
197
  if not stream_info:
196
- return "00:00:00.00" if not precision else "00:00:00.000000 UTC"
197
- if stream_info.get("input_settings", {}).get("stream_type", "video_file") == "video_file":
198
- stream_time_str = stream_info.get("video_timestamp", "")
199
- return stream_time_str[:8] if not precision else stream_time_str
198
+ return "00:00:00.00"
199
+ # is_video_chunk = stream_info.get("input_settings", {}).get("is_video_chunk", False)
200
+ if precision:
201
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
202
+ if frame_id:
203
+ start_time = int(frame_id)/stream_info.get("input_settings", {}).get("original_fps", 30)
204
+ else:
205
+ start_time = stream_info.get("input_settings", {}).get("start_frame", 30)/stream_info.get("input_settings", {}).get("original_fps", 30)
206
+ stream_time_str = self._format_timestamp_for_video(start_time)
207
+ return stream_time_str
208
+ else:
209
+ return datetime.now(timezone.utc).strftime("%Y-%m-%d-%H:%M:%S.%f UTC")
210
+
211
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
212
+ if frame_id:
213
+ start_time = int(frame_id)/stream_info.get("input_settings", {}).get("original_fps", 30)
214
+ else:
215
+ start_time = stream_info.get("input_settings", {}).get("start_frame", 30)/stream_info.get("input_settings", {}).get("original_fps", 30)
216
+ stream_time_str = self._format_timestamp_for_video(start_time)
217
+ return stream_time_str
200
218
  else:
201
- stream_time_str = stream_info.get("stream_time", "")
219
+ # For streams, use stream_time from stream_info
220
+ stream_time_str = stream_info.get("input_settings", {}).get("stream_info", {}).get("stream_time", "")
202
221
  if stream_time_str:
222
+ # Parse the high precision timestamp string to get timestamp
203
223
  try:
224
+ # Remove " UTC" suffix and parse
204
225
  timestamp_str = stream_time_str.replace(" UTC", "")
205
226
  dt = datetime.strptime(timestamp_str, "%Y-%m-%d-%H:%M:%S.%f")
206
227
  timestamp = dt.replace(tzinfo=timezone.utc).timestamp()
207
- return self._format_timestamp_for_stream(timestamp, precision)
228
+ return self._format_timestamp_for_stream(timestamp)
208
229
  except:
209
- return self._format_timestamp_for_stream(time.time(), precision)
210
- return self._format_timestamp_for_stream(time.time(), precision)
230
+ # Fallback to current time if parsing fails
231
+ return self._format_timestamp_for_stream(time.time())
232
+ else:
233
+ return self._format_timestamp_for_stream(time.time())
211
234
 
212
- def _get_start_timestamp_str(self, stream_info: Optional[Dict[str, Any]], precision: bool = False) -> str:
235
+ def _get_start_timestamp_str(self, stream_info: Optional[Dict[str, Any]], precision=False) -> str:
236
+ """Get formatted start timestamp for 'TOTAL SINCE' based on stream type."""
213
237
  if not stream_info:
214
- return "00:00:00" if not precision else "00:00:00.000000 UTC"
215
- is_video_chunk = stream_info.get("input_settings", {}).get("is_video_chunk", False)
216
- if is_video_chunk or stream_info.get("video_format") is not None:
217
- return "00:00:00" if not precision else "00:00:00.000000 UTC"
218
- if self._tracking_start_time is None:
219
- stream_time_str = stream_info.get("stream_time", "")
220
- if stream_time_str:
221
- try:
222
- timestamp_str = stream_time_str.replace(" UTC", "")
223
- dt = datetime.strptime(timestamp_str, "%Y-%m-%d-%H:%M:%S.%f")
224
- self._tracking_start_time = dt.replace(tzinfo=timezone.utc).timestamp()
225
- except:
226
- self._tracking_start_time = time.time()
238
+ return "00:00:00"
239
+ if precision:
240
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
241
+ return "00:00:00"
227
242
  else:
228
- self._tracking_start_time = time.time()
229
- dt = datetime.fromtimestamp(self._tracking_start_time, tz=timezone.utc)
230
- dt = dt.replace(minute=0, second=0, microsecond=0)
231
- return dt.strftime("%Y:%m:%d %H:%M:%S" if not precision else "%Y-%m-%d-%H:%M:%S.%f UTC")
243
+ return datetime.now(timezone.utc).strftime("%Y-%m-%d-%H:%M:%S.%f UTC")
244
+
245
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
246
+ # If video format, start from 00:00:00
247
+ return "00:00:00"
248
+ else:
249
+ # For streams, use tracking start time or current time with minutes/seconds reset
250
+ if self._tracking_start_time is None:
251
+ # Try to extract timestamp from stream_time string
252
+ stream_time_str = stream_info.get("input_settings", {}).get("stream_info", {}).get("stream_time", "")
253
+ if stream_time_str:
254
+ try:
255
+ # Remove " UTC" suffix and parse
256
+ timestamp_str = stream_time_str.replace(" UTC", "")
257
+ dt = datetime.strptime(timestamp_str, "%Y-%m-%d-%H:%M:%S.%f")
258
+ self._tracking_start_time = dt.replace(tzinfo=timezone.utc).timestamp()
259
+ except:
260
+ # Fallback to current time if parsing fails
261
+ self._tracking_start_time = time.time()
262
+ else:
263
+ self._tracking_start_time = time.time()
264
+
265
+ dt = datetime.fromtimestamp(self._tracking_start_time, tz=timezone.utc)
266
+ # Reset minutes and seconds to 00:00 for "TOTAL SINCE" format
267
+ dt = dt.replace(minute=0, second=0, microsecond=0)
268
+ return dt.strftime('%Y:%m:%d %H:%M:%S')
232
269
 
233
270
  def _get_track_ids_info(self, detections: List[Dict]) -> Dict[str, Any]:
234
271
  frame_track_ids = set(det.get('track_id') for det in detections if det.get('track_id') is not None)
@@ -514,67 +514,89 @@ class TrafficSignMonitoringUseCase(BaseProcessor):
514
514
  return {cat: len(ids) for cat, ids in getattr(self, '_per_category_total_track_ids', {}).items()}
515
515
 
516
516
  def _format_timestamp_for_video(self, timestamp: float) -> str:
517
- """Format timestamp for video chunks."""
517
+ """Format timestamp for video chunks (HH:MM:SS.ms format)."""
518
518
  hours = int(timestamp // 3600)
519
519
  minutes = int((timestamp % 3600) // 60)
520
- seconds = timestamp % 60
521
- return f"{hours:02d}:{minutes:02d}:{seconds:06.2f}"
520
+ seconds = round(float(timestamp % 60),2)
521
+ return f"{hours:02d}:{minutes:02d}:{seconds:.1f}"
522
522
 
523
523
  def _format_timestamp_for_stream(self, timestamp: float) -> str:
524
524
  """Format timestamp for streams."""
525
525
  dt = datetime.fromtimestamp(timestamp, tz=timezone.utc)
526
526
  return dt.strftime('%Y:%m:%d %H:%M:%S')
527
527
 
528
- def _get_current_timestamp_str(self, stream_info: Optional[Dict[str, Any]], precision=False) -> str:
529
- """Get formatted current timestamp."""
528
+ def _get_current_timestamp_str(self, stream_info: Optional[Dict[str, Any]], precision=False, frame_id: Optional[str]=None) -> str:
529
+ """Get formatted current timestamp based on stream type."""
530
530
  if not stream_info:
531
531
  return "00:00:00.00"
532
+ # is_video_chunk = stream_info.get("input_settings", {}).get("is_video_chunk", False)
532
533
  if precision:
533
- if stream_info.get("input_settings", {}).get("stream_type", "video_file") == "video_file":
534
- stream_time_str = stream_info.get("video_timestamp", "")
535
- return stream_time_str[:8]
534
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
535
+ if frame_id:
536
+ start_time = int(frame_id)/stream_info.get("input_settings", {}).get("original_fps", 30)
537
+ else:
538
+ start_time = stream_info.get("input_settings", {}).get("start_frame", 30)/stream_info.get("input_settings", {}).get("original_fps", 30)
539
+ stream_time_str = self._format_timestamp_for_video(start_time)
540
+ return stream_time_str
536
541
  else:
537
542
  return datetime.now(timezone.utc).strftime("%Y-%m-%d-%H:%M:%S.%f UTC")
538
- if stream_info.get("input_settings", {}).get("stream_type", "video_file") == "video_file":
539
- stream_time_str = stream_info.get("video_timestamp", "")
540
- return stream_time_str[:8]
543
+
544
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
545
+ if frame_id:
546
+ start_time = int(frame_id)/stream_info.get("input_settings", {}).get("original_fps", 30)
547
+ else:
548
+ start_time = stream_info.get("input_settings", {}).get("start_frame", 30)/stream_info.get("input_settings", {}).get("original_fps", 30)
549
+ stream_time_str = self._format_timestamp_for_video(start_time)
550
+ return stream_time_str
541
551
  else:
542
- stream_time_str = stream_info.get("stream_time", "")
552
+ # For streams, use stream_time from stream_info
553
+ stream_time_str = stream_info.get("input_settings", {}).get("stream_info", {}).get("stream_time", "")
543
554
  if stream_time_str:
555
+ # Parse the high precision timestamp string to get timestamp
544
556
  try:
557
+ # Remove " UTC" suffix and parse
545
558
  timestamp_str = stream_time_str.replace(" UTC", "")
546
559
  dt = datetime.strptime(timestamp_str, "%Y-%m-%d-%H:%M:%S.%f")
547
560
  timestamp = dt.replace(tzinfo=timezone.utc).timestamp()
548
561
  return self._format_timestamp_for_stream(timestamp)
549
562
  except:
563
+ # Fallback to current time if parsing fails
550
564
  return self._format_timestamp_for_stream(time.time())
551
565
  else:
552
566
  return self._format_timestamp_for_stream(time.time())
553
567
 
554
568
  def _get_start_timestamp_str(self, stream_info: Optional[Dict[str, Any]], precision=False) -> str:
555
- """Get formatted start timestamp."""
569
+ """Get formatted start timestamp for 'TOTAL SINCE' based on stream type."""
556
570
  if not stream_info:
557
571
  return "00:00:00"
558
572
  if precision:
559
- if stream_info.get("input_settings", {}).get("stream_type", "video_file") == "video_file":
573
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
560
574
  return "00:00:00"
561
575
  else:
562
576
  return datetime.now(timezone.utc).strftime("%Y-%m-%d-%H:%M:%S.%f UTC")
563
- if stream_info.get("input_settings", {}).get("stream_type", "video_file") == "video_file":
577
+
578
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
579
+ # If video format, start from 00:00:00
564
580
  return "00:00:00"
565
581
  else:
582
+ # For streams, use tracking start time or current time with minutes/seconds reset
566
583
  if self._tracking_start_time is None:
567
- stream_time_str = stream_info.get("stream_time", "")
584
+ # Try to extract timestamp from stream_time string
585
+ stream_time_str = stream_info.get("input_settings", {}).get("stream_info", {}).get("stream_time", "")
568
586
  if stream_time_str:
569
587
  try:
588
+ # Remove " UTC" suffix and parse
570
589
  timestamp_str = stream_time_str.replace(" UTC", "")
571
590
  dt = datetime.strptime(timestamp_str, "%Y-%m-%d-%H:%M:%S.%f")
572
591
  self._tracking_start_time = dt.replace(tzinfo=timezone.utc).timestamp()
573
592
  except:
593
+ # Fallback to current time if parsing fails
574
594
  self._tracking_start_time = time.time()
575
595
  else:
576
596
  self._tracking_start_time = time.time()
597
+
577
598
  dt = datetime.fromtimestamp(self._tracking_start_time, tz=timezone.utc)
599
+ # Reset minutes and seconds to 00:00 for "TOTAL SINCE" format
578
600
  dt = dt.replace(minute=0, second=0, microsecond=0)
579
601
  return dt.strftime('%Y:%m:%d %H:%M:%S')
580
602
 
@@ -426,63 +426,88 @@ class WeaponDetectionUseCase(BaseProcessor):
426
426
  return {cat: len(ids) for cat, ids in getattr(self, '_per_category_total_track_ids', {}).items()}
427
427
 
428
428
  def _format_timestamp_for_video(self, timestamp: float) -> str:
429
+ """Format timestamp for video chunks (HH:MM:SS.ms format)."""
429
430
  hours = int(timestamp // 3600)
430
431
  minutes = int((timestamp % 3600) // 60)
431
- seconds = timestamp % 60
432
- return f"{hours:02d}:{minutes:02d}:{seconds:06.2f}"
432
+ seconds = round(float(timestamp % 60),2)
433
+ return f"{hours:02d}:{minutes:02d}:{seconds:.1f}"
433
434
 
434
435
  def _format_timestamp_for_stream(self, timestamp: float) -> str:
435
436
  dt = datetime.fromtimestamp(timestamp, tz=timezone.utc)
436
437
  return dt.strftime('%Y:%m:%d %H:%M:%S')
437
438
 
438
- def _get_current_timestamp_str(self, stream_info: Optional[Dict[str, Any]], precision=False) -> str:
439
+ def _get_current_timestamp_str(self, stream_info: Optional[Dict[str, Any]], precision=False, frame_id: Optional[str]=None) -> str:
440
+ """Get formatted current timestamp based on stream type."""
439
441
  if not stream_info:
440
442
  return "00:00:00.00"
443
+ # is_video_chunk = stream_info.get("input_settings", {}).get("is_video_chunk", False)
441
444
  if precision:
442
- if stream_info.get("input_settings", {}).get("stream_type", "video_file") == "video_file":
443
- stream_time_str = stream_info.get("video_timestamp", "")
444
- return stream_time_str[:8]
445
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
446
+ if frame_id:
447
+ start_time = int(frame_id)/stream_info.get("input_settings", {}).get("original_fps", 30)
448
+ else:
449
+ start_time = stream_info.get("input_settings", {}).get("start_frame", 30)/stream_info.get("input_settings", {}).get("original_fps", 30)
450
+ stream_time_str = self._format_timestamp_for_video(start_time)
451
+ return stream_time_str
445
452
  else:
446
453
  return datetime.now(timezone.utc).strftime("%Y-%m-%d-%H:%M:%S.%f UTC")
447
- if stream_info.get("input_settings", {}).get("stream_type", "video_file") == "video_file":
448
- stream_time_str = stream_info.get("video_timestamp", "")
449
- return stream_time_str[:8]
454
+
455
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
456
+ if frame_id:
457
+ start_time = int(frame_id)/stream_info.get("input_settings", {}).get("original_fps", 30)
458
+ else:
459
+ start_time = stream_info.get("input_settings", {}).get("start_frame", 30)/stream_info.get("input_settings", {}).get("original_fps", 30)
460
+ stream_time_str = self._format_timestamp_for_video(start_time)
461
+ return stream_time_str
450
462
  else:
451
- stream_time_str = stream_info.get("stream_time", "")
463
+ # For streams, use stream_time from stream_info
464
+ stream_time_str = stream_info.get("input_settings", {}).get("stream_info", {}).get("stream_time", "")
452
465
  if stream_time_str:
466
+ # Parse the high precision timestamp string to get timestamp
453
467
  try:
468
+ # Remove " UTC" suffix and parse
454
469
  timestamp_str = stream_time_str.replace(" UTC", "")
455
470
  dt = datetime.strptime(timestamp_str, "%Y-%m-%d-%H:%M:%S.%f")
456
471
  timestamp = dt.replace(tzinfo=timezone.utc).timestamp()
457
472
  return self._format_timestamp_for_stream(timestamp)
458
473
  except:
474
+ # Fallback to current time if parsing fails
459
475
  return self._format_timestamp_for_stream(time.time())
460
476
  else:
461
477
  return self._format_timestamp_for_stream(time.time())
462
478
 
463
479
  def _get_start_timestamp_str(self, stream_info: Optional[Dict[str, Any]], precision=False) -> str:
480
+ """Get formatted start timestamp for 'TOTAL SINCE' based on stream type."""
464
481
  if not stream_info:
465
482
  return "00:00:00"
466
483
  if precision:
467
- if stream_info.get("input_settings", {}).get("stream_type", "video_file") == "video_file":
484
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
468
485
  return "00:00:00"
469
486
  else:
470
487
  return datetime.now(timezone.utc).strftime("%Y-%m-%d-%H:%M:%S.%f UTC")
471
- if stream_info.get("input_settings", {}).get("stream_type", "video_file") == "video_file":
488
+
489
+ if stream_info.get("input_settings", {}).get("start_frame", "na") != "na":
490
+ # If video format, start from 00:00:00
472
491
  return "00:00:00"
473
492
  else:
493
+ # For streams, use tracking start time or current time with minutes/seconds reset
474
494
  if self._tracking_start_time is None:
475
- stream_time_str = stream_info.get("stream_time", "")
495
+ # Try to extract timestamp from stream_time string
496
+ stream_time_str = stream_info.get("input_settings", {}).get("stream_info", {}).get("stream_time", "")
476
497
  if stream_time_str:
477
498
  try:
499
+ # Remove " UTC" suffix and parse
478
500
  timestamp_str = stream_time_str.replace(" UTC", "")
479
501
  dt = datetime.strptime(timestamp_str, "%Y-%m-%d-%H:%M:%S.%f")
480
502
  self._tracking_start_time = dt.replace(tzinfo=timezone.utc).timestamp()
481
503
  except:
504
+ # Fallback to current time if parsing fails
482
505
  self._tracking_start_time = time.time()
483
506
  else:
484
507
  self._tracking_start_time = time.time()
508
+
485
509
  dt = datetime.fromtimestamp(self._tracking_start_time, tz=timezone.utc)
510
+ # Reset minutes and seconds to 00:00 for "TOTAL SINCE" format
486
511
  dt = dt.replace(minute=0, second=0, microsecond=0)
487
512
  return dt.strftime('%Y:%m:%d %H:%M:%S')
488
513
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrice
3
- Version: 1.0.99132
3
+ Version: 1.0.99134
4
4
  Summary: SDK for connecting to matrice.ai services
5
5
  Home-page: https://github.com/matrice-ai/python-sdk
6
6
  Author: Matrice.ai
File without changes
File without changes
File without changes