Skip to content

Commit

Permalink
more reasonable way to use 640x480 resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
t committed Jun 5, 2019
1 parent a6ce4b7 commit 19d4355
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
File renamed without changes.
Binary file added GCN2/gcn2_480x640.pt
Binary file not shown.
7 changes: 5 additions & 2 deletions GCN2/run.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Run GCN, removed resolution requirment. The current model was trained with resolution 320x240 as input. Use other resolution may affect the actual performance. Ideally, GCNv2 should be trained/finetuned in desired resolution.
GCN_PATH=gcn2.pt ./rgbd_gcn ../Vocabulary/GCNvoc.bin TUM3.yaml ~/Workspace/Datasets/TUM/freiburg3/rgbd_dataset_freiburg3_long_office_household ~/Workspace/Datasets/TUM/freiburg3/rgbd_dataset_freiburg3_long_office_household/associations.txt
GCN_PATH=gcn2_320x240.pt ./rgbd_gcn ../Vocabulary/GCNvoc.bin TUM3.yaml ~/Workspace/Datasets/TUM/freiburg3/rgbd_dataset_freiburg3_long_office_household ~/Workspace/Datasets/TUM/freiburg3/rgbd_dataset_freiburg3_long_office_household/associations.txt

# 640x480 resolution example
FULL_RESOLUTION=1 GCN_PATH=gcn2_640x480.pt ./rgbd_gcn ../Vocabulary/GCNvoc.bin TUM3.yaml ~/Workspace/Datasets/TUM/freiburg3/rgbd_dataset_freiburg3_long_office_household ~/Workspace/Datasets/TUM/freiburg3/rgbd_dataset_freiburg3_long_office_household/associations.txt

# Reproduce results in comparison with ORB as in our paper, will enable NN_ONLY and use 320x240 resolution.

# GCNv2
# NN_ONLY=1 GCN_PATH=gcn2.pt ./rgbd_gcn ../Vocabulary/GCNvoc.bin TUM3_small.yaml ~/Workspace/Datasets/TUM/freiburg3/rgbd_dataset_freiburg3_long_office_household ~/Workspace/Datasets/TUM/freiburg3/rgbd_dataset_freiburg3_long_office_household/associations.txt
# NN_ONLY=1 GCN_PATH=gcn2_320x240.pt ./rgbd_gcn ../Vocabulary/GCNvoc.bin TUM3_small.yaml ~/Workspace/Datasets/TUM/freiburg3/rgbd_dataset_freiburg3_long_office_household ~/Workspace/Datasets/TUM/freiburg3/rgbd_dataset_freiburg3_long_office_household/associations.txt

# Vanilla ORB
# NN_ONLY=1 USE_ORB=1 ./rgbd_gcn ../Vocabulary/ORBvoc.bin TUM3_small.yaml ~/Workspace/Datasets/TUM/freiburg3/rgbd_dataset_freiburg3_long_office_household ~/Workspace/Datasets/TUM/freiburg3/rgbd_dataset_freiburg3_long_office_household/associations.txt
6 changes: 6 additions & 0 deletions src/GCNextractor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ void GCNextractor::operator()( InputArray _image, InputArray _mask, vector<KeyPo

int img_width = 320;
int img_height = 240;

if (getenv("FULL_RESOLUTION") != nullptr)
{
img_width = 640;
img_height = 480;
}

float ratio_width = float(img.cols) / float(img_width);
float ratio_height = float(img.rows) / float(img_height);
Expand Down

0 comments on commit 19d4355

Please sign in to comment.