Closed ducha-aiki closed 3 years ago
Allow pairwise methods like Patch2pix, loftr, etc for the stereo track.
One needs to save matching pairwise "keypoints" in h5 files in the following format:
src_pts, dst_pts = match_pairwise(img1, img2) keypoints['img1-img2'] = src_pts keypoints['img2-img1'] = dst_pts
So instead of the default version, where keypoints.h5 contains N items, one per image, now it should contain 2N(N-1) items, two per image pair.
keypoints.h5
The matches.h5 file should contain the indexes of the matching keypoints as usual, which in this case means [arange(num_kpts), arange(num_kpts)]
matches.h5
In the config.json, section config_common should contain the following entries:
config.json
config_common
"num_keypoints": -1, "pairwise_keypoints": true
This works only for stereo.
ToDo: update the ReadMe and tutorial example.
The valid example code is here: https://github.com/ducha-aiki/imc2021-sample-kornia-submission/blob/master/extract_loftr_matches.py
Allow pairwise methods like Patch2pix, loftr, etc for the stereo track.
One needs to save matching pairwise "keypoints" in h5 files in the following format:
So instead of the default version, where
keypoints.h5
contains N items, one per image, now it should contain 2N(N-1) items, two per image pair.The
matches.h5
file should contain the indexes of the matching keypoints as usual, which in this case means [arange(num_kpts), arange(num_kpts)]In the
config.json
, sectionconfig_common
should contain the following entries:This works only for stereo.