Git Product home page Git Product logo

3dom-fbk / deep-image-matching Goto Github PK

View Code? Open in Web Editor NEW
316.0 13.0 36.0 334.82 MB

Multiview matching with deep-learning and hand-crafted local features for COLMAP and other SfM software. Supports high-resolution formats and images with rotations. Both CLI and GUI are supported.

Home Page: https://3dom-fbk.github.io/deep-image-matching/

License: BSD 3-Clause "New" or "Revised" License

Python 92.25% Batchfile 0.05% Shell 0.14% Jupyter Notebook 4.20% Dockerfile 0.10% HTML 2.03% JavaScript 0.95% CSS 0.27%
colmap deep-learning image-matching keypoint-matching keypoints local-feature-matching multiview slam structure-from-motion high-resolution-image

deep-image-matching's People

Contributors

3dom-fbk avatar elliestath avatar franioli avatar gperda avatar kauevestena avatar lcmrl avatar nneilsutherland avatar tudipffmgt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deep-image-matching's Issues

Make detector-free matchers (loftr, se2-loftr, roma) really working for multi-camera

All the detector-free matchers (loftr, se2-loftr, roma) work only on image pairs. Therefore, these approaches currentely return matches on each pair of images with multiplicity (track length) of 2. We should think of some approaches to track the same matched feature on all the images and increase robustness of dense reconstruction.

A possible approach is to implement some kind of binning of the features, as Dmytro Mishkin did in
https://github.com/ducha-aiki/imc2023-kornia-starter-pack

Configuration management

Define a better way to manage configuation parameters.
Each Extractor/Matcher should have its default configuration defined within the class itselft (before the init method), but the user should be able to update it by defined a custom configuration at the program beginning.
Also, a list of pre-defined combinations of allowed extractors and matchers must be defined and the user can choose only between them

16bit images

Could be nice to not convert 16bit images to 8bit images, and check if DL local features works better

Show matches result error with RootSIFT local features

Thanks for your work!
I use the colmap gui to visual the matches,and result is right,which means the match process(database.db) is right.But I use the show_matches.py to visual the matches. I get wrong result.
After debugging,I find that some keypoints have negative coordinate values.,which makes me confused.
How can I solve this problem?

image
image
image

Merging databases - issues on raw matches

Merged matches from different local features are written in COLMAP databases both as raw and verified matches. If verified matches are deleted in COLMAP GUI and then run only geometric verification, COLMAP crashes (COLMAP 3.8)

Problem running "Run Dense reconstruction.ipynb'

Hi, I`m testing the dense reconstrucion notebook but I found some problems importing OutputCapture and db_from_existing_poses. Moreover, 'config = dim.Config(params)' gives this error message: 'AttributeError: module 'deep_image_matching' has no attribute 'Config' ' . Does anybody knows how to fix these issues?
Thnks

I found the matching speed is slow ( use superpoint+lightglue )

First of all, I would like to thank you for your work. However, when I was using it to process 1k images of 4k resolution, I noticed that the matching speed was very slow, around 3 pairs/s. I saw that you have mentioned speed improvements in your todo, and if there is any progress, I will follow up promptly.

Why the homography matrix all elements are equal to ones?

I read database.db using pycolmap, but when I form two_view_geometry using two image ids, the homography matrix all elements equal to ones.

reconstruction= pycolmap.Database(database_path)
two_view_geometry= reconstruction.read_two_view_geometry(1, 2)
H = two_view_geometry.H

Warning loading EXIF

Extend warning description when EXIFs are not correctly imported.In any case, the warning does not affect the correct functioning of the software.

Removed "feature_path" and "im_path" from hdf5 feature file

When writing "features.h5" after the extraction, the ExtractorBase class was saving in the h5 file also "feature_path" and "im_path" as datatasets.
I commented it because it was leading to errors when not using matching by tiles.

Commented lines:

  1. extractor_base.py - extract(): ln. 149-150, ln. 158-159
  2. h5.py - get_features(): ln. 53-54, ln 58-59

How to define initial camera params

Hi,

First thank you for this awesome project !

I wonder if it is possible to set initial camera params in the cameras.yaml file ?
For example, if I define an OPENCV camera model, can I set initial fx, fy, cx,cy, k1, k2, p1 and p2 params ?

If they are guessed, how are they guessed ?

Do I need to manually update them in the database.db colmap file ? Because the column type is a blob and it might not be easy to do it on command line.

Thank you.

keep matching score/confidence (if available)

Now all the matcher classes return only the image coordinates of the matched keypoints. We should keep track also of the matching score/confidence/certainty (especially for dense/semi-dense matchers such as RoMa)

the Error when using 'loftr'

Hi, thank you for your solid work.
When I use 'loftr', will meet 'line 293, in _extract_by_tile, (kpts_full, feat_tile["keypoints"] + np.array(lim[0:2])), ValueError: operands could not be broadcast together with shapes (0,) (2,) '.
Could you give me some advice, thank you.

Running error

Hi,

After done installation by document,
I tried the first step to run help and got this error:
(Running on Win10)

(deep-image-matching) C:\Users\Up2U\Desktop\deep-image-matching\deep-image-matching>python main.py --help
*** Aborted at 1706143103 (unix time) try "date -d @1706143103" if you are using GNU date ***
    @     0x7ff9e6f10ef5 _seh_filter_exe
    @     0x7ff6187a2408 (unknown)
    @     0x7ff9e55de390 __C_specific_handler
    @     0x7ff9e98723af __chkstk
    @     0x7ff9e98214b4 RtlRaiseException
    @     0x7ff9e9870ebe KiUserExceptionDispatcher
    @     0x7ff9b45126de void __cdecl __ExceptionPtrRethrow(void const * __ptr64)
    @     0x7ff95e958f8e public: void __cdecl c10::ivalue::Future::markCompleted(void) __ptr64
    @     0x7ff95ece6b02 struct _object * __ptr64 __cdecl THPGenerator_initDefaultGenerator(struct at::Generator)
    @     0x7ff978e5de65 (unknown)
    @     0x7ff9793bd389 PyInit_pycolmap
    @     0x7ff9d2e11080 (unknown)
    @     0x7ff9d2e126b5 __NLG_Return2
    @     0x7ff9e9871716 RtlCaptureContext2
    @     0x7ff978e60961 (unknown)
    @     0x7ff99c98f0ee _PyArg_ParseTuple_SizeT
    @     0x7ff99c919b3d _PyObject_MakeTpCall
    @     0x7ff99caa2eb6 _PyErr_FormatFromCauseTstate
    @     0x7ff99c92b723 _PyObject_GenericGetAttrWithDict
    @     0x7ff99c92c280 PyObject_GetAttr
    @     0x7ff99c971229 PyObject_GetAttrString
    @     0x7ff978e96cae PyInit_pycolmap
    @     0x7ff978ef3796 PyInit_pycolmap
    @     0x7ff978ec9aad PyInit_pycolmap
    @     0x7ff978e854a3 (unknown)
    @     0x7ff978e91fc8 PyInit_pycolmap
    @     0x7ff978e91ace PyInit_pycolmap
    @     0x7ff99c94c53c PyImport_GetModuleDict
    @     0x7ff99c94c796 PyImport_GetModuleDict
    @     0x7ff99c94c6f1 PyImport_GetModuleDict
    @     0x7ff99c9242e7 PyType_GenericAlloc
    @     0x7ff99c9136e4 PyVectorcall_Call

Thank you.

Using COLMAP camera models in Deep Image Matching

Dear @lcmrl

First of all, I want to express my gratitude for the fantastic work you've been doing!

I am trying to use classical COLMAP camera models in Deep Image Matching. For instance i'm trying to use a fish-eye camera model.

Whenever I try any of the following models

SIMPLE_RADIAL_FISHEYE, RADIAL_FISHEYE, OPENCV_FISHEYE, FOV, THIN_PRISM_FISHEYE

The error message I receive is: RuntimeError: Invalid camera model RADIAL_FISHEYE. This suggests that the camera model I'm trying to use is not recognized by Deep Image Matching.

I've tried to change upper case with lower case and use the dash "-" instead of the underscore "_," but the error persists.

Could you please help me pass to Deep Image Matching the correct instruction?

Your guidance on this matter would be invaluable and greatly appreciated.

Some options not working

All local features work with TileSelection.PRESELECTION option in the config.py file a part for SuperPoint+SuperGlue and keynetaffnethardnet+kornia_matcher. TileSelection.NONE at the moment doesn't work with SuperPoint+LightGlue, DISK+LightGlue and ALIKED+LightGlue

matches with geometric verification?

hello, in clomap, after the feature matching , it will also undergo geometric verification to remove the outlier . I want to know whether it will also undergo geometric verification in deep-image-matching, thank you.

Improve Tiler with adaptive tile grid computation

Now you have to statically define the number of tiles and the Tiler compute the limits of the tiling grid. We should also give the possibility to set the tile length and compute the tiling grid accordingly and introduce an auto mode to automatically compute the tiling grid based on the available GPU memory and the chosen extractor/matcher approach.

e.g., use Kornia approaches for extracting patches https://kornia.readthedocs.io/en/latest/contrib.html#image-patches

Processing stucks after ~1000 images at BA

HI!

Thank you very much for a wonderfull job you did! I've tried to run a reconstruction
python ./main.py --config superpoint+lightglue --images images --outs out --strategy sequential --overlap 2 --force
and everything is fine when I run it for a dataset with <1000 images. However, I run it for a dataset with 2000 images it takes significantly more time for BA, especially after 1000 images.
I tried to lower the quality here "quality": Quality.HIGH -> "quality": Quality.LOW but got
2024-01-04 16:08:21 | [INFO ] Matching features...
2024-01-04 16:08:21 | [INFO ]
3%|█▉ | 114/4545 [00:37<23:58, 3.08it/s]
Traceback (most recent call last):
File "C:\Users\yaroslav\Desktop\deep-image-matching\main.py", line 405, in
main()
File "C:\Users\yaroslav\Desktop\deep-image-matching\main.py", line 238, in main
match_path = img_matching.match_pairs(feature_path)
File "C:\Users\yaroslav\Desktop\deep-image-matching\src\deep_image_matching\image_matching.py", line 311, in match_pairs
matches = self._matcher.match(
File "C:\Users\yaroslav\Desktop\deep-image-matching\src\deep_image_matching\matchers\matcher_base.py", line 279, in match
self._matches = self._match_by_tile(
File "C:\Users\yaroslav\Desktop\deep-image-matching\src\deep_image_matching\matchers\matcher_base.py", line 380, in _match_by_tile
correspondences = self._match_pairs(feats0_tile, feats1_tile)
File "C:\Users\yaroslav\anaconda3\envs\slam\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "C:\Users\yaroslav\Desktop\deep-image-matching\src\deep_image_matching\matchers\lightglue.py", line 71, in _match_pairs
match_res = self._matcher({"image0": feats0, "image1": feats1})
File "C:\Users\yaroslav\anaconda3\envs\slam\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\yaroslav\anaconda3\envs\slam\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Users\yaroslav\Desktop\deep-image-matching\src\deep_image_matching\thirdparty\LightGlue\lightglue\lightglue.py", line 463, in forward
return self._forward(data)
File "C:\Users\yaroslav\Desktop\deep-image-matching\src\deep_image_matching\thirdparty\LightGlue\lightglue\lightglue.py", line 529, in _forward
if self.check_if_stop(token0[..., :m, :], token1[..., :n, :], i, m + n):
File "C:\Users\yaroslav\Desktop\deep-image-matching\src\deep_image_matching\thirdparty\LightGlue\lightglue\lightglue.py", line 613, in check_if_stop
confidences = torch.cat([confidences0, confidences1], -1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 1 but got size 0 for tensor number 1 in the list.

What is the distance unit of the generated file?

I am using the output of deep-image-matching as the input of openMVS. When I get the camera pose and point cloud and try to calculate the distance from the camera to the point for further calculation, I find that I cannot know the unit of the distance. I raised the question in the issue of the openMVS project, and the maintainer told me that openMVS did not change the unit, and the unit was determined during SfM. So I am here to ask a question, how to determine the length unit of deep-image-matching output?

This is the link where I asked a question in openMVS:
cdcseacave/openMVS#1145

Remove unmactched features from the h5 file and from COLMAP database after the matching is completed

When using a dataset with a high number of images the features.h5 file and the COLMAP database can become very large as there will be a huge number of features, even though they have no matches (features.h5 can reach also tens of GB).
After the matching is concluded, the features with no matches should be deleted from the h5 file and from the COLMAP database (this can be done just before exporting the features from the h5 to the colmap databse).

Small question about camera model (multi focal length)

Hi, thanks for the great support for multi focal length, it works fine.
And I have some small questions about camera model part.

  1. Why does model simple-radial set default value K1=0.1?
    Meanwhile, model opencv sets default value K1=K2=0.
    https://github.com/3DOM-FBK/deep-image-matching/blob/master/src/deep_image_matching/io/h5_to_db.py#L159

  2. Manually editing cameras.yaml makes users can set everything, but it is not a easy usage when calculating large image set (>hundreds).
    Now I have written a small program to scan the file names in a folder.
    So my actually process is: 1. Put different focal length images in seperated sub-folders. 2. Run the scan program to get the file names in every sub-folders. 3. Move all the images in sub-folders to the images folder. 4. Edit cameras.yaml to fill in the file names.
    If ImageMatching class could scan sub-folders, it will be no need to do these steps. This makes all the images use a same camera model, which is not so flexible, but we can change it using COLMAP UI later.
    Of course, this is not a functional question, just for easy using for large data set.

Thank you.

cannot find file when run in Colab

hello, when I run [colab_run_from_bash_example.ipynb] in Colab, here is an error:

Snipaste_2024-04-05_16-51-52
Snipaste_2024-04-05_16-53-31
Snipaste_2024-04-05_16-54-43
As you can see, install deep-image-matching and run python3 deep-image-matching/main.py --help is OK,
but when I run
python3 ./deep-image-matching/main.py \ --dir ./deep-image-matching/assets/pytest \ --pipeline sift+kornia_matcher \ --skip_reconstruction
here is an error:

2024-04-05 09:03:55 | [INFO    ] Running image matching with the following configuration:
2024-04-05 09:03:55 | [INFO    ]   Image folder: deep-image-matching/assets/pytest/images
2024-04-05 09:03:55 | [INFO    ]   Output folder: deep-image-matching/assets/pytest/results_sift+kornia_matcher_matching_lowres_quality_high
2024-04-05 09:03:55 | [INFO    ]   Number of images: 3
2024-04-05 09:03:55 | [INFO    ]   Matching strategy: matching_lowres
2024-04-05 09:03:55 | [INFO    ]   Image quality: HIGH
2024-04-05 09:03:55 | [INFO    ]   Tile selection: NONE
2024-04-05 09:03:55 | [INFO    ]   Feature extraction method: sift
2024-04-05 09:03:55 | [INFO    ]   Matching method: kornia_matcher
2024-04-05 09:03:55 | [INFO    ]   Geometric verification: PYDEGENSAC
2024-04-05 09:03:55 | [INFO    ]   CUDA available: True
2024-04-05 09:03:55 | [INFO    ] Low resolution matching, generating pairs ..
Loaded SuperPoint model
2024-04-05 09:03:56 | [INFO    ] Extracting features from downsampled images...
2024-04-05 09:03:57 | [INFO    ] Matching downsampled images...
2024-04-05 09:03:58 | [INFO    ] Found 3 pairs.
2024-04-05 09:03:58 | [INFO    ] Extracting features with sift...
2024-04-05 09:03:58 | [INFO    ] sift configuration: 
{'name': 'sift'}
2024-04-05 09:04:00 | [INFO    ] Features extracted!
2024-04-05 09:04:00 | [INFO    ] Matching features with kornia_matcher...
2024-04-05 09:04:00 | [INFO    ] kornia_matcher configuration: 
{'match_mode': 'smnn', 'name': 'kornia_matcher', 'th': 0.85}
2024-04-05 09:04:00 | [INFO    ] Matching features...
2024-04-05 09:04:00 | [INFO    ] 
2024-04-05 09:04:00 | [WARNING ] Cannot find scores in deep-image-matching/assets/pytest/results_sift+kornia_matcher_matching_lowres_quality_high/features.h5
2024-04-05 09:04:00 | [WARNING ] Cannot find scores in deep-image-matching/assets/pytest/results_sift+kornia_matcher_matching_lowres_quality_high/features.h5
2024-04-05 09:04:00 | [WARNING ] Cannot find scores in deep-image-matching/assets/pytest/results_sift+kornia_matcher_matching_lowres_quality_high/features.h5
2024-04-05 09:04:00 | [WARNING ] Cannot find scores in deep-image-matching/assets/pytest/results_sift+kornia_matcher_matching_lowres_quality_high/features.h5
2024-04-05 09:04:00 | [WARNING ] Cannot find scores in deep-image-matching/assets/pytest/results_sift+kornia_matcher_matching_lowres_quality_high/features.h5
2024-04-05 09:04:00 | [WARNING ] Cannot find scores in deep-image-matching/assets/pytest/results_sift+kornia_matcher_matching_lowres_quality_high/features.h5
Downloading: "https://github.com/cvg/LightGlue/releases/download/v0.1_arxiv/superpoint_v1.pth" to /root/.cache/torch/hub/checkpoints/superpoint_v1.pth
100%|██████████| 4.96M/4.96M [00:00<00:00, 98.3MB/s]
Downloading: "https://github.com/cvg/LightGlue/releases/download/v0.1_arxiv/superpoint_lightglue.pth" to /root/.cache/torch/hub/checkpoints/superpoint_lightglue_v0-1_arxiv.pth
100%|██████████| 45.3M/45.3M [00:00<00:00, 226MB/s]
100%|██████████| 3/3 [00:00<00:00,  3.16it/s]
100%|██████████| 3/3 [00:00<00:00,  3.49it/s]
100%|██████████| 3/3 [00:01<00:00,  2.46it/s]
100%|██████████| 3/3 [00:01<00:00,  2.67it/s]
Traceback (most recent call last):
  File "/content/./deep-image-matching/main.py", line 58, in <module>
    with open(config.general["camera_options"], "r") as file:
FileNotFoundError: [Errno 2] No such file or directory: './config/cameras.yaml'
---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
[<ipython-input-5-935a973addd6>](https://localhost:8080/#) in <cell line: 1>()
----> 1 get_ipython().run_cell_magic('bash', '', 'python3 ./deep-image-matching/main.py \\\n  --dir ./deep-image-matching/assets/pytest \\\n  --pipeline sift+kornia_matcher \\\n  --skip_reconstruction\n')

4 frames
[/usr/local/lib/python3.10/dist-packages/google/colab/_shell.py](https://localhost:8080/#) in run_cell_magic(self, magic_name, line, cell)
    332     if line and not cell:
    333       cell = ' '
--> 334     return super().run_cell_magic(magic_name, line, cell)
    335 
    336 

[/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py](https://localhost:8080/#) in run_cell_magic(self, magic_name, line, cell)
   2471             with self.builtin_trap:
   2472                 args = (magic_arg_s, cell)
-> 2473                 result = fn(*args, **kwargs)
   2474             return result
   2475 

[/usr/local/lib/python3.10/dist-packages/IPython/core/magics/script.py](https://localhost:8080/#) in named_script_magic(line, cell)
    140             else:
    141                 line = script
--> 142             return self.shebang(line, cell)
    143 
    144         # write a basic docstring:

<decorator-gen-103> in shebang(self, line, cell)

[/usr/local/lib/python3.10/dist-packages/IPython/core/magic.py](https://localhost:8080/#) in <lambda>(f, *a, **k)
    185     # but it's overkill for just that one bit of state.
    186     def magic_deco(arg):
--> 187         call = lambda f, *a, **k: f(*a, **k)
    188 
    189         if callable(arg):

[/usr/local/lib/python3.10/dist-packages/IPython/core/magics/script.py](https://localhost:8080/#) in shebang(self, line, cell)
    243             sys.stderr.flush()
    244         if args.raise_error and p.returncode!=0:
--> 245             raise CalledProcessError(p.returncode, cell, output=out, stderr=err)
    246 
    247     def _run_script(self, p, cell, to_close):

CalledProcessError: Command 'b'python3 ./deep-image-matching/main.py \\\n  --dir ./deep-image-matching/assets/pytest \\\n  --pipeline sift+kornia_matcher \\\n  --skip_reconstruction\n'' returned non-zero exit status 1.

can you help me? thank you so much

No exif data available for image

when i run python main.py --dir assets/test --pipeline superpoint+lightglue,I always get this info on terminal :

2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000000.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000010.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000020.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000030.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000040.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000050.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000060.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000070.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000080.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000090.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000100.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000110.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000120.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000130.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000140.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000150.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000160.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000170.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000180.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000190.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000200.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000210.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000220.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000230.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000240.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000250.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000260.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000270.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000280.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000290.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000300.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000310.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000320.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000330.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000340.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000350.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000360.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000370.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000380.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000390.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000400.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000410.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000420.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000430.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000440.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000450.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000460.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000470.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000480.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000490.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000500.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000510.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000520.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000530.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000540.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000550.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000560.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000570.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000580.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000590.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000600.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000610.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000620.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000630.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000640.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000650.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000660.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000670.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000680.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000690.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000700.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000710.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000720.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000730.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000740.jpg (this will probably not affect the matching).
2024-05-28 13:46:09 | [INFO    ] No exif data available for image 86e0b31c214c0a2eb5d50b3ca395479c_000750.jpg (this will probably not affect the matching).

what's this message mean? and how to avoid it?

Will it affect the output?

thanks a lot.

Run error with custom images. Could not reconstruct any model!

I am getting the following error when I run on a pair of images. One is a regular rgb image another is the same image in lwir format.

(deep-image-matching) deep-image-matching % python3 main.py
--images ./images
--pipeline superpoint+superglue
PNG file does not have exif data.
2024-04-15 11:58:03 | [INFO ] No exif data available for image img01.jpg (this will probably not affect the matching).
PNG file does not have exif data.
2024-04-15 11:58:03 | [INFO ] No exif data available for image img02.jpg (this will probably not affect the matching).
Loaded SuperPoint model
Loaded SuperGlue model ("outdoor" weights)
2024-04-15 11:58:03 | [INFO ] Running image matching with the following configuration:
2024-04-15 11:58:03 | [INFO ] Image folder: images
2024-04-15 11:58:03 | [INFO ] Output folder: results_superpoint+superglue_matching_lowres_quality_high
2024-04-15 11:58:03 | [INFO ] Number of images: 2
2024-04-15 11:58:03 | [INFO ] Matching strategy: matching_lowres
2024-04-15 11:58:03 | [INFO ] Image quality: HIGH
2024-04-15 11:58:03 | [INFO ] Tile selection: NONE
2024-04-15 11:58:03 | [INFO ] Feature extraction method: superpoint
2024-04-15 11:58:03 | [INFO ] Matching method: superglue
2024-04-15 11:58:03 | [INFO ] Geometric verification: PYDEGENSAC
2024-04-15 11:58:03 | [INFO ] CUDA available: False
2024-04-15 11:58:03 | [INFO ] Low resolution matching, generating pairs ..
Loaded SuperPoint model
2024-04-15 11:58:03 | [INFO ] Extracting features from downsampled images...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:02<00:00, 1.13s/it]
2024-04-15 11:58:06 | [INFO ] Matching downsampled images...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 5.19it/s]
2024-04-15 11:58:06 | [INFO ] Found 0 pairs.
2024-04-15 11:58:06 | [INFO ] Extracting features with superpoint...
2024-04-15 11:58:06 | [INFO ] superpoint configuration:
{'keypoint_threshold': 0.0005,
'max_keypoints': 4096,
'name': 'superpoint',
'nms_radius': 3}
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:02<00:00, 1.47s/it]
2024-04-15 11:58:09 | [INFO ] Features extracted!
2024-04-15 11:58:09 | [INFO ] Matching features with superglue...
2024-04-15 11:58:09 | [INFO ] superglue configuration:
{'match_threshold': 0.3,
'name': 'superglue',
'sinkhorn_iterations': 100,
'weights': 'outdoor'}
2024-04-15 11:58:09 | [INFO ] Matching features...
2024-04-15 11:58:09 | [INFO ]
0it [00:00, ?it/s]
2024-04-15 11:58:09 | [WARNING ] Was not possible to load the first image to initialize cam0
2024-04-15 11:58:09 | [WARNING ] Was not possible to load the first image to initialize cam1
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 44.05it/s]
2024-04-15 11:58:09 | [INFO ] Using pycolmap version 0.6.1
2024-04-15 11:58:09 | [INFO ] Running 3D reconstruction...
I20240415 11:58:09.452909 10708766 misc.cc:198]

Loading database

I20240415 11:58:09.455094 10708766 database_cache.cc:54] Loading cameras...
I20240415 11:58:09.455137 10708766 database_cache.cc:64] 1 in 0.000s
I20240415 11:58:09.455160 10708766 database_cache.cc:72] Loading matches...
I20240415 11:58:09.455184 10708766 database_cache.cc:78] 0 in 0.000s
I20240415 11:58:09.455200 10708766 database_cache.cc:94] Loading images...
I20240415 11:58:09.455260 10708766 database_cache.cc:143] 2 in 0.000s (connected 0)
I20240415 11:58:09.455279 10708766 database_cache.cc:154] Building correspondence graph...
I20240415 11:58:09.455296 10708766 database_cache.cc:190] in 0.000s (ignored 0)
I20240415 11:58:09.455333 10708766 timer.cc:91] Elapsed time: 0.000 [minutes]
W20240415 11:58:09.455351 10708766 incremental_mapper.cc:349] No images with matches found in the database
2024-04-15 11:58:09 | [ERROR ] Could not reconstruct any model!
2024-04-15 11:58:09 | [ERROR ] Pycolmap reconstruction failed
2024-04-15 11:58:09 | [INFO ] [Timer] | [Deep Image Matching] generate_pairs=4.730, extract_features=2.933, matching=0.000, export_to_colmap=0.052, pycolmap reconstruction=0.007, Total execution=7.723

How to check the matching result?

Hi, I found some problem when processing my own data (large images).
When downsampled to 2K, position calcultion result is right. When downsampled to 2K, and processing with tiling preselection (tile_size is set to half of default, try_match_full_images set true), still OK.
But when downsampled to 4K, the result is wrong. When downsampled to 4K, and processing with tiling preselection (try_match_full_images set true or false both tested), still wrong.
It seems that processing of large images may have problem.

I guess if matching result is not good, and I want to debug this.
Now I can find image pairs with features in folder results_superpoint+lightglue_matching_lowres_quality_high/debug.
But there is no matching result for debug. I have read the documents and still do not know how to check the matching results.
Is there a way to check this result?

Update: I have found show_matches.py in the root folder, but I cannot run it as the usage.
Error message is:
ModuleNotFoundError: No module named 'cv2'
I have tried to run pip install opencv-python, and got message:

Requirement already satisfied: opencv-python in c:\users\up2u\miniconda3\envs\deep-image-matching\lib\site-packages (4.9.0.80)
Requirement already satisfied: numpy>=1.17.0 in c:\users\up2u\miniconda3\envs\deep-image-matching\lib\site-packages (from opencv-python) (1.26.3)

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.