Spaces:
Running
Running
AI-Contain-Checker
A modular AI content detection system with support for image classification, image edit detection, Nepali text classification, and general text classification. Built for performance and extensibility, it is ideal for detecting AI-generated content in both visual and textual forms.
π Features
πΌοΈ Image Classifier
- Purpose: Classifies whether an image is AI-generated or a real-life photo.
- Model: Fine-tuned InceptionV3 CNN.
- Dataset: Custom curated dataset with ~79,950 images for binary classification.
- Location:
features/image_classifier
- Docs:
docs/features/image_classifier.md
ποΈ Image Edit Detector
Purpose: Detects image tampering or post-processing.
Techniques Used:
- Error Level Analysis (ELA): Visualizes compression artifacts.
- Fast Fourier Transform (FFT): Detects unnatural frequency patterns.
Location:
features/image_edit_detector
Docs:
π Nepali Text Classifier
- Purpose: Determines if Nepali text content is AI-generated or written by a human.
- Model: Based on
XLMRClassifier
fine-tuned on Nepali language data. - Dataset: Scraped dataset of ~18,000 Nepali texts.
- Location:
features/nepali_text_classifier
- Docs:
docs/features/nepali_text_classifier.md
π English Text Classifier
Purpose: Detects if English text is AI-generated or human-written.
Pipeline:
- Uses GPT2 tokenizer for input preprocessing.
- Custom binary classifier to differentiate between AI and human-written content.
Location:
features/text_classifier
ποΈ Project Structure
AI-Checker/
β
βββ app.py # Main FastAPI entry point
βββ config.py # Configuration settings
βββ Dockerfile # Docker build script
βββ Procfile # Deployment file for Heroku or similar
βββ requirements.txt # Python dependencies
βββ README.md # You are here π
β
βββ features/ # Core detection modules
β βββ image_classifier/
β βββ image_edit_detector/
β βββ nepali_text_classifier/
β βββ text_classifier/
β
βββ docs/ # Internal and API documentation
β βββ api_endpoints.md
β βββ deployment.md
β βββ detector/
β β βββ ELA.md
β β βββ fft.md
β β βββ meta.md
β β βββ note-for-backend.md
β βββ functions.md
β βββ nestjs_integration.md
β βββ security.md
β βββ setup.md
β βββ structure.md
β
βββ IMG_Models/ # Saved image classifier model(s)
β βββ latest-my_cnn_model.h5
β
βββ notebooks/ # Experimental and debug notebooks
βββ static/ # Static assets if needed
βββ test.md # Test notes
π Documentation Links
π Usage
Install dependencies
pip install -r requirements.txt
Run the API
uvicorn app:app --reload
Build Docker (optional)
docker build -t ai-contain-checker . docker run -p 8000:8000 ai-contain-checker
π Security & Integration
- Token Authentication and IP Whitelisting supported.
- NestJS integration guide:
docs/nestjs_integration.md
- Rate limiting handled using
slowapi
.
π‘οΈ Future Plans
- Add video classifier module.
- Expand dataset for multilingual AI content detection.
- Add fine-tuning UI for models.
π License
See full license terms here: LICENSE.md