Image segmentation is like coloring a picture by dividing it into parts. It means splitting an image into pieces where each piece shows something important, like a person or a tree.
Click to reveal answer
beginner
What is the difference between classification and segmentation?
Classification says what is in the whole image (like 'cat' or 'dog'). Segmentation tells exactly where each object is by coloring each pixel with a label.
Click to reveal answer
intermediate
What is a common neural network architecture used for image segmentation?
U-Net is a popular network for image segmentation. It looks like a U shape and helps the model learn both the big picture and small details.
Click to reveal answer
beginner
What does a segmentation mask represent?
A segmentation mask is an image where each pixel has a label showing which object or background it belongs to. It’s like a coloring book page for the model.
Click to reveal answer
intermediate
Why do we use metrics like IoU (Intersection over Union) in segmentation?
IoU measures how well the predicted segmentation matches the true segmentation by comparing overlapping areas. It helps us know if the model is doing a good job.
Click to reveal answer
What does image segmentation do?
ADivides an image into meaningful parts
BClassifies the whole image into one category
CGenerates captions for images
DResizes images to smaller dimensions
✗ Incorrect
Image segmentation splits an image into parts that represent different objects or regions.
Which architecture is commonly used for image segmentation?
AResNet
BRNN
CTransformer
DU-Net
✗ Incorrect
U-Net is designed specifically for image segmentation tasks.
What is a segmentation mask?
AA text description of the image
BA blurred version of the original image
CAn image with pixel-wise labels
DA resized image
✗ Incorrect
A segmentation mask labels each pixel to show which object it belongs to.
What does IoU measure in segmentation?
AImage brightness
BOverlap between predicted and true masks
CModel training speed
DNumber of layers in the model
✗ Incorrect
IoU compares how much the predicted and true segmentation masks overlap.
How is segmentation different from classification?
ASegmentation labels each pixel; classification labels the whole image
BSegmentation is faster than classification
CClassification uses images; segmentation uses text
DThey are the same
✗ Incorrect
Segmentation assigns labels to every pixel, while classification assigns one label to the entire image.
Explain what image segmentation is and why it is useful.
Think about how you would color different objects in a photo.
You got /3 concepts.
Describe the U-Net architecture and its role in image segmentation.
Imagine a network that zooms out and then zooms back in.
You got /3 concepts.
Practice
(1/5)
1. What is the main goal of image segmentation in TensorFlow?
easy
A. To compress images without losing quality
B. To label each pixel in an image with a class
C. To generate random noise images
D. To classify the entire image into one category
Solution
Step 1: Understand image segmentation purpose
Image segmentation assigns a class label to every pixel, dividing the image into meaningful parts.
Step 2: Compare with other tasks
Unlike classification, which labels the whole image, segmentation works at pixel level.
Final Answer:
To label each pixel in an image with a class -> Option B
Quick Check:
Image segmentation = pixel-wise labeling [OK]
Hint: Segmentation means labeling pixels, not whole images [OK]
Common Mistakes:
Confusing segmentation with image classification
Thinking segmentation compresses images
Believing segmentation creates random images
2. Which TensorFlow layer is commonly used to extract features for image segmentation?
easy
A. Convolutional layer
B. Dense layer
C. Dropout layer
D. Flatten layer
Solution
Step 1: Identify feature extraction layers
Convolutional layers scan images to find patterns and features useful for segmentation.
Step 2: Understand other layers' roles
Dense layers are for classification, dropout prevents overfitting, flatten reshapes data but doesn't extract features.
Final Answer:
Convolutional layer -> Option A
Quick Check:
Feature extraction = convolutional layers [OK]
Hint: Convolutional layers find image features [OK]
Common Mistakes:
Choosing dense layers for feature extraction
Confusing flatten with convolution
Ignoring convolution's role in images
3. What will be the shape of the output tensor after applying a softmax activation on a segmentation model predicting 3 classes for a 128x128 image?
medium
A. (128, 128, 3)
B. (3, 128, 128)
C. (128, 3, 128)
D. (128, 128)
Solution
Step 1: Understand output shape for segmentation
Each pixel has a probability for each class, so output shape is height x width x classes.
Step 2: Apply to given image and classes
Image size is 128x128, classes are 3, so output shape is (128, 128, 3).
Final Answer:
(128, 128, 3) -> Option A
Quick Check:
Output shape = (height, width, classes) [OK]
Hint: Output shape = image size + number of classes [OK]
Common Mistakes:
Mixing class dimension position
Forgetting classes dimension
Using 2D shape instead of 3D
4. Given this TensorFlow code snippet for segmentation, what is the error?