diff --git a/README.md b/README.md
index 4e45495..66d8af9 100644
--- a/README.md
+++ b/README.md
@@ -127,6 +127,13 @@ cd demo
### Reproduce the testing results with pytorch-lightning
+You need to setup the testing subsets of ScanNet and MegaDepth first. We create symlinks from the previously downloaded datasets to `data/{{dataset}}/test`.
+
+```shell
+# set up symlinks
+ln -s /path/to/scannet-1500-testset/* /path/to/LoFTR/data/scannet/test
+ln -s /path/to/megadepth-1500-testset/* /path/to/LoFTR/data/megadepth/test
+```
```shell
conda activate loftr
@@ -142,7 +149,7 @@ For visualizing the results, please refer to `notebooks/visualize_dump_results.i
-### Image pair info for training on ScanNet
+
## Training
diff --git a/assets/megadepth_test_1500_scene_info/megadepth_test_1500.txt b/assets/megadepth_test_1500_scene_info/megadepth_test_1500.txt
index 958259d..85a2e16 100644
--- a/assets/megadepth_test_1500_scene_info/megadepth_test_1500.txt
+++ b/assets/megadepth_test_1500_scene_info/megadepth_test_1500.txt
@@ -1,5 +1,5 @@
-0022_0.1_0.3.npz
-0015_0.1_0.3.npz
-0015_0.3_0.5.npz
-0022_0.3_0.5.npz
-0022_0.5_0.7.npz
\ No newline at end of file
+0022_0.1_0.3
+0015_0.1_0.3
+0015_0.3_0.5
+0022_0.3_0.5
+0022_0.5_0.7
\ No newline at end of file
diff --git a/configs/data/megadepth_test_1500.py b/configs/data/megadepth_test_1500.py
index 3d86b1e..5cc98a0 100644
--- a/configs/data/megadepth_test_1500.py
+++ b/configs/data/megadepth_test_1500.py
@@ -3,9 +3,9 @@ from configs.data.base import cfg
TEST_BASE_PATH = "assets/megadepth_test_1500_scene_info"
cfg.DATASET.TEST_DATA_SOURCE = "MegaDepth"
-cfg.DATASET.TEST_DATA_ROOT = "/data/MegaDepth/megadepth_test_1500"
+cfg.DATASET.TEST_DATA_ROOT = "data/megadepth/test"
cfg.DATASET.TEST_NPZ_ROOT = f"{TEST_BASE_PATH}"
cfg.DATASET.TEST_LIST_PATH = f"{TEST_BASE_PATH}/megadepth_test_1500.txt"
cfg.DATASET.MGDPT_IMG_RESIZE = 840
-cfg.DATASET.MIN_OVERLAP_SCORE = 0.0
+cfg.DATASET.MIN_OVERLAP_SCORE_TEST = 0.0
diff --git a/configs/data/scannet_test_1500.py b/configs/data/scannet_test_1500.py
index e9befe9..60e560f 100644
--- a/configs/data/scannet_test_1500.py
+++ b/configs/data/scannet_test_1500.py
@@ -3,9 +3,9 @@ from configs.data.base import cfg
TEST_BASE_PATH = "assets/scannet_test_1500"
cfg.DATASET.TEST_DATA_SOURCE = "ScanNet"
-cfg.DATASET.TEST_DATA_ROOT = "/data/scannet/scannet_test_1500"
+cfg.DATASET.TEST_DATA_ROOT = "data/scannet/test"
cfg.DATASET.TEST_NPZ_ROOT = f"{TEST_BASE_PATH}"
cfg.DATASET.TEST_LIST_PATH = f"{TEST_BASE_PATH}/scannet_test.txt"
cfg.DATASET.TEST_INTRINSIC_PATH = f"{TEST_BASE_PATH}/intrinsics.npz"
-cfg.DATASET.MIN_OVERLAP_SCORE = 0.0
+cfg.DATASET.MIN_OVERLAP_SCORE_TEST = 0.0
diff --git a/data/scannet/test b/data/scannet/test
deleted file mode 120000
index da5e7bf..0000000
--- a/data/scannet/test
+++ /dev/null
@@ -1 +0,0 @@
-/mnt/lustre/share/3dv/dataset/scannet/scannet_1500_testset
\ No newline at end of file
diff --git a/data/scannet/test/.gitignore b/data/scannet/test/.gitignore
new file mode 100644
index 0000000..94548af
--- /dev/null
+++ b/data/scannet/test/.gitignore
@@ -0,0 +1,3 @@
+*
+*/
+!.gitignore
diff --git a/docs/TRAINING.md b/docs/TRAINING.md
index 1118178..6beddd8 100644
--- a/docs/TRAINING.md
+++ b/docs/TRAINING.md
@@ -37,8 +37,8 @@ ln -s /path/to/scannet_indices/* /path/to/LoFTR/data/scannet/index
# megadepth
# -- # train and test dataset (train and test share the same dataset)
-ln -s /path/to/megadepth/Undistorted_SfM/* /path/to/LoFTR/data/megadepth/train
-ln -s /path/to/megadepth/Undistorted_SfM/* /path/to/LoFTR/data/megadepth/test
+ln -s /path/to/megadepth/Undistorted_SfM /path/to/LoFTR/data/megadepth/train
+ln -s /path/to/megadepth/Undistorted_SfM /path/to/LoFTR/data/megadepth/test
# -- # dataset indices
ln -s /path/to/megadepth_indices/* /path/to/LoFTR/data/megadepth/index
```
diff --git a/notebooks/demo_single_pair.ipynb b/notebooks/demo_single_pair.ipynb
index 260ba7d..e076f2e 100644
--- a/notebooks/demo_single_pair.ipynb
+++ b/notebooks/demo_single_pair.ipynb
@@ -1,34 +1,13 @@
{
- "metadata": {
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.8.10"
- },
- "orig_nbformat": 2,
- "kernelspec": {
- "name": "python3810jvsc74a57bd065d19ceb1c5e26d1d1e4e93c9824aa3d4633a56cbb655ff57f645571fa154c9a",
- "display_name": "Python 3.8.10 64-bit ('loftr': conda)"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2,
"cells": [
{
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"# Demo LoFTR-DS on a single pair of images\n",
"\n",
"This notebook shows how to use the loftr matcher with default config(dual-softmax) and the pretrained weights."
- ],
- "cell_type": "markdown",
- "metadata": {}
+ ]
},
{
"cell_type": "code",
@@ -46,15 +25,15 @@
]
},
{
+ "cell_type": "markdown",
+ "metadata": {},
"source": [
"## Indoor Example"
- ],
- "cell_type": "markdown",
- "metadata": {}
+ ]
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
@@ -70,7 +49,7 @@
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
@@ -96,17 +75,18 @@
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 4,
"metadata": {},
"outputs": [
{
- "output_type": "display_data",
"data": {
- "text/plain": "