Algorithmadvanced
R-CNN
Also called regions with CNN features.
Detect objects by warping each selective search proposal to a fixed size, extracting CNN features, classifying them with SVMs and regressing the box.
- Solves
- Object detection
- Time
- O(P S^2 + P C d + C P^2) worst
- Space
- O(S^2 + P (d + C)) extra
- Where
- C = the number of classes; P = the number of proposals; S = the side of the warped patch; d = the feature length
- Model
- Real RAM
- Properties
- deterministicnot exactofflineiterative
- Evidence
- Proof sketchCode in 1 languages
- Origin
- Ross Girshick, Jeff Donahue, Trevor Darrell, Jitendra Malik, 2014
R-CNN is the first detector that used the features of a deep convolutional network (CNN) for object detection at the scale of PASCAL VOC. It works in three stages. Selective search gives about 2000 class-agnostic proposals per image. Each proposal is grown by a margin of context, warped to a fixed patch and passed through a CNN that was trained for image classification and then fine-tuned on the warped proposals. A linear support vector machine for each class scores the features, a class-specific box regression corrects the box, and greedy non-maximum suppression for each class removes duplicates. The CNN runs once for each proposal, which made R-CNN slow: 13 seconds per image on a GPU. Fast R-CNN removed that cost by running the network once for each image.
In plain words
First ask a cheap method, selective search, for about 2000 boxes that could hold an object. Cut each box out of the photo with a small border, and stretch it to a square of fixed size, because the network only takes one input size. Run the network on each square to get a long list of numbers that describe it. For each kind of object, such as "cat" or "car", a simple linear rule turns those numbers into a score. A second small rule nudges the box so that it fits the object better. Many boxes land on the same cat, so keep the best one and drop the boxes that overlap it too much. The network is the slow part: it runs 2000 times for one photo.
The problem
The input is an image, a set of object classes, and trained parts: a feature function that maps a patch to a vector in (the CNN, with and in the paper), a linear classifier for each class, and a box regressor for each class. The output is a list of boxes, each with a class and a score. Boxes are in continuous pixel coordinates, where pixel covers . How good the output is depends on the trained parts and is measured by detection mean average precision; this page proves facts about the steps that are not learned.
The algorithm
R-CNN-DETECT(I, proposals, φ, {(w_c, b_c)}, {reg_c}, τ)- 1
for each proposal p of the about 2000 from selective search - 2
warp the context box of p, filled with the image mean outside I, to an S × S patch - 3
f_p ← φ(patch) ▷ the CNN, outside this page - 4
for each class c - 5
s_{p,c} ← w_c · f_p + b_c for every p - 6
B_{p,c} ← DECODE(p, reg_c(f_p)) for every p - 7
keep_c ← greedy NMS of the boxes B_{p,c} with scores s_{p,c} at IoU threshold τ - 8
return the detections (c, s_{p,c}, B_{p,c}) for p in keep_c, for every c
The context box (line L2). Appendix A of the paper grows the box about its center so that, after the warp to , there are exactly pixels of context around the original box. So each side grows by the factor . The warp scales the two axes on their own, so the aspect ratio of the object changes. Where the grown box goes past the image border, the missing pixels take the mean of the image, which the network input later subtracts.
Scores and boxes (lines L5 and L6). The SVM score is a dot product with the 4096 features of the second fully connected layer. The regressor is a ridge regression on the features of the last pooling layer that predicts the offsets of bounding box regression: with in center form , the box is . The NMS threshold of line L7 is, in the words of the paper, a learned threshold, set on held-out data.
Training labels. Training has three steps, and each uses its own labels. They are a frequent source of confusion.
- Fine-tuning of the CNN as an -way classifier: a proposal takes the class of the ground truth box it overlaps most if that IoU is at least 0.5, and is background otherwise. Each batch of 128 windows holds 32 positive and 96 background windows.
- The SVM of class : the positives are the ground truth boxes of class only, the negatives are the proposals with IoU below 0.3 with every box of class , and the proposals in between are left out. Hard negative mining picks the negatives, since they do not fit in memory.
- The box regressor: the pairs are a proposal and the ground truth box it overlaps most, if that IoU is above 0.6, with a ridge penalty of .
Example
One ground truth box of class 1, , and five proposals:
| proposal | box | IoU with | fine-tuning | SVM | regression |
|---|---|---|---|---|---|
| (0, 0, 10, 8) | 4/5 | class 1 | left out | pair | |
| (0, 0, 10, 5) | 1/2 | class 1 | left out | no | |
| (5, 0, 15, 10) | 1/3 | background | left out | no | |
| (6, 0, 16, 10) | 1/4 | background | negative | no | |
| (20, 20, 30, 30) | 0 | background | negative | no |
The SVM gets one positive, itself, and two negatives. Now let the scores of class 1 be 0.9, 0.6, 0.4, 0.3 and 0.2, with no box offsets, and . NMS keeps . It drops , since . It keeps , since . It drops , since , and it keeps . The output is with their scores; a threshold of 0.7 keeps as well. The context box of a proposal at the origin is , a square of side 227.
Correctness
The trained parts have no correctness theorem; their quality is measured. For the steps of lines L2 and L5 to L7 and the labels, the proof page shows:
- Context. In the warped patch the edges of the original proposal land exactly at and , for any box.
- Warp. The bilinear warp, inside the image, reproduces an image that is an affine function of the pixel position exactly, so the patch is the original image under the affine map from the box to the square.
- Decoding. Decoding with the offsets of the encoding of relative to gives back, and zero offsets give .
- Labels. Every regression pair is also a fine-tuning positive of the class of its box, and every SVM negative of class has a fine-tuning label other than .
- NMS. The kept boxes of a class overlap each other by at most , and every dropped box overlaps a kept box with a score at least as high by more than .
Proof: The R-CNN context box puts the proposal at p pixels from the patch border, the warp is the affine map of the box, decoding inverts the encoding, the label rules are consistent, and NMS keeps a non-overlapping coverfull
The CNN, the SVM weights and the regressors are learned, and nothing is claimed about them. The claims below are about the steps of the page that are not learned, as the Python code does them. A box is with and .
Claim 1 (context). Let , and let line L2 grow the box about its center by the factor to the box . Under the map from to , the left and right edges of go to and , and the same holds for the rows.
Proof. Let and . Then and , so the width of is . The left edge of is , and it maps to . Since and , this is . The right edge maps to by the same algebra, since . The rows are the same with and the height.
So, for and , a proposal of side 195 at the origin has the context box .
Claim 2 (warp). Let the image be at pixel . If the sample point of an output pixel satisfies and , the warp returns exactly . Outside the image it returns the fill value.
Proof. The code samples output pixel of a box at and the same for , which is the image of the output pixel center under the affine map from to . Inside the stated range the clamping does nothing, , and with and the bilinear formula is , which for a function that is affine in equals its value at . When then and only one column is used. The same holds for , and bilinear interpolation of a function that is affine in each variable on its own is exact. A point outside takes the fill by the first test of the code.
Claim 3 (decoding). For a proposal with center form and a box , let . Then , and .
Proof. Decoding gives the center , the width , and the same for and ; a box is fixed by its center form. With the center is and the width .
Claim 4 (labels). With the thresholds 0.5 for fine-tuning, 0.3 for the SVM negatives and 0.6 for regression:
- if is a regression pair, the fine-tuning label of proposal is the class of ground truth box ;
- if proposal is an SVM negative of class , its fine-tuning label is not .
Proof. (1) Both rules pick the ground truth box of largest IoU, with ties going to the first box. For a regression pair this IoU is above , so fine-tuning labels the proposal with the class of that same box. (2) A negative of class has IoU below 0.3 with every box of class . If its fine-tuning label were , its best box would be of class with IoU at least 0.5, which is a contradiction.
The rules do not agree the other way round. A proposal with IoU 0.5 is a fine-tuning positive but neither an SVM example nor a regression pair, which is the example of the page.
Claim 5 (NMS). For one class, let be the indices kept by greedy NMS with threshold . Then any two boxes of have IoU at most , and every index not in has a box in with a score at least as high and an IoU above .
Proof. The code visits the boxes by score, best first, and adds a box to only if its IoU with every box already in is at most . Two kept boxes were compared when the later of them was added, so their IoU is at most . A box that is not kept was rejected because some box already in overlapped it by more than , and that box was visited earlier, so its score is at least as high.
Box non-maximum suppression proves more about this procedure; R-CNN runs it once for each class, so a box of one class never removes a box of another class.
Complexity
The network, which runs times, costs far more than the rest and is not part of the page. With proposals, classes, features of length and patches of side , the warps cost , the scores (one by matrix product), the decoding and NMS in the worst case. Extra space is for one patch and for the features and scores. The paper reports 13 seconds per image on a GPU and 53 seconds on a CPU, almost all of it in the network, and notes that the class-specific part is cheap: all scores of an image are one matrix product of features by weights, which for 100000 classes takes about 10 seconds on a multi-core CPU.
Properties
- Deterministic at test time. Selective search, the warp, the scores and NMS have no random step.
- Not exact. It is a learned method for a problem with no exact output.
- Separate stages. The proposals, the CNN, the SVMs and the regressors are trained one after the other, not as one network.
- No shared computation. Overlapping proposals pass the same pixels through the network many times.
- Recall bounded by the proposals. An object with no proposal at IoU 0.5 or more is lost, and the regression can fix only small errors.
Variants and improvements
- Other proposals. The pipeline does not depend on selective search; the paper chose it to compare with earlier detectors that used it. Any method for the object proposal problem can take its place.
- Softmax instead of SVMs. Appendix B uses the 21-way softmax of the fine-tuned network. On VOC 2007 mAP drops from 54.2 to 50.9 percent, which the authors explain by the positives of fine-tuning, which do not stress precise localization, and by the random negatives in place of hard negatives.
- SPPnet. He et al. (2014) ran the convolutional layers once for each image and pooled each proposal from the shared feature map with spatial pyramid pooling, which is much faster at test time.
- Fast R-CNN. Girshick (2015) pooled each proposal with RoI pooling and trained classification and box regression together in one network.
- Faster R-CNN. Ren et al. (2015) made the proposals with a network that shares the features, the region proposal network of Faster R-CNN.
When to use it
Today R-CNN is mainly of teaching and historical interest. Its parts are easy to see one at a time: proposals, a fixed-size warp, features, a linear classifier, box regression and NMS. Use it as a baseline when the classifier must be trained apart from the feature extractor, for example with a frozen feature model and few labels. For real detection use Fast R-CNN, Faster R-CNN or a one-stage detector such as the single shot multibox detector.
Pitfalls
- Mixing the label rules. The fine-tuning threshold of 0.5, the SVM negatives below 0.3 with only the ground truth as positives, and the regression pairs above 0.6 are three different rules. Using one rule for all changes the results.
- No context padding. In the pilot tests of Appendix A, warping with 16 pixels of context beat the other choices by 3 to 5 mAP points.
- Forgetting the mean fill. A context box that crosses the border needs a fill value; zero is a strong dark edge after mean subtraction.
- Regression on the wrong box. The offsets are relative to the proposal, not to the context box. Regress once: Appendix C found that scoring and regressing the new box again does not help.
- NMS across classes. NMS runs for each class on its own; a cat and a dog in the same place must both survive.
- Speed. Running the CNN 2000 times per image is the reason for the 13 seconds; caching the features to disk for SVM training also takes much space.
Implementations
The CNN is outside this page: the Python code takes the feature function as an argument, and the tests pass a small hand-written function on the warped patch, as do the SVM weights and the box regressors. The code implements the context box, the bilinear warp with the image mean outside the image, the SVM scores, the class-specific decoding, greedy NMS for each class, and the three training label rules. The tests check the example above, the context box against the margin of pixels, the warp against an affine image, decoding against the encoding, a small end-to-end run on a synthetic image with a bright square, and the label rules and NMS on random boxes with a fixed seed.
Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/r-cnn/. The authors are listed in prov/4YN1M9.jsonl.
"""R-CNN detection around a given feature extractor.
The CNN is not part of this file. The caller passes `features`, a function
from a warped patch (a list of rows) to a feature vector; the tests pass a
small hand-written function. This file has the parts of R-CNN that are not
learned: the context box and the warp of each proposal (Appendix A of the
paper), the linear SVM scores, the class-specific box decoding, the greedy
non-maximum suppression for each class, and the three labeling rules used in
training (fine-tuning, SVM and box regression).
Boxes are (x1, y1, x2, y2) in continuous pixel coordinates: pixel (u, v)
covers [u, u + 1) x [v, v + 1) and its center is (u + 0.5, v + 0.5). Images
are lists of rows of numbers, indexed img[v][u]. Standard library only.
"""
import math
from fractions import Fraction
def area(b):
return max(0, b[2] - b[0]) * max(0, b[3] - b[1])
def iou(a, b):
"""Intersection over union of two boxes; exact on ints and Fractions."""
iw = min(a[2], b[2]) - max(a[0], b[0])
ih = min(a[3], b[3]) - max(a[1], b[1])
if iw <= 0 or ih <= 0:
return 0
inter = iw * ih
union = area(a) + area(b) - inter
if isinstance(inter, int) and isinstance(union, int):
return Fraction(inter, union)
return inter / union
def context_box(box, size=227, pad=16):
"""Grow the box about its center so that, warped to size x size, the
original box covers [pad, size - pad] and pad pixels of context surround it."""
x1, y1, x2, y2 = box
f = size / (size - 2 * pad)
cx, cy = (x1 + x2) / 2, (y1 + y2) / 2
hw, hh = (x2 - x1) * f / 2, (y2 - y1) * f / 2
return (cx - hw, cy - hh, cx + hw, cy + hh)
def image_mean(img):
return sum(sum(row) for row in img) / (len(img) * len(img[0]))
def sample(img, x, y, fill):
"""Bilinear sample at the continuous point (x, y); fill outside the image."""
h, w = len(img), len(img[0])
if x < 0 or y < 0 or x >= w or y >= h:
return fill
fx = min(max(x - 0.5, 0.0), w - 1.0)
fy = min(max(y - 0.5, 0.0), h - 1.0)
u0, v0 = int(math.floor(fx)), int(math.floor(fy))
u1, v1 = min(u0 + 1, w - 1), min(v0 + 1, h - 1)
a, b = fx - u0, fy - v0
top = (1 - a) * img[v0][u0] + a * img[v0][u1]
bot = (1 - a) * img[v1][u0] + a * img[v1][u1]
return (1 - b) * top + b * bot
def warp(img, box, size, fill):
"""Scale the box, without keeping its aspect ratio, to a size x size patch."""
x1, y1, x2, y2 = box
sx, sy = (x2 - x1) / size, (y2 - y1) / size
return [[sample(img, x1 + (u + 0.5) * sx, y1 + (v + 0.5) * sy, fill) for u in range(size)]
for v in range(size)]
def decode(p, d):
"""Apply class-specific offsets d = (dx, dy, dw, dh) to a proposal p (Appendix C)."""
pw, ph = p[2] - p[0], p[3] - p[1]
px, py = p[0] + pw / 2, p[1] + ph / 2
gx, gy = px + pw * d[0], py + ph * d[1]
gw, gh = pw * math.exp(d[2]), ph * math.exp(d[3])
return (gx - gw / 2, gy - gh / 2, gx + gw / 2, gy + gh / 2)
def greedy_nms(boxes, scores, thr):
"""Indices kept by greedy NMS: take the best box, drop boxes with IoU above thr with it."""
order = sorted(range(len(boxes)), key=lambda i: (-scores[i], i))
keep = []
for i in order:
if all(iou(boxes[i], boxes[k]) <= thr for k in keep):
keep.append(i)
return keep
def detect(img, proposals, features, svm, regressors=None, nms_thr=0.3, size=227, pad=16):
"""R-CNN test time. svm[c] = (w, b) for each object class c; regressors[c] maps a
feature vector to offsets, or is None. Returns, for each class, a list of
(score, box, proposal index), best first."""
fill = image_mean(img)
feats = []
for p in proposals: # @line L1
patch = warp(img, context_box(p, size, pad), size, fill) # @line L2
feats.append(features(patch)) # @line L3
out = {}
for c, (w, b) in svm.items(): # @line L4
scores = [sum(wi * fi for wi, fi in zip(w, f)) + b for f in feats] # @line L5
if regressors and regressors.get(c):
boxes = [decode(p, regressors[c](f)) for p, f in zip(proposals, feats)] # @line L6
else:
boxes = list(proposals)
keep = greedy_nms(boxes, scores, nms_thr) # @line L7
out[c] = [(scores[i], boxes[i], i) for i in keep]
return out # @line L8
def finetune_labels(proposals, gts, gt_classes, thr=0.5):
"""Fine-tuning label: the class of the best-overlapping truth if IoU >= thr, else 0."""
labels = []
for p in proposals:
best, lab = 0, 0
for g, c in zip(gts, gt_classes):
o = iou(p, g)
if o > best:
best, lab = o, c
labels.append(lab if best >= thr else 0)
return labels
def svm_examples(proposals, gts, gt_classes, c, neg_thr=0.3):
"""SVM training set for class c: the truths of class c are the positives, and the
proposals with IoU below neg_thr with every truth of class c are the negatives.
The other proposals are ignored."""
pos = [g for g, k in zip(gts, gt_classes) if k == c]
neg = [i for i, p in enumerate(proposals) if all(iou(p, g) < neg_thr for g in pos)]
return pos, neg
def regression_pairs(proposals, gts, thr=0.6):
"""Pairs (proposal index, truth index) for box regression: the best truth, if IoU > thr."""
pairs = []
for i, p in enumerate(proposals):
if not gts:
break
j = max(range(len(gts)), key=lambda k: (iou(p, gts[k]), -k))
if iou(p, gts[j]) > thr:
pairs.append((i, j))
return pairs
test_r_cnn.py 133 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/r-cnn/. The authors are listed in prov/4YN1M9.jsonl.
import math
import random
from fractions import Fraction
from r_cnn import (
context_box,
decode,
detect,
finetune_labels,
greedy_nms,
iou,
regression_pairs,
svm_examples,
warp,
)
TRUTH = [(0, 0, 10, 10)]
PROPS = [(0, 0, 10, 8), (0, 0, 10, 5), (5, 0, 15, 10), (6, 0, 16, 10), (20, 20, 30, 30)]
def test_page_example_labels():
assert [iou(p, TRUTH[0]) for p in PROPS] == [Fraction(4, 5), Fraction(1, 2), Fraction(1, 3), Fraction(1, 4), 0]
assert finetune_labels(PROPS, TRUTH, [1]) == [1, 1, 0, 0, 0]
pos, neg = svm_examples(PROPS, TRUTH, [1], 1)
assert pos == TRUTH and neg == [3, 4]
assert regression_pairs(PROPS, TRUTH) == [(0, 0)]
def test_page_example_nms():
scores = [0.9, 0.6, 0.4, 0.3, 0.2]
assert greedy_nms(PROPS, scores, 0.3) == [0, 2, 4]
assert greedy_nms(PROPS, scores, 0.7) == [0, 1, 2, 4]
def test_context_box():
assert all(abs(a - b) < 1e-9 for a, b in zip(context_box((0, 0, 195, 195)), (-16, -16, 211, 211)))
rng = random.Random(1)
for _ in range(50):
x1, y1 = rng.uniform(-5, 50), rng.uniform(-5, 50)
b = (x1, y1, x1 + rng.uniform(1, 40), y1 + rng.uniform(1, 40))
size, pad = rng.choice([(227, 16), (20, 3), (9, 1)])
c = context_box(b, size, pad)
# The original edges map to pad and size - pad in the warped patch.
for k, lo, hi in ((0, 0, 2), (1, 1, 3)):
span = c[hi] - c[lo]
assert abs((b[lo] - c[lo]) / span * size - pad) < 1e-9
assert abs((b[hi] - c[lo]) / span * size - (size - pad)) < 1e-9
def test_warp_is_exact_on_a_ramp_and_fills_outside():
img = [[3 * u - 2 * v + 7 for u in range(12)] for v in range(10)]
box = (2.0, 1.5, 9.0, 8.0)
size = 7
patch = warp(img, box, size, fill=-1)
for v in range(size):
for u in range(size):
x = box[0] + (u + 0.5) * (box[2] - box[0]) / size - 0.5
y = box[1] + (v + 0.5) * (box[3] - box[1]) / size - 0.5
assert abs(patch[v][u] - (3 * x - 2 * y + 7)) < 1e-9
assert warp(img, (20, 20, 30, 30), 3, fill=5.5) == [[5.5] * 3] * 3
def test_decode_inverts_the_encoding():
rng = random.Random(2)
for _ in range(100):
p = (rng.uniform(0, 50), rng.uniform(0, 50))
p = p + (p[0] + rng.uniform(1, 30), p[1] + rng.uniform(1, 30))
g = (rng.uniform(0, 50), rng.uniform(0, 50))
g = g + (g[0] + rng.uniform(1, 30), g[1] + rng.uniform(1, 30))
pw, ph, gw, gh = p[2] - p[0], p[3] - p[1], g[2] - g[0], g[3] - g[1]
t = (((g[0] + g[2]) - (p[0] + p[2])) / 2 / pw, ((g[1] + g[3]) - (p[1] + p[3])) / 2 / ph,
math.log(gw / pw), math.log(gh / ph))
assert all(abs(a - b) < 1e-9 for a, b in zip(decode(p, t), g))
assert decode((1, 2, 5, 9), (0, 0, 0, 0)) == (1, 2, 5, 9)
def test_detect_end_to_end():
img = [[0] * 16 for _ in range(16)]
for v in range(3, 9):
for u in range(2, 8):
img[v][u] = 100
size, pad = 12, 2
def features(patch):
inner = [patch[v][u] for v in range(pad, size - pad) for u in range(pad, size - pad)]
ring = [patch[v][u] for v in range(size) for u in range(size)
if not (pad <= v < size - pad and pad <= u < size - pad)]
return [sum(inner) / len(inner), sum(ring) / len(ring)]
props = [(2, 3, 8, 9), (1, 2, 9, 10), (2, 3, 8, 6), (0, 0, 16, 16), (10, 10, 15, 15)]
svm = {1: ([1.0, -1.0], -50.0)}
shift = {1: lambda f: (0.0, 0.0, 0.0, 0.0)}
out = detect(img, props, features, svm, shift, nms_thr=0.3, size=size, pad=pad)
dets = out[1]
assert dets[0][2] == 0 and dets[0][0] > 0
kept = [i for _, _, i in dets]
assert 1 not in kept and 2 not in kept
assert all(s <= 0 for s, _, i in dets if i in (3, 4))
# A regressor that moves every box right by its width moves the output boxes the same way.
move = {1: lambda f: (1.0, 0.0, 0.0, 0.0)}
out2 = detect(img, props, features, svm, move, nms_thr=0.3, size=size, pad=pad)
b = out2[1][0][1]
assert out2[1][0][2] == 0 and b == (8.0, 3.0, 14.0, 9.0)
def test_rules_agree_on_random_inputs():
rng = random.Random(3)
def rbox():
x, y = rng.randint(0, 30), rng.randint(0, 30)
return (x, y, x + rng.randint(1, 15), y + rng.randint(1, 15))
for _ in range(60):
gts = [rbox() for _ in range(rng.randint(1, 3))]
cls = [rng.randint(1, 2) for _ in gts]
props = [rbox() for _ in range(12)]
ft = finetune_labels(props, gts, cls)
for i, j in regression_pairs(props, gts):
assert ft[i] == cls[j] and iou(props[i], gts[j]) > Fraction(3, 5)
for c in (1, 2):
pos, neg = svm_examples(props, gts, cls, c)
for i in neg:
assert ft[i] != c
scores = [rng.random() for _ in props]
keep = greedy_nms(props, scores, 0.3)
for a in keep:
for b in keep:
assert a == b or iou(props[a], props[b]) <= 0.3
for i in set(range(len(props))) - set(keep):
assert any(scores[k] >= scores[i] and iou(props[i], props[k]) > 0.3 for k in keep)
History
Before R-CNN, the best detectors on PASCAL VOC used hand-made features such as HOG in deformable part models, and progress had slowed. Krizhevsky, Sutskever and Hinton showed in 2012 that a large CNN wins image classification. Girshick, Donahue, Darrell and Malik put the paper on arXiv in November 2013 and presented it at CVPR 2014. They took a CNN trained on ImageNet classification, fine-tuned it on warped proposals, and reached 53.7 percent mAP on VOC 2010 and 58.5 percent on VOC 2007 with box regression (54.2 percent without). The name stands for "regions with CNN features". SPPnet, Fast R-CNN and Faster R-CNN followed within two years, each removing a slow stage.
References
- Ross Girshick, Jeff Donahue, Trevor Darrell and Jitendra Malik, Rich feature hierarchies for accurate object detection and semantic segmentation, CVPR 2014, 580-587, Section 2.1, Module design (about 2000 selective search proposals, warping to 227 x 227); Section 2.2, Test-time detection (SVM scores and greedy NMS for each class, 13 s per image on a GPU and 53 s on a CPU); Section 2.3, Training (IoU 0.5 for fine-tuning, 32 positive and 96 background windows per batch of 128, SVM negatives below IoU 0.3 chosen by a grid search, hard negative mining)
- Ross Girshick, Jeff Donahue, Trevor Darrell and Jitendra Malik, Rich feature hierarchies for accurate object detection and semantic segmentation, arXiv 1311.2524, version 5 with appendices, Appendix A, Object proposal transformations (context padding p = 16, the image mean outside the image, 3 to 5 mAP points over the other choices); Appendix B, Positive vs. negative examples and softmax (54.2 to 50.9 mAP on VOC 2007); Appendix C, Bounding-box regression (lambda = 1000, pairs with IoU above 0.6); Table 1 (VOC 2010) and Table 2 (VOC 2007)
- Jasper R. R. Uijlings, Koen E. A. van de Sande, Theo Gevers and Arnold W. M. Smeulders, Selective search for object recognition, International Journal of Computer Vision 104(2), 2013, 154-171, Section 3, the fast mode that R-CNN uses for its proposals
- Richard Szeliski, Computer Vision, Algorithms and Applications, second edition, Springer, 2022, Section 6.3, Object detection
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H1 sketch |
|
| Lean | L0 no Lean part |
|
| Code (python) | I0 not checked yet |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag 4YN1M9 Edit this page History Report an error Markdown