MASK RCNN Error DataSource TABLE CREATED

3 visualizaciones (últimos 30 días)
mohd akmal masud
mohd akmal masud el 10 de Mayo de 2023
Comentada: mohd akmal masud el 30 de Ag. de 2023
Dear All,
I want to do the MASK RCNN deep learning method for object detection. (All the data set was attached.)
But I got error like this LINE:
boxmaskpc= table(gTruthnouveau.DataSource.Source(1:9,1), gTruthnouveau.LabelData.ordinateur(1:9,1),...
'VariableNames',{'files','box'});
boxmaskphone= table(gTruthnouveau.DataSource.Source(10:18,1), gTruthnouveau.LabelData.portable(10:18,1),...
'VariableNames',{'files','box'});
BELOW IS MY CODING
%% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
% __________________________________________MaskRCNN_Voiture implémenter par un Maskhead______________
% ______________________________________________Executer sans affichage du masks et boxes ._____________________________
% ________________________________________________Meme apres creation des images logiques _______________________________
%% Load data set ******************************************************************
clc
clear all
close all
imds1= imageDatastore('BDD','IncludeSubfolders',true,'LabelSource','Foldernames');
%% Convertir en image logique"
% OutputFolder4= fullfile('PixelLabelData_12');
% imdsboxmask= imageDatastore(fullfile(OutputFolder4),'LabelSource','Foldernames');
% p=height(imdsboxmask.Files);
% for p= 1:p
% pp=imread(imdsboxmask.Files{p});
% pp=logical(pp);
% imshow(pp);
% imsave;
% end
% %% this one for imwrite from binary subplot(imshow3D) to single image binary
% % pastikan outt22(:,:,ii) = imopen(outt2,st2); imshow(outt22(:,:,ii)) buat
% % dulu kat atas
% for k = 1:18
% metadata = dicominfo('1.3.46.670589.5.2.10.2.4.46.678.1.2428.1625227336625.dcm');
% dicomwrite(b(:,:,k),sprintf('I-13125610N1256%03d.dcm',k), metadata, 'CreateMode', 'copy');
% % dicomwrite(P(:,:,k),sprintf('I-13125610N125666666%03d.dcm',k));
% % imwrite(BW1(:,:,k), sprintf(['bwaftersegmentationpngI13125610N1' ...
% % '%03d.png'], k)); %allBW is from gradientweight imshow3D
% end
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%ù
OutputFolder1= fullfile('logique_masks');
logique_image= imageDatastore(fullfile(OutputFolder1),'LabelSource','Foldernames');
%% For files "Masks"
I1 = readimage(imds1,1);
imshow(I1)
classNames1 = {'PC', 'PHONE'};
pixelLabelID1 = [1 2];
load gTruthnouveau.mat;
%% _____________________Create a Table of Data___________________________________
% Create Box Label and Masks from gTruthbox
% boxmaskpc= table(gTruthnouveau.DataSource.Source, gTruthnouveau.LabelData.ordinateur,...
% 'VariableNames',{'files','box'});
% boxmaskphone= table(gTruthnouveau.DataSource.Source, gTruthnouveau.LabelData.portable,...
% 'VariableNames',{'files','box'});
boxmaskpc= table(gTruthnouveau.DataSource.Source(1:9,1), gTruthnouveau.LabelData.ordinateur(1:9,1),...
'VariableNames',{'files','box'});
boxmaskphone= table(gTruthnouveau.DataSource.Source(10:18,1), gTruthnouveau.LabelData.portable(10:18,1),...
'VariableNames',{'files','box'});
z=[boxmaskpc;boxmaskphone];
bldsmask = boxLabelDatastore(z(:,'box'));
% pxdsboxmask = pixelLabelDatastore(logique_image.Files,classNames1,pixelLabelID1);
pxdsboxmask = pixelLabelDatastore(gTruthnouveau.LabelData.PixelLabelData,classNames1,pixelLabelID1);
databoxmask=combine(imds1,bldsmask);
databoxmask=combine(databoxmask,pxdsboxmask);

Respuestas (1)

Sanjana
Sanjana el 23 de Ag. de 2023
Hi mohd,
I Understand that you are facing an issue in accessing “groundTruth” Object. As per the data provided, the “DataSource” of “groundTruth” Object is not created properly.
As per the documentation, “DataSource” can be created in the following way, and then you can create a “groundTruth” Object using the “DataSource”,”LabelDefinitions” and “LabelData”.
%Creating the dataSource
dataSource = groundTruthDataSource(gTruthnouveau.DataSource)
%Creating the groundTruthObject
groundTruthObject = groundTruth(dataSource, gTruthnouveau.LabelDefintions ,gTruthnoveau.LabelData)
Please refer to the following link, for further information,
Hope this helps!
Regards,
Sanjana.
  1 comentario
mohd akmal masud
mohd akmal masud el 30 de Ag. de 2023
Hi @Sanjana, I got Error
%Creating the dataSource
>> dataSource = groundTruthDataSource(gTruthnouveau.DataSource);
Error using groundTruthDataSource/parseAndPopulateInputs
Cannot find files or folders matching:
'C:\Users\NGSI\Desktop\FasterRCNN_and_MaskRCNN_PC\BDD_ESSAI\02.jpg'.
Error in groundTruthDataSource (line 194)
parseAndPopulateInputs(this, varargin{:});
>> groundTruthObject = groundTruth(dataSource, gTruthnouveau.LabelDefintions ,gTruthnoveau.LabelData);
Unrecognized function or variable 'dataSource'.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by