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

Covisibility Matching 重建失败 #47

Open
Oreki718 opened this issue Jul 25, 2024 · 2 comments
Open

Covisibility Matching 重建失败 #47

Oreki718 opened this issue Jul 25, 2024 · 2 comments

Comments

@Oreki718
Copy link

Oreki718 commented Jul 25, 2024

大佬好,我在我自己的数据上尝试按照指示的方式进行基于 covisibility matching 的重建,结果显示重建失败。retrieval 文件已经按照 https://github.com/openxrlab/xrlocalization/blob/main/docs/en/tutorials/generate_image_pairs.md 进行了生成,并且在 retireval matching 成功生成了正确的重建效果。camera_colmap 由colmap重建校准生成,在 sequence 和 retrieval 下验证可用。

root@ea34e28b2deb:/home/xrsfm# ./bin/run_matching /home/xrsfm/data/IMG_0108/images/ /home/xrsfm/data/IMG_0108/pair.txt covisibility /home/xrsfm/data/IMG_0108/
Load Image Info Done.
Extract Features Done.
Load Retrieval Info Done.
matched image pairs: 843/893
Init Matching Done.
init: 843 893
////////Iter (0)/////////
frame number
cov_1: 275 cov_30: 193 cov_100:190
#covisiblity candidates: 826
#full candidates: 826
#filtered candidates: 826
matched image pairs: 1387/826
expansion: 826 1387 1719
precision: 80.6864
Time searching 0.138655s
Time matching 0.256098s
////////Iter (1)/////////
frame number
cov_1: 275 cov_30: 203 cov_100:199
#covisiblity candidates: 189
#full candidates: 189
#filtered candidates: 189
matched image pairs: 1446/189
expansion: 189 1446 1908
precision: 75.7862
Time searching 0.289261s
Time matching 0.389230s
////////Iter (2)/////////
frame number
cov_1: 275 cov_30: 257 cov_100:247
#covisiblity candidates: 399
#full candidates: 414
#filtered candidates: 414
matched image pairs: 1706/414
expansion: 414 1706 2322
precision: 73.4711
Time searching 0.449550s
Time matching 0.607309s
////////Iter (3)/////////
frame number
cov_1: 275 cov_30: 266 cov_100:259
#covisiblity candidates: 142
#full candidates: 142
#filtered candidates: 142
matched image pairs: 1720/142
expansion: 142 1720 2464
precision: 69.8052
Time searching 0.615087s
Time matching 0.729682s
////////Iter (4)/////////
frame number
cov_1: 275 cov_30: 274 cov_100:266
#covisiblity candidates: 82
#full candidates: 82
#filtered candidates: 82
matched image pairs: 1730/82
expansion: 82 1730 2546
precision: 67.9497
Time searching 0.780787s
Time matching 0.823036s
1.890187 s
root@ea34e28b2deb:/home/xrsfm# ./bin/run_reconstruction /home/xrsfm/data/IMG_0108/ /home/xrsfm/data/IMG_0108/camera_colmap.txt /home/xrsfm/data/IMG_0108/
Read Config Done!
ReadFramePairs
PreProcess Done!
Found Init Frame Pair -1 -1
276
Fail to Find Frame Pair!!!

调整初始pair后出错
root@ea34e28b2deb:/home/xrsfm# ./bin/run_reconstruction /home/xrsfm/data/IMG_0108/ /home/xrsfm/data/IMG_0108/camera_colmap.txt /home/xrsfm/data/IMG_0108/ 0 1
Read Config Done!
ReadFramePairs
PreProcess Done!
Init with Given Frames 0 1
NO SUCH FRAME PAIR
Found Init Frame Pair Done!
Initialize id1: 0 0001.png id2: 0 0001.png
Segmentation fault (core dumped)

@Oreki718
Copy link
Author

Debug了一下,发现covisibility matching 导出的 frame_pairs 数量为0
root@ea34e28b2deb:/home/xrsfm# ./bin/run_reconstruction /home/xrsfm/data/IMG_0108/ /home/xrsfm/data/IMG_0108/camera_colmap.txt /home/xrsfm/data/IMG_0108/ 0 1
Read Config Done!
ReadFramePairs
Number of frames: 276
Number of frame pairs: 0
PreProcess Done!
Init with Given Frames 0 1
NO SUCH FRAME PAIR
Found Init Frame Pair Done!
Initialize id1: 0 0001.png id2: 0 0001.png
Segmentation fault (core dumped)

@SueeH
Copy link

SueeH commented Feb 5, 2025

您好,请问上述问题解决了吗? @Oreki718
用官方给出的样例数据,跑sequential全部流程都正常,当时跑covisibility有同样的问题。

  1. 利用xrlocalization执行的结果如下:
  1. ./bin/run_matching /root/dataset/xrsfm_test_data/images/ /root/dataset/xrsfm_test_data/covisibility/pair.txt covisibility /root/dataset/xrsfm_test_data/covisibility/ 的结果:
    Load Image Info Done.
    Extract Features Done.
    Load Retrieval Info Done.
    matched image pairs: 1665/1665
    Init Matching Done.
    init: 1665 1665
    ////////Iter (0)/////////
    frame number
    cov_1: 540 cov_30: 540 cov_100:540
    #covisiblity candidates: 185
    #full candidates: 185
    #filtered candidates: 185
    matched image pairs: 1850/185
    expansion: 185 1850 1850
    precision: 100
    Time searching 2.839836s
    Time matching 0.336176s
    ////////Iter (1)/////////
    frame number
    cov_1: 540 cov_30: 540 cov_100:540
    #covisiblity candidates: 0
    #full candidates: 0
    #filtered candidates: 0
    matched image pairs: 1850/0
    expansion: 0 1850 1850
    precision: 100
    Time searching 5.789542s
    Time matching 0.696762s
    ////////Iter (2)/////////
    frame number
    cov_1: 540 cov_30: 540 cov_100:540
    #covisiblity candidates: 0
    #full candidates: 0
    #filtered candidates: 0
    matched image pairs: 1850/0
    expansion: 0 1850 1850
    precision: 100
    Time searching 8.734036s
    Time matching 1.017818s
    ////////Iter (3)/////////
    frame number
    cov_1: 540 cov_30: 540 cov_100:540
    #covisiblity candidates: 0
    #full candidates: 0
    #filtered candidates: 0
    matched image pairs: 1850/0
    expansion: 0 1850 1850
    precision: 100
    Time searching 11.694786s
    Time matching 1.394736s
    ////////Iter (4)/////////
    frame number
    cov_1: 540 cov_30: 540 cov_100:540
    #covisiblity candidates: 0
    #full candidates: 0
    #filtered candidates: 0
    matched image pairs: 1850/0
    expansion: 0 1850 1850
    precision: 100
    Time searching 14.653824s
    Time matching 1.780189s
    17.411080 s
  2. ./bin/run_reconstruction /root/dataset/xrsfm_test_data/covisibility/ /root/dataset/xrsfm_test_data/camera_colmap.txt /root/dataset/xrsfm_test_data/covisibility/ 0 1 的结果如下(其中内参是用测试代码重新生成的内参):
    Read Config Done!
    ReadFramePairs
    PreProcess Done!
    Found Init Frame Pair -1 -1
    540
    Fail to Find Frame Pair!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants