CNN Object Detection Models 3 — Questions and Answers
Question 1: How does RetinaNet address the foreground-background class imbalance problem?
- By using hard negative mining
- By applying Focal Loss (Correct answer)
- By training with balanced mini-batches
- By adding a separate background classifier
Correct answer: By applying Focal Loss
RetinaNet uses Focal Loss, which down-weights the contribution of easy negatives so training focuses on hard examples.
Question 2: What is the key architectural difference between one-stage and two-stage object detectors?
- One-stage detectors use larger backbones
- Two-stage detectors generate region proposals first, then classify them (Correct answer)
- One-stage detectors only work on small images
- Two-stage detectors skip NMS post-processing
Correct answer: Two-stage detectors generate region proposals first, then classify them
Two-stage detectors (e.g., Faster R-CNN) first generate proposals then classify each; one-stage detectors (e.g., YOLO) predict boxes and classes simultaneously.
Question 3: In YOLO, what does each grid cell predict?
- Only the class probabilities
- Bounding boxes, objectness scores, and class probabilities (Correct answer)
- Only the bounding box coordinates
- Region proposals for the RPN
Correct answer: Bounding boxes, objectness scores, and class probabilities
Each YOLO grid cell predicts B bounding boxes with confidence scores and C class probabilities for objects whose center falls in that cell.
Question 4: What is Intersection over Union (IoU) used for in object detection?
- Measuring pixel-level segmentation accuracy
- Quantifying the overlap between predicted and ground-truth boxes (Correct answer)
- Calculating the learning rate schedule
- Evaluating backbone feature quality
Correct answer: Quantifying the overlap between predicted and ground-truth boxes
IoU measures the ratio of overlap area to union area between a predicted box and a ground-truth box, indicating detection quality.
Question 5: Which component of Faster R-CNN is shared between the RPN and the detection head?
- The classification layer
- The convolutional feature extractor (backbone) (Correct answer)
- The bounding box regression layer
- The RoI pooling layer
Correct answer: The convolutional feature extractor (backbone)
Both the RPN and the detection head use the same convolutional backbone features, making computation efficient.
Question 6: What is the purpose of ROI Pooling (or ROI Align) in two-stage detectors?
- To resize proposed regions to a fixed size for the classifier (Correct answer)
- To generate anchor boxes at each feature map location
- To apply NMS across detected regions
- To augment training data with random crops
Correct answer: To resize proposed regions to a fixed size for the classifier
ROI Pooling extracts fixed-size feature maps from variable-size region proposals so they can be fed into a fully connected classification head.
Question 7: Which of the following is a key advantage of DETR over traditional CNN-based detectors?
- It uses more anchor boxes for better coverage
- It eliminates the need for NMS by using a transformer with set prediction (Correct answer)
- It achieves higher speed by using fewer layers
- It uses a recurrent backbone instead of a CNN
Correct answer: It eliminates the need for NMS by using a transformer with set prediction
DETR treats detection as a direct set prediction problem using a transformer encoder-decoder, removing the need for handcrafted NMS.
How does RetinaNet address the foreground-background class imbalance problem?