yaya36095 commited on
Commit
00ec010
·
verified ·
1 Parent(s): ae6dd48

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -31
README.md CHANGED
@@ -1,4 +1,4 @@
1
- ---
2
  ---
3
  language: en
4
  tags:
@@ -45,25 +45,32 @@ def detect_image(image_path):
45
  # Example usage
46
  # result, confidence = detect_image("path/to/image.jpg")
47
  # print(f"Result: {result} (Confidence: {confidence:.2f}%)")
48
- Classes
 
 
49
  The model classifies images into two categories:
50
 
51
- Real Image (0): The image is real and not AI-generated.
52
- AI Generated (1): The image is generated by AI.
53
- Technical Details
54
- Model Architecture: Vision Transformer (ViT)
55
- Input: Images (RGB)
56
- Output: Binary classification with confidence score
57
- Max Image Size: 224x224 (automatically resized)
58
- Requirements
59
- transformers>=4.30.0
60
- torch>=2.0.0
61
- Pillow>=9.0.0
62
- Limitations
63
- Best performance with clear, high-quality images.
64
- May have reduced accuracy with heavily edited photos.
65
- Designed for general image detection.
66
- Web Integration Example
 
 
 
 
 
67
  async function detectImage(imageFile) {
68
  const formData = new FormData();
69
  formData.append('image', imageFile);
@@ -75,17 +82,9 @@ async function detectImage(imageFile) {
75
 
76
  return await response.json();
77
  }
78
- Developer
79
- Created by: yaya36095
80
- License: MIT
81
- Repository: https://huggingface.co/yaya36095/ai-image-detector
82
-
83
-
84
-
85
- ### **ماذا يميز هذا التنسيق؟**
86
- 1. **استخدام العناوين بشكل مناسب:** كل قسم له عنوان محدد.
87
- 2. **استخدام الكود بشكل واضح:** أكواد Python و JavaScript موضوعة داخل كتل كود.
88
- 3. **تفاصيل واضحة للمستخدمين:** يوضح التصنيفات (Classes)، المتطلبات، والقيود بوضوح.
89
- 4. **قابلية القراءة:** النص منظم وسهل الفهم.
90
 
91
- انسخ هذا التنسيق والصقه في ملف `README.md` الخاص بك، وسترى النتيجة تظهر بشكل احترافي على Hugging Face. إذا كنت بحاجة لأي تعديل إضافي، لا تتردد في السؤال! 😊
 
 
 
 
1
+
2
  ---
3
  language: en
4
  tags:
 
45
  # Example usage
46
  # result, confidence = detect_image("path/to/image.jpg")
47
  # print(f"Result: {result} (Confidence: {confidence:.2f}%)")
48
+ ```
49
+
50
+ ## Classes
51
  The model classifies images into two categories:
52
 
53
+ - **Real Image (0)**: The image is real and not AI-generated.
54
+ - **AI Generated (1)**: The image is generated by AI.
55
+
56
+ ## Technical Details
57
+ - **Model Architecture**: Vision Transformer (ViT)
58
+ - **Input**: Images (RGB)
59
+ - **Output**: Binary classification with confidence score
60
+ - **Max Image Size**: 224x224 (automatically resized)
61
+
62
+ ## Requirements
63
+ - `transformers>=4.30.0`
64
+ - `torch>=2.0.0`
65
+ - `Pillow>=9.0.0`
66
+
67
+ ## Limitations
68
+ - Best performance with clear, high-quality images.
69
+ - May have reduced accuracy with heavily edited photos.
70
+ - Designed for general image detection.
71
+
72
+ ## Web Integration Example
73
+ ```javascript
74
  async function detectImage(imageFile) {
75
  const formData = new FormData();
76
  formData.append('image', imageFile);
 
82
 
83
  return await response.json();
84
  }
85
+ ```
 
 
 
 
 
 
 
 
 
 
 
86
 
87
+ ## Developer
88
+ - **Created by**: yaya36095
89
+ - **License**: MIT
90
+ - **Repository**: [https://huggingface.co/yaya36095/ai-image-detector](https://huggingface.co/yaya36095/ai-image-detector)