ANN · MLP · Backprop

Detect Real vs Fake
Images with AI

Upload any image and our Neural Network will classify it as Real or Fake (AI-generated) within seconds using 1,423 extracted forensic dimensions.

📥 Upload
→
⚙️ Preprocess
→
🧠 ANN Model
→
✅ Prediction

🖼️ Upload Image for Classification

Max 16 MB

Supports JPG, PNG, BMP · High-precision forensic extraction

📊 Live AI Forensic Analysis

System Ready

Real-time deep neural feature inspection & authenticity verdict

🔬

Awaiting Image Inspection

Upload any picture on the left and click "Analyse Image" to extract 1,423 forensic dimensions and classify with our trained Neural Network.

📐
HOG Edge Gradients Detects synthetic smoothing and edge boundary abnormalities.
🎨
Color Moment Statistics Captures channel distribution shifts across RGB & HSV color spaces.
🧠
1,423-D ANN Topology Deep feedforward layers (128 → 64) with Sigmoid activation.
⚡
Sub-Second Execution Fully vectorized NumPy architecture delivers instant decisions.
Real-World Project Metrics

Model Performance & Dataset Specifications

Trained and evaluated on real vs AI-generated synthetic images using our custom-engineered Neural Network.

4,000 Images Processed 2,000 Real · 2,000 AI Fake
1,423 Extracted Features HOG + Color Moments + Gradients
76.17% Peak Val Accuracy Up +10% with Feature Engineering
27 Grid Search Trials LR × Neurons × Activations
🧠

Custom Deep ANN Architecture

NumPy From Scratch

Vectorized multi-layer feedforward network with 1,423 → 128 → 64 → 1 topology, He/Xavier initialization, and Sigmoid output probability σ(z) ∈ [0, 1].

Inputs: 1,423 Activation: ReLU Output: Sigmoid
📉

Binary Cross-Entropy & L2 Loss

Cost Function

Penalizes confident wrong classifications with L2 weight decay (λ = 10-4) and StandardScaler normalization (μ=0, σ=1) to prevent neuron saturation.

Loss: BCE Scaling: Standard Batch Size: 64
🔄

Momentum Backpropagation

Velocity Optimization

Exact matrix chain-rule gradients ∂ℒ/∂W updated with Momentum (β = 0.9) velocity vectors and gradient clipping [-5, 5] for ultra-smooth convergence.

Optimizer: SGD + Momentum β: 0.9 Epochs: 80
⚙️

Hyperparameter Tuning (27 Trials)

Grid Search Winner

Exhaustive search across 3 learning rates (0.1, 0.01, 0.001), 3 layer topologies, and 3 activations (ReLU, Tanh, Sigmoid). (128, 64) + ReLU achieved 76.17% validation accuracy.

Best LR: 0.10 Neurons: (128, 64) Best Val Acc: 76.17%

📊 Real Model Benchmark & Evaluation Results

Evaluated on 600 Independent Test Images
Model Architecture Activation Learning Rate Test Accuracy Precision (Fake) Recall (Fake) F1-Score
Baseline MLP (Scikit-Learn) 1423 → 256 → 128 ReLU Adam 75.17% 75.25% 75.00% 75.13%
Custom ANN (Default Scratch) 1423 → 128 → 64 ReLU 0.01 74.67% 73.10% 77.00% 75.00%
Tuned Custom ANN (Best Config) ⭐ 1423 → 128 → 64 ReLU 0.10 74.17% (76.17% Val) 72.73% 77.33% 74.96%

CivicLens · Real vs Fake Image Classifier · Powered by a Custom Neural Network