0
0
Computer Visionml~12 mins

Random erasing in Computer Vision - Model Pipeline Trace

Choose your learning style9 modes available
Model Pipeline - Random erasing

This pipeline shows how random erasing helps a computer vision model learn better by randomly hiding parts of images during training. This makes the model stronger and less likely to get confused by small changes.

Data Flow - 4 Stages
1Input images
1000 images x 3 channels x 32 height x 32 widthOriginal images loaded for training1000 images x 3 channels x 32 height x 32 width
Image of a cat with clear details
2Random erasing augmentation
1000 images x 3 channels x 32 height x 32 widthRandomly erase a small rectangle area in each image by replacing pixels with random values1000 images x 3 channels x 32 height x 32 width
Same cat image but with a small random patch erased (covered with noise)
3Feature extraction
1000 images x 3 channels x 32 height x 32 widthConvolutional layers extract important features from images1000 images x 64 feature maps x 8 height x 8 width
Feature maps highlighting edges and textures
4Classification layer
1000 images x 64 feature maps x 8 height x 8 widthFully connected layer predicts image class1000 images x 10 classes
Predicted probabilities for 10 classes like cat, dog, car
Training Trace - Epoch by Epoch

Epochs
1 |***************...............| Loss=1.8
3 |********************..........| Loss=1.2
5 |************************......| Loss=0.9
7 |****************************..| Loss=0.7
10|*******************************| Loss=0.5
EpochLoss ↓Accuracy ↑Observation
11.80.35Model starts learning, loss high, accuracy low
31.20.55Loss decreases, accuracy improves as model learns features
50.90.68Random erasing helps model generalize, accuracy rises
70.70.75Loss continues to drop, model becomes more confident
100.50.82Training converges with good accuracy and low loss
Prediction Trace - 4 Layers
Layer 1: Input image
Layer 2: Random erasing (only during training, skipped here)
Layer 3: Feature extraction
Layer 4: Classification layer
Model Quiz - 3 Questions
Test your understanding
What is the main purpose of random erasing in this pipeline?
ATo increase image resolution
BTo hide parts of images during training to improve model robustness
CTo convert images to grayscale
DTo speed up training by reducing image size
Key Insight
Random erasing helps the model learn to recognize objects even when parts are missing or hidden. This makes the model more flexible and better at handling real-world images that might have noise or occlusions.