You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.6 KiB

function [ ] = func_setupData( dataDir, zippedDataFile, grDataFile )
% script func_setupData:
% - entpackt die trainingsdaten,
% - räumt ein bisschen auf, bzw. liefert Hinweise zum aufräumen
% - erstellt grounddata
% - (alles nur, falls es das nicht schon gibt)
if not(exist(dataDir , 'dir'))
% unzip data
if (not(exist(zippedDataFile , 'file')))
fprintf("Data file is missing please copy %s to script folder !", zippedDataFile);
return;
end
fprintf("unzipping Data");
unzip (zippedDataFile, dataDir)
%rename files correctly (there are two wrong):
fprintf("fix faulty falenames\n");
movefile (append(dataDir, '/Labels_1024_768/60GBS/60GBS_Gruppe05_SS21_Nr49.png'), append(dataDir, '/Labels_1024_768/60GBS/60GBS_Gruppe05_SS21_49.png'));
movefile (append(dataDir, '/Labels_1024_768/60GBS/60GBS_Gruppe05_SS21_Nr50.png'), append(dataDir, '/Labels_1024_768/60GBS/60GBS_Gruppe05_SS21_50.png'));
fprintf("Labeldata is incomplete\n");
fprintf("please compare data in keinGBS and delete what's to much manually\n");
fprintf("otherwise grounddatageneration will fail\n");
frpintf("then restart script \n");
return;
end
% generate Grounddata from Pictures
if (not(exist(grDataFile , 'file')))
dataStorePicturePath = append(pwd,'/', dataDir,'/Pictures_1024_768/');
dataStoreLabelPath = append(pwd,'/', dataDir, '/Labels_1024_768/');
% Die Tabelle wird in einer Funktion erstellt und gespeichert
% dabei werden Datensätze, wo die Label nicht passen entfernt.
func_groundTruthFromLabelPic(dataStorePicturePath, dataStoreLabelPath, grDataFile);
end