0
0
Computer Visionml~20 mins

Medical image segmentation basics in Computer Vision - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Medical Segmentation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding segmentation masks
In medical image segmentation, what does a segmentation mask represent?
AA binary or multi-class image labeling each pixel with a class such as organ or background
BA 3D model of the organ reconstructed from the scan
CA heatmap showing the probability of disease presence
DA grayscale image showing the intensity of the original scan
Attempts:
2 left
💡 Hint
Think about how each pixel is classified in segmentation.
Predict Output
intermediate
1:30remaining
Output shape of segmentation model
Given a 2D medical image input of shape (128, 128, 1), what is the output shape of a segmentation model that predicts 3 classes per pixel?
Computer Vision
input_shape = (128, 128, 1)
num_classes = 3
# Model outputs per-pixel class probabilities
A(3, 128, 128)
B(128, 128, 1)
C(128, 128, 3)
D(128, 3)
Attempts:
2 left
💡 Hint
The output shape matches the input height and width, with channels equal to number of classes.
Hyperparameter
advanced
2:00remaining
Choosing loss function for imbalanced classes
In medical image segmentation, some organs occupy very small areas compared to background. Which loss function is best to handle this class imbalance?
AMean Squared Error (MSE)
BDice Loss
CCategorical Cross-Entropy
DHinge Loss
Attempts:
2 left
💡 Hint
Look for a loss that focuses on overlap between predicted and true masks.
Metrics
advanced
1:30remaining
Evaluating segmentation quality
Which metric best measures how well the predicted segmentation overlaps with the ground truth mask?
AAccuracy
BRecall
CPrecision
DIntersection over Union (IoU)
Attempts:
2 left
💡 Hint
This metric compares the size of the intersection to the size of the union of two sets.
🔧 Debug
expert
2:30remaining
Diagnosing model output shape error
You trained a segmentation model but the output shape is (126, 126, 2) instead of (128, 128, 2) for 2 classes. What is the most likely cause?
Computer Vision
model = Sequential([
    Conv2D(32, 1, activation='relu', input_shape=(128,128,1)),
    Conv2D(2, 3, activation='softmax')
])
output = model.predict(input_image)
print(output.shape)
ALast Conv2D layer lacks padding='same', causing shape reduction
BMissing a Flatten layer before the last Conv2D
CLast Conv2D layer uses kernel size 1 but no channels dimension in output
DThe model is missing a final activation layer
Attempts:
2 left
💡 Hint
Check if convolution reduces spatial dimensions unexpectedly.