refactor(crowd_analysis): simplify table + upgrade YOLO + add regional holidays

- Remove internal YOLO counts (cars/people/buses/total_vehicles) from crowd_analysis table
- Keep only crowd_density and confidence_scores for persistence (no ML training impact)
- Upgrade from YOLOv8n to YOLOv11m for better person detection (fewer false positives)
- Add regional holidays: Día de Castilla y León (4/23), Santiago Apóstol (7/25, shared with Galicia)
- Add Easter Monday (moveable, 2018-2035) for Castilla y León and Galicia
- Update all tests to match simplified crowd_analysis schema

Tests: all 38 SQLite/crowd_analyzer tests + 13 feature tests passing.
This commit is contained in:
dasemu committed 2026-03-13 18:03:15 +01:00
1 parent fa7d61b7db
commit 5e2a22340f
5 files changed
+25 -78

No files matched your search

-8
View File
@@ -107,10 +107,6 @@ def test_crowd_analysis_roundtrip(tmp_path):
"timestamp": "2026-03-13T11:00:00",
"station_id": "sanisidro",
"image_path": "/tmp/frame.jpg",
"cars_detected": 5,
"people_detected": 2,
"buses_detected": 0,
"total_vehicles": 5,
"crowd_density": "low",
"confidence_scores": [0.91, 0.88],
}
@@ -120,10 +116,6 @@ def test_crowd_analysis_roundtrip(tmp_path):
"timestamp": "2026-03-13T12:00:00",
"station_id": "sanisidro",
"image_path": "/tmp/frame2.jpg",
"cars_detected": 25,
"people_detected": 4,
"buses_detected": 1,
"total_vehicles": 26,
"crowd_density": "medium",
"confidence_scores": [0.77],
}