Skip to content

Commit 5f73785

Browse files
author
Abhishek Shankar
committed
updated code in changepathfiles and anchorbox calculation
1 parent 842ab70 commit 5f73785

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

adjustGroundTruthPaths.m

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
load('gTruthResizedVald.mat');
88

99
% original datasource path, do not edit
10-
oldPathDataSource = fullfile("C:","Sandbox","DLODFX","deepLearningForObjectDetection","RoboSubFootage","valResized");
10+
oldPathDataSource = convertCharsToStrings(gTruthResizedVal.DataSource);
1111

1212
% new datasource path, edit with the appropriate location
13-
newPathDataSource = fullfile("RoboSubFootage","valResized");
13+
newPathDataSource = "C:\Users\abshanka\Documents\Matlab\dl-objectDetection\dataset\valResized";
1414

1515
alterPaths = {[oldPathDataSource newPathDataSource]};
1616
unresolvedPaths = changeFilePaths(gTruthResizedVal,alterPaths);
@@ -25,10 +25,9 @@
2525
load('gTruthResizedTest.mat');
2626

2727
% original datasource path, do not edit
28-
oldPathDataSource = fullfile("C:","MYWORK","deep-learning-for-object-detection","ObjectDetectionDLFX","RoboSubFootage","testResized");
28+
oldPathDataSource = convertCharsToStrings(gTruthResizedTest.DataSource);
2929
% new datasource path
30-
newPathDataSource = fullfile("RoboSubFootage","testResized");
31-
30+
newPathDataSource = "C:\Users\abshanka\Documents\Matlab\dl-objectDetection\dataset\testResized";
3231
alterPaths = {[oldPathDataSource newPathDataSource]};
3332
unresolvedPaths = changeFilePaths(gTruthResizedTest,alterPaths);
3433

@@ -41,9 +40,9 @@
4140
load('gTruthResizedTrain.mat');
4241

4342
% your original datasource path
44-
oldPathDataSource = fullfile("C:","MYWORK","deep-learning-for-object-detection","ObjectDetectionDLFX","RoboSubFootage","trainResized");
43+
oldPathDataSource = convertCharsToStrings(gTruthResizedVal.DataSource);
4544
% new datasource path
46-
newPathDataSource = fullfile("RoboSubFootage","trainResized");
45+
newPathDataSource = "C:\Users\abshanka\Documents\Matlab\dl-objectDetection\dataset\trainResized";
4746

4847
alterPaths = {[oldPathDataSource newPathDataSource]};
4948
unresolvedPaths = changeFilePaths(gTruthResizedTrain,alterPaths);

codeFiles/AnchorBoxes.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
summary(trainingData);
22

33
% Combine all the ground truth boxes into one array.
4-
allBoxes = vertcat(trainingData.navGate{:},trainingData.greenBuoy{:},trainingData.redBuoy{:},trainingData.yellowBuoy{:});
5-
4+
allBoxes = vertcat(gTruthResizedTrain.LabelData.navGate{:},gTruthResizedTrain.LabelData.greenBuoy{:},gTruthResizedTrain.LabelData.redBuoy{:},gTruthResizedTrain.LabelData.yellowBuoy{:});
65
% Plot the box area versus box aspect ratio.
76
aspectRatio = allBoxes(:,3) ./ allBoxes(:,4);
87
area = prod(allBoxes(:,3:4),2);

codeFiles/importPreTrainedNetwork.mlx

-1.34 KB
Binary file not shown.

0 commit comments

Comments
 (0)