Skip to content

Commit 7b01181

Browse files
committed
update to new DIM version
1 parent 600a196 commit 7b01181

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

notebooks/colab_run_from_bash_custom_images.ipynb

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,24 @@
3737
"outputs": [],
3838
"source": [
3939
"# Download locally deep-image-matching repository\n",
40-
"!git clone https://github.com/3DOM-FBK/deep-image-matching.git"
40+
"!git clone https://github.com/3DOM-FBK/deep-image-matching.git\n",
41+
"\n",
42+
"# Uncomment to run with python 3.9\n",
43+
"# Install Python 3.9\n",
44+
"!sudo apt-get update\n",
45+
"!sudo apt-get install python3.9\n",
46+
"\n",
47+
"# Set Python 3.9 as the default\n",
48+
"!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 0\n",
49+
"!sudo update-alternatives --set python3 /usr/bin/python3.9\n",
50+
"\n",
51+
"# Check Python version\n",
52+
"!python --version\n",
53+
"\n",
54+
"# Install pip for Python 3.9\n",
55+
"!sudo apt-get install python3.9-distutils\n",
56+
"!wget https://bootstrap.pypa.io/get-pip.py\n",
57+
"!sudo python3 get-pip.py"
4158
]
4259
},
4360
{
@@ -64,7 +81,10 @@
6481
"python3 ./deep-image-matching/main.py \\\n",
6582
" --dir /content/custom_example \\\n",
6683
" --pipeline superpoint+lightglue \\\n",
67-
" --config ./deep-image-matching/config/superpoint+lightglue.yaml"
84+
" --config ./deep-image-matching/config/superpoint+lightglue.yaml\n",
85+
" --skip_reconstruction \\\n",
86+
" --camera_options ./deep-image-matching/config/cameras.yaml \\\n",
87+
" --force"
6888
]
6989
},
7090
{
@@ -81,7 +101,7 @@
81101
" --type ids \\\n",
82102
" --database /content/custom_example/results_superpoint+lightglue_matching_lowres_quality_high/database.db \\\n",
83103
" --imgsdir /content/custom_example/images \\\n",
84-
" --output /content/custom_example/matches.png"
104+
" --output /content/custom_example/"
85105
]
86106
},
87107
{
@@ -94,7 +114,7 @@
94114
"import cv2\n",
95115
"from google.colab.patches import cv2_imshow\n",
96116
"\n",
97-
"image_path1 = \"/content/custom_example/matches.png\"\n",
117+
"image_path1 = \"/content/custom_example/1_2.png\"\n",
98118
"image1 = cv2.imread(image_path1)\n",
99119
"cv2_imshow(image1)"
100120
]

0 commit comments

Comments
 (0)