MATLAB Answers

Invalid network of Object Detector

3 views (last 30 days)
Beatriz Martins
Beatriz Martins on 11 Jan 2020
I am using Alexnet for transfer learning.
I used trainFasterRCNNObjectDetector function to train 25000 images and obtained a detector. Now I want to use the layers of this detector to train more 25000 different images. However, during training the function added new layers and this detector (https://drive.google.com/file/d/1uJmNmPWkgoujM6pONVP-I61EuA_jKtK4/view?usp=sharing) returns a Network with 35 layers (insted of 25 like alexnet).
Therefore, when I try to run again the trainFasterRCNNObjectDetector with layers of my detector I get the following error:
Error using trainFasterRCNNObjectDetector (line 333)
Invalid networkInvalid network.
Error in train_detector (line 34)
detector = trainFasterRCNNObjectDetector(trainingData, layers, options)
Caused by:
Network: Too many output layers. The network must have one output layer.
Detected output layers:
layer 'rpnBoxDeltas'
layer 'rpnClassification'
layer 'classoutput'
layer 'boxDeltas'
Layer 'regionProposal': Missing input. Each layer input must be connected to the output of another layer.
Detected missing inputs:
input 'boxDeltas'
Layer 'roiPooling': Missing input. Each layer input must be connected to the output of another layer.
Detected missing inputs:
input 'roi'
Layer 'rpnClassification': Missing softmax layer. A classification layer must be preceded by a softmax layer.
Does anyone know how to solve this problem?

Answers (0)

Community Treasure Hunt

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

Start Hunting!