Hello
Can anyone please help me with resolving this error message?
The error message occurs after uploading the network to the deep network designer application
Thank you
My code:
clear all
close all
format long g
data=load('matlab_V21_ROI_11_3_2021.mat')
gTruth=data.gTruth;
gTruth.DataSource
gTruth.LabelDefinitions;
replaceimds=imageDatastore('C:\monika\vse\kratery')
replaceDataSource=groundTruthDataSource(replaceimds)
gTruth.DataSource=replaceDataSource
%objectdetector
trainingDataTable=objectDetectorTrainingData(gTruth);
% [imds,blds]=objectDetectorTrainingData(gTruth);
% cds=combine(imds,blds)
% read(cds)
% counts=countEachLabel(cds)
filenamesImages=trainingDataTable.imageFilename
tblBoxes=trainingDataTable(:,'krater')
imds=imageDatastore(filenamesImages, 'LabelSource','foldernames')
blds=boxLabelDatastore(tblBoxes)
cds=combine(imds,blds)
% anchor boxes I
network = resnet50;%squeezenet; % resnet50
inputImageSize =[224 224 3]; %network.Layers(1).InputSize;
numClasses = 1;
featureLayer = 'activation_40_relu';%'fire5-concat' %'activation_40_relu';
%estimate anchor boxes
numAnchors = 3
[anchorBoxes,meanIoU] = estimateAnchorBoxes(cds,numAnchors);
anchorBoxes
meanIoU
maxNumAnchors = 3;
meanIoU = zeros([maxNumAnchors,1]);
anchorBoxes = cell(maxNumAnchors, 1);
for k = 1:maxNumAnchors
% Estimate anchors and mean IoU.
[anchorBoxes{k},meanIoU(k)] = estimateAnchorBoxes(cds,k);
end
figure
plot(1:maxNumAnchors,meanIoU,'-o')
ylabel("Mean IoU")
xlabel("Number of Anchors")
title("Number of Anchors vs. Mean IoU")
% anchor boxes 2 - pokracovani
anchorBoxes = [72,70; 99,96; 53,51];
lgraph = fasterRCNNLayers(inputImageSize,numClasses,anchorBoxes, ...
network,featureLayer);
analyzeNetwork(lgraph);