Challenge - 5 Problems
Bounding Box Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Output of bounding box area calculation
What is the output of the following code that calculates the area of bounding boxes stored as (x_min, y_min, x_max, y_max)?
PyTorch
import torch boxes = torch.tensor([[1, 2, 4, 6], [0, 0, 3, 3], [2, 2, 5, 5]]) widths = boxes[:, 2] - boxes[:, 0] heights = boxes[:, 3] - boxes[:, 1] areas = widths * heights print(areas.tolist())
Attempts:
2 left
💡 Hint
Remember area = width * height, where width = x_max - x_min and height = y_max - y_min.
✗ Incorrect
The widths are [3, 3, 3] and heights are [4, 3, 3]. Multiplying element-wise gives areas [12, 9, 9].
❓ Model Choice
intermediate2:00remaining
Choosing the right bounding box format for IoU calculation
Which bounding box format is best suited for calculating Intersection over Union (IoU) directly without conversion?
Attempts:
2 left
💡 Hint
IoU requires overlapping area calculation which is easier with corner coordinates.
✗ Incorrect
The (x_min, y_min, x_max, y_max) format directly gives the corners needed to find intersection areas without extra conversion.
❓ Hyperparameter
advanced2:00remaining
Effect of IoU threshold on Non-Maximum Suppression (NMS)
What is the effect of increasing the IoU threshold parameter in Non-Maximum Suppression when filtering bounding boxes?
Attempts:
2 left
💡 Hint
Higher IoU threshold means boxes must overlap more to be suppressed.
✗ Incorrect
Increasing IoU threshold means boxes with less overlap are not suppressed, so more boxes remain after NMS.
🔧 Debug
advanced2:00remaining
Debugging incorrect bounding box clipping
Given bounding boxes and image size, which option correctly clips boxes to image boundaries without errors?
PyTorch
import torch boxes = torch.tensor([[50, 30, 200, 180], [-10, 20, 100, 150], [30, 40, 500, 400]]) image_size = (300, 300) # height, width # Clip boxes so coordinates stay within image boundaries
Attempts:
2 left
💡 Hint
Remember image_size is (height, width). x coordinates clamp to width, y coordinates clamp to height.
✗ Incorrect
x coordinates (0 and 2) clamp to width (image_size[1]-1), y coordinates (1 and 3) clamp to height (image_size[0]-1).
🧠 Conceptual
expert3:00remaining
Understanding bounding box regression targets in object detection
In object detection, bounding box regression predicts offsets relative to anchor boxes. Which statement correctly describes why offsets are predicted instead of absolute coordinates?
Attempts:
2 left
💡 Hint
Think about how predicting relative changes helps the model focus on small adjustments.
✗ Incorrect
Predicting offsets relative to anchors normalizes the scale and position differences, improving training stability and convergence.