My goal is to train a pretrained mask rcnn on the TACO trash detection dataset of images. I want to match the annotations information with their corresponding images?

4 views (last 30 days)
The data can be downloaded from Kaggle: https://www.kaggle.com/kneroma/tacotrashdataset
The code I was following can be found with this link in github: https://github.com/matlab-deep-learning/mask-rcnn
I want to train a pretrained maskr rcnn network on a trash dataset for detecting trash in the wild. So far I have this;
SetDir = fullfile('Training data');
Imds = imageDatastore(SetDir,'IncludeSubfolders',true,'LabelSource','foldernames');
annotationFile = jsondecode(fileread("annotations.json"));
save('Annotations.mat',"annotationFile")
%%
trainClassNames = {'Bottle', 'Can','Bottle cap'};
numClasses = length(trainClassNames);
imageSizeTrain = [800 800 3];
cocoAPIDir = fullfile("cocoapi-master","MatlabAPI");
addpath(cocoAPIDir);
unpackAnnotationDir = fullfile(SetDir,"annotations_unpacked","matFiles");
if ~exist(unpackAnnotationDir,'dir')
mkdir(unpackAnnotationDir)
end

Answers (0)

Categories

Find more on Recognition, Object Detection, and Semantic Segmentation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!