フィルターのクリア

Semantic Segmentation Using Deep Learning example error

2 ビュー (過去 30 日間)
woong
woong 2023 年 10 月 2 日
回答済み: 檮杌 2023 年 10 月 3 日
There is a problem executing the following code.
There's no problem here
pretrainedURL = 'https://ssd.mathworks.com/supportfiles/vision/data/deeplabv3plusResnet18CamVid.zip';
pretrainedFolder = fullfile(tempdir,'pretrainedNetwork');
pretrainedNetworkZip = fullfile(pretrainedFolder,'deeplabv3plusResnet18CamVid.zip');
if ~exist(pretrainedNetworkZip,'file')
mkdir(pretrainedFolder);
disp('Downloading pretrained network (58 MB)...');
websave(pretrainedNetworkZip,pretrainedURL);
end
unzip(pretrainedNetworkZip, pretrainedFolder)
That's where the problem comes from
pretrainedNetwork = fullfile(pretrainedFolder,'deeplabv3plusResnet18CamVid.mat');
data = load(pretrainedNetwork); % !! The variable 'metrics' stored in semantic Segmentation Metrics cannot be instantiated as an object and is read as unit32
There's an error here too
net = data.net; % The variable 'net' originally stored in the DAG Network cannot be instantiated as an object and is read as unit32.
.....
classes = string(net.Layers(end).Classes) % This type of variable does not support point indexing.
What's wrong with you?
How can we solve it..

採用された回答

檮杌
檮杌 2023 年 10 月 3 日
Hi,
Your issue is not reproducible in my end.
Are you sure that you have successfully installed Deep Learning Toolbox? Your MATLAB does not recognize "semanticSegmantationMetrics" or "DAGNetwork" as objects but treats them as "uint32". As indicated in the doc, the example requires not only Computer Vision Toolbox but also Deep Learning Toolbox to begin with. Please check the output of "ver" and see if Deep Learning Toolbox is correctly installed.

その他の回答 (0 件)

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by