{
  "source_file": "0930",
  "source_platform": "个人博客",
  "author": "Lilian Weng / Lil'Log",
  "title_listed": "Object Detection for Dummies Part 3: R-CNN Family",
  "keywords": "目标检测,R-CNN,Faster R-CNN",
  "domain": "图像处理",
  "content_type": "深度技术解析",
  "is_paid_flag": "否",
  "url": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/",
  "publish_date": "2017-12",
  "corpus_stage": "预训练/SFT",
  "notes": "目标检测R-CNN家族综述",
  "id": "b9468080b799",
  "collected_at": "2026-10-02T14:13:33",
  "title": "Object Detection for Dummies Part 3: R-CNN Family | Lil'Log",
  "body_markdown": "[Updated on 2018-12-20: Remove YOLO here. Part 4 will cover multiple fast object detection algorithms, including YOLO.]\n[Updated on 2018-12-27: Add\nbbox regression\nand\ntricks\nsections for R-CNN.]\nIn the series of “Object Detection for Dummies”, we started with basic concepts in image processing, such as gradient vectors and HOG, in\nPart 1\n. Then we introduced classic convolutional neural network architecture designs for classification and pioneer models for object recognition, Overfeat and DPM, in\nPart 2\n. In the third post of this series, we are about to review a set of models in the R-CNN (“Region-based CNN”) family.\nLinks to all the posts in the series:\n[\nPart 1\n]\n[\nPart 2\n]\n[\nPart 3\n]\n[\nPart 4\n].\nHere is a list of papers covered in this post ;)\nModel\nGoal\nResources\nR-CNN\nObject recognition\n[\npaper\n][\ncode\n]\nFast R-CNN\nObject recognition\n[\npaper\n][\ncode\n]\nFaster R-CNN\nObject recognition\n[\npaper\n][\ncode\n]\nMask R-CNN\nImage segmentation\n[\npaper\n][\ncode\n]\nR-CNN\n#\nR-CNN (\nGirshick et al., 2014\n) is short for “Region-based Convolutional Neural Networks”. The main idea is composed of two steps. First, using\nselective search\n, it identifies a manageable number of bounding-box object region candidates (“region of interest” or “RoI”). And then it extracts CNN features from each region independently for classification.\nThe architecture of R-CNN. (Image source:\nGirshick et al., 2014\n)\nModel Workflow\n#\nHow R-CNN works can be summarized as follows:\nPre-train\na CNN network on image classification tasks; for example, VGG or ResNet trained on\nImageNet\ndataset. The classification task involves N classes.\nNOTE: You can find a pre-trained\nAlexNet\nin Caffe Model\nZoo\n. I don’t think you can\nfind it\nin Tensorflow, but Tensorflow-slim model\nlibrary\nprovides pre-trained ResNet, VGG, and others.\nPropose category-independent regions of interest by selective search (~2k candidates per image). Those regions may contain target objects and they are of different sizes.\nRegion candidates are\nwarped\nto have a fixed size as required by CNN.\nContinue fine-tuning the CNN on warped proposal regions for K + 1 classes; The additional one class refers to the background (no object of interest). In the fine-tuning stage, we should use a much smaller learning rate and the mini-batch oversamples the positive cases because most proposed regions are just background.\nGiven every image region, one forward propagation through the CNN generates a feature vector. This feature vector is then consumed by a\nbinary SVM\ntrained for\neach class\nindependently.\nThe positive samples are proposed regions with IoU (intersection over union) overlap threshold >= 0.3, and negative samples are irrelevant others.\nTo reduce the localization errors, a regression model is trained to correct the predicted detection window on bounding box correction offset using CNN features.\nBounding Box Regression\n#\nGiven a predicted bounding box coordinate $\\mathbf{p} = (p_x, p_y, p_w, p_h)$ (center coordinate, width, height) and its corresponding ground truth box coordinates $\\mathbf{g} = (g_x, g_y, g_w, g_h)$ , the regressor is configured to learn scale-invariant transformation between two centers and log-scale transformation between widths and heights. All the transformation functions take $\\mathbf{p}$ as input.\n$$\n\\begin{aligned}\n\\hat{g}_x &= p_w d_x(\\mathbf{p}) + p_x \\\\\n\\hat{g}_y &= p_h d_y(\\mathbf{p}) + p_y \\\\\n\\hat{g}_w &= p_w \\exp({d_w(\\mathbf{p})}) \\\\\n\\hat{g}_h &= p_h \\exp({d_h(\\mathbf{p})})\n\\end{aligned}\n$$\nIllustration of transformation between predicted and ground truth bounding boxes.\nAn obvious benefit of applying such transformation is that all the bounding box correction functions, $d_i(\\mathbf{p})$ where $i \\in \\{ x, y, w, h \\}$, can take any value between [-∞, +∞]. The targets for them to learn are:\n$$\n\\begin{aligned}\nt_x &= (g_x - p_x) / p_w \\\\\nt_y &= (g_y - p_y) / p_h \\\\\nt_w &= \\log(g_w/p_w) \\\\\nt_h &= \\log(g_h/p_h)\n\\end{aligned}\n$$\nA standard regression model can solve the problem by minimizing the SSE loss with regularization:\n$$\n\\mathcal{L}_\\text{reg} = \\sum_{i \\in \\{x, y, w, h\\}} (t_i - d_i(\\mathbf{p}))^2 + \\lambda \\|\\mathbf{w}\\|^2\n$$\nThe regularization term is critical here and RCNN paper picked the best λ by cross validation. It is also noteworthy that not all the predicted bounding boxes have corresponding ground truth boxes. For example, if there is no overlap, it does not make sense to run bbox regression. Here, only a predicted box with a nearby ground truth box with at least 0.6 IoU is kept for training the bbox regression model.\nCommon Tricks\n#\nSeveral tricks are commonly used in RCNN and other detection models.\nNon-Maximum Suppression\nLikely the model is able to find multiple bounding boxes for the same object. Non-max suppression helps avoid repeated detection of the same instance. After we get a set of matched bounding boxes for the same object category:\nSort all the bounding boxes by confidence score.\nDiscard boxes with low confidence scores.\nWhile\nthere is any remaining bounding box, repeat the following:\nGreedily select the one with the highest score.\nSkip the remaining boxes with high IoU (i.e. > 0.5) with previously selected one.\nMultiple bounding boxes detect the car in the image. After non-maximum suppression, only the best remains and the rest are ignored as they have large overlaps with the selected one. (Image source:\nDPM paper\n)\nHard Negative Mining\nWe consider bounding boxes without objects as negative examples. Not all the negative examples are equally hard to be identified. For example, if it holds pure empty background, it is likely an “\neasy negative\n”; but if the box contains weird noisy texture or partial object, it could be hard to be recognized and these are “\nhard negative\n”.\nThe hard negative examples are easily misclassified. We can explicitly find those false positive samples during the training loops and include them in the training data so as to improve the classifier.\nSpeed Bottleneck\n#\nLooking through the R-CNN learning steps, you could easily find out that training an R-CNN model is expensive and slow, as the following steps involve a lot of work:\nRunning selective search to propose 2000 region candidates for every image;\nGenerating the CNN feature vector for every image region (N images * 2000).\nThe whole process involves three models separately without much shared computation: the convolutional neural network for image classification and feature extraction; the top SVM classifier for identifying target objects; and the regression model for tightening region bounding boxes.\nFast R-CNN\n#\nTo make R-CNN faster, Girshick (\n2015\n) improved the training procedure by unifying three independent models into one jointly trained framework and increasing shared computation results, named\nFast R-CNN\n. Instead of extracting CNN feature vectors independently for each region proposal, this model aggregates them into one CNN forward pass over the entire image and the region proposals share this feature matrix. Then the same feature matrix is branched out to be used for learning the object classifier and the bounding-box regressor. In conclusion, computation sharing speeds up R-CNN.\nThe architecture of Fast R-CNN. (Image source:\nGirshick, 2015\n)\nRoI Pooling\n#\nIt is a type of max pooling to convert features in the projected region of the image of any size, h x w, into a small fixed window, H x W. The input region is divided into H x W grids, approximately every subwindow of size h/H x w/W. Then apply max-pooling in each grid.\nRoI pooling (Image source:\nStanford CS231n slides\n.)\nModel Workflow\n#\nHow Fast R-CNN works is summarized as follows; many steps are same as in R-CNN:\nFirst, pre-train a convolutional neural network on image classification tasks.\nPropose regions by selective search (~2k candidates per image).\nAlter the pre-trained CNN:\nReplace the last max pooling layer of the pre-trained CNN with a\nRoI pooling\nlayer. The RoI pooling layer outputs fixed-length feature vectors of region proposals. Sharing the CNN computation makes a lot of sense, as many region proposals of the same images are highly overlapped.\nReplace the last fully connected layer and the last softmax layer (K classes) with a fully connected layer and softmax over K + 1 classes.\nFinally the model branches into two output layers:\nA softmax estimator of K + 1 classes (same as in R-CNN, +1 is the “background” class), outputting a discrete probability distribution per RoI.\nA bounding-box regression model which predicts offsets relative to the original RoI for each of K classes.\nLoss Function\n#\nThe model is optimized for a loss combining two tasks (classification + localization):\n|\nSymbol\n|\nExplanation\n|\n| $u$ | True class label, $ u \\in 0, 1, \\dots, K$; by convention, the catch-all background class has $u = 0$. |\n| $p$ | Discrete probability distribution (per RoI) over K + 1 classes: $p = (p_0, \\dots, p_K)$, computed by a softmax over the K + 1 outputs of a fully connected layer. |\n| $v$ | True bounding box $ v = (v_x, v_y, v_w, v_h) $. |\n| $t^u$ | Predicted bounding box correction, $t^u = (t^u_x, t^u_y, t^u_w, t^u_h)$. See\nabove\n. |\n{:.info}\nThe loss function sums up the cost of classification and bounding box prediction: $\\mathcal{L} = \\mathcal{L}_\\text{cls} + \\mathcal{L}_\\text{box}$. For “background” RoI, $\\mathcal{L}_\\text{box}$ is ignored by the indicator function $\\mathbb{1} [u \\geq 1]$, defined as:\n$$\n\\mathbb{1} [u >= 1] = \\begin{cases}\n    1  & \\text{if } u \\geq 1\\\\\n    0  & \\text{otherwise}\n\\end{cases}\n$$\nThe overall loss function is:\n$$\n\\begin{align*}\n\\mathcal{L}(p, u, t^u, v) &= \\mathcal{L}_\\text{cls} (p, u) + \\mathbb{1} [u \\geq 1] \\mathcal{L}_\\text{box}(t^u, v) \\\\\n\\mathcal{L}_\\text{cls}(p, u) &= -\\log p_u \\\\\n\\mathcal{L}_\\text{box}(t^u, v) &= \\sum_{i \\in \\{x, y, w, h\\}} L_1^\\text{smooth} (t^u_i - v_i)\n\\end{align*}\n$$\nThe bounding box loss $\\mathcal{L}_{box}$ should measure the difference between $t^u_i$ and $v_i$ using a\nrobust\nloss function. The\nsmooth L1 loss\nis adopted here and it is claimed to be less sensitive to outliers.\n$$\nL_1^\\text{smooth}(x) = \\begin{cases}\n    0.5 x^2             & \\text{if } \\vert x \\vert < 1\\\\\n    \\vert x \\vert - 0.5 & \\text{otherwise}\n\\end{cases}\n$$\nThe plot of smooth L1 loss, $y = L\\_1^\\text{smooth}(x)$. (Image source:\nlink\n)\nSpeed Bottleneck\n#\nFast R-CNN is much faster in both training and testing time. However, the improvement is not dramatic because the region proposals are generated separately by another model and that is very expensive.\nFaster R-CNN\n#\nAn intuitive speedup solution is to integrate the region proposal algorithm into the CNN model.\nFaster R-CNN\n(\nRen et al., 2016\n) is doing exactly this: construct a single, unified model composed of RPN (region proposal network) and fast R-CNN with shared convolutional feature layers.\nAn illustration of Faster R-CNN model. (Image source:\nRen et al., 2016\n)\nModel Workflow\n#\nPre-train a CNN network on image classification tasks.\nFine-tune the RPN (region proposal network) end-to-end for the region proposal task, which is initialized by the pre-train image classifier. Positive samples have IoU (intersection-over-union) > 0.7, while negative samples have IoU < 0.3.\nSlide a small n x n spatial window over the conv feature map of the entire image.\nAt the center of each sliding window, we predict multiple regions of various scales and ratios simultaneously. An anchor is a combination of (sliding window center, scale, ratio). For example, 3 scales + 3 ratios => k=9 anchors at each sliding position.\nTrain a Fast R-CNN object detection model using the proposals generated by the current RPN\nThen use the Fast R-CNN network to initialize RPN training. While keeping the shared convolutional layers, only fine-tune the RPN-specific layers. At this stage, RPN and the detection network have shared convolutional layers!\nFinally fine-tune the unique layers of Fast R-CNN\nStep 4-5 can be repeated to train RPN and Fast R-CNN alternatively if needed.\nLoss Function\n#\nFaster R-CNN is optimized for a multi-task loss function, similar to fast R-CNN.\n|\nSymbol\n|\nExplanation\n|\n| $p_i$     | Predicted probability of anchor i being an object. |\n| $p^*_i$   | Ground truth label (binary) of whether anchor i is an object. |\n| $t_i$     | Predicted four parameterized coordinates. |\n| $t^*_i$   | Ground truth coordinates. |\n| $N_\\text{cls}$ | Normalization term, set to be mini-batch size (~256) in the paper. |\n| $N_\\text{box}$ | Normalization term, set to the number of anchor locations (~2400) in the paper. |\n| $\\lambda$ | A balancing parameter, set to be ~10 in the paper (so that both $\\mathcal{L}_\\text{cls}$ and $\\mathcal{L}_\\text{box}$ terms are roughly equally weighted). |\n{:.info}\nThe multi-task loss function combines the losses of classification and bounding box regression:\n$$\n\\begin{align*}\n\\mathcal{L} &= \\mathcal{L}_\\text{cls} + \\mathcal{L}_\\text{box} \\\\\n\\mathcal{L}(\\{p_i\\}, \\{t_i\\}) &= \\frac{1}{N_\\text{cls}} \\sum_i \\mathcal{L}_\\text{cls} (p_i, p^*_i) + \\frac{\\lambda}{N_\\text{box}} \\sum_i p^*_i \\cdot L_1^\\text{smooth}(t_i - t^*_i) \\\\\n\\end{align*}\n$$\nwhere $\\mathcal{L}_\\text{cls}$ is the log loss function over two classes, as we can easily translate a multi-class classification into a binary classification by predicting a sample being a target object versus not. $L_1^\\text{smooth}$ is the smooth L1 loss.\n$$\n\\mathcal{L}_\\text{cls} (p_i, p^*_i) = - p^*_i \\log p_i - (1 - p^*_i) \\log (1 - p_i)\n$$\nMask R-CNN\n#\nMask R-CNN (\nHe et al., 2017\n) extends Faster R-CNN to pixel-level\nimage segmentation\n. The key point is to decouple the classification and the pixel-level mask prediction tasks. Based on the framework of\nFaster R-CNN\n, it added a third branch for predicting an object mask in parallel with the existing branches for classification and localization. The mask branch is a small fully-connected network applied to each RoI, predicting a segmentation mask in a pixel-to-pixel manner.\nMask R-CNN is Faster R-CNN model with image segmentation. (Image source:\nHe et al., 2017\n)\nBecause pixel-level segmentation requires much more fine-grained alignment than bounding boxes, mask R-CNN improves the RoI pooling layer (named “RoIAlign layer”) so that RoI can be better and more precisely mapped to the regions of the original image.\nPredictions by Mask R-CNN on COCO test set. (Image source:\nHe et al., 2017\n)\nRoIAlign\n#\nThe RoIAlign layer is designed to fix the location misalignment caused by quantization in the RoI pooling. RoIAlign removes the hash quantization, for example, by using x/16 instead of [x/16], so that the extracted features can be properly aligned with the input pixels.\nBilinear interpolation\nis used for computing the floating-point location values in the input.\nA region of interest is mapped **accurately** from the original image onto the feature map without rounding up to integers. (Image source:\nlink\n)\nLoss Function\n#\nThe multi-task loss function of Mask R-CNN combines the loss of classification, localization and segmentation mask: $ \\mathcal{L} = \\mathcal{L}_\\text{cls} + \\mathcal{L}_\\text{box} + \\mathcal{L}_\\text{mask}$, where $\\mathcal{L}_\\text{cls}$ and $\\mathcal{L}_\\text{box}$ are same as in Faster R-CNN.\nThe mask branch generates a mask of dimension m x m for each RoI and each class; K classes in total. Thus, the total output is of size $K \\cdot m^2$. Because the model is trying to learn a mask for each class, there is no competition among classes for generating masks.\n$\\mathcal{L}_\\text{mask}$ is defined as the average binary cross-entropy loss, only including k-th mask if the region is associated with the ground truth class k.\n$$\n\\mathcal{L}_\\text{mask} = - \\frac{1}{m^2} \\sum_{1 \\leq i, j \\leq m} \\big[ y_{ij} \\log \\hat{y}^k_{ij} + (1-y_{ij}) \\log (1- \\hat{y}^k_{ij}) \\big]\n$$\nwhere $y_{ij}$ is the label of a cell (i, j) in the true mask for the region of size m x m; $\\hat{y}_{ij}^k$ is the predicted value of the same cell in the mask learned for the ground-truth class k.\nSummary of Models in the R-CNN family\n#\nHere I illustrate model designs of R-CNN, Fast R-CNN, Faster R-CNN and Mask R-CNN. You can track how one model evolves to the next version by comparing the small differences.\nCited as:\n@article{weng2017detection3,\n  title   = \"Object Detection for Dummies Part 3: R-CNN Family\",\n  author  = \"Weng, Lilian\",\n  journal = \"lilianweng.github.io\",\n  year    = \"2017\",\n  url     = \"https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/\"\n}\nReference\n#\n[1] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik.\n“Rich feature hierarchies for accurate object detection and semantic segmentation.”\nIn Proc. IEEE Conf. on computer vision and pattern recognition (CVPR), pp. 580-587. 2014.\n[2] Ross Girshick.\n“Fast R-CNN.”\nIn Proc. IEEE Intl. Conf. on computer vision, pp. 1440-1448. 2015.\n[3] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun.\n“Faster R-CNN: Towards real-time object detection with region proposal networks.”\nIn Advances in neural information processing systems (NIPS), pp. 91-99. 2015.\n[4] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick.\n“Mask R-CNN.”\narXiv preprint arXiv:1703.06870, 2017.\n[5] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi.\n“You only look once: Unified, real-time object detection.”\nIn Proc. IEEE Conf. on computer vision and pattern recognition (CVPR), pp. 779-788. 2016.\n[6]\n“A Brief History of CNNs in Image Segmentation: From R-CNN to Mask R-CNN”\nby Athelas.\n[7] Smooth L1 Loss:\nhttps://github.com/rbgirshick/py-faster-rcnn/files/764206/SmoothL1Loss.1.pdf",
  "metadata": {
    "title": "Object Detection for Dummies Part 3: R-CNN Family | Lil'Log",
    "description": "[Updated on 2018-12-20: Remove YOLO here. Part 4 will cover multiple fast object detection algorithms, including YOLO.]\n\n[Updated on 2018-12-27: Add bbox regression and tricks sections for R-CNN.]\nIn the series of “Object Detection for Dummies”, we started with basic concepts in image processing, such as gradient vectors and HOG, in Part 1. Then we introduced classic convolutional neural network architecture designs for classification and pioneer models for object recognition, Overfeat and DPM, in Part 2. In the third post of this series, we are about to review a set of models in the R-CNN (“Region-based CNN”) family.",
    "keywords": "object-detection, object-recognition, vision-model",
    "author": "Lilian Weng",
    "og:title": "Object Detection for Dummies Part 3: R-CNN Family",
    "og:description": "[Updated on 2018-12-20: Remove YOLO here. Part 4 will cover multiple fast object detection algorithms, including YOLO.]\n\n[Updated on 2018-12-27: Add bbox regression and tricks sections for R-CNN.]\nIn the series of “Object Detection for Dummies”, we started with basic concepts in image processing, such as gradient vectors and HOG, in Part 1. Then we introduced classic convolutional neural network architecture designs for classification and pioneer models for object recognition, Overfeat and DPM, in Part 2. In the third post of this series, we are about to review a set of models in the R-CNN (“Region-based CNN”) family.",
    "og:type": "article",
    "og:url": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/",
    "twitter:card": "summary",
    "twitter:title": "Object Detection for Dummies Part 3: R-CNN Family",
    "twitter:description": "[Updated on 2018-12-20: Remove YOLO here. Part 4 will cover multiple fast object detection algorithms, including YOLO.]\n\n[Updated on 2018-12-27: Add bbox regression and tricks sections for R-CNN.]\nIn the series of “Object Detection for Dummies”, we started with basic concepts in image processing, such as gradient vectors and HOG, in Part 1. Then we introduced classic convolutional neural network architecture designs for classification and pioneer models for object recognition, Overfeat and DPM, in Part 2. In the third post of this series, we are about to review a set of models in the R-CNN (“Region-based CNN”) family.",
    "article:section": "posts",
    "article:published_time": "2017-12-31T00:00:00+00:00",
    "article:modified_time": "2017-12-31T00:00:00+00:00"
  },
  "paywall": {
    "listed_paid": false,
    "detected": false,
    "marker": "",
    "public_only": false,
    "policy": "付费/会员内容只保留页面公开可见部分，不绕过付费墙"
  },
  "crawl": {
    "success": true,
    "status_code": 200,
    "error": ""
  },
  "code_blocks": [
    {
      "file": "attachments/b9468080b799/code/body-000.txt",
      "chars": 267,
      "language": "text"
    }
  ],
  "images": [
    {
      "status": "ok",
      "url": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/RCNN.png",
      "bytes": 788352,
      "reused": false,
      "local_path": "attachments/b9468080b799/images/body-4bea384db100fbf3fa0e.png",
      "src": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/RCNN.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/RCNN-bbox-regression.png",
      "bytes": 109138,
      "reused": false,
      "local_path": "attachments/b9468080b799/images/body-227c6111eda2f97ab1f2.png",
      "src": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/RCNN-bbox-regression.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/non-max-suppression.png",
      "bytes": 3136069,
      "reused": false,
      "local_path": "attachments/b9468080b799/images/body-b0d9d2dda61d5528b14d.png",
      "src": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/non-max-suppression.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/fast-RCNN.png",
      "bytes": 437592,
      "reused": false,
      "local_path": "attachments/b9468080b799/images/body-e837b0cac457a4dfa174.png",
      "src": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/fast-RCNN.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/roi-pooling.png",
      "bytes": 269669,
      "reused": false,
      "local_path": "attachments/b9468080b799/images/body-283d484fb68c4e61aa0b.png",
      "src": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/roi-pooling.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/l1-smooth.png",
      "bytes": 27821,
      "reused": false,
      "local_path": "attachments/b9468080b799/images/body-c7816ecf6f5265465238.png",
      "src": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/l1-smooth.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/faster-RCNN.png",
      "bytes": 432129,
      "reused": false,
      "local_path": "attachments/b9468080b799/images/body-9794f4d3172e6d7ec6e1.png",
      "src": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/faster-RCNN.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/mask-rcnn.png",
      "bytes": 855836,
      "reused": false,
      "local_path": "attachments/b9468080b799/images/body-ad16881681864ec9a905.png",
      "src": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/mask-rcnn.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/mask-rcnn-examples.png",
      "bytes": 1600504,
      "reused": false,
      "local_path": "attachments/b9468080b799/images/body-db8216b190ed77df91ef.png",
      "src": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/mask-rcnn-examples.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/roi-align.png",
      "bytes": 98699,
      "reused": false,
      "local_path": "attachments/b9468080b799/images/body-de07b29467385da73bbf.png",
      "src": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/roi-align.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/rcnn-family-summary.png",
      "bytes": 1000184,
      "reused": false,
      "local_path": "attachments/b9468080b799/images/body-781e719388c2d1788151.png",
      "src": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/rcnn-family-summary.png",
      "alt": "",
      "downloaded": true
    }
  ],
  "audio": [],
  "videos": [],
  "links": [
    {
      "href": "https://lilianweng.github.io/posts/2017-10-29-object-recognition-part-1/",
      "label": "Part 1",
      "type": "a"
    },
    {
      "href": "https://lilianweng.github.io/posts/2017-12-15-object-recognition-part-2/",
      "label": "Part 2",
      "type": "a"
    },
    {
      "href": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/",
      "label": "Part 3",
      "type": "a"
    },
    {
      "href": "https://lilianweng.github.io/posts/2018-12-27-object-recognition-part-4/",
      "label": "Part 4",
      "type": "a"
    },
    {
      "href": "https://arxiv.org/abs/1311.2524",
      "label": "paper",
      "type": "a"
    },
    {
      "href": "https://github.com/rbgirshick/rcnn",
      "label": "code",
      "type": "a"
    },
    {
      "href": "https://arxiv.org/abs/1504.08083",
      "label": "paper",
      "type": "a"
    },
    {
      "href": "https://github.com/rbgirshick/fast-rcnn",
      "label": "code",
      "type": "a"
    },
    {
      "href": "https://arxiv.org/abs/1506.01497",
      "label": "paper",
      "type": "a"
    },
    {
      "href": "https://github.com/rbgirshick/py-faster-rcnn",
      "label": "code",
      "type": "a"
    },
    {
      "href": "https://arxiv.org/abs/1703.06870",
      "label": "paper",
      "type": "a"
    },
    {
      "href": "https://github.com/CharlesShang/FastMaskRCNN",
      "label": "code",
      "type": "a"
    },
    {
      "href": "http://image-net.org/index",
      "label": "ImageNet",
      "type": "a"
    },
    {
      "href": "https://github.com/BVLC/caffe/tree/master/models/bvlc_alexnet",
      "label": "AlexNet",
      "type": "a"
    },
    {
      "href": "https://github.com/caffe2/caffe2/wiki/Model-Zoo",
      "label": "Zoo",
      "type": "a"
    },
    {
      "href": "https://github.com/tensorflow/models/issues/1394",
      "label": "find it",
      "type": "a"
    },
    {
      "href": "https://github.com/tensorflow/models/tree/master/research/slim",
      "label": "library",
      "type": "a"
    },
    {
      "href": "http://lear.inrialpes.fr/~oneata/reading_group/dpm.pdf",
      "label": "DPM paper",
      "type": "a"
    },
    {
      "href": "https://arxiv.org/pdf/1504.08083.pdf",
      "label": "2015",
      "type": "a"
    },
    {
      "href": "http://cs231n.stanford.edu/slides/2016/winter1516_lecture8.pdf",
      "label": "Stanford CS231n slides",
      "type": "a"
    },
    {
      "href": "https://github.com/rbgirshick/py-faster-rcnn/files/764206/SmoothL1Loss.1.pdf",
      "label": "smooth L1 loss",
      "type": "a"
    },
    {
      "href": "https://arxiv.org/pdf/1506.01497.pdf",
      "label": "Ren et al., 2016",
      "type": "a"
    },
    {
      "href": "https://arxiv.org/pdf/1703.06870.pdf",
      "label": "He et al., 2017",
      "type": "a"
    },
    {
      "href": "https://en.wikipedia.org/wiki/Bilinear_interpolation",
      "label": "Bilinear interpolation",
      "type": "a"
    },
    {
      "href": "https://blog.athelas.com/a-brief-history-of-cnns-in-image-segmentation-from-r-cnn-to-mask-r-cnn-34ea83205de4",
      "label": "link",
      "type": "a"
    },
    {
      "href": "https://www.cv-foundation.org/openaccess/content_cvpr_2014/papers/Girshick_Rich_Feature_Hierarchies_2014_CVPR_paper.pdf",
      "label": "“Rich feature hierarchies for accurate object detection and semantic segmentation.”",
      "type": "a"
    },
    {
      "href": "http://papers.nips.cc/paper/5638-faster-r-cnn-towards-real-time-object-detection-with-region-proposal-networks.pdf",
      "label": "“Faster R-CNN: Towards real-time object detection with region proposal networks.”",
      "type": "a"
    },
    {
      "href": "https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Redmon_You_Only_Look_CVPR_2016_paper.pdf",
      "label": "“You only look once: Unified, real-time object detection.”",
      "type": "a"
    }
  ],
  "repair_version": 2,
  "repaired_at": "2026-10-14T10:51:37Z",
  "source_url": "https://lilianweng.github.io/posts/2017-12-31-object-recognition-part-3/",
  "papers": [
    {
      "status": "ok",
      "url": "https://arxiv.org/pdf/1311.2524",
      "bytes": 6537772,
      "reused": false,
      "local_path": "papers/repair/5a971c9318fd8ef99b6d.pdf"
    },
    {
      "status": "ok",
      "url": "https://arxiv.org/pdf/1504.08083",
      "bytes": 731121,
      "reused": false,
      "local_path": "papers/repair/6389d2bce9bb81657bc7.pdf"
    },
    {
      "status": "ok",
      "url": "https://arxiv.org/pdf/1506.01497",
      "bytes": 6913803,
      "reused": false,
      "local_path": "papers/repair/713fc776568d336b3d68.pdf"
    },
    {
      "status": "ok",
      "url": "https://arxiv.org/pdf/1703.06870",
      "bytes": 7723886,
      "reused": false,
      "local_path": "papers/repair/664bbc784da30edacdb6.pdf"
    },
    {
      "status": "http_404",
      "url": "http://lear.inrialpes.fr/~oneata/reading_group/dpm.pdf",
      "retried_at": "2026-10-20T18:02:44Z"
    },
    {
      "status": "ok",
      "url": "https://arxiv.org/pdf/1504.08083.pdf",
      "bytes": 731121,
      "reused": false,
      "local_path": "papers/repair/95f875d1b93587451953.pdf"
    },
    {
      "status": "ok",
      "url": "http://cs231n.stanford.edu/slides/2016/winter1516_lecture8.pdf",
      "bytes": 5264822,
      "reused": false,
      "local_path": "papers/repair/6704307d3926afe480a0.pdf"
    },
    {
      "status": "ok",
      "url": "https://github.com/rbgirshick/py-faster-rcnn/files/764206/SmoothL1Loss.1.pdf",
      "bytes": 132365,
      "reused": false,
      "local_path": "papers/repair/75b4690976ed5ab1f64d.pdf"
    },
    {
      "status": "ok",
      "url": "https://arxiv.org/pdf/1506.01497.pdf",
      "bytes": 6913803,
      "reused": false,
      "local_path": "papers/repair/9037a5243698d57ca173.pdf"
    },
    {
      "status": "ok",
      "url": "https://arxiv.org/pdf/1703.06870.pdf",
      "bytes": 7723886,
      "reused": false,
      "local_path": "papers/repair/2f0eeff44085ec6f68ba.pdf"
    },
    {
      "status": "ok",
      "url": "https://www.cv-foundation.org/openaccess/content_cvpr_2014/papers/Girshick_Rich_Feature_Hierarchies_2014_CVPR_paper.pdf",
      "bytes": 1847626,
      "reused": false,
      "local_path": "papers/repair/99bf7bde4d6390550327.pdf"
    },
    {
      "status": "ok",
      "url": "http://papers.nips.cc/paper/5638-faster-r-cnn-towards-real-time-object-detection-with-region-proposal-networks.pdf",
      "bytes": 761683,
      "reused": false,
      "local_path": "papers/repair/b13d014f28dadd2b7070.pdf"
    },
    {
      "status": "ok",
      "url": "https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Redmon_You_Only_Look_CVPR_2016_paper.pdf",
      "bytes": 1270136,
      "reused": false,
      "local_path": "papers/repair/326369cb8bd278bd904e.pdf"
    }
  ],
  "actual_video_files": [],
  "body_chars": 17566,
  "expected_body_images": 11,
  "discovery_status": "ok",
  "delivery_status": "partial",
  "missing_reason": "http_404",
  "raw_html": "attachments/b9468080b799/pages/source.html",
  "local_html": "attachments/b9468080b799/pages/article.html",
  "body_base_path": "attachments/b9468080b799/pages/",
  "body_markdown_path": "attachments/b9468080b799/pages/article.md"
}