samyyc.dev
LOC::Macau, China

..UTC+8

samyyc.dev

-- BPM

Mon Jul 21 2025

Object Detection

#117

/

samyyc

/

274 words

/

Updated 502 days ago

/

[中文]

R-CNN family

Includes R-CNN, Fast R-CNN, Faster R-CNN, and other models.

It uses two-stage detection: first search for candidate boxes, then loop over the candidate boxes and use an RNN to search.

Slower.

YOLO V1

Uses just one CNN, end-to-end recognition, fast.

Step 1 Divide into cells

Labels: manually drawn boxes (Ground Truth). Divide the input image into an S*S grid. If the center point of a box falls inside a cell, that cell is responsible for the object.

Step 2 Prediction per cell

  • Bounding Box: bounding box coordinates x, y, w, h
  • Confidence: confidence of each bounding box
  • Class: classification of the image

Cell tasks

  1. Predict the Bounding Box
  2. Predict Confidence

P_r(Object) * IOU^{truth}_{pred}

IOU: the intersection over union of the predicted box and the ground truth box, the intersection of the two boxes over the union of the two boxes.

  1. Each cell predicts a set of class probabilities (improvement: each bounding box predicts a set of class probabilities)
  2. Output dimensions: S*S*(B*5+C). S*S is the grid, B is the number of bounding boxes, 5 is x, y, w, h, confidence, and C is the class probabilities.

Handling too many boxes at test time

NMS algorithm (non-maximum suppression)

  1. Find the box with the highest class confidence
  2. Compute its IOU with the remaining boxes
  3. If the IOU is greater than the threshold, remove that box
  4. Repeat the above process

Evaluation

Evaluation method: mAP (Mean Average Precision)

Need to compute precision and recall.

Judging TP for detection tasks: select boxes with IOU > 0.5 and set a threshold on confidence.