-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathadjustGroundTruthPaths.m
53 lines (38 loc) · 1.55 KB
/
adjustGroundTruthPaths.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
%% Run this script to adjust the paths for all the gTruth Data Objects
clc
clear
load('gTruthResizedVald.mat');
% original datasource path, do not edit
oldPathDataSource = convertCharsToStrings(gTruthResizedVal.DataSource);
% new datasource path, edit with the appropriate location
newPathDataSource = "C:\Users\abshanka\Documents\Matlab\dl-objectDetection\dataset\valResized";
alterPaths = {[oldPathDataSource newPathDataSource]};
unresolvedPaths = changeFilePaths(gTruthResizedVal,alterPaths);
cd Utilities
save('gTruthResizedVald.mat', 'gTruthResizedVal');
clear gTruthResizedVal
cd ..
%%
load('gTruthResizedTest.mat');
% original datasource path, do not edit
oldPathDataSource = "C:\Users\abshanka\Documents\Matlab\dl-objectDetection\dataset\testResized";
% new datasource path
newPathDataSource = "C:\Users\abshanka\Documents\Matlab\dl-objectDetection\dataset\testResized";
alterPaths = {[oldPathDataSource newPathDataSource]};
unresolvedPaths = changeFilePaths(gTruthResizedTest,alterPaths);
cd Utilities
save('gTruthResizedTest.mat', 'gTruthResizedTest');
clear gTruthResizedTest
cd ..
%%
load('gTruthResizedTrain.mat');
% your original datasource path
oldPathDataSource = convertCharsToStrings(gTruthResizedTrain.DataSource);
% new datasource path
newPathDataSource = "C:\Users\abshanka\Documents\Matlab\dl-objectDetection\dataset\trainResized";
alterPaths = {[oldPathDataSource newPathDataSource]};
unresolvedPaths = changeFilePaths(gTruthResizedTrain,alterPaths);
cd Utilities
save('gTruthResizedTrain.mat', 'gTruthResizedTrain');
clear gTruthResizedTrain
cd ..