feat: initial BantayCam scaffold

- FastAPI backend with async SQLAlchemy
- Camera RTSP management (add, start, stop)
- Vehicle detection (YOLO + fast-alpr)
  - Type: car, motorcycle, truck, jeepney
  - Color detection (HSV)
  - License plate OCR
  - Motorcycle person count
- Face detection + InsightFace ArcFace embedding
- pgvector identity grouping (auto-cluster same face)
- Vehicle + person movement trail APIs
- Docker Compose with pgvector/pg16
- Models: Camera, VehicleIdentity, VehicleEvent, PersonIdentity, FaceEvent
This commit is contained in:
Nemo
2026-03-12 12:11:02 +08:00
commit 7c43e4580d
24 changed files with 1650 additions and 0 deletions

27
backend/requirements.txt Normal file
View File

@@ -0,0 +1,27 @@
# Web framework
fastapi==0.115.0
uvicorn[standard]==0.30.6
pydantic==2.9.2
pydantic-settings==2.5.2
# Database
sqlalchemy[asyncio]==2.0.35
asyncpg==0.29.0
pgvector==0.3.2
alembic==1.13.3
# AI / Computer Vision
ultralytics==8.3.0 # YOLOv8/v11 vehicle + person detection
fast-alpr==0.2.0 # License plate recognition
insightface==0.7.3 # Face detection + recognition (ArcFace)
opencv-python-headless==4.10.0.84
numpy==1.26.4
onnxruntime-gpu==1.19.2 # GPU inference (use onnxruntime for CPU-only)
# Optional: GPU acceleration
# torch>=2.0 (install separately with CUDA support)
# Utilities
python-multipart==0.0.9 # File uploads
aiofiles==24.1.0
httpx==0.27.2