Problem with segment anything model
67 views (last 30 days)
Show older comments
Hi,
I would like to use the segment anything model that was released on 2024a and 2024b versions of matlab.
I have checked that all the necessary toolboxes (Image processing, Deep learning and Computer vision) were installed but I still have a problem when trying to run it (either through the segmentAnythingModel command; or through imsegsam; or through the image segmenter app).
The following error saying that the computer vision toolbox is missing appear:
Error using images.internal.sam.configureAndLoadSAM
Using Segment Anything Model is missing the following dependencies:
* Computer Vision Toolbox™
Install missing toolboxes:
* Computer Vision Toolbox™
Error in segmentAnythingModel (line 70)
data = images.internal.sam.configureAndLoadSAM();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I don't know what to do as the toolbox is clearly installed and up to date.
Thank you,
Anthony
2 Comments
Jacob Mathew
on 21 Nov 2024 at 18:08
Edited: Jacob Mathew
on 21 Nov 2024 at 18:08
Hey Anthony,
You can list the Add Ons installed in your MATLAB Installation using the following command:
matlab.addons.installedAddons
Could you share the output of the command in its entirety?
Answers (1)
Jaimin
on 25 Nov 2024 at 4:35
Hi @Anthony
It looks like you are facing a problem where MATLAB is not detecting the installed “Computer Vision Toolbox”, even though it's up to date. Here are some steps you can take to troubleshoot and resolve the issue:
Verify Installation: Double-check that the “Computer Vision Toolbox” is installed by typing the “ver” command in the MATLAB Command Window.
Check Licensing: Ensure your MATLAB license includes the “Computer Vision Toolbox” by verifying your licenses with command “license('test', 'Computer_Vision_Toolbox')”.
Update MATLAB Path: Sometimes, the MATLAB path might not be set correctly.
Reset it by executing:
restoredefaultpath;
rehash toolboxcache;
savepath;
Then restart MATLAB and try running your code again.
Reinstall the Toolbox: If the above steps don't resolve the issue, consider reinstalling the Computer Vision Toolbox:
- Go to the "Add-Ons" menu in MATLAB.
- Select "Manage Add-Ons."
- Uninstall the Computer Vision Toolbox and then reinstall it.
For more detailed guidance, please refer to the MathWorks Documentation.
If the issue continues, please reach out to MathWorks Technical Support for further assistance:
I hope this will be helpful.
0 Comments
See Also
Categories
Find more on Code Generation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!