Data Pipeline & Model Architecture

A complete explanation of the data processing pipeline (dataset split, augmentation, generator) and the neural network architecture used by InsCure.

๐Ÿ“Š 1. Data Processing Pipeline & Preprocessing

Steps for preparing, splitting, and augmenting data before training.

๐Ÿ“ˆ

Dataset Split

  • Split ratio: 80% Training and 20% Validation.
  • Dataset parameter: `validation_split=0.2` with random seed `123`.
  • Goal: Ensure objective model performance evaluation on unseen data.
Split Ratio80% Train / 20% Val
๐ŸŒ€

Image Data Augmentation

  • Overfitting prevention: Generates real-time image variation for training.
  • Supporting library: TensorFlow Keras `ImageDataGenerator`.
  • Config: Rotation (40ยฐ), width/height shift (20%), shear (20%), zoom (20%), and horizontal flip.
Augmentation MethodImageDataGenerator
๐Ÿ‹๏ธ

Training Data

  • Batch size: 32 images per iteration.
  • Target input dimension: 224x224 pixels (RGB).
  • Pixel normalisation: Division by 255.0 (`rescale=1./255`) to range [0.0, 1.0].
Training Normalisationrescale = 1/255.0
๐Ÿงช

Validation Data

  • Clean processing: No augmentation to preserve metric integrity.
  • Target input dimension: 224x224 pixels (RGB).
  • Pixel normalisation: Division by 255.0 (`rescale=1./255`).
Validation Normalisationrescale = 1/255.0

๐Ÿง  2. Neural Network Model Architecture

Data flow visualisation through each layer of the neural network architecture during the training process.

Model Processing Workflow Pipeline

Click a block below to see detailed layer parameter information.

1

Input Layer

Input image sized 224ร—224 with 3 colour channels (RGB).

224 x 224 x 3
โ–ผ
2

Base Model (MobileNetV2)

CNN backbone pre-trained on the ImageNet dataset. Weights frozen (trainable=False) for transfer learning.

7 x 7 x 1280
โ–ผ
3

Global Average Pooling 2D

Reduces the spatial dimensions of the 2D feature map (7ร—7) to a 1D vector by averaging feature values.

1280
โ–ผ
4

Dense (Hidden) Layer

Fully Connected Layer with 256 neurons for custom skin disease feature classification.

256
โ–ผ
5

Dropout Layer (50%)

Regularisation technique that randomly disables 50% of neurons during the training phase.

256
โ–ผ
6

Output (Softmax) Layer

Final Dense layer with 11 units producing probability values for each skin disease class.

11
๐Ÿ’ก Tip: Click one of the flow blocks above to read the detailed analysis, activation functions, and technical parameters of the neural network layer.

Model Training Metadata

  • OptimiserAdam (learning_rate=0.001)
  • Loss Functionsparse_categorical_crossentropy
  • Epoch LimitMax 100 Epochs
  • Custom CallbackStop if train & val acc > 92%
  • Batch Size32

Final Performance Metrics

The training process was automatically stopped at Epoch 43 as the model met the optimal performance criteria with high accuracy.

Validation Accuracy92.50%
Validation Loss0.2336

*Performance metrics are evaluated independently using a random validation dataset (20% split).