About the Model
Deep learning pipeline and technical implementation details
Training Pipeline
Dataset
30k images — Kaggle (xhlulu)
60 / 20 / 20 %
60 / 20 / 20 %
→
Preprocessing
Resize 224×224 & EfficientNet normalize
→
Augmentation
Rotation ±15°, flip, zoom, brightness
→
EfficientNetB0
ImageNet weights
Phase 1: base frozen
Phase 1: base frozen
→
Fine-tuning
Phase 2: unfreeze 20 last layers
lr = 1e-5
lr = 1e-5
→
Custom Head
Dense(256) → Dropout(0.4)
Dense(128) → Dropout(0.3)
Dense(128) → Dropout(0.3)
→
Prediction
Real / Fake output
Threshold: 0.67
Threshold: 0.67
Training Details
Phase 1: Base Frozen — Epochs20
Phase 1 Learning Rate3e-4
Batch Size16
Phase 2: Fine-tuning — Max Epochs40
Phase 2 Learning Rate1e-5
OptimizerAdam
Loss FunctionBinary Crossentropy
Early Stopping PatienceP1: 6 / P2: 12 epoch
Optimal Threshold0.67
Dataset Information
SourceKaggle — xhlulu
Full Dataset140,000 images
Subset Used30,000 images
Real Images15,000
Fake Images15,000
Train / Val / Test Split60 / 20 / 20 %
Input Size224 × 224 px
Model Filerealvsfake_effnetB0_final.h5