3.4.13 · D5Convolutional Neural Networks

Question bank — Object detection (R-CNN, YOLO, SSD)

1,960 words9 min readBack to topic

This page is a misconception hunt. Each line below is a trap that object-detection students routinely fall into. Read the question, cover the answer, decide, then reveal. Every answer explains the reasoning, not just the verdict.

Before you start, make sure the three paradigms from Object detection (R-CNN, YOLO, SSD) are fresh: two-stage (R-CNN family), single-stage grid (YOLO), single-stage multi-scale (SSD). Several traps below hinge on knowing which is which.


Notation refresher (read before the traps)

Several traps use symbols and weights from the two loss functions. Let's pin them down first, with a picture for each.

Figure — Object detection (R-CNN, YOLO, SSD)
Figure — Object detection (R-CNN, YOLO, SSD)

True or false — justify

True or false: Object detection is just image classification run in a sliding window.
Partly — that's the naive ancestor, but modern detectors avoid the crippling cost of classifying millions of windows by proposing regions (R-CNN) or predicting boxes directly (YOLO/SSD), and they add box regression which pure classification lacks.
True or false: Semantic Segmentation can tell you how many cars are in an image.
False — semantic segmentation labels every pixel as "car" but does not separate one car from the next; counting instances needs object detection or Instance Segmentation.
True or false: Faster R-CNN is called "faster" because it uses a smaller CNN than R-CNN.
False — the backbone can be identical; the speedup comes from running the CNN once over the whole image and replacing Selective Search with a learned Region Proposal Network.
True or false: YOLO is single-stage because it only has one convolutional layer.
False — "single-stage" means one forward pass produces boxes and classes directly, with no separate region-proposal stage; the network itself is deep with many layers.
True or false: A YOLO v1 grid cell can detect an unlimited number of objects.
False — a cell owns only box predictors ( in v1) and shares one class distribution across them, so at most two boxes and only a single class per cell — crowded scenes overflow this budget.
True or false: In SSD, small objects are best detected on the deepest, lowest-resolution feature map.
False — small objects are detected on early, high-resolution maps where fine detail survives; deep low-resolution maps handle large objects.
True or false: Non-Maximum Suppression is part of the trained network.
False — NMS is a post-processing step applied to raw predictions at inference; it has no learnable parameters (though learnable variants exist as research).
True or false: The confidence score in YOLO equals the probability that the box contains a dog.
False — raw confidence is , object-agnostic; the class probability must be multiplied in to get "dog-ness."
True or false: Anchor Boxes tell the network exactly where objects are.
False — anchors are fixed reference shapes; the network predicts offsets from them. They only give the regression a sensible starting point at multiple scales/ratios.
True or false: Bounding-box regression predicts absolute pixel coordinates.
False — it predicts normalized transforms ( as fractions of proposal size, in log space) so learning is scale-invariant and always yields positive width/height.

Spot the error

Spot the error: "We take the square root of in YOLO's loss so that width and height stay positive."
The log/exp trick keeps sizes positive; the square root is there to make equal absolute errors matter more on small boxes than large ones (a 5-pixel error on a tiny box is a bigger relative mistake).
Spot the error: "Fast R-CNN warps each of the 2000 proposals to 227×227 before the CNN."
That's the original R-CNN. Fast R-CNN feeds the whole image through the CNN once and uses RoI pooling to crop fixed-size features from the shared feature map.
Spot the error: "The weight makes YOLO care more about empty boxes."
Opposite — down-weights the huge number of no-object confidence terms so their gradient doesn't swamp the rare cells that actually contain objects.
Spot the error: "In Faster R-CNN's loss, multiplies the regression term so we regress every anchor's box."
Since is the ground-truth label that equals 1 only for positive (object) anchors, we regress boxes only where an object exists — regressing background boxes would be meaningless.
Spot the error: " scales down the localization loss so classification dominates."
It scales up localization (coefficient greater than 1), because getting boxes precisely right is hard and would otherwise be under-weighted next to classification.
Spot the error: "RoI pooling standardizes proposals so each region can be a different aspect ratio at the CNN input."
RoI pooling produces a fixed output grid (e.g. 7×7) regardless of proposal size/ratio — that's the point: downstream fully-connected layers need a constant-size input.
Spot the error: "SSD's default boxes are generated by Selective Search."
SSD uses no external proposal algorithm — its "default boxes" are hand-designed anchors tiled across every feature map cell, predicted in one shot.

