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.
@@ -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
- 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")
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
- 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")
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