Clear Filters
Clear Filters

MaskRcnn error out of the box

2 views (last 30 days)
Dominik Mattioli
Dominik Mattioli on 6 Apr 2023
Answered: Nihal Reddy on 12 Apr 2023
I installed the computer vision toolbox and tried to instantiate a detector object for maskrcnn:
detector = maskrcnn("resnet50-coco")
This gives an error:
Error using maskrcnn
The specified superclass 'deep.internal.sdk.LearnableParameterContainer' contains a parse error, cannot be found on MATLAB's search path,
or is shadowed by another file with the same name.
The error persists after running restoredefaultpath.
I'm using MATLAB R2022a.

Answers (1)

Nihal Reddy
Nihal Reddy on 12 Apr 2023
I understand you are facing an error while trying to create a "maskrcnn" object.
Generally, the error message encountered by you is received when there is a user-defined function in the MATLAB search path which has the same name as the MATLAB built-in function. In order to resolve the issue follow the troubleshooting steps below:
a) Manually go through the MATLAB search path and remove the paths which have functions conflicting with built-in MATLAB functions. Execute the following command to get the list of the current search path.
>> path
The following command may help to find the source of the issue:
>> which -all <conflicting_function>
b) If you are unsure of which paths to remove or the above command displays only one line, restore the MATLAB search path to its factory-installed state by executing the following command :
>> rehash toolboxcache
>> restoredefaultpath
Notice that the above command may remove the paths that you have previously added to the MATLAB search path in order for your scripts to work. So it is advisable to save a backup copy of the current MATLAB search path before running the command.
Refer to the following link to the documentation to back up the current search path: https://www.mathworks.com/help/matlab/ref/savepath.html
If none of the above steps work, please reinstall the Computer Vision Toolbox as this issue may have been related to corrupted class hierarchies in MATLAB.

Categories

Find more on Entering Commands in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!