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
|
|
| 21 |
|
| 22 |
-
```
|
|
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# AI-Contain-Checker
|
| 13 |
|
| 14 |
+
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.
|
| 15 |
|
| 16 |
+
|
| 17 |
+
## π Features
|
| 18 |
+
|
| 19 |
+
### πΌοΈ Image Classifier
|
| 20 |
+
|
| 21 |
+
* **Purpose**: Classifies whether an image is AI-generated or a real-life photo.
|
| 22 |
+
* **Model**: Fine-tuned **InceptionV3** CNN.
|
| 23 |
+
* **Dataset**: Custom curated dataset with **\~79,950 images** for binary classification.
|
| 24 |
+
* **Location**: [`features/image_classifier`](features/image_classifier)
|
| 25 |
+
* **Docs**: [`docs/features/image_classifier.md`](docs/features/image_classifier.md)
|
| 26 |
+
|
| 27 |
+
### ποΈ Image Edit Detector
|
| 28 |
+
|
| 29 |
+
* **Purpose**: Detects image tampering or post-processing.
|
| 30 |
+
* **Techniques Used**:
|
| 31 |
+
|
| 32 |
+
* **Error Level Analysis (ELA)**: Visualizes compression artifacts.
|
| 33 |
+
* **Fast Fourier Transform (FFT)**: Detects unnatural frequency patterns.
|
| 34 |
+
* **Location**: [`features/image_edit_detector`](features/image_edit_detector)
|
| 35 |
+
* **Docs**:
|
| 36 |
+
|
| 37 |
+
* [ELA](docs/detector/ELA.md)
|
| 38 |
+
* [FFT](docs/detector/fft.md )
|
| 39 |
+
* [Metadata Analysis](docs/detector/meta.md)
|
| 40 |
+
* [Backend Notes](docs/detector/note-for-backend.md)
|
| 41 |
+
|
| 42 |
+
### π Nepali Text Classifier
|
| 43 |
+
|
| 44 |
+
* **Purpose**: Determines if Nepali text content is AI-generated or written by a human.
|
| 45 |
+
* **Model**: Based on `XLMRClassifier` fine-tuned on Nepali language data.
|
| 46 |
+
* **Dataset**: Scraped dataset of **\~18,000** Nepali texts.
|
| 47 |
+
* **Location**: [`features/nepali_text_classifier`](features/nepali_text_classifier)
|
| 48 |
+
* **Docs**: [`docs/features/nepali_text_classifier.md`](docs/features/nepali_text_classifier.md)
|
| 49 |
+
|
| 50 |
+
### π English Text Classifier
|
| 51 |
+
|
| 52 |
+
* **Purpose**: Detects if English text is AI-generated or human-written.
|
| 53 |
+
* **Pipeline**:
|
| 54 |
+
|
| 55 |
+
* Uses **GPT2 tokenizer** for input preprocessing.
|
| 56 |
+
* Custom binary classifier to differentiate between AI and human-written content.
|
| 57 |
+
* **Location**: [`features/text_classifier`](features/text_classifier)
|
| 58 |
+
* **Docs**: [`docs/features/text_classifier.md`](docs/features/text_classifier.md)
|
| 59 |
+
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
+
## ποΈ Project Structure
|
| 63 |
|
| 64 |
```bash
|
| 65 |
+
AI-Checker/
|
| 66 |
+
β
|
| 67 |
+
βββ app.py # Main FastAPI entry point
|
| 68 |
+
βββ config.py # Configuration settings
|
| 69 |
+
βββ Dockerfile # Docker build script
|
| 70 |
+
βββ Procfile # Deployment file for Heroku or similar
|
| 71 |
+
βββ requirements.txt # Python dependencies
|
| 72 |
+
βββ README.md # You are here π
|
| 73 |
+
β
|
| 74 |
+
βββ features/ # Core detection modules
|
| 75 |
+
β βββ image_classifier/
|
| 76 |
+
β βββ image_edit_detector/
|
| 77 |
+
β βββ nepali_text_classifier/
|
| 78 |
+
β βββ text_classifier/
|
| 79 |
+
β
|
| 80 |
+
βββ docs/ # Internal and API documentation
|
| 81 |
+
β βββ api_endpoints.md
|
| 82 |
+
β βββ deployment.md
|
| 83 |
+
β βββ detector/
|
| 84 |
+
β β βββ ELA.md
|
| 85 |
+
β β βββ fft.md
|
| 86 |
+
β β βββ meta.md
|
| 87 |
+
β β βββ note-for-backend.md
|
| 88 |
+
β βββ functions.md
|
| 89 |
+
β βββ nestjs_integration.md
|
| 90 |
+
β βββ security.md
|
| 91 |
+
β βββ setup.md
|
| 92 |
+
β βββ structure.md
|
| 93 |
+
β
|
| 94 |
+
βββ IMG_Models/ # Saved image classifier model(s)
|
| 95 |
+
β βββ latest-my_cnn_model.h5
|
| 96 |
+
β
|
| 97 |
+
βββ notebooks/ # Experimental and debug notebooks
|
| 98 |
+
βββ static/ # Static assets if needed
|
| 99 |
+
βββ test.md # Test notes
|
| 100 |
+
````
|
| 101 |
+
|
| 102 |
+
---
|
| 103 |
+
|
| 104 |
+
## π Documentation Links
|
| 105 |
+
|
| 106 |
+
* [API Endpoints](docs/api_endpoints.md)
|
| 107 |
+
* [Deployment Guide](docs/deployment.md)
|
| 108 |
+
* [Detector Documentation](docs/detector/)
|
| 109 |
+
|
| 110 |
+
* [Error Level Analysis (ELA)](docs/detector/ELA.md)
|
| 111 |
+
* [Fast Fourier Transform (FFT)](docs/detector/fft.md)
|
| 112 |
+
* [Metadata Analysis](docs/detector/meta.md)
|
| 113 |
+
* [Backend Notes](docs/detector/note-for-backend.md)
|
| 114 |
+
* [Functions Overview](docs/functions.md)
|
| 115 |
+
* [NestJS Integration Guide](docs/nestjs_integration.md)
|
| 116 |
+
* [Security Details](docs/security.md)
|
| 117 |
+
* [Setup Instructions](docs/setup.md)
|
| 118 |
+
* [Project Structure](docs/structure.md)
|
| 119 |
+
|
| 120 |
+
---
|
| 121 |
+
|
| 122 |
+
## π Usage
|
| 123 |
+
|
| 124 |
+
1. **Install dependencies**
|
| 125 |
+
|
| 126 |
+
```bash
|
| 127 |
+
pip install -r requirements.txt
|
| 128 |
+
```
|
| 129 |
+
|
| 130 |
+
2. **Run the API**
|
| 131 |
+
|
| 132 |
+
```bash
|
| 133 |
+
uvicorn app:app --reload
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
3. **Build Docker (optional)**
|
| 137 |
+
|
| 138 |
+
```bash
|
| 139 |
+
docker build -t ai-contain-checker .
|
| 140 |
+
docker run -p 8000:8000 ai-contain-checker
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
---
|
| 144 |
+
|
| 145 |
+
## π Security & Integration
|
| 146 |
+
|
| 147 |
+
* **Token Authentication** and **IP Whitelisting** supported.
|
| 148 |
+
* NestJS integration guide: [`docs/nestjs_integration.md`](docs/nestjs_integration.md)
|
| 149 |
+
* Rate limiting handled using `slowapi`.
|
| 150 |
+
|
| 151 |
+
---
|
| 152 |
+
|
| 153 |
+
## π‘οΈ Future Plans
|
| 154 |
+
|
| 155 |
+
* Add **video classifier** module.
|
| 156 |
+
* Expand dataset for **multilingual** AI content detection.
|
| 157 |
+
* Add **fine-tuning UI** for models.
|
| 158 |
+
|
| 159 |
+
---
|
| 160 |
+
|
| 161 |
+
## π License
|
| 162 |
+
|
| 163 |
+
See full license terms here: [`LICENSE.md`](license.md)
|
| 164 |
|
|
|