0%
June 27, 2022

Faster RCNN in PyTorch

deep-learning

pytorch

Repo

Results

Here the faded white boxes are the ROIs, and blue boxes are refined ROIs that are estimated from the feature of ROIAlign module.

Model Structure

How to Read the Source Code

It is not easy to explain everything in a blog post. Rather one can delve into the source code and see how it works!

Reader can treat src/faster_rcnn.py as an entry point, the class FasterRCNN is our target result. The FasterRCNN.forward method behaves differently when it is in:

  • Training Mode. It returns
    • rpn_cls_loss
    • rpn_reg_loss
    • roi_cls_loss
    • roi_reg_loss
  • Evaluation Mode. It returns
    • scores
    • roi_refined_box
    • cls_idxes
    • rois (no use, debugging purpose)