How to use resnet50 in faster RCNN?

4 views (last 30 days)
liangkui lin
liangkui lin on 14 Aug 2018
Answered: Kautuk Raj on 22 Oct 2024
There is a note: trainFasterRCNNObjectDetector does not support DAG networks, such as ResNet-50, Inception-v3, or GoogLeNet. Additionally, you cannot pass a Layers array from a DAG network to the training function, because the Layers property from a DAG network does not contain the connection information. So, how to use resnet50 in trainFasterRCNNObjectDetector?

Answers (1)

Kautuk Raj
Kautuk Raj on 22 Oct 2024
ResNet-50 can be used with trainFasterRCNNObjectDetector by following the steps entailed below:
  1. Extract Layers: Start by loading ResNet-50 and extracting the layers up to the feature extraction point.
  2. Create a Custom Feature Extractor: Use these extracted layers to form a powerful feature extractor tailored for the Faster R-CNN framework.
  3. Configure and Train: With your custom feature extractor in place, define the region proposal network (RPN) and detection network. Then, the model can be trained using trainFasterRCNNObjectDetector.
For detailed instructions and code examples, you can refer to this MathWorks example on Object Detection Using Faster R-CNN Deep Learning here: https://www.mathworks.com/help/vision/ug/object-detection-using-faster-r-cnn-deep-learning.html

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!