arsath-sm commited on
Commit
4b1ca5b
Β·
verified Β·
1 Parent(s): cae2ce2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +147 -3
README.md CHANGED
@@ -1,3 +1,147 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ tags:
6
+ - computer-vision
7
+ - image-classification
8
+ - face-detection
9
+ ---
10
+
11
+
12
+ # Inception-style Face Classification Model 🎭
13
+
14
+ This model uses an Inception-style architecture to distinguish between real human faces and AI-generated faces.
15
+
16
+ ## Model Description πŸ“
17
+
18
+ ### Model Architecture
19
+ - Inception-style network with multi-scale feature processing
20
+ - Input shape: (224, 224, 3)
21
+ - Multiple inception modules with parallel pathways
22
+ - Global average pooling
23
+ - Dense layers with dropout for classification
24
+ - Binary output with sigmoid activation
25
+
26
+ ### Task
27
+ Binary classification to determine if a face image is real (human) or AI-generated.
28
+
29
+ ### Framework and Training
30
+ - Framework: TensorFlow
31
+ - Training Device: GPU
32
+ - Training Dataset: Custom dataset of real and AI-generated faces
33
+ - Validation Metrics:
34
+ - Accuracy: 52.94%
35
+ - Loss: 0.6913
36
+
37
+ ## Intended Use 🎯
38
+
39
+ ### Primary Intended Uses
40
+ - Research in deepfake detection
41
+ - Educational purposes in deep learning
42
+ - Face authentication systems
43
+
44
+ ### Out-of-Scope Uses
45
+ - Production-level face verification
46
+ - Legal or forensic applications
47
+ - Stand-alone security systems
48
+
49
+ ## Training Procedure πŸ”„
50
+
51
+ ### Training Details
52
+ ```python
53
+ optimizer = Adam(learning_rate=0.0001)
54
+ loss = 'binary_crossentropy'
55
+ metrics = ['accuracy']
56
+ ```
57
+
58
+ ### Training Hyperparameters
59
+ - Learning rate: 0.0001
60
+ - Batch size: 32
61
+ - Dropout rate: 0.5
62
+ - Architecture:
63
+ - Initial conv: 64 filters, 7x7
64
+ - Inception modules: [64, 128, 256, 512] filters
65
+ - Dense layer: 256 units
66
+
67
+ ## Evaluation Results πŸ“Š
68
+
69
+ ### Performance Metrics
70
+ - Validation Accuracy: 52.94%
71
+ - Validation Loss: 0.6913
72
+
73
+ ### Advantages Over ResNet Model
74
+ - Better generalization
75
+ - More stable learning process
76
+ - Lower validation loss
77
+ - Slightly higher accuracy
78
+
79
+ ## Usage πŸ’»
80
+
81
+ ```python
82
+ from tensorflow.keras.models import load_model
83
+ import cv2
84
+ import numpy as np
85
+
86
+ # Load the model
87
+ model = load_model('face_classification_model2')
88
+
89
+ # Preprocess image
90
+ def preprocess_image(image_path):
91
+ img = cv2.imread(image_path)
92
+ img = cv2.resize(img, (224, 224))
93
+ img = img / 255.0
94
+ return np.expand_dims(img, axis=0)
95
+
96
+ # Make prediction
97
+ image = preprocess_image('face_image.jpg')
98
+ prediction = model.predict(image)
99
+ is_real = prediction[0][0] > 0.5
100
+ ```
101
+
102
+ ## Example Predictions πŸ–ΌοΈ
103
+
104
+ [Include sample images with predictions here]
105
+
106
+ ## Ethical Considerations 🀝
107
+
108
+ This model is designed for research and educational purposes only. Users should:
109
+ - Obtain proper consent when processing personal face images
110
+ - Be aware of potential biases in face detection systems
111
+ - Consider privacy implications when using face analysis tools
112
+ - Not use this model for surveillance or harmful applications
113
+
114
+ ## Technical Limitations ⚠️
115
+
116
+ 1. Current performance limitations:
117
+ - Accuracy only slightly above random chance
118
+ - May require ensemble methods for better results
119
+ - Limited testing on diverse datasets
120
+
121
+ 2. Recommended improvements:
122
+ - Extended training with larger datasets
123
+ - Implementation of data augmentation
124
+ - Hyperparameter optimization
125
+ - Transfer learning from pre-trained models
126
+
127
+ ## Citation πŸ“š
128
+
129
+ ```bibtex
130
+ @software{face_classification_model2,
131
+ author = {Your Name},
132
+ title = {Face Classification Model using Inception Architecture},
133
+ year = {2024},
134
+ publisher = {HuggingFace},
135
+ url = {https://huggingface.co/arsath-sm/face_classification_model2}
136
+ }
137
+ ```
138
+
139
+ ## Contributors πŸ‘₯
140
+ - Arsath S.M
141
+ - Faahith K.R.M
142
+ - Arafath M.S.M
143
+
144
+ University of Jaffna
145
+
146
+ ## License πŸ“„
147
+ This model is licensed under the MIT License.