Skip to content

Commit 6005b55

Browse files
Fixed keypoint pixel positions
1 parent 8d5b90a commit 6005b55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

patchnetvlad/models/local_matcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def calc_receptive_boxes(height, width):
5959
6060
Returns:
6161
rf_boxes: [N, 4] receptive boxes tensor. Here N equals to height x width.
62-
Each box is represented by [ymin, xmin, ymax, xmax].
62+
Each box is represented by [xmin, ymin, xmax, ymax].
6363
"""
6464

6565
rf, stride, padding = [196.0, 16.0, 90.0] # hardcoded for vgg-16 conv5_3
@@ -108,7 +108,7 @@ def calc_keypoint_centers_from_patches(config, patch_size_h, patch_size_w, strid
108108
for i in range(0, Hout, stride_h):
109109
for j in range(0, Wout, stride_w):
110110
keypoints[0, k] = ((boxes[j + (i * W), 0] + boxes[(j + (patch_size[1] - 1)) + (i * W), 2]) / 2)
111-
keypoints[1, k] = ((boxes[j + ((i + 1) * W), 1] + boxes[j + ((i + (patch_size[0] - 1)) * W), 3]) / 2)
111+
keypoints[1, k] = ((boxes[j + (i * W), 1] + boxes[j + ((i + (patch_size[0] - 1)) * W), 3]) / 2)
112112
indices[0, k] = j
113113
indices[1, k] = i
114114
k += 1

0 commit comments

Comments
 (0)