Why questions

Why does R-CNN separate "where to look" from "what is it"?
Searching all possible boxes is millions of evaluations; proposing ~2000 promising regions first lets a strong fixed-size classifier (Image Classification) do the heavy lifting on a tractable candidate set.
Why regress instead of ?
Log-space turns multiplicative scale changes into additive ones, which are more linear and easier for a network to learn, and guarantees the recovered width is positive.
Why does single-stage YOLO produce fewer background false positives than sliding-window classifiers?
YOLO sees the entire image in one pass, so it has global context to tell a real object from background texture, whereas a window classifier sees each patch in isolation.
Why does SSD predict from multiple feature maps instead of just one?
Each resolution has a natural object-size sweet spot; combining maps gives coverage across scales without expensively resizing the input image several times.
Why do YOLO v2/v3 adopt anchor boxes after v1 predicted boxes directly?
Direct coordinate regression struggles with varied aspect ratios and unstable early training; anchors give sensible priors so the network only learns small offsets, improving recall and stability.
Why is IoU used inside the confidence target rather than a simple hit/miss flag?
IoU is a graded measure of overlap, so the confidence target smoothly rewards boxes that fit better, giving the regressor a continuous signal instead of a binary one.
Why can Transfer Learning and Batch Normalization speed up detector training?
A pretrained backbone starts with rich visual features so detection heads learn faster on limited data, and BatchNorm stabilizes gradients through the deep backbone, allowing higher learning rates.

Edge cases

What does object detection output for an image with zero objects?
Ideally an empty set — every proposal/box is suppressed by low objectness/confidence and NMS, so no bounding boxes survive. A detector must handle the empty case, not force a prediction.
What happens when two identical objects overlap almost perfectly (IoU near 1)?
NMS may delete one as a "duplicate," causing a missed detection; this is a known weakness in dense scenes, motivating softer suppression schemes that decay scores instead of removing boxes outright.
What if an object's true box straddles two YOLO grid cells?
Only the cell containing the object's center is responsible; the other cell is trained to output no-object for it, so a badly centered object can be assigned to a cell with weak features.
Can a single YOLO v1 cell detect two overlapping objects of the same class?
Yes — its two box predictors () can output two boxes, and since both objects share the same class the single class distribution still fits; the same two objects with different classes cannot both be reported because the cell has only one class distribution.
What happens if an object is larger than every anchor/default box?
The regressor must apply a large positive ; because sizing is in space it can stretch beyond any anchor, but very extreme scale gaps hurt localization accuracy — hence multi-scale designs.
What if the IoU threshold for NMS is set too high (e.g. 0.9)?
Almost nothing is treated as a duplicate, so many redundant boxes for the same object survive; set too low and legitimately separate nearby objects get wrongly merged. The threshold trades duplicates against merges.
What does confidence look like for a box whose center is right but size is badly wrong?
The IoU with ground truth is low, so the target confidence () is small — the network is taught to report low confidence even though "an object is there," reflecting a poor fit.
How should a detector behave on a heavily augmented image (extreme crop/rotation from Data Augmentation)?
Boxes must be transformed with the image during training; if augmentation moves an object partly out of frame, its box is clipped and may be dropped if too little remains visible.
Recall One-line self-test

Name the one structural reason a v1 YOLO cell fails on two overlapping objects of different classes. ::: A cell holds only a single shared class distribution, so it cannot label two co-centered objects differently — even though its two box predictors could locate both.