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