Skip to content

Releases: Circuit-Overtime/CNN_Facecom

Gender Detection Model on vgg19

26 Jun 05:58

Choose a tag to compare

Gender Detection using VGG19 and Metrics

This model performs binary gender classification (Male/Female) on face images using a fine-tuned VGG19 architecture. The model is trained on the class-imbalanced FACECOM dataset using advanced techniques to ensure fairness and high generalization.


🧠 Model Architecture

  • Base model: VGG19 (pretrained on ImageNet)
  • Top layers:
    • GlobalAveragePooling2D
    • Dense(512, activation='relu')
    • Dropout(0.5)
    • Dense(1, activation='sigmoid')
  • Input size: 250 × 250 × 3
  • Output: Probability of class “Female” (label 1)

⚙️ Training Strategy

Phase Description
1️⃣ Train only the new head layers (VGG19 frozen)
2️⃣ Fine-tune top convolutional blocks of VGG19
EarlyStopping, ReduceLROnPlateau, and ModelCheckpoint for best performance

🧪 Techniques Used

  • Loss Function: Binary Crossentropy with Label Smoothing
  • Optimizer: Adam with learning rate scheduling
  • Augmentation: Horizontal flip, rotation, brightness/contrast jitter
  • Class Imbalance Handling:
    • Augmented female class
    • Class weights during training
  • Metrics Tracked: Accuracy, Precision, Recall, F1-Score, AUC

📊 Performance (Validation Set)

Metric Value
Accuracy 97%
Precision 0.9714
Recall 0.9653
F1-score 0.9684
AUC > 0.96

📁 Model Files

File Description
vgg19_train.h5 Final fine-tuned model ready for inference (recommended)
vgg19_final_epoch.h5 Final saved model & ready for inference

Dataset structure

Data/
└── Task_A/
    ├── train/
    │   ├── male/
    │   └── female/
    └── val/
        ├── male/
        └── female/

Embedding Model Resnet50 on Common Faces

26 Jun 05:51

Choose a tag to compare

Embedding Model of Facial Classification Triplet Network

This model performs face verification using a Triplet Network with a ResNet50 backbone, trained on the distorted face images provided in the FACECOM dataset.

🔧 Architecture Details

  • Backbone: ResNet50 (pretrained on ImageNet)
  • Embedding dimension: 256
  • Triplet Loss: Euclidean distance with margin = 0.3
  • Normalization: L2 normalized embeddings
  • Head: Dense(256) + Lambda(L2 norm)
  • Training strategy:
    • Phase 1: Train frozen ResNet base
    • Phase 2: Fine-tune top ResNet layers
  • Input size: 224 × 224 × 3

📁 Model Files

File Description
tripletNetwork.h5 Full Triplet Network (used for training)
embedding_sequel.h5 Embedding extractor model (used for inference)

📊 Performance (on Validation Set)

  • Accuracy: ~96–97%
  • Precision: 0.9729
  • Recall: 0.9841
  • F1 Score: 0.9785
  • 📐 Threshold: 0.945

Dataset Structure

Data/
└── Task_B/
    ├── train/
    │   └── 001_identity/
    │       ├── 001_identity.jpg
    │       └── distortion/
    │           ├── 001_identity_blurred.jpg
    │           └── ...
    └── val/
        └── ...