Skip to content

garimauttam/HackByte-3.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🎭 FaceGuard – Deepfake Image & Video Detector Extension

🔍 About the Project

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.


💡 Motivation

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 AI Model

The backend is powered by a fine-tuned MobileNetV2 convolutional neural network trained on a curated deepfake detection dataset.

⚙️ Model Highlights

  • ✅ Lightweight and optimized for fast inference
  • ✅ Binary classification: real vs fake
  • ✅ Supports both image and video (frame-based) analysis

🔁 Output

  • Prediction: real or fake
  • Confidence Score: Probability of authenticity (e.g., 92% real)

🧩 Extension Features

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

🚀 How It Works

🧩 Architecture

  1. Frontend: Chrome Extension (Popup UI + Context Menu)
  2. Backend: FastAPI + MobileNetV2 Deepfake Detection Model
  3. Communication: REST API endpoints:
    • /predict-image/
    • /predict-video/

🌐 System Flow

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"]
Loading

🖥️ Frontend Workflow

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
Loading

⚙️ Backend Workflow

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"]
Loading

🛠️ Tech Stack

  • 🧠 Model: MobileNetV2 (TensorFlow / Keras)
  • ⚙️ Backend: FastAPI (Python)
  • 🧩 Frontend: Chrome Extension (HTML, CSS, JavaScript)
  • ☁️ Deployment: Render (Backend Hosting)

🔮 Future Scope

  • 🧬 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

📄 License

MIT License. Feel free to fork, enhance, and build on FaceGuard. 🙌


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •