Update README.md
Browse files
README.md
CHANGED
@@ -15,33 +15,37 @@ This model is designed to detect whether an image is real or AI-generated. It us
|
|
15 |
## Model Usage
|
16 |
|
17 |
```python
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
15 |
## Model Usage
|
16 |
|
17 |
```python
|
18 |
+
## Classes
|
19 |
+
The model classifies images into two categories:
|
20 |
+
- Real Image (0)
|
21 |
+
- AI Generated (1)
|
22 |
+
|
23 |
+
## Technical Details
|
24 |
+
- Model Architecture: Vision Transformer (ViT)
|
25 |
+
- Input: Images (RGB)
|
26 |
+
- Output: Binary classification with confidence score
|
27 |
+
- Max Image Size: 224x224 (automatically resized)
|
28 |
+
|
29 |
+
## Requirements
|
30 |
+
- transformers>=4.30.0
|
31 |
+
- torch>=2.0.0
|
32 |
+
- Pillow>=9.0.0
|
33 |
+
|
34 |
+
## Limitations
|
35 |
+
- Best performance with clear, high-quality images
|
36 |
+
- May have reduced accuracy with heavily edited photos
|
37 |
+
- Designed for general image detection
|
38 |
+
|
39 |
+
## Web Integration Example
|
40 |
+
```javascript
|
41 |
+
async function detectImage(imageFile) {
|
42 |
+
const formData = new FormData();
|
43 |
+
formData.append('image', imageFile);
|
44 |
+
|
45 |
+
const response = await fetch('YOUR_API_ENDPOINT', {
|
46 |
+
method: 'POST',
|
47 |
+
body: formData
|
48 |
+
});
|
49 |
+
|
50 |
+
return await response.json();
|
51 |
+
}
|