|
37 | 37 | "outputs": [], |
38 | 38 | "source": [ |
39 | 39 | "# 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" |
41 | 58 | ] |
42 | 59 | }, |
43 | 60 | { |
|
64 | 81 | "python3 ./deep-image-matching/main.py \\\n", |
65 | 82 | " --dir /content/custom_example \\\n", |
66 | 83 | " --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" |
68 | 88 | ] |
69 | 89 | }, |
70 | 90 | { |
|
81 | 101 | " --type ids \\\n", |
82 | 102 | " --database /content/custom_example/results_superpoint+lightglue_matching_lowres_quality_high/database.db \\\n", |
83 | 103 | " --imgsdir /content/custom_example/images \\\n", |
84 | | - " --output /content/custom_example/matches.png" |
| 104 | + " --output /content/custom_example/" |
85 | 105 | ] |
86 | 106 | }, |
87 | 107 | { |
|
94 | 114 | "import cv2\n", |
95 | 115 | "from google.colab.patches import cv2_imshow\n", |
96 | 116 | "\n", |
97 | | - "image_path1 = \"/content/custom_example/matches.png\"\n", |
| 117 | + "image_path1 = \"/content/custom_example/1_2.png\"\n", |
98 | 118 | "image1 = cv2.imread(image_path1)\n", |
99 | 119 | "cv2_imshow(image1)" |
100 | 120 | ] |
|
0 commit comments