Merge pull request #23 from cyberalertnepal/main
Browse filesInitial commit and merge updates to Testing branch (checkpoints)
Files changed (2)
- .gitignore
- README.md+148-6
8 unmodified lines9101112131415161718192021228 unmodified linespinned: false---# Testing AI ContainThis Hugging Face Space uses **Docker** to run a custom environment for AI content detection.## How to run locally```bashdocker build -t testing-ai-contain .docker run -p 7860:7860 testing-ai-contain```8 unmodified lines91011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631648 unmodified linespinned: false---# AI-Contain-CheckerA 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`](features/image_classifier)* **Docs**: [`docs/features/image_classifier.md`](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`](features/image_edit_detector)* **Docs**:* [ELA](docs/detector/ELA.md)* [FFT](docs/detector/fft.md )* [Metadata Analysis](docs/detector/meta.md)* [Backend Notes](docs/detector/note-for-backend.md)### π 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`](features/nepali_text_classifier)* **Docs**: [`docs/features/nepali_text_classifier.md`](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`](features/text_classifier)* **Docs**: [`docs/features/text_classifier.md`](docs/features/text_classifier.md)---## ποΈ Project Structure```bashAI-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* [API Endpoints](docs/api_endpoints.md)* [Deployment Guide](docs/deployment.md)* [Detector Documentation](docs/detector/)* [Error Level Analysis (ELA)](docs/detector/ELA.md)* [Fast Fourier Transform (FFT)](docs/detector/fft.md)* [Metadata Analysis](docs/detector/meta.md)* [Backend Notes](docs/detector/note-for-backend.md)* [Functions Overview](docs/functions.md)* [NestJS Integration Guide](docs/nestjs_integration.md)* [Security Details](docs/security.md)* [Setup Instructions](docs/setup.md)* [Project Structure](docs/structure.md)---## π Usage1. **Install dependencies**```bashpip install -r requirements.txt```2. **Run the API**```bashuvicorn app:app --reload```3. **Build Docker (optional)**```bashdocker 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`](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.---## π LicenseSee full license terms here: [`LICENSE.md`](license.md)
.gitignore
README.md+148-6