mani880740255/AI_Image_detection
VisionAI — Premium AI Image Detection Dashboard
VisionAI is a modern, high-end web application designed to detect AI-generated images using state-of-the-art deep learning. It features a stunning Glassmorphism + Soft UI dashboard and integrates with Twilio to provide real-time voice call alerts when a high-confidence AI image is detected.
✨ Features
- Modern Dashboard: Premium glassmorphism aesthetic with animated cosmic backgrounds.
- AI Detection: Uses the
umm-maybe/AI-image-detector(Swin Transformer) model. - Local Inference: Supports loading models from local disk for zero-latency, private analysis.
- Real-time Alerts: Triggers Twilio voice calls when AI confidence exceeds a configurable threshold (default: 50%).
- History & Analytics: Track session stats and recent scan history.
- Mobile Responsive: Fully optimized for all device sizes.
🛠️ Tech Stack
- Frontend: HTML5, Vanilla CSS (Glassmorphism), JavaScript (ES6+).
- Backend: Python, Flask, Flask-CORS.
- AI Engine: PyTorch, HuggingFace Transformers.
- Alerting: Twilio API (Voice).
🚀 Getting Started
1. Prerequisites
- Python 3.8+
- Twilio Account (SID, Token, and Phone Number)
2. Installation
Clone the repository:
git clone https://github.com/yourusername/visionai-image-detection.git
cd visionai-image-detectionInstall dependencies:
pip install -r requirements.txt3. Model Setup
Since the model weights are large, you should download pytorch_model.bin (e.g., from umm-maybe/AI-image-detector on HuggingFace) and place it in the local_model/ directory, or run the setup script:
python setup_local_model.pyNote: The setup script will attempt to copy your `.bin` from Downloads and fetch necessary config JSONs.
4. Environment Configuration
Create a .env file in the root directory and add your credentials:
TWILIO_ACCOUNT_SID=your_sid_here
TWILIO_AUTH_TOKEN=your_token_here
TWILIO_FROM_NUMBER=your_twilio_number
YOUR_PHONE_NUMBER=your_target_phone_number
AI_CONFIDENCE_THRESHOLD=0.55. Run the Application
Start the Flask server:
python app.pyAccess the dashboard at http://127.0.0.1:5000.
📂 Project Structure
app.py: Flask backend with inference and Twilio logic.local_model/: Directory containing model weights and configs.index.html: Main dashboard UI.style.css: Glassmorphism design system.script.js: Frontend logic and API integration.setup_local_model.py: Script to prepare local model files.
🛡️ License
Distributed under the MIT License. See LICENSE for more information.
Created by Mani Deep
