Porting an R-CNN Stop-Sign Detector from MATLAB to PyTorch and TensorFlow
Keywords:
R-CNN, transfer learning, object detection, PyTorch, TensorFlow, stop-sign detection, CIFAR-10Abstract
Region-based convolutional networks (R-CNN) remain a compact way to teach how transfer learning connects image classification with object detection. This paper documents a Python port of the MATLAB “Train Object Detector Using R-CNN Deep Learning” stop-sign example, implemented in parallel in PyTorch and TensorFlow/Keras on Google Colab. The workflow pre-trains a three-block CNN on CIFAR-10, replaces its head with a two-class (stop sign vs. background) head, fine-tunes it on IoU-labelled sliding-window patches, and detects stop signs by scoring windows. We report the results that the executed run actually produced: the PyTorch CNN, trained for 20 epochs, lowered the cross-entropy loss from 2.3033 to 1.6880 and reached 38.34% top-1 accuracy on the 10,000-image CIFAR-10 test set, and both implementations share 116,906 trainable parameters. We analyse why training initially stalled at the chance-level loss, show analytically that a single-scale 32×32 window can yield positive patches (IoU ≥ 0.5) only for objects about 22.6–45.3 px wide, and list the pitfalls that kept the TensorFlow evaluation and the stop-sign fine-tuning stages from completing. The paper is therefore an implementation report with a corrected evaluation protocol, not a benchmark of detection accuracy
References
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Indonesian Journal of Cyber-AI and Security Intelligence

This work is licensed under a Creative Commons Attribution 4.0 International License.
This work is licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0)


