0
0
Computer Visionml~12 mins

Dataset bias in vision in Computer Vision - Model Pipeline Trace

Choose your learning style9 modes available
Model Pipeline - Dataset bias in vision

This pipeline shows how dataset bias in vision can affect model training and predictions. It demonstrates how biased data leads to skewed learning and poor generalization.

Data Flow - 5 Stages
1Raw Image Dataset
1000 images x 64x64 pixels x 3 channelsCollect images mostly of cats in indoor settings1000 images x 64x64 pixels x 3 channels
Image of a cat sitting on a couch indoors
2Data Preprocessing
1000 images x 64x64 pixels x 3 channelsResize images to 32x32 pixels and normalize pixel values1000 images x 32x32 pixels x 3 channels
Resized and normalized cat image
3Train/Test Split
1000 images x 32x32 pixels x 3 channelsSplit dataset into 800 training and 200 testing images800 training images x 32x32 pixels x 3 channels, 200 testing images x 32x32 pixels x 3 channels
Training set mostly indoor cat images, test set includes some outdoor cat images
4Model Training
800 training images x 32x32 pixels x 3 channelsTrain CNN to classify cat imagesTrained CNN model
Model learns mostly indoor cat features
5Model Evaluation
200 testing images x 32x32 pixels x 3 channelsEvaluate model accuracy on test imagesAccuracy score (percentage)
High accuracy on indoor cats, low accuracy on outdoor cats
Training Trace - Epoch by Epoch
Loss
1.2 |****
0.9 |***
0.7 |**
0.6 |*
0.55|*
    +------------
     Epochs 1-5
EpochLoss ↓Accuracy ↑Observation
11.20.45Model starts learning basic features
20.90.60Model improves recognizing indoor cats
30.70.72Model fits well to biased training data
40.60.78Loss decreases steadily, accuracy increases
50.550.82Model converges on training data with bias
Prediction Trace - 5 Layers
Layer 1: Input Image
Layer 2: Convolutional Layer
Layer 3: Pooling Layer
Layer 4: Fully Connected Layer
Layer 5: Output Layer with Softmax
Model Quiz - 3 Questions
Test your understanding
What is a main cause of dataset bias in this vision model?
AMost training images show cats indoors
BImages are resized to 32x32 pixels
CThe model uses ReLU activation
DTest images are fewer than training images
Key Insight
Dataset bias in vision models causes them to learn features mostly from the dominant data type, reducing accuracy on underrepresented cases. Careful dataset design and diverse data collection are essential to build fair and robust vision models.