System Architecture
1. Frontend Layer
- Built using Next.js (App Router) and Tailwind CSS
- Uses shadcn/ui components for a clean and consistent UI
- Allows users to upload a single image (JPG/PNG)
- Sends the image to the backend using a POST request in multipart/form-data
- Displays prediction results including:
- Likely Fake / Likely Real label
- Fake and Real probability scores
- Disclaimer message
2. Backend Layer
- Built using a backend API server
- Receives image upload requests from the frontend
- Handles:
- Image validation and format checking
- Image preprocessing (resizing, normalization, tensor conversion)
- Model inference request handling
- Invokes the trained deep learning model for prediction
- Sends a structured JSON response back to the frontend
3. Machine Learning Model Layer (MesoNet CNN)
- Uses a MesoNet Convolutional Neural Network
- Designed specifically for deepfake detection
- Trained on:
- Real images
- AI-generated / deepfake images