필터 지우기
필터 지우기

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