Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running workflow from notebooks and several other improvements #31

Merged
merged 75 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
986dc4d
moved config.py inside deep_image_matching package and moved parser f…
franioli Nov 30, 2023
f8c2ebe
cleaned main code and add comments for pycolmap
franioli Nov 30, 2023
26d9d48
cleaned main code and add comments for pycolmap
franioli Nov 30, 2023
07a6ae8
added Config class and started notebook
franioli Nov 30, 2023
f94503d
updated config.py comments
franioli Nov 30, 2023
a5f7ddb
fixing bug with loftr and roma when using tiles
franioli Nov 30, 2023
1984c3c
removed feature_path e image_path from features.h5
franioli Dec 5, 2023
b37aaa7
delated _old dir
franioli Dec 5, 2023
488694c
updated pycolmap reconstruction
franioli Dec 5, 2023
03c5f55
updated pycolmap reconstruction
franioli Dec 5, 2023
4f13994
working on roma_as_dense workflow
franioli Dec 11, 2023
3cfb531
small updates
franioli Dec 18, 2023
40857d0
cleaned main.py
franioli Dec 18, 2023
031a64f
merged main into old detector-free-matchers branch
franioli Jan 5, 2024
87b4dec
fix remanining conflicts
franioli Jan 5, 2024
d1acf8e
moved join_database.py to scripts folder
franioli Jan 5, 2024
4a6cb69
added metashape import and funcs
franioli Jan 6, 2024
3f59c2d
updated parser for specifying only the project directory containing t…
franioli Jan 6, 2024
edfb736
fixed unresolved conflicts after last merge and removed copying image…
franioli Jan 6, 2024
005223e
updated parser
franioli Jan 6, 2024
58515b6
moved ms into scripts folder
franioli Jan 6, 2024
e993d37
removed warnings in get_features from h5.py
franioli Jan 6, 2024
65af71b
updated dense matching script
franioli Jan 6, 2024
966b96e
updated PairsGenerator
franioli Jan 6, 2024
03f442a
updated PairsGenerator
franioli Jan 6, 2024
8773251
updated PairsGenerator
franioli Jan 6, 2024
7a88026
signifincantly improved low-res guided pair generation speed
franioli Jan 6, 2024
47898dd
updated low-res guided pair generation
franioli Jan 6, 2024
aa6bd50
updated geometric_verification function and low-res guided pair gener…
franioli Jan 6, 2024
1469ef2
small updates
franioli Jan 6, 2024
c887d44
added pairs from covisibility starting from an existing colmap recons…
franioli Jan 6, 2024
fe28fa8
fixed bug with pair names in image_matching.py
franioli Jan 7, 2024
d7d442a
updated Config class to work with notebooks
franioli Jan 7, 2024
c29ff28
updated scripts
franioli Jan 7, 2024
e827f97
created first noteboo for basic processing
franioli Jan 7, 2024
547500e
updated notebook for basic processing
franioli Jan 7, 2024
c350b43
updated config.py
franioli Jan 7, 2024
696ea02
updated main.py to use the new Config class
franioli Jan 7, 2024
46f0db1
updated main.py to use the new Config class
franioli Jan 7, 2024
3d8d289
removed parser.py
franioli Jan 7, 2024
1c12b1d
superpoint implemented directly in deep_image_matching without loadin…
franioli Jan 7, 2024
f65f194
some code cleaning in extractors
franioli Jan 7, 2024
3fee519
some code cleaning in matchers
franioli Jan 7, 2024
1b598bd
removed match_imgs.py
franioli Jan 7, 2024
8005924
moved deep_image_matching consts in __init__.py
franioli Jan 7, 2024
8d56dc8
updated Config
franioli Jan 7, 2024
f93aefd
updated Config
franioli Jan 7, 2024
3515352
updated ImageMatching inputs
franioli Jan 7, 2024
4c4c610
updated main.py and notebook
franioli Jan 7, 2024
69a7edb
added rescaling for geometric verification threshold based on image q…
franioli Jan 7, 2024
e817f3e
fixed bug in calling geometric_verification in image_matching
franioli Jan 8, 2024
f83ff18
fixed small bug in SuperPoint config
franioli Jan 8, 2024
a1f19ea
added min_inliers_per_pair configuration
franioli Jan 8, 2024
955faed
moved geometric verification inside the MathcerBase and DetectorFreeM…
franioli Jan 8, 2024
a3385f9
added min_inlier_ration option for rejecting matched pairs
franioli Jan 8, 2024
88c804d
save config to json file in output directory
franioli Jan 8, 2024
bfa4ab6
added main for casalbagnano and other small fixes
franioli Jan 9, 2024
88f091d
added export to metashape function
franioli Jan 9, 2024
a539fe6
moved parser again inside src folder and updated try_match_full_image…
franioli Jan 10, 2024
ca93e67
updated lightglue at the latest version to fix no keypoints crash
franioli Jan 11, 2024
dae48c0
updated config and lowres preselection
franioli Jan 12, 2024
2da57fa
updated to pycolmap 0.5.0
franioli Jan 12, 2024
d9f0b2a
add compression when saving keypoints to features.h5
franioli Jan 12, 2024
21b5b70
updated image resampling when resizing
franioli Jan 15, 2024
6651fec
updated image resizing globally
franioli Jan 15, 2024
564b7e8
using threading for saving features in h5 database
franioli Jan 15, 2024
c759c32
using threading for saving keypoints figures for debugging
franioli Jan 15, 2024
583a435
implemented low_resolution.py for SP+LG extraction and matching on lo…
franioli Jan 15, 2024
0ccafa7
cleaned repo
franioli Jan 17, 2024
5ac0bc1
updated notebooks and main.py
franioli Jan 17, 2024
ad57ea6
removed heavy datasets from assets
franioli Jan 17, 2024
543f585
marged master branch into notebooks
franioli Jan 17, 2024
cae56ea
disable hloc warning becuase of the new version of pycolmap 0.5.0
franioli Jan 17, 2024
9d14617
updated readme
franioli Jan 17, 2024
5f68e9b
Merge branch 'master' into notebooks
franioli Jan 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Specific
data/
res/
datasets/
*results_*/
assets/output/
output/
sandbox/
assets/outs
src/deep_image_matching/thirdparty/weights
fra_*
sb_*

