Computer Vision Interview
40 Q&A
Chapter 9
One-Stage Object Detection — Interview Q&A
YOLO, RetinaNet, and SSD-style single-shot detectors for real-time localization.
40 questions
Chapter 9
YOLO: 20 Essential Q&A
1
What does YOLO mean?
📊 medium
Answer: You Only Look Once: single forward pass predicts boxes and classes—treats detection as regression from a grid of cells.
2
YOLOv1 grid idea?
📊 medium
Answer: Image split into S×S cells; cell responsible for object whose center falls in it—predicts B boxes + class distribution per cell.
3
YOLOv1 loss components?
🔥 hard
Answer: Coordinate regression (with sqrt w,h trick), confidence (IoU weighted), classification CE—λ weights balance localization vs no-object cells.
4
When did anchors appear?
📊 medium
Answer: YOLOv2+ uses k-means anchor priors on dataset boxes—predict offsets instead of raw sizes for stability.
5
IoU in training?
📊 medium
Answer: Assign anchors/cells to GT by best IoU; some versions ignore preds below IoU threshold for classification to reduce conflict.
6
Post-processing?
⚡ easy
Answer: Like other detectors: NMS on decoded boxes with class-wise scores—some variants use DIoU-NMS or soft-NMS.
7
Objectness vs class?
⚡ easy
Answer: Objectness = is there an object in this anchor; class = which class—decoupled in many heads (obj * class prob = final score).
8
Multi-scale YOLO?
📊 medium
Answer: Later versions predict at multiple feature map scales (e.g. large/small stride) to catch objects of different sizes—similar spirit to FPN.
9
Path aggregation?
📊 medium
Answer: Models like YOLOv4 use PANet-style bottom-up path after top-down FPN for richer multi-scale features.
10
YOLOv5/v8 / Ultralytics?
⚡ easy
Answer: Popular PyTorch implementations with training zoo, export, and deployment tooling—interview “practical YOLO” often means this ecosystem.
11
Deploy on edge?
📊 medium
Answer: Export to ONNX, TensorRT, CoreML—quantize INT8 for speed; validate mAP drop after conversion.
12
Small objects?
📊 medium
Answer: Higher-res input, smaller stride heads, copy-paste aug, or tiling—same fundamentals as other detectors.
13
Crowded objects?
🔥 hard
Answer: Grid responsibility and NMS can struggle—improved assignment (e.g. ATSS-style ideas in some detectors) and better NMS help.
14
Common augmentations?
📊 medium
Answer: Mosaic, mixup, HSV jitter, random scale—strong aug standard in modern YOLO training recipes.
15
mAP vs FPS tradeoff?
⚡ easy
Answer: Larger model and image size ↑ mAP, ↓ FPS—choose for product SLA (latency vs accuracy).
16
YOLO vs SSD?
📊 medium
Answer: Both one-stage; SSD uses multi-scale default boxes on VGG features; YOLO family evolved different heads and assignment—both real-time capable.
17
YOLO vs RetinaNet?
📊 medium
Answer: RetinaNet introduced focal loss for dense classification imbalance; YOLO uses different obj loss weighting—both dense predictors.
18
Tiling satellite / huge images?
📊 medium
Answer: Split image, run YOLO per tile with overlap, merge + NMS—handle boundary duplicates.
19
Rotated boxes?
🔥 hard
Answer: Variants predict angle θ or use rotated IoU—needed for aerial/text detection.
20
Real-time on CPU?
📊 medium
Answer: Choose nano/tiny backbones, reduce input size, INT8—expect large accuracy gap vs GPU server models.
RetinaNet: 20 Essential Q&A
21
What is RetinaNet?
📊 medium
Answer: One-stage detector with FPN backbone and focal loss on dense classification—closes accuracy gap to two-stage without proposals.
22
Focal loss intuition?
🔥 hard
Answer: Down-weights easy negatives (well-classified background) so training focuses on hard examples—prevents huge CE loss from overwhelming gradients.
# FL = -α * (1 - p_t)**γ * log(p_t) # p_t = prob of ground-truth class
23
Role of γ (gamma)?
🔥 hard
Answer: Focusing parameter: (1 − p_t)^γ reduces loss for high-confidence correct preds; γ=0 is CE; typical γ=2.
24
Why imbalance in one-stage?
📊 medium
Answer: ~100k anchors per image with few positives—vanilla CE is dominated by easy background classifications.
25
How does FPN help RetinaNet?
📊 medium
Answer: Predicts at multiple pyramid levels P3–P7 with shared heads—each level responsible for objects in a scale range.
26
Subnet design?
📊 medium
Answer: Separate small conv classification and box regression subnets applied per level—4 conv layers each in original paper.
27
Anchors?
⚡ easy
Answer: Similar to RPN: multiple scales/ratios per location; classification predicts class (sigmoid per class) and reg head predicts deltas.
28
Box regression loss?
⚡ easy
Answer: Smooth L1 on positive anchors only—standard in Faster R-CNN lineage.
29
vs SSD?
📊 medium
Answer: Both multi-scale one-stage; RetinaNet’s focal loss specifically addresses training imbalance SSD tackled partly with hard negative mining.
30
vs two-stage?
📊 medium
Answer: No separate proposal stage—simpler pipeline; historically competitive mAP on COCO with proper FPN + focal loss.
31
Training tips?
📊 medium
Answer: Longer schedules help; careful anchor matching; synchronized BN on multi-GPU for large batch stability.
32
Inference cost?
⚡ easy
Answer: Single backbone forward + per-level heads + NMS—faster than two-stage but still heavier than tiny YOLO variants.
33
Anchor-free successors?
🔥 hard
Answer: FCOS, CenterNet, DETR reduce anchor design—focal loss ideas still influence classification in some heads.
34
Why sigmoid per class?
📊 medium
Answer: Enables multi-label rare cases and simplifies K independent binary classifiers vs softmax mutual exclusivity.
35
Unified loss?
⚡ easy
Answer: Sum of focal classification + smooth L1 regression over all locations (masked to assigned anchors).
36
Variants of focal loss?
🔥 hard
Answer: Quality focal loss, balanced loss, GHM—adjust weighting scheme for hard/easy examples differently.
37
IoU-aware classification?
🔥 hard
Answer: Some heads predict joint IoU quality with class to better rank detections—post-RetinaNet refinement.
38
Historical COCO note?
⚡ easy
Answer: RetinaNet showed one-stage could match two-stage mAP around 2017—important milestone before transformer detectors.
39
Limitations?
📊 medium
Answer: Many hyperparameters (α, γ, anchor design); dense preds still need NMS; superseded in some tracks by newer architectures.
40
When reuse focal loss?
⚡ easy
Answer: Any extreme class imbalance in dense prediction—segmentation, keypoint heatmaps, or custom detectors.
Full tutorial chapter
Pair these interview notes with the matching CV tutorial chapter.