Pujan-Dev commited on
Commit
8ac659e
Β·
1 Parent(s): f43f89c

feat:added readme.md

Browse files
Files changed (3) hide show
  1. README.md +15 -145
  2. READMEs.md +152 -0
  3. 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
- ## πŸ—‚οΈ 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)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ ```
READMEs.md ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
- ```