Writing

Deep Learning — Object Detection (1)

Object detection basics, traditional pipelines, R-CNN flow, NMS, and bounding-box regression.

Preface: In deep learning for images, object detection is fundamental and widely used. Below are common detection algorithms and models.

What Is Object Detection?

Detect what objects appear in an image and where. Traditional pipelines have three stages: propose candidate regions, extract features, classify with a trained classifier.

  • Region proposal Localize targets. Classical approach: exhaustive sliding windows at multiple scales—high complexity, redundant windows, slow feature extraction and classification.

  • Feature extraction Quality affects classification; diverse object shapes make robust features hard. Common: SIFT and HOG.

  • Classifier SVM, Adaaboost, etc. Two main problems: non-targeted sliding windows (slow, redundant) and hand-crafted features with weak robustness.

R-CNN

Early detection model. R = region proposal—human/precomputed candidate locations, then CNN recognition.

R-CNN Pipeline

Three parts: proposals, fixed-length CNN features per proposal, SVM classification.

image

In words:

(1) Input natural image; (2) Selective Search ~2000 proposals; (3) Warp each proposal to fixed square, CNN features; AlexNet → 4096-d vector. AlexNet expects 227×227—small edge padding (16px) then stretch (not padding—padding worked poorly). (4) Linear SVM per class.

  • NMS For each class, score all proposal features with class SVM; apply NMS—discard a proposal if it overlaps a higher-scoring proposal with IoU below threshold.

  • Positive/negative ratio ~1:3

Bounding-Box Regression

Improves localization—a regression model. Training input: N pairs

image

where

image

is proposal (center x,y; width, height) and

image

is ground truth. Learn mapping P→G; t is label relating P and G; after training, predict G from P.

image

  • Pair (P,G) when max IoU(P,G)>0.6; else drop P. Objective: image

  • Bounding-box regression fine-tunes proposals for better localization: image

  • Note: only when P and GT are close (linear regime) use as training sample; far apart is nonlinear—linear regression fails—hence “fine-tuning.”

  • Input: the four numbers? Actual input is CNN features for the window—R-CNN Pool5 feature vector—deep features approaching the label.