An AI-powered platform for real-time missing person detection, human trafficking prevention, and identification through advanced facial and voice recognition.
- Overview
- Features
- System Architecture
- Technology Stack
- Prerequisites
- Installation
- Configuration
- Running the Project
- Jetson Nano Setup
- API Documentation
- Project Structure
- Technical Details
- Troubleshooting
- Contributing
FindMe is a comprehensive platform designed to help locate missing persons and prevent human trafficking through:
- Real-time Face Recognition: Advanced AI-powered facial recognition using InsightFace
- Voice Identification: Multi-speaker voice recognition using Resemblyzer
- SMS Notifications: Automatic alerts with location data via Sinch API
- Web Interface: User-friendly Next.js frontend for reporting missing persons
- Cloud Storage: Secure Firebase Firestore database for person data
- Edge Computing: Optimized for ARM-based devices like Jetson Nano
- ๐ Missing person reporting form with image/audio upload
- ๐ผ๏ธ Multi-image upload (up to 10 images, 5MB each)
- ๐ค Voice sample upload for identification
- ๐ Police station coordination
- ๐ฌ Consultation page
- ๐ฑ Responsive design with modern UI
- โ Form validation and error handling
- ๐ RESTful API with FastAPI
- ๐ง Face embedding extraction (512-dimensional)
- ๐๏ธ Voice embedding extraction (256-dimensional)
- โ๏ธ Firebase Firestore integration
- ๐ฆ Base64 image storage
- ๐ Automatic model initialization
- ๐ฅ Real-time video processing (webcam or video file)
- ๐ค Multi-face detection and recognition
- ๐ Real-time voice detection (separate thread)
- ๐ Temporal smoothing for stable results
- ๐พ Automatic image saving after 10 seconds of detection
- ๐ฑ SMS notifications with GPS coordinates
- โฑ๏ธ 1-hour SMS cooldown per person
- ๐ฎ Keyboard controls (q=quit, r=reload, v=toggle voice)
โโโโโโโโโโโโโโโโโโโ
โ Frontend โ Next.js 14 (React 18, TypeScript)
โ (Port 3000) โ โโ> Upload Form, Consultation, Home Page
โโโโโโโโโโฌโโโโโโโโโ
โ HTTP/REST
โผ
โโโโโโโโโโโโโโโโโโโ
โ Backend API โ FastAPI (Python)
โ (Port 8000) โ โโ> Image/Audio Processing, Firebase Integration
โโโโโโโโโโฌโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ Firebase โ Firestore Database
โ Cloud โ โโ> Person Data, Embeddings, Images
โโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโ
โ Detection Systemโ Python (Detector_example.py)
โ (Standalone) โ โโ> Real-time Face/Voice Detection
โ โ โโ> SMS Notifications (Sinch)
โโโโโโโโโโโโโโโโโโโ
- Framework: Next.js 14.2.5 (App Router)
- Language: TypeScript 5.5.4
- UI Library: React 18.3.1
- Styling: Tailwind CSS 3.4.7
- Animations: Framer Motion 11.3.3
- Forms: React Hook Form 7.52.1 + Zod 3.23.8
- Icons: Lucide React 0.424.0
- UI Components: Radix UI
- Framework: FastAPI 0.115.0
- Server: Uvicorn 0.30.6
- Language: Python 3.8+
-
Face Recognition: InsightFace (buffalo_l model)
- Embedding dimension: 512
- Framework: ONNX Runtime 1.19.1
- Similarity threshold: 0.30-0.35
-
Voice Recognition: Resemblyzer
- Embedding dimension: 256
- Sample rate: 16000 Hz
- Similarity threshold: 0.3
- Database: Firebase Firestore
- Storage: Base64 encoded images in Firestore
- SMS: Sinch API (sinch-python-sdk 2.0.0)
- Geolocation: IP-API (ip-api.com)
- Library: OpenCV 4.10.0.84
- Processing: NumPy 1.26.4
- Node.js 18.x or higher
- npm 9.x or higher
- Python 3.8 or higher
- pip (Python package manager)
- Python 3.8 or higher
- USB Webcam or video file
- (Optional) CUDA-capable GPU for faster processing
- NVIDIA Jetson Nano with JetPack 4.6+ or JetPack 5.x
- MicroSD card (64GB+ recommended)
- Power supply (5V 4A)
- USB webcam
- Firebase project with Firestore enabled
- Sinch account (for SMS notifications)
- Internet connection
git clone <repository-url>
cd "FINDME"cd frontend
npm installThis will install all frontend dependencies including:
- Next.js, React, TypeScript
- Tailwind CSS and styling libraries
- Form handling and validation libraries
- UI components
cd backend
pip install -r requirements.txtThis will install:
- FastAPI and Uvicorn
- Firebase Admin SDK
- InsightFace and ONNX Runtime
- OpenCV and NumPy
- Resemblyzer for voice recognition
- Sinch SDK for SMS
- Other dependencies
The detection system uses the same dependencies as the backend:
# From project root
pip install -r backend/requirements.txtNote: For Jetson Nano, see Jetson Nano Setup section below.
You need Firebase credentials to store and retrieve person data.
Option A: Service Account Key File (Recommended for Development)
- Go to Firebase Console
- Select your project โ โ๏ธ Settings โ Project settings
- Go to "Service accounts" tab
- Click "Generate new private key"
- Download the JSON file
- Rename it to
serviceAccountKey.json - Place it in the
backend/directory
Option B: Environment Variable (Recommended for Production)
- Download the service account key (same as Option A)
- Copy the entire JSON content
- Create a
.envfile inbackend/directory:(Keep it on ONE line, wrap in single quotes)FIREBASE_SERVICE_ACCOUNT_KEY='{"type":"service_account",...}'
For SMS notifications, configure Sinch credentials:
Option A: Environment Variables
Create .env file in root or backend/ directory:
SINCH_KEY_ID=your_key_id_here
SINCH_KEY_SECRET=your_key_secret_here
SINCH_PROJECT_ID=your_project_id_here
SINCH_FROM_NUMBER=your_sinch_phone_numberOption B: Config File
Create sinch_config.txt in project root:
your_key_id
your_key_secret
your_project_id
your_sinch_phone_number
Option C: Direct Parameters
Pass credentials directly in Detector_example.py (see code comments).
Create frontend/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:8000cd backend
python main.pyOr with uvicorn directly:
cd backend
uvicorn main:app --host 0.0.0.0 --port 8000 --reloadThe backend will start on http://localhost:8000
Expected Output:
โ
Firebase credentials loaded from serviceAccountKey.json
โ
Firebase Admin SDK initialized successfully
โ
Firestore client connected
INFO: Uvicorn running on http://0.0.0.0:8000
cd frontend
npm run devThe frontend will start on http://localhost:3000
Expected Output:
โฒ Next.js 14.2.5
- Local: http://localhost:3000
- ready started server on 0.0.0.0:3000
For Regular PC/Laptop:
# From project root
python Detector_example.pyFor Jetson Nano:
See Jetson Nano Setup section below.
Expected Output:
โ
Firebase credentials loaded from serviceAccountKey.json
โ
Firebase Admin SDK initialized successfully
โ
Firestore client connected
๐ฅ DOWNLOADING EMBEDDINGS FROM FIREBASE...
โ
Loaded X face embeddings into memory
โ
Loaded Y voice embeddings into memory
โ
Sinch SMS client initialized
๐ฅ STARTING FACE & VOICE DETECTION
- Web Interface: Open
http://localhost:3000in your browser - Upload Missing Person: Go to Upload page and fill the form
- Detection Window: The detection system will show a window with real-time face/voice detection
The Detector_example.py is specifically optimized for running on NVIDIA Jetson Nano (ARM-based edge device).
- Flash JetPack (4.6+ or 5.x) to microSD card
- Boot Jetson Nano and complete initial setup
- Update system packages:
sudo apt-get update sudo apt-get upgrade -y
# Install Python and pip
sudo apt-get install python3-pip python3-dev -y
# Install OpenCV dependencies
sudo apt-get install libopencv-dev python3-opencv -y
# Install audio libraries
sudo apt-get install portaudio19-dev python3-pyaudio -y
sudo apt-get install libsndfile1 -y
# Install other system libraries
sudo apt-get install libatlas-base-dev libblas-dev liblapack-dev -y# Navigate to project directory
cd "FINDME"
# Install requirements
pip3 install -r backend/requirements.txtNote: Some packages may take longer to install on ARM. Be patient.
The Detector_example.py is already configured for ARM/CPU execution:
# In Detector_example.py (already set)
use_gpu=False # Jetson Nano uses CPU (or enable GPU if needed)
detection_size=320 # Smaller for ARM performance
process_resolution=720 # Reduced resolution
frame_skip=1 # Process every other frame# From project root
python3 Detector_example.py-
Enable Maximum Performance Mode:
sudo nvpmodel -m 0 sudo jetson_clocks
-
Monitor Performance:
# In another terminal sudo tegrastats -
Expected Performance:
- Face Detection: 5-15 FPS (depending on resolution)
- Voice Processing: Real-time (separate thread)
- Memory Usage: ~2-3GB RAM
-
Optimization Settings (already in code):
- Lower resolution (720p instead of 1080p)
- Frame skipping (process every other frame)
- Smaller detection size (320x320)
- CPU execution (no GPU overhead)
Issue: Models take too long to load
- Solution: Models are downloaded on first run. Subsequent runs are faster.
Issue: Low FPS
- Solution: Reduce
process_resolutionto 480, increaseframe_skipto 2
Issue: Out of memory
- Solution: Close other applications, reduce
detection_sizeto 256
Issue: Audio not working
- Solution: Check USB microphone connection, install
portaudio19-dev
http://localhost:8000
GET /
Response:
{
"message": "FindMe Backend API is running"
}POST /api/upload
Content-Type: multipart/form-data
Request Parameters:
fullName(string, required): Full name of missing personage(string, required): Age of missing personcityLastSeen(string, required): City where person was last seendateLastSeen(string, required): Date when person was last seen (YYYY-MM-DD)contactPhone(string, required): Contact phone numbernearbyPoliceStation(string, required): Police station name and addressadditionalDescription(string, optional): Additional informationimages(File[], required): Image files (max 10, 5MB each)audio(File, optional): Audio file (10MB max)
Response:
{
"message": "Data uploaded successfully",
"docId": "document_id_in_firebase",
"imagesProcessed": 3,
"facesDetected": 2,
"audioProcessed": true,
"voiceDetected": true
}Error Responses:
400: Bad request (missing images, invalid data)500: Server error
FINDME/
โโโ frontend/ # Next.js frontend application
โ โโโ app/
โ โ โโโ page.tsx # Home page
โ โ โโโ upload/
โ โ โ โโโ page.tsx # Upload form
โ โ โโโ consultation/
โ โ โ โโโ page.tsx # Consultation page
โ โ โโโ layout.tsx # Root layout
โ โ โโโ globals.css # Global styles
โ โโโ components/
โ โ โโโ Navbar.tsx # Navigation component
โ โ โโโ ui/ # Reusable UI components
โ โโโ lib/
โ โ โโโ api.ts # API configuration
โ โ โโโ utils.ts # Utility functions
โ โโโ package.json # Frontend dependencies
โ โโโ next.config.js # Next.js configuration
โ
โโโ backend/ # FastAPI backend
โ โโโ main.py # FastAPI application
โ โโโ image_processor.py # Face embedding extraction
โ โโโ audio_processor.py # Voice embedding extraction
โ โโโ requirements.txt # Python dependencies
โ โโโ serviceAccountKey.json # Firebase credentials (optional)
โ โโโ .env # Environment variables (optional)
โ
โโโ Detector_example.py # Real-time detection system (for Jetson Nano)
โ
โโโ detected_persons/ # Saved detection images
โ โโโ {name}_{timestamp}_{key}.jpg
โ โโโ {name}_{timestamp}_FULL.jpg
โ โโโ {name}_{timestamp}_INFO.txt
โ
โโโ TECHNICAL_DOCUMENTATION.txt # Detailed technical docs
โ
โโโ README.md # This file
- Image Upload โ Backend receives image
- Face Detection โ InsightFace detects faces
- Embedding Extraction โ 512-dim vector extracted
- Storage โ Embedding saved to Firebase
- Real-time Matching โ Detection system compares live video with stored embeddings
- Similarity Calculation โ Cosine similarity (threshold: 0.30)
- Temporal Smoothing โ Average over 5 frames
- Match Decision โ If similarity > threshold, person identified
- Audio Upload โ Backend receives audio file
- Preprocessing โ Convert to WAV, resample to 16kHz
- Embedding Extraction โ 256-dim vector extracted
- Storage โ Embedding saved to Firebase
- Real-time Matching โ Detection system records 1-second chunks
- Similarity Calculation โ Cosine similarity (threshold: 0.3)
- Multi-speaker Detection โ Finds all matches above threshold
- Active Speaker Tracking โ Tracks currently speaking persons
- Person Detected โ First time detection triggers SMS check
- Cooldown Check โ Verify 1 hour has passed since last SMS
- Location Retrieval โ Get GPS coordinates via IP geolocation
- Message Formatting โ Format: Name, Age, Coordinates
- SMS Sending โ Send via Sinch API
- Cooldown Update โ Record SMS send time
Firebase Firestore Collection: upload
{
"fullName": "John Doe",
"age": 25,
"cityLastSeen": "New York",
"dateLastSeen": "2024-01-15",
"contactPhone": "+1234567890",
"nearbyPoliceStation": "NYPD Station 123 Main St",
"additionalDescription": "Last seen wearing blue jacket",
"images": ["base64_encoded_image1", "base64_encoded_image2"],
"imageMetadata": [
{
"index": 0,
"filename": "image1.jpg",
"has_face": true,
"embedding": [0.123, 0.456, ...] // 512 dimensions
}
],
"audioMetadata": {
"filename": "audio.wav",
"has_voice": true,
"embedding": [0.789, 0.012, ...] // 256 dimensions
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}Issue: npm install fails
- Solution: Clear cache:
npm cache clean --force, then retry
Issue: Port 3000 already in use
- Solution: Change port:
npm run dev -- -p 3001
Issue: API connection error
- Solution: Ensure backend is running on port 8000
Issue: Firebase credentials not found
- Solution: Check
backend/serviceAccountKey.jsonexists or setFIREBASE_SERVICE_ACCOUNT_KEYin.env
Issue: Models not downloading
- Solution: Check internet connection. Models download automatically on first use.
Issue: Port 8000 already in use
- Solution: Change port in
main.pyor use:uvicorn main:app --port 8001
Issue: Camera not detected
- Solution: Check USB connection, try different camera, or use video file path
Issue: SMS not sending
- Solution: Check Sinch credentials in
.envorsinch_config.txt
Issue: Low FPS
- Solution: Reduce
process_resolution, increaseframe_skip, or enable GPU
Issue: Out of memory
- Solution: Reduce
detection_size, close other applications
Issue: Packages fail to install
- Solution: Use
pip3instead ofpip, install system dependencies first
Issue: OpenCV not working
- Solution: Install system OpenCV:
sudo apt-get install python3-opencv
Issue: Audio not recording
- Solution: Install
portaudio19-devandpython3-pyaudio
- Navigate to
http://localhost:3000/upload - Fill in all required fields:
- Full Name
- Age
- City Last Seen
- Date Last Seen
- Contact Phone
- Nearby Police Station
- Upload at least one image (up to 10 images)
- (Optional) Upload audio file
- Click "Submit Information"
- Wait for confirmation message
# Basic usage (webcam)
python Detector_example.py
# With video file
# Edit Detector_example.py, change: detector.run(video_source="path/to/video.mp4")q: Quit applicationr: Reload embeddings from Firebasev: Toggle voice detection on/off
- Firebase Credentials: Never commit
serviceAccountKey.jsonto version control - Sinch Credentials: Store in environment variables, not in code
- API Endpoints: Add authentication for production deployment
- HTTPS: Use HTTPS in production for secure data transmission
- Input Validation: All inputs are validated on both frontend and backend
- Face Detection: 15-30 FPS (CPU), 30-60 FPS (GPU)
- Voice Processing: Real-time (separate thread)
- Memory Usage: 2-4GB RAM
- Face Detection: 5-15 FPS (CPU)
- Voice Processing: Real-time
- Memory Usage: 2-3GB RAM
- Face detection requires clear face visibility
- Voice detection requires clear audio (no background noise)
- SMS requires valid phone numbers with country code
- Location accuracy depends on IP geolocation (not GPS)
- Performance varies by hardware specifications
- Models require internet connection for first-time download
- GPU acceleration support for Jetson Nano
- Batch processing for multiple videos
- Cloud deployment (AWS, GCP, Azure)
- Mobile app integration
- Advanced analytics dashboard
- Multi-language support
- Real-time database updates
- WebSocket for live updates
This project is a hackathon submission for the ARM AI Challenge.
This is a hackathon project. For questions or issues, please refer to the technical documentation.
For technical support or questions:
- Check
TECHNICAL_DOCUMENTATION.txtfor detailed information - Review troubleshooting section above
- Check Firebase and Sinch service status
- InsightFace: Face recognition models
- Resemblyzer: Voice recognition
- Firebase: Cloud database and storage
- Sinch: SMS notification service
- Next.js & FastAPI: Web frameworks
Built with โค๏ธ for the ARM AI Challenge