Sentinel
Police intelligence platform built on computer vision and machine learning: InsightFace face recognition across photos and video, DBSCAN crime-hotspot detection on real map coordinates, Gemini-written crime analysis, a missing-persons register, and SMS and email alerts.
- Python
- InsightFace
- OpenCV
- scikit-learn
- PostgreSQL
- pgvector
- Gemini
- Flask

The problem
Investigators work across separate records, photos and maps, so matching a face to a known suspect or seeing where crimes cluster is slow, manual work.
What was built
- Face recognition with InsightFace (buffalo_l): CLAHE, normalisation and gamma preprocessing, a quality score from size, blur, orientation and lighting, and original plus aligned embeddings stored in pgvector.
- Matching by a blend of cosine and Euclidean similarity on L2-normalised embeddings, with a strict default threshold.
- Video search: sampled frames, optional DeepSORT tracking and DBSCAN clustering to find each unique person and keep their best frame.
- Hotspot detection with DBSCAN over haversine distance (2 km radius, at least 3 incidents), clustered per crime type and ranked from low to critical.
- Gemini-generated analysis summaries and recommendations, Twilio SMS and email alerts, role-based access and recoverable (soft) deletes.