# VScode
.vscode/
Expand Down
39 changes: 28 additions & 11 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,25 @@
"program": "${file}",
"console": "integratedTerminal",
"args": [
"--dir",
"datasets/easy_small",
// "datasets/belvedere_stereo",
// "datasets/casalbagliano",
// "/home/francesco/casalbagliano/C",
"--config",
// "superpoint+lightglue",
"roma",
"--images",
"data/belv_lingua_easy",
"superpoint+lightglue",
"--strategy",
// "matching_lowres",
"bruteforce",
"--quality",
"low",
"medium",
"--tiling",
"preselection",
"--strategy",
"low",
// "--upright",
"--skip_reconstruction",
"--force",
"none",
"-V"
// "--db_path",
// "/home/francesco/casalbagliano/B_extended/results_superpoint+lightglue_bruteforce_quality_high/reconstruction",
// "--skip_reconstruction",
// "--force",
]
},
{
Expand All @@ -39,6 +43,19 @@
"program": "${file}",
"console": "integratedTerminal",
"args": ["--gui"]
},
{
"name": "Python: dense",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"args": [
"--sfm_dir",
"/home/francesco/casalbagliano/subset_A/deep_image_matching/results_superpoint+lightglue_bruteforce_quality_high",
"--dense_dir",
"/home/francesco/casalbagliano/subset_A/deep_image_matching/results_roma_sequential_quality_low"
]
}
]
}
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
| ------------------------------------------------ | -------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------- |
| <img src='assets/matches_sift.gif' height="100"> | <img src='assets/matches_joined.gif' height="100"> | <img src='assets/orientation_deep.gif' height="100"> | <img src='assets/roma_dense.gif' height="100"> |

| SIFT | SUPERGLUE |
| ------------------------------------ | ------------------------------------ |
| SIFT | SUPERGLUE |
| ------------------------------------------------ | ---------------------------------------------------- |
| <img src='assets/temple_rsift.gif' height="165"> | <img src='assets/temple_superglue.gif' height="165"> |

Multivew matcher for SfM software. Support both deep-learning based and hand-crafted local features and matchers and export keypoints and matches directly in a COLMAP database or to Agisoft Metashape by importing the reconstruction in Bundler format. It supports both CLI and GUI. Feel free to collaborate!
Expand Down Expand Up @@ -37,14 +37,15 @@ Key features:
| &check; SIFT (opencv) |
| &check; DeDoDe |

| Supported SfM software |
| ---------------------------------------------|
| &check; COLMAP |
| &check; OpenMVG |
| &check; Agisoft Metashape |
| &check; Software that supports bundler format|
| Supported SfM software |
| --------------------------------------------- |
| &check; COLMAP |
| &check; OpenMVG |
| &check; Agisoft Metashape |
| &check; Software that supports bundler format |

## Colab demo ➡️ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/3DOM-FBK/deep-image-matching/blob/master/notebooks/deep_image_matching_example.ipynb)

## Colab demo ➡️ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/3DOM-FBK/deep-image-matching/blob/master/notebooks/deep_image_matching_example.ipynb)
Want to run on a sample dataset? Try the Colab demo!

## Installation
Expand Down Expand Up @@ -101,7 +102,7 @@ There are two main configuration in `config.py`: `conf_general` and `confs`.
"geom_verification": GeometricVerification.PYDEGENSAC, -> `Enable or disable Geometric Verification. Options are: NONE: disabled; PYDEGENSAC: use pydegensac; MAGSAC: use OpenCV geometric verification with MAGSAC.`
"gv_threshold": 4, -> `Threshold [px] for the geometric verification`
"gv_confidence": 0.9999, -> `Confidence value for the geometric verification`
"preselection_size_max": 2000, -> `if tile_selection == TileSelection.PRESELECTION, define the resolution at which the images are downsampled to run the low-resolution tile preselection.`
"tile_preselection_size": 2000, -> `if tile_selection == TileSelection.PRESELECTION, define the resolution at which the images are downsampled to run the low-resolution tile preselection.`
}
```

Expand Down Expand Up @@ -206,6 +207,7 @@ The GUI loads the available configurations from `config.py` and it shows them in
### Merging databases with different local features

To run the matching with different local features and/or matchers and marging together the results, you can use scripts in the `./scripts` directory for merging the COLMAP databases.

```bash
python ./join_databases.py --help
python ./join_databases.py --input assets/to_be_joined --output assets/to_be_joined
Expand Down
Binary file removed assets/example_easy_highres/01_Camera1.jpg
Binary file not shown.
Binary file removed assets/example_easy_highres/02_Camera1.jpg
Binary file not shown.
Binary file removed assets/example_easy_highres/03_Camera1.jpg
Binary file not shown.
Binary file removed assets/example_easy_highres/04_Camera1.jpg
Binary file not shown.
Binary file removed assets/example_easy_lowres/01_Camera1.jpg
Binary file not shown.
Binary file removed assets/example_easy_lowres/02_Camera1.jpg
Binary file not shown.
Binary file removed assets/example_easy_lowres/03_Camera1.jpg
Binary file not shown.
Binary file removed assets/example_easy_lowres/04_Camera1.jpg
Binary file not shown.
Binary file removed assets/example_square/01_Camera4.jpg
Binary file not shown.
Binary file removed assets/example_square/02_Camera2.jpg
Binary file not shown.
Binary file removed assets/example_square/03_Camera2.jpg
Binary file not shown.
Binary file removed assets/example_square/04_Camera2.jpg
Binary file not shown.
Binary file removed assets/example_square/04_Camera4.jpg
Binary file not shown.
Binary file removed assets/example_square/05_Camera4.jpg
Binary file not shown.
Binary file removed assets/example_square/08_Camera4.jpg
Binary file not shown.
Binary file removed assets/example_square/11_Camera4.jpg
Diff not rendered.
Binary file removed assets/example_square/12_Camera3.jpg
Diff not rendered.
Binary file removed assets/example_square/14_Camera1.jpg
Diff not rendered.
Binary file removed assets/example_square/14_Camera3.jpg
Diff not rendered.
Binary file removed assets/example_square/15_Camera1.jpg
Diff not rendered.
Binary file removed assets/example_square/15_Camera3.jpg
Diff not rendered.
Binary file removed assets/example_square/16_Camera3.jpg
Diff not rendered.
Binary file removed assets/example_square/26_Camera2.jpg
Diff not rendered.
Binary file removed assets/example_square/27_Camera2.jpg
Diff not rendered.
Binary file removed assets/example_square/28_Camera2.jpg
Diff not rendered.
Binary file removed assets/example_square/29_Camera2.jpg
Diff not rendered.
Binary file removed assets/example_square/38_Camera1.jpg
Diff not rendered.
Binary file removed assets/example_square/40_Camera1.jpg
Diff not rendered.
Binary file removed assets/example_square/42_Camera1.jpg
Diff not rendered.
14 changes: 14 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Configuration file for Deep Image Matching

# General
general:
data_dir: /home/username/data
output_dir: /home/username/output
config: "superpoint+lightglue"

extractor:



matcher:
name: flann
Loading