-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated loop closure benchmark scripts
- Loading branch information
Showing
13 changed files
with
151 additions
and
101 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
56 changes: 56 additions & 0 deletions
56
archive/2010-LoopClosure/ShowLogs/precisionRecallAllDetectors.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
|
||
#set(0,'defaultAxesFontName', 'Times') | ||
#set(0,'defaultTextFontName', 'Times') | ||
|
||
Prefix = 'loop_closure_detection_datasets'; | ||
Dataset= 'CityCentre' | ||
Detectors = {'Surf'; 'Sift'; 'CudaSift'; 'GfttBrief'}; | ||
|
||
% The Ground Truth is a squared bmp file (size must match the log files | ||
% length) where white dots mean loop closures. | ||
% Grey dots mean 'loop closures to ignore', this happens when the rehearsal | ||
% doesn't match consecutive images together. | ||
GroundTruthFile = [Prefix '/' Dataset '.png']; | ||
|
||
colors = 'kbgrcm'; | ||
figure | ||
xlabel('Recall (%)') | ||
ylabel('Precision (%)') | ||
hold on; | ||
|
||
Results = {}; | ||
TimeResults = {}; | ||
|
||
for i=1:length(Detectors) | ||
LogI = importfile([Prefix '/' Dataset '/' Detectors{i} 'LogI.txt']); | ||
LogF = importfile([Prefix '/' Dataset '/' Detectors{i} 'LogF.txt']); | ||
|
||
PR = getPrecisionRecall(LogI, LogF, GroundTruthFile, 0.07); | ||
plot(100*PR(:,2), 100*PR(:,1), colors(mod(i,6)+1)); | ||
% hold on; | ||
Results{i} = PR; | ||
time = sum(LogF(:,2:7),2)+LogF(:,17);%LogF(:,1) | ||
TimeResults{i} = time; | ||
meanTime = mean(time) | ||
meanWm = mean(LogI(:,7)) | ||
meanDict = mean(LogI(:,6)) | ||
maxTime = max(time) | ||
maxWm = max(LogI(:,7)) | ||
maxDict = max(LogI(:,6)) | ||
|
||
%figure(2) | ||
%plot(PR(:,4), PR(:,3), colors(mod(i,6)+1)); | ||
%hold on; | ||
end | ||
legend(Detectors) | ||
title(Dataset) | ||
|
||
figure | ||
rows=floor(length(Detectors)/2 )+ mod(length(Detectors), 2) | ||
for i=1:length(TimeResults) | ||
subplot(rows, 2, i) | ||
plot(TimeResults{i}) | ||
ylabel('Time (s)') | ||
title([Detectors{i} ' (' num2str(mean(TimeResults{i})) 's)']) | ||
end | ||
xlabel('Location indexes') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
DATASETS_FOLDER="" | ||
if [ $# -eq 1 ] | ||
then | ||
DATASETS_FOLDER=$1 | ||
else | ||
echo "Usage: run_all_datasets.sh \"datasets folder\" " | ||
exit | ||
fi | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
|
||
$SCRIPT_DIR/run_bow.sh $DATASETS_FOLDER/NewCollege $DATASETS_FOLDER/NewCollege.png | ||
if [ -s LogF.txt ]; then | ||
mv LogF.txt $DATASETS_FOLDER/NewCollege/LogF.txt | ||
mv LogI.txt $DATASETS_FOLDER/NewCollege/LogI.txt | ||
fi | ||
$SCRIPT_DIR/run_bow.sh $DATASETS_FOLDER/CityCentre $DATASETS_FOLDER/CityCentre.png | ||
if [ -s LogF.txt ]; then | ||
mv LogF.txt $DATASETS_FOLDER/CityCentre/LogF.txt | ||
mv LogI.txt $DATASETS_FOLDER/CityCentre/LogI.txt | ||
fi | ||
$SCRIPT_DIR/run_bow.sh $DATASETS_FOLDER/UdeS_1Hz $DATASETS_FOLDER/UdeS_1Hz.png | ||
if [ -s LogF.txt ]; then | ||
mv LogF.txt $DATASETS_FOLDER/UdeS_1Hz/LogF.txt | ||
mv LogI.txt $DATASETS_FOLDER/UdeS_1Hz/LogI.txt | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
DATASET_FOLDER="" | ||
GT_FILE="" | ||
MEMORY_THR=0 | ||
if [ $# -ge 2 ] | ||
then | ||
DATASET_FOLDER=$1 | ||
GT_FILE=$2 | ||
else | ||
echo "Usage: run_all_detectors.sh \"dataset folder\" \"ground truth file\" [\"Rtabmap/MemoryThr=0\"]" | ||
exit | ||
fi | ||
|
||
if [ $# -ge 3 ] | ||
then | ||
MEMORY_THR=$3 | ||
fi | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
|
||
$SCRIPT_DIR/run_bow.sh $DATASET_FOLDER $GT_FILE $MEMORY_THR 0 false | ||
mv LogF.txt $DATASET_FOLDER/SurfLogF.txt | ||
mv LogI.txt $DATASET_FOLDER/SurfLogI.txt | ||
$SCRIPT_DIR/run_bow.sh $DATASET_FOLDER $GT_FILE $MEMORY_THR 1 false | ||
mv LogF.txt $DATASET_FOLDER/SiftLogF.txt | ||
mv LogI.txt $DATASET_FOLDER/SiftLogI.txt | ||
$SCRIPT_DIR/run_bow.sh $DATASET_FOLDER $GT_FILE $MEMORY_THR 1 true | ||
mv LogF.txt $DATASET_FOLDER/CudaSiftLogF.txt | ||
mv LogI.txt $DATASET_FOLDER/CudaSiftLogI.txt | ||
$SCRIPT_DIR/run_bow.sh $DATASET_FOLDER $GT_FILE $MEMORY_THR 6 false | ||
mv LogF.txt $DATASET_FOLDER/GfttBriefLogF.txt | ||
mv LogI.txt $DATASET_FOLDER/GfttBriefLogI.txt | ||
#$SCRIPT_DIR/run_bow.sh $DATASET_FOLDER $GT_FILE $MEMORY_THR 11 false | ||
#mv LogF.txt $DATASET_FOLDER/SuperPointLogF.txt | ||
#mv LogI.txt $DATASET_FOLDER/SuperPointLogI.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters