Spaces:
Sleeping
Sleeping
Realcat
commited on
Commit
•
772e4c0
1
Parent(s):
ed0584b
add: wxbs examples
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitignore +1 -2
- common/app_class.py +1 -1
- common/utils.py +39 -6
- datasets/wxbs_benchmark/.EVD/EVD/1/adam.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/1/cafe.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/1/cat.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/1/dum.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/1/face.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/1/fox.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/1/girl.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/1/graf.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/1/grand.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/1/index.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/1/mag.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/1/pkk.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/1/shop.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/1/there.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/1/vin.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/adam.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/cafe.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/cat.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/dum.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/face.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/fox.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/girl.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/graf.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/grand.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/index.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/mag.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/pkk.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/shop.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/there.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/2/vin.png +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/adam.txt +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/cafe.txt +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/cat.txt +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/dum.txt +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/face.txt +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/fox.txt +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/girl.txt +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/graf.txt +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/grand.txt +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/index.txt +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/mag.txt +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/pkk.txt +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/shop.txt +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/there.txt +3 -0
- datasets/wxbs_benchmark/.EVD/EVD/h/vin.txt +3 -0
- datasets/wxbs_benchmark/.WxBS/v1.1/README.txt +47 -0
- datasets/wxbs_benchmark/.WxBS/v1.1/WGABS/.DS_Store +0 -0
.gitignore
CHANGED
@@ -18,5 +18,4 @@ gradio_cached_examples
|
|
18 |
hloc/matchers/quadtree.py
|
19 |
third_party/QuadTreeAttention
|
20 |
desktop.ini
|
21 |
-
experiments*
|
22 |
-
datasets/wxbs_benchmark
|
|
|
18 |
hloc/matchers/quadtree.py
|
19 |
third_party/QuadTreeAttention
|
20 |
desktop.ini
|
21 |
+
experiments*
|
|
common/app_class.py
CHANGED
@@ -197,7 +197,7 @@ class ImageMatchingApp:
|
|
197 |
cache_examples=False,
|
198 |
label=(
|
199 |
"Examples (click one of the images below to Run"
|
200 |
-
" Match)"
|
201 |
),
|
202 |
)
|
203 |
with gr.Accordion("Supported Algorithms", open=False):
|
|
|
197 |
cache_examples=False,
|
198 |
label=(
|
199 |
"Examples (click one of the images below to Run"
|
200 |
+
" Match). Thx: WxBS"
|
201 |
),
|
202 |
)
|
203 |
with gr.Accordion("Supported Algorithms", open=False):
|
common/utils.py
CHANGED
@@ -127,16 +127,29 @@ def gen_examples():
|
|
127 |
random.seed(1)
|
128 |
example_matchers = [
|
129 |
"disk+lightglue",
|
|
|
|
|
130 |
"loftr",
|
131 |
"disk",
|
|
|
132 |
"d2net",
|
|
|
133 |
"topicfm",
|
134 |
"superpoint+superglue",
|
135 |
-
"
|
136 |
-
"
|
|
|
137 |
]
|
138 |
|
139 |
-
def
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
imgs_list = [
|
141 |
os.path.join(path, file)
|
142 |
for file in os.listdir(path)
|
@@ -146,9 +159,28 @@ def gen_examples():
|
|
146 |
selected = random.sample(range(len(pairs)), count)
|
147 |
return [pairs[i] for i in selected]
|
148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
# image pair path
|
150 |
-
|
151 |
-
pairs
|
|
|
152 |
match_setting_threshold = DEFAULT_SETTING_THRESHOLD
|
153 |
match_setting_max_features = DEFAULT_SETTING_MAX_FEATURES
|
154 |
detect_keypoints_threshold = DEFAULT_DEFAULT_KEYPOINT_THRESHOLD
|
@@ -157,7 +189,8 @@ def gen_examples():
|
|
157 |
ransac_confidence = DEFAULT_RANSAC_CONFIDENCE
|
158 |
ransac_max_iter = DEFAULT_RANSAC_MAX_ITER
|
159 |
input_lists = []
|
160 |
-
|
|
|
161 |
input_lists.append(
|
162 |
[
|
163 |
pair[0],
|
|
|
127 |
random.seed(1)
|
128 |
example_matchers = [
|
129 |
"disk+lightglue",
|
130 |
+
"xfeat(sparse)",
|
131 |
+
"dedode",
|
132 |
"loftr",
|
133 |
"disk",
|
134 |
+
"roma",
|
135 |
"d2net",
|
136 |
+
"aspanformer",
|
137 |
"topicfm",
|
138 |
"superpoint+superglue",
|
139 |
+
"superpoint+lightglue",
|
140 |
+
"superpoint+mnn",
|
141 |
+
"disk",
|
142 |
]
|
143 |
|
144 |
+
def distribute_elements(A, B):
|
145 |
+
new_B = np.array(B, copy=True).flatten()
|
146 |
+
np.random.shuffle(new_B)
|
147 |
+
new_B = np.resize(new_B, len(A))
|
148 |
+
np.random.shuffle(new_B)
|
149 |
+
return new_B.tolist()
|
150 |
+
|
151 |
+
def gen_images_pairs(count: int = 5):
|
152 |
+
path = str(ROOT / "datasets/sacre_coeur/mapping")
|
153 |
imgs_list = [
|
154 |
os.path.join(path, file)
|
155 |
for file in os.listdir(path)
|
|
|
159 |
selected = random.sample(range(len(pairs)), count)
|
160 |
return [pairs[i] for i in selected]
|
161 |
|
162 |
+
def gen_image_pairs_wxbs(count: int = None):
|
163 |
+
prefix = "datasets/wxbs_benchmark/.WxBS/v1.1"
|
164 |
+
wxbs_path = ROOT / prefix
|
165 |
+
pairs = []
|
166 |
+
for catg in os.listdir(wxbs_path):
|
167 |
+
catg_path = wxbs_path / catg
|
168 |
+
if not catg_path.is_dir():
|
169 |
+
continue
|
170 |
+
for scene in os.listdir(catg_path):
|
171 |
+
scene_path = catg_path / scene
|
172 |
+
if not scene_path.is_dir():
|
173 |
+
continue
|
174 |
+
img1_path = scene_path / "01.png"
|
175 |
+
img2_path = scene_path / "02.png"
|
176 |
+
if img1_path.exists() and img2_path.exists():
|
177 |
+
pairs.append([str(img1_path), str(img2_path)])
|
178 |
+
return pairs
|
179 |
+
|
180 |
# image pair path
|
181 |
+
pairs = gen_images_pairs()
|
182 |
+
pairs += gen_image_pairs_wxbs()
|
183 |
+
|
184 |
match_setting_threshold = DEFAULT_SETTING_THRESHOLD
|
185 |
match_setting_max_features = DEFAULT_SETTING_MAX_FEATURES
|
186 |
detect_keypoints_threshold = DEFAULT_DEFAULT_KEYPOINT_THRESHOLD
|
|
|
189 |
ransac_confidence = DEFAULT_RANSAC_CONFIDENCE
|
190 |
ransac_max_iter = DEFAULT_RANSAC_MAX_ITER
|
191 |
input_lists = []
|
192 |
+
dist_examples = distribute_elements(pairs, example_matchers)
|
193 |
+
for pair, mt in zip(pairs, dist_examples):
|
194 |
input_lists.append(
|
195 |
[
|
196 |
pair[0],
|
datasets/wxbs_benchmark/.EVD/EVD/1/adam.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/1/cafe.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/1/cat.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/1/dum.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/1/face.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/1/fox.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/1/girl.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/1/graf.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/1/grand.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/1/index.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/1/mag.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/1/pkk.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/1/shop.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/1/there.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/1/vin.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/adam.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/cafe.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/cat.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/dum.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/face.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/fox.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/girl.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/graf.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/grand.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/index.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/mag.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/pkk.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/shop.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/there.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/2/vin.png
ADDED
Git LFS Details
|
datasets/wxbs_benchmark/.EVD/EVD/h/adam.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
-0.475719 0.28239 -808.118
|
2 |
+
-0.0337691 -2.62434 -12.0121
|
3 |
+
0.000234167 8.96558e-05 -2.96958
|
datasets/wxbs_benchmark/.EVD/EVD/h/cafe.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
-15.8525 20.632 -111.81
|
2 |
+
-0.866106 -0.309191 -335.089
|
3 |
+
0.00197221 0.00575211 -5.53643
|
datasets/wxbs_benchmark/.EVD/EVD/h/cat.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
-39.2129 0.823102 5118.35
|
2 |
+
1.39233 -0.138102 -1711.78
|
3 |
+
0.00592927 0.00421801 -11.1641
|
datasets/wxbs_benchmark/.EVD/EVD/h/dum.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
-0.778836 0.981896 -748.395
|
2 |
+
3.80065 -6.24622 -695.732
|
3 |
+
0.00344236 0.000197217 -4.13445
|
datasets/wxbs_benchmark/.EVD/EVD/h/face.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
-0.260478 -0.124431 -3232.91
|
2 |
+
-0.0968348 -2.12523 -254.238
|
3 |
+
4.85011e-05 -0.000178626 -4.2015
|
datasets/wxbs_benchmark/.EVD/EVD/h/fox.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
-1.39944 -4.86818 -1653
|
2 |
+
3.74922 -40.7447 2368.02
|
3 |
+
6.58821e-05 -0.016356 -6.58091
|
datasets/wxbs_benchmark/.EVD/EVD/h/girl.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
1.80543 -28.3029 -3740.88
|
2 |
+
1.55303 -18.1493 -474.282
|
3 |
+
0.00279485 -0.0334053 -4.76287
|
datasets/wxbs_benchmark/.EVD/EVD/h/graf.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
4.2714590e-01 -6.7181765e-01 4.5361534e+02
|
2 |
+
4.4106579e-01 1.0133230e+00 -4.6534569e+01
|
3 |
+
5.1887712e-04 -7.8853731e-05 1.0000000e+00
|
datasets/wxbs_benchmark/.EVD/EVD/h/grand.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
-0.964008 0.742193 -686.412
|
2 |
+
3.65869 -3.74358 -1880.34
|
3 |
+
0.00239552 0.000705499 -3.33892
|
datasets/wxbs_benchmark/.EVD/EVD/h/index.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
0.420191 -1.04493 1337.46
|
2 |
+
-2.95716 8.01143 1193.82
|
3 |
+
-0.00241706 -0.000152038 5.08127
|
datasets/wxbs_benchmark/.EVD/EVD/h/mag.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
-0.296887 -16.5762 4405.55
|
2 |
+
0.672497 0.906427 398.264
|
3 |
+
-0.000777876 0.00319639 3.31196
|
datasets/wxbs_benchmark/.EVD/EVD/h/pkk.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
-2.63017 -5.53715 -1101.86
|
2 |
+
-2.06413 -10.0132 1466.65
|
3 |
+
-0.00338896 -0.00999799 -2.34239
|
datasets/wxbs_benchmark/.EVD/EVD/h/shop.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
-0.0379327 -0.792592 -2778.33
|
2 |
+
2.80747 -11.5896 919.535
|
3 |
+
0.00281406 0.000153738 -8.54098
|
datasets/wxbs_benchmark/.EVD/EVD/h/there.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
0.314825 0.115834 690.506
|
2 |
+
0.175462 0.706365 14.4974
|
3 |
+
0.000267118 0.000126909 1.0
|
datasets/wxbs_benchmark/.EVD/EVD/h/vin.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
4.90207 -19.4931 2521.64
|
2 |
+
7.0392 -28.4826 5753.82
|
3 |
+
0.00953653 -0.0350753 4.24836
|
datasets/wxbs_benchmark/.WxBS/v1.1/README.txt
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Welcome to WxBS version 1.1 -- Wide (multiple) Baseline Dataset.
|
2 |
+
|
3 |
+
It contains 34 very challenging image pairs with manually annotated ground truth correspondences.
|
4 |
+
The images are organized into several categories:
|
5 |
+
|
6 |
+
- WGALBS: with Geometric, Appearance and iLlumination changes
|
7 |
+
- WGBS: with Geometric (viewpoint) changes
|
8 |
+
- WLABS: with iLlumination and Appearance changes. The viewpoint change is present, but not significant
|
9 |
+
- WGSBS: with Geometric and Sensor (thermal camera vs visible) changes
|
10 |
+
- WGABS: with Geometric and Appearance changes.
|
11 |
+
|
12 |
+
Compared to the original dataset from 2015, v.1.1 contains more correspondences, which are also cleaned, and 3 additional image pairs: WGALBS/kyiv_dolltheater, WGALBS/kyiv_dolltheater2, WGBS/kn-church.
|
13 |
+
We also provide cross-validation errors for each of the GT correspondences.
|
14 |
+
They are estimated in the following way:
|
15 |
+
|
16 |
+
- the fundamental matrix F is estimated with OpenCV 8pt algorithm (no RANSAC), using all points, except one.
|
17 |
+
F, _ = cv2.findFundamentalMat(corrs_cur[:,:2], corrs_cur[:,2:], cv2.FM_8POINT)
|
18 |
+
Then the symmetrical epipolar distance is calculatd on that held-out point. We have used kornia implementation of the symmetrical epipolar distance:
|
19 |
+
|
20 |
+
|
21 |
+
From Hartley and Zisserman, symmetric epipolar distance (11.10)
|
22 |
+
sed = (x'^T F x) ** 2 / (((Fx)_1**2) + (Fx)_2**2)) + 1/ (((F^Tx')_1**2) + (F^Tx')_2**2))
|
23 |
+
|
24 |
+
https://kornia.readthedocs.io/en/latest/geometry.epipolar.html#kornia.geometry.epipolar.symmetrical_epipolar_distance
|
25 |
+
|
26 |
+
|
27 |
+
The labeling is done using [pixelstitch](https://pypi.org/project/pixelstitch/)
|
28 |
+
|
29 |
+
There are main intended ways of using the dataset.
|
30 |
+
a) First, is evaluation of the image matchers, which are estimating fundamental matrix. One calculates reprojection error on the GT correspondences and report mean error, or the percentage of the GT correspondences, which are in agreement with the estimated F. For more details see the paper[1]
|
31 |
+
|
32 |
+
b) For the methods like [CoTR](https://arxiv.org/abs/2103.14167), which look for the correspondences in the image 2, given the query point in image 1, one can directly calculate error between returned point and GT correspondence.
|
33 |
+
|
34 |
+
|
35 |
+
***
|
36 |
+
If you are using this dataset, please cite us:
|
37 |
+
|
38 |
+
[1] WxBS: Wide Baseline Stereo Generalizations. D. Mishkin and M. Perdoch and J.Matas and K. Lenc. In Proc BMVC, 2015
|
39 |
+
|
40 |
+
@InProceedings{Mishkin2015WXBS,
|
41 |
+
author = {{Mishkin}, D. and {Matas}, J. and {Perdoch}, M. and {Lenc}, K. },
|
42 |
+
booktitle = {Proceedings of the British Machine Vision Conference},
|
43 |
+
publisher = {BMVA},
|
44 |
+
title = "{WxBS: Wide Baseline Stereo Generalizations}",
|
45 |
+
year = 2015,
|
46 |
+
month = sep
|
47 |
+
}
|
datasets/wxbs_benchmark/.WxBS/v1.1/WGABS/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|