How panchapakesanganesan/fasterrcnn works
This repository provides Faster R-CNN object detection in two runnable implementations: PyTorch and TensorFlow 2/Keras. The primary workflow is to invoke a backend’s command-line entry point, load and preprocess VOC images and labels, form anchors and training targets, run feature extraction, region proposals and box classification/regression, then evaluate or visualize detections. The README also documents training, evaluation, prediction, pretrained weights, and alternative PyTorch ResNet backbones. Edges reflect README statements and SOURCE INDEX references; unsampled implementation details are not inferred.
Main entry points: FasterRCNN/__main__.py PyTorch CLI · models/faster_rcnn.py Faster R-CNN · FasterRCNN/__main__.py TensorFlow CLI · models/faster_rcnn.py Faster R-CNN
Components 29
Entry and data
- PyTorch CLI
pytorch/FasterRCNN/__main__.py - VOC loader
pytorch/FasterRCNN/datasets/voc.py - Image preprocessing
pytorch/FasterRCNN/datasets/image.py - Training samples
pytorch/FasterRCNN/datasets/training_sample.py - TensorFlow CLI
tf2/FasterRCNN/__main__.py - VOC loader
tf2/FasterRCNN/datasets/voc.py - Image preprocessing
tf2/FasterRCNN/datasets/image.py - Training samples
tf2/FasterRCNN/datasets/training_sample.py
PyTorch model
- Faster R-CNN
pytorch/FasterRCNN/models/faster_rcnn.py - Anchor targets
pytorch/FasterRCNN/models/anchors.py - Box math
pytorch/FasterRCNN/models/math_utils.py - Backbone interface
pytorch/FasterRCNN/models/backbone.py - VGG-16 backbone
pytorch/FasterRCNN/models/vgg16.py - ResNet backbone
pytorch/FasterRCNN/models/resnet.py - Region proposals
pytorch/FasterRCNN/models/rpn.py - Detector head
pytorch/FasterRCNN/models/detector.py
TensorFlow model
- Faster R-CNN
tf2/FasterRCNN/models/faster_rcnn.py - Anchor targets
tf2/FasterRCNN/models/anchors.py - Box math
tf2/FasterRCNN/models/math_utils.py - VGG-16 backbone
tf2/FasterRCNN/models/vgg16.py - Region proposals
tf2/FasterRCNN/models/rpn.py - Detector head
tf2/FasterRCNN/models/detector.py - RoI pooling
tf2/FasterRCNN/models/roi_pooling_layer.py
Evaluation and results
- Detection metrics
pytorch/FasterRCNN/statistics.py - Detection visualization
pytorch/FasterRCNN/visualize.py - Detection metrics
tf2/FasterRCNN/statistics.py - Detection visualization
tf2/FasterRCNN/visualize.py
Other components
- User
- VOC dataset
Connections 35
- User → PyTorch CLI: runs
README.md - User → TensorFlow CLI: runs
README.md - VOC dataset → VOC loader: provides images and labels
README.md - VOC dataset → VOC loader: provides images and labels
README.md - PyTorch CLI → VOC loader: loads splits
pytorch/FasterRCNN/__main__.py - PyTorch CLI → Faster R-CNN: trains or predicts
pytorch/FasterRCNN/__main__.py - PyTorch CLI → Detection metrics: evaluates detections
pytorch/FasterRCNN/__main__.py - PyTorch CLI → Detection visualization: renders predictions
pytorch/FasterRCNN/__main__.py - VOC loader → Image preprocessing: loads and preprocesses
pytorch/FasterRCNN/datasets/voc.py - VOC loader → Training samples: builds samples
pytorch/FasterRCNN/datasets/voc.py - VOC loader → Anchor targets: generates targets
pytorch/FasterRCNN/datasets/voc.py - Faster R-CNN → Anchor targets: uses anchors
pytorch/FasterRCNN/models/faster_rcnn.py - Faster R-CNN → VGG-16 backbone: uses backbone
pytorch/FasterRCNN/models/faster_rcnn.py - Faster R-CNN → Region proposals: runs proposal network
pytorch/FasterRCNN/models/faster_rcnn.py - Faster R-CNN → Detector head: runs detector
pytorch/FasterRCNN/models/faster_rcnn.py - Faster R-CNN → Box math: uses box math
pytorch/FasterRCNN/models/faster_rcnn.py - Anchor targets → Box math: computes overlaps
pytorch/FasterRCNN/models/anchors.py - Region proposals → Box math: uses box math
pytorch/FasterRCNN/models/rpn.py - VGG-16 backbone → Backbone interface: implements backbone
pytorch/FasterRCNN/models/vgg16.py - ResNet backbone → Backbone interface: implements backbone
pytorch/FasterRCNN/models/resnet.py - PyTorch CLI → ResNet backbone: can select
pytorch/FasterRCNN/__main__.py - TensorFlow CLI → VOC loader: loads splits
tf2/FasterRCNN/__main__.py - TensorFlow CLI → Faster R-CNN: trains or predicts
tf2/FasterRCNN/__main__.py - TensorFlow CLI → Detection metrics: evaluates detections
tf2/FasterRCNN/__main__.py - TensorFlow CLI → Detection visualization: renders predictions
tf2/FasterRCNN/__main__.py - VOC loader → Image preprocessing: loads and preprocesses
tf2/FasterRCNN/datasets/voc.py - VOC loader → Training samples: builds samples
tf2/FasterRCNN/datasets/voc.py - VOC loader → Anchor targets: generates targets
tf2/FasterRCNN/datasets/voc.py - Faster R-CNN → VGG-16 backbone: uses backbone
tf2/FasterRCNN/models/faster_rcnn.py - Faster R-CNN → Region proposals: runs proposal network
tf2/FasterRCNN/models/faster_rcnn.py - Faster R-CNN → Detector head: runs detector
tf2/FasterRCNN/models/faster_rcnn.py - Faster R-CNN → Box math: uses box math
tf2/FasterRCNN/models/faster_rcnn.py - Anchor targets → Box math: computes overlaps
tf2/FasterRCNN/models/anchors.py - Region proposals → Box math: uses box math
tf2/FasterRCNN/models/rpn.py - Detector head → RoI pooling: uses pooling layer
tf2/FasterRCNN/models/detector.py