AI-powered surveillance — 4G cameras (OFITECO/ADIF)
Full-stack service to operate a network of autonomous 4G cameras (solar, no fixed IP) and analyse events with computer vision on railway infrastructure, integrated with the digital-twin platform.
The problem
Watching over stretches of track (ADIF) in locations with no fixed network, no public IP and no power supply. The answer: solar-powered 4G cameras (4K, PTZ, battery) that send JPEG photos every 10 minutes instead of continuous video — to preserve battery and mobile data — plus a backend that operates and analyses them remotely.
What I built
A full-stack web service to operate a network of ~50 4G cameras (Reolink Go Ranger PT G450) from the browser and run optional computer vision on the captures, integrated with the xdata digital-twin platform.
- Control of cameras with no fixed IP via MQTT + Neolink (Baichuan P2P bridge): on-demand capture, PTZ (355° pan / 140° tilt), presets with auto-photo, real-time battery and remote siren / reboot / wake-up.
- MQTT snapshots instead of RTSP: ~90% less bandwidth over 4G, with the camera sleeping between captures to preserve battery.
- Per-camera auto-capture (from 5 min to 24 h), managed server-side (one asyncio task per camera) and persistent across restarts.
- Dual storage: JPEG photo + metadata CSV (battery, status, location) per capture, with gallery and lightbox.
- Computer vision (optional module, CPU-only): a YOLOv8n (ONNX) + zero-shot CLIP + change detection (SSIM) pipeline that detects intrusions (person / vehicle / animal), classifies weather (fog / snow / night) and flags changes against the previous photo, with ray-casting exclusion zones to cut false positives.
Why it matters
- ~€150 per point (solar camera + 4G SIM), no civil works, no cabling: adding a new camera means registering it in the web panel.
- AI on CPU (Intel i5, no GPU): zero inference cost, ~700 ms/photo — plenty for 10-minute capture intervals.
- Photos and CSVs live only on the client’s host (bind mounts), never in a third-party cloud.
Technical metrics (verifiable)
- 30 REST endpoints in 7 groups (Swagger / OpenAPI) · 3 Docker services (Mosquitto · Neolink P2P · FastAPI app) with a multi-stage Dockerfile.
- 63 tests (pytest) · 8-check quality gate before every push (tests, build, syntax, secrets, tech debt, WCAG AA, security, docs).
- Vision pipeline at ~700 ms/photo on CPU with no GPU: YOLOv8n 58 ms + CLIP ~600 ms + change detection ~14 ms.
Stack
Frontend: Svelte 5 · Vite 7 · TypeScript. Backend: Python 3.12 · FastAPI · aiomqtt · Pydantic. Vision: YOLOv8n (ONNX) · CLIP ViT-B/32 · SSIM. Comms: MQTT (Mosquitto) · Neolink P2P. Deployment: Docker Compose.
Professional project at OFITECO (VINCI Group) · private repository.