matrice-analytics 0.1.70__py3-none-any.whl → 0.1.89__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- matrice_analytics/post_processing/config.py +2 -2
- matrice_analytics/post_processing/core/base.py +1 -1
- matrice_analytics/post_processing/face_reg/face_recognition.py +871 -190
- matrice_analytics/post_processing/face_reg/face_recognition_client.py +55 -25
- matrice_analytics/post_processing/usecases/advanced_customer_service.py +908 -498
- matrice_analytics/post_processing/usecases/color_detection.py +18 -18
- matrice_analytics/post_processing/usecases/customer_service.py +356 -9
- matrice_analytics/post_processing/usecases/fire_detection.py +147 -9
- matrice_analytics/post_processing/usecases/license_plate_monitoring.py +549 -41
- matrice_analytics/post_processing/usecases/people_counting.py +11 -11
- matrice_analytics/post_processing/usecases/vehicle_monitoring.py +34 -34
- matrice_analytics/post_processing/utils/alert_instance_utils.py +950 -0
- matrice_analytics/post_processing/utils/business_metrics_manager_utils.py +1245 -0
- matrice_analytics/post_processing/utils/incident_manager_utils.py +1657 -0
- {matrice_analytics-0.1.70.dist-info → matrice_analytics-0.1.89.dist-info}/METADATA +1 -1
- {matrice_analytics-0.1.70.dist-info → matrice_analytics-0.1.89.dist-info}/RECORD +19 -16
- {matrice_analytics-0.1.70.dist-info → matrice_analytics-0.1.89.dist-info}/WHEEL +0 -0
- {matrice_analytics-0.1.70.dist-info → matrice_analytics-0.1.89.dist-info}/licenses/LICENSE.txt +0 -0
- {matrice_analytics-0.1.70.dist-info → matrice_analytics-0.1.89.dist-info}/top_level.txt +0 -0
|
@@ -333,20 +333,20 @@ class PeopleCountingUseCase(BaseProcessor):
|
|
|
333
333
|
})
|
|
334
334
|
|
|
335
335
|
human_text_lines = []
|
|
336
|
-
human_text_lines.append(f"CURRENT FRAME @ {current_timestamp}")
|
|
336
|
+
human_text_lines.append(f"CURRENT FRAME @ {current_timestamp}:")
|
|
337
337
|
for cat, count in per_category_count.items():
|
|
338
338
|
human_text_lines.append(f"\t- People Detected: {count}")
|
|
339
339
|
human_text_lines.append("")
|
|
340
|
-
human_text_lines.append(f"TOTAL SINCE {start_timestamp}")
|
|
341
|
-
for cat, count in total_counts_dict.items():
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
if alerts:
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
else:
|
|
349
|
-
|
|
340
|
+
# human_text_lines.append(f"TOTAL SINCE {start_timestamp}")
|
|
341
|
+
# for cat, count in total_counts_dict.items():
|
|
342
|
+
# if count > 0:
|
|
343
|
+
# human_text_lines.append("")
|
|
344
|
+
# human_text_lines.append(f"\t- Total unique people count: {count}")
|
|
345
|
+
# if alerts:
|
|
346
|
+
# for alert in alerts:
|
|
347
|
+
# human_text_lines.append(f"Alerts: {alert.get('settings', {})} sent @ {current_timestamp}")
|
|
348
|
+
# else:
|
|
349
|
+
# human_text_lines.append("Alerts: None")
|
|
350
350
|
human_text = "\n".join(human_text_lines)
|
|
351
351
|
|
|
352
352
|
reset_settings = [{"interval_type": "daily", "reset_time": {"value": 9, "time_unit": "hour"}}]
|
|
@@ -633,40 +633,40 @@ class VehicleMonitoringUseCase(BaseProcessor):
|
|
|
633
633
|
human_text_lines.append(f"\t\t- {cat}: {count}")
|
|
634
634
|
|
|
635
635
|
human_text_lines.append("")
|
|
636
|
-
human_text_lines.append(f"TOTAL SINCE @ {start_timestamp}:")
|
|
637
|
-
|
|
638
|
-
# Display total counts - zone-wise or category-wise
|
|
639
|
-
if zone_analysis:
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
else:
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
# Display alerts
|
|
663
|
-
if alerts:
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
else:
|
|
668
|
-
|
|
669
|
-
|
|
636
|
+
# human_text_lines.append(f"TOTAL SINCE @ {start_timestamp}:")
|
|
637
|
+
|
|
638
|
+
# # Display total counts - zone-wise or category-wise
|
|
639
|
+
# if zone_analysis:
|
|
640
|
+
# human_text_lines.append("\t- Total Vehicles by Zone:")
|
|
641
|
+
# for zone_name, zone_data in zone_analysis.items():
|
|
642
|
+
# total_count = 0
|
|
643
|
+
# if isinstance(zone_data, dict):
|
|
644
|
+
# # Prefer the numeric cumulative total if available
|
|
645
|
+
# if "total_count" in zone_data and isinstance(zone_data.get("total_count"), (int, float)):
|
|
646
|
+
# total_count = zone_data.get("total_count", 0)
|
|
647
|
+
# # Fallback: compute from list of total_track_ids if present
|
|
648
|
+
# elif "total_track_ids" in zone_data and isinstance(zone_data.get("total_track_ids"), list):
|
|
649
|
+
# total_count = len(zone_data.get("total_track_ids", []))
|
|
650
|
+
# else:
|
|
651
|
+
# # Last resort: try to sum numeric values present
|
|
652
|
+
# counts_dict = zone_data if isinstance(zone_data, dict) else {}
|
|
653
|
+
# total_count = sum(v for v in counts_dict.values() if isinstance(v, (int, float)))
|
|
654
|
+
# human_text_lines.append(f"\t\t- {zone_name}: {int(total_count)}")
|
|
655
|
+
# else:
|
|
656
|
+
# if total_counts_dict:
|
|
657
|
+
# human_text_lines.append("\t- Total Unique Vehicles:")
|
|
658
|
+
# for cat, count in total_counts_dict.items():
|
|
659
|
+
# if count > 0:
|
|
660
|
+
# human_text_lines.append(f"\t\t- {cat}: {count}")
|
|
661
|
+
|
|
662
|
+
# # Display alerts
|
|
663
|
+
# if alerts:
|
|
664
|
+
# human_text_lines.append("")
|
|
665
|
+
# for alert in alerts:
|
|
666
|
+
# human_text_lines.append(f"Alerts: {alert.get('settings', {})} sent @ {current_timestamp}")
|
|
667
|
+
# else:
|
|
668
|
+
# human_text_lines.append("")
|
|
669
|
+
# human_text_lines.append("Alerts: None")
|
|
670
670
|
|
|
671
671
|
human_text = "\n".join(human_text_lines)
|
|
672
672
|
|