Trying to train RCNN with ground truth labels

5 次查看(过去 30 天)
I am creating a RCNN detector for a pre-ground truthed mp4 file, but errors for the layering are popping up, what's happening with the layering?
Here are the errors:
Error using trainFasterRCNNObjectDetector Invalid network.Error in trainDetect (line 151) detector = trainFasterRCNNObjectDetector(trainingData, lgraph, options);Caused by: Network: The network must contain one RPN classification layer. See the documentation for more details about creating Faster R-CNN networks. Network: The network must have two R-CNN box regression layers. See the documentation for more details about creating Faster R-CNN networks. Network: The network must contain one RPN softmax layer. See the documentation for more details about creating Faster R-CNN networks. Network: The network must contain one classification layer. See the documentation for more details about creating Fast or Faster R-CNN networks. Network: Multiple graph components. The layer graph must consist of a single connected component. Initial layers of disconnected components: layer 'input_1' (component with 174 layers) layer 'rpn_conv1' (component with 8 layers) layer 'roiMaxPooling' (component with 4 layers) Layer 'avg_pool': Unconnected output. Each layer output must be connected to the input of another layer. Layer 'regionProposal': Unconnected output. Each layer output must be connected to the input of another layer. Layer 'roiMaxPooling': Unconnected input. Each layer input must be connected to the output of another layer. Layer 'rpn_conv1': Unconnected input. Each layer input must be connected to the output of another layer. Layer 'rpn_reg': Unconnected input. Each layer input must be connected to the output of another layer.

回答(1 个)

Aishwarya
Aishwarya 2023-10-27
编辑:Aishwarya 2023-10-27
Hi,
As per my understanding, it appears that you are encountering errors while creating a Faster R-CNN network using Resnet-50 as base network.
After reviewing the information provided in the attached file, below are some suggestions that might help resolve the issue:
  • After creating a custom network, ensure that all layers are connected correctly using “analyzeNetwork” function. This function helps visualize the layer graph and check for any errors or missing connections.
Here's an example of how to use "analyzeNetwork" function:
analyzeNetwork(lgraph)
  • After running the above code on your Faster RCNN network, the below results were observed in ‘Deep Learning Network Analyzer’. As can be seen in the visualizer that the layers have not been connected properly.
Refer to below MathWorks documentation for more information about the “analyzeNetwork” function: https://www.mathworks.com/help/deeplearning/ref/analyzenetwork.html
I hope this helps!

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by