FaceGuard is a browser extension powered by a deep learning model that detects whether an image or video contains a real human face or one generated by AI (deepfakes). It enables users to:
- 🖼️ Right-click on any image/video and instantly get authenticity results.
- 📁 Upload files via the popup interface.
- 📊 View confidence scores along with predictions.
This solution blends cutting-edge AI with a user-friendly UX to fight misinformation and manipulated content.
The rise of generative AI tools has blurred the line between real and synthetic media. Deepfakes pose serious threats to:
- 🔐 Personal identity
- 📰 Media credibility
- 🗳️ Election integrity
- 🧠 Public perception
FaceGuard serves as a personal media watchdog, helping users stay informed and alert.
The backend is powered by a fine-tuned MobileNetV2 convolutional neural network trained on a curated deepfake detection dataset.
- ✅ Lightweight and optimized for fast inference
- ✅ Binary classification:
realvsfake - ✅ Supports both image and video (frame-based) analysis
- Prediction:
realorfake - Confidence Score: Probability of authenticity (e.g., 92% real)
| Feature | Description |
|---|---|
| 🖱️ Right-click Check | Inspect any image/video on the web via context menu |
| 📁 File Upload | Upload media via the popup interface |
| 🔥 Real-time Results | Get instant predictions and confidence scores |
| 🔐 Secure API Calls | Data sent securely to the backend for prediction |
- Frontend: Chrome Extension (Popup UI + Context Menu)
- Backend: FastAPI + MobileNetV2 Deepfake Detection Model
- Communication: REST API endpoints:
/predict-image//predict-video/
flowchart TD
A["User Interaction"] -->|Right-click or Upload| B["Chrome Extension"]
B -->|Send media to backend| C["FastAPI Backend"]
C -->|Determine media type| D{"Media Type?"}
D -->|Image| E["/predict-image/"]
D -->|Video| F["/predict-video/"]
E -->|Process image| G["MobileNetV2 Model"]
F -->|Extract frame and process| G
G -->|Generate prediction + confidence| H["Backend"]
H -->|Return result| B
B -->|Display in popup| I["User Interface"]
flowchart TD
A["User Action"] -->|Right-click or Upload| B["Chrome Extension"]
B --> C["Handle Media"]
C -->|Determine type| D{"Image or Video?"}
D -->|Image| E["Send to /predict-image/"]
D -->|Video| F["Extract frame"]
F --> G["Send to /predict-video/"]
E --> H["Display Result"]
G --> H
flowchart TD
A["Receive Media"] --> B{"Select Endpoint"}
B -->|Image| C["Process Image"]
B -->|Video| D["Process Video Frame"]
C --> E["MobileNetV2 Model"]
D --> E
E --> F["Return Prediction + Confidence"]
F --> G["Send to Frontend"]
- 🧠 Model: MobileNetV2 (TensorFlow / Keras)
- ⚙️ Backend: FastAPI (Python)
- 🧩 Frontend: Chrome Extension (HTML, CSS, JavaScript)
- ☁️ Deployment: Render (Backend Hosting)
- 🧬 Train on more complex datasets (e.g., DFDC, CelebDF)
- 🎥 Integrate multi-frame analysis for better video detection
- 🌐 Support for Firefox & Edge browsers
- 🛒 Publish on Chrome Web Store
MIT License. Feel free to fork, enhance, and build on FaceGuard. 🙌