Challenge - 5 Problems
Faster R-CNN Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Output shape of Faster R-CNN model predictions
Given the following PyTorch code snippet using a pretrained Faster R-CNN model, what is the type and structure of the output after running the model on a batch of images?
PyTorch
import torch from torchvision.models.detection import fasterrcnn_resnet50_fpn model = fasterrcnn_resnet50_fpn(pretrained=True) model.eval() images = [torch.rand(3, 300, 400), torch.rand(3, 500, 600)] outputs = model(images) print(type(outputs)) print(len(outputs)) print(outputs[0].keys())
Attempts:
2 left
💡 Hint
Think about how torchvision detection models return predictions for each image separately.
✗ Incorrect
The Faster R-CNN model returns a list of dictionaries, one per input image. Each dictionary contains keys 'boxes', 'labels', and 'scores' with tensors describing detected objects.
❓ Model Choice
intermediate1:30remaining
Choosing the right backbone for Faster R-CNN
You want to detect small objects in high-resolution images using Faster R-CNN. Which backbone architecture is generally better for capturing fine details?
Attempts:
2 left
💡 Hint
Feature Pyramid Network helps detect objects at multiple scales.
✗ Incorrect
ResNet-50 with FPN provides strong multi-scale feature maps, which help detect small objects better than shallower or backbone without FPN.
❓ Hyperparameter
advanced2:00remaining
Adjusting Faster R-CNN training for fewer false positives
During training Faster R-CNN, you notice many false positive detections. Which hyperparameter adjustment is most likely to reduce false positives?
Attempts:
2 left
💡 Hint
False positives can be filtered by confidence score thresholds.
✗ Incorrect
Increasing the score threshold during inference filters out low-confidence boxes, reducing false positives.
🔧 Debug
advanced2:00remaining
Identifying error in Faster R-CNN input format
You run this code and get a runtime error:
import torch
from torchvision.models.detection import fasterrcnn_resnet50_fpn
model = fasterrcnn_resnet50_fpn(pretrained=True)
model.eval()
image = torch.rand(3, 224, 224)
output = model(image)
What is the cause of the error?
Attempts:
2 left
💡 Hint
Check the expected input type for torchvision detection models.
✗ Incorrect
Faster R-CNN expects a list of tensors, each representing an image. Passing a single tensor causes a runtime error.
❓ Metrics
expert2:30remaining
Evaluating Faster R-CNN with mAP metric
You trained a Faster R-CNN model and want to evaluate its performance using mean Average Precision (mAP) at IoU=0.5. Which statement about mAP is correct?
Attempts:
2 left
💡 Hint
mAP involves precision and IoU thresholds for matching predictions to ground truth.
✗ Incorrect
mAP@0.5 calculates average precision considering only predicted boxes with IoU > 0.5 to ground truth, reflecting detection quality.