Warning when loading a trained RCNN Object Detector from a .mat file
    5 views (last 30 days)
  
       Show older comments
    
Hello,
I have trained a fast RCNN Object Detector using a remote cluster computing service. I write the code on my machine then package it and send it to the service. The service is running MATLAB 2018a on what I believe is either a linux or mac based machine with the Neural Network Toolbox. My own machine is running MATLAB 2017b on Windows with the Neural Network Toolbox. This service returns the output of the training as a .mat file containing whatever arrays were left when the training finished, namely, a ground truth object, the array of training data, as well as of course the trained network.
When I try to load the .mat file, all the arrays load properly, except for the object containing the trained network.
The code I am using is simply 
load('output.mat') %
This returns the warning:
Warning: While loading an object of class 'nnet.cnn.layer.ClassificationOutputLayer':
Reference to non-existent field 'ClassNames'. 
Warning: While loading an object of class 'nnet.cnn.layer.ClassificationOutputLayer':
Reference to non-existent field 'ClassNames'. 
Warning: While loading an object of class 'fastRCNNObjectDetector':
Struct contents reference from a non-struct array object. 
If I attempt to open the FastRCNN object detector, all fields are empty, even though training completed successfully. 
rcnn56alex = 
  fastRCNNObjectDetector with properties:
            ModelName: ''
              Network: []
    RegionProposalFcn: []
        MinObjectSize: []
Any advice would be appreciated, thank you very much.,
2 Comments
Answers (1)
  Yash
      
 on 24 Dec 2024
        It appears that a Faster R-CNN model trained in one version of MATLAB may not be compatible with another version. Here is another MATLAB Answers post that states a different error message but highlights the same fundamental issue of training the Fater R-CNN model in one version of MATLAB and loading the obtained .MAT file in another.
This discrepancy might stem from structural changes implemented by MathWorks, where certain fields stored in the .MAT file may have been modified or removed in later versions. To address this, one potential solution is to train the model and subsequently load the .MAT file within the same version. Alternatively, upgrade to the latest release of MATLAB.
0 Comments
See Also
Categories
				Find more on Parallel and Cloud in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

