Skip to content
~/projects/sentinel$ cat README.md← projects

DONEsince 2025

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
Sentinel architecture overview from the project README

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

  1. 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.
  2. Matching by a blend of cosine and Euclidean similarity on L2-normalised embeddings, with a strict default threshold.
  3. Video search: sampled frames, optional DeepSORT tracking and DBSCAN clustering to find each unique person and keep their best frame.
  4. Hotspot detection with DBSCAN over haversine distance (2 km radius, at least 3 incidents), clustered per crime type and ranked from low to critical.
  5. Gemini-generated analysis summaries and recommendations, Twilio SMS and email alerts, role-based access and recoverable (soft) deletes.