You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FindSafe.ai is a full-stack AI system that helps locate missing persons using face recognition.
The public uploads sightings → AI matches faces → Family gets instant email alerts with location.
📸 Screenshots
✨ Features
🧠 AI Face Recognition — DeepFace (VGG-Face model) with cosine similarity matching
📸 Public Sighting Portal — Anyone can upload a photo, no login required
📍 Auto Location Capture — GPS coordinates captured on every sighting
🚨 Instant Email Alerts — Family notified with match confidence %, Google Maps link, and sighting photo
👮 Multi-Organization Auth — Police stations and NGOs register and get approved by Super Admin
🔄 Rescan Feature — Police can upload new photo and rescan all existing sightings
🛡️ Rate Limiting — Max 5 uploads per IP per hour to prevent abuse
🗑️ Case Management — Add, view, expand, and delete missing person cases
👑 Super Admin Portal — Hidden portal to approve/reject organization registrations
Token Auth — Role-based access on all admin routes
Safe Updates — No passwords or encodings exposed to frontend
CORS — Configured for frontend origin only
📁 Project Structure
MPF-backend/
├── app.py # Flask API — all routes
├── database.py # MySQL connection + CRUD operations
├── matcher.py # Face matching engine (cosine similarity)
├── email_service.py # Gmail SMTP alert with HTML email
├── fix_password.py # One-time super admin setup script
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
├── .env # Your actual credentials (not in git)
└── uploads/ # Uploaded images (not in git)
MPF-frontend/
├── src/
│ ├── pages/
│ │ ├── PublicUpload.jsx # Public sighting portal
│ │ ├── AdminLogin.jsx # Organization login
│ │ ├── AdminDashboard.jsx # Police/NGO dashboard
│ │ ├── Register.jsx # Organization registration
│ │ ├── SuperAdminLogin.jsx # Super admin login
│ │ └── SuperAdminDashboard.jsx # Approve/reject orgs
│ ├── components/
│ │ └── Navbar.jsx # Navigation bar
│ └── App.js # Routes
🧠 How the AI Matching Works
1. Admin uploads missing person photo
↓
2. DeepFace extracts 512-dimension face encoding
(VGG-Face model — trained on millions of faces)
↓
3. Encoding stored as JSON in MySQL
↓
4. Public uploads sighting photo
↓
5. System extracts encoding from sighting
↓
6. Cosine similarity calculated against ALL stored encodings
similarity = dot(A, B) / (||A|| × ||B||)
↓
7. If distance < 0.4 threshold → MATCH FOUND
↓
8. Email sent to family with:
- Match confidence percentage
- Google Maps link of sighting location
- Actual sighting photo attached
📧 Email Alert Preview
When a match is found, family receives:
🚨 POSSIBLE MATCH FOUND
Person : [Name]
Match Confidence: 87.5%
Location : 12.9716, 77.5946
[ 📍 View Location on Google Maps ]
📸 Photo uploaded by public: [image attached]
⚠️ This is an AI-based match. Please verify in person.