Faster RCNN Inference Pipeline
Section 6 of 6 in the Faster RCNN from-scratch series We load the checkpoint saved in section 05, run inference on COCO validation images streamed from Hugging Face, and visualise detections. Topics covered:- Loading and verifying a checkpoint
- Running
model.eval()forward pass (proposal generation + postprocessing) - Visualising class-agnostic proposals and final detections
- Measuring per-image inference latency
- Pseudo-evaluation: counting detections above a confidence threshold
Expected outcome after 5-step training: the checkpoint from section 05 is a
sanity-check model, not a trained detector. Expect zero or very few final
detections above the 0.05 score threshold, the ROI classifier has seen only
5 images and its weights are essentially random. What you should see is a healthy
set of RPN proposals (cyan boxes), confirming the proposal pipeline works end-to-end.
A properly trained COCO model (≥12 epochs) would show labelled red boxes on every image.


Pseudo-evaluation: detection counts above threshold
References
- (2022). Faster R-CNN.
- Redmon, J., Farhadi, A. (2016). YOLO9000: Better, Faster, Stronger.
- Redmon, J., Divvala, S., Girshick, R., Farhadi, A. (2015). You only look once: Unified, real-time object detection.
- Ren, S., He, K., Girshick, R., Sun, J. (2015). Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks.
- Szegedy, C., Ioffe, S., Vanhoucke, V., Alemi, A. (2016). Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning.

