-
Notifications
You must be signed in to change notification settings - Fork 431
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
Question about m_kp1 and m_kp2 not being generated #310
Comments
Hi, maybe there are simply no keypoint detected. Did you visualize the images and the predictions of the network? |
|
Did you modify anything from the code online? |
Running the original code gave me the following two errors, so I made changes:
My solution: add it before the error reporting statement: keypoints=keypoints.astype(np.float32) Traceback (most recent call last): My solution: change "bf = cv2.BFMatcher(cv2.NORM_L2,crossCheck=True)" to "bf = cv2.BFMatcher(cv2.NORM_L2)" No other changes have been made. |
Hi, these changes should not be a problem in theory. So I don't know why you don't get keypoints on the second image. This is indeed a very weird behavior... You would need to debug yourself, by inspecting the data at different steps of the inference (e.g. visualize the keypoint probability map output by the network, print the number of keypoints at different stages, etc), to localize the part of the code where the keypoints are discarded (or whether the probability map is itself full of zeros). |
Hello, thank you very much for your guidance, your work has helped me a lot in my studies. When using pre-trained weights for image matching, the elements in out2[0] are all 0-valued, resulting in kp2 not being generated, why is this?
Traceback (most recent call last):
File "SuperPoint-master/SuperPoint-master/superpoint/match_features_demo.py", line 186, in
H, inliers = compute_homography(m_kp1, m_kp2)
File "SuperPoint-master/SuperPoint-master/superpoint/match_features_demo.py", line 65, in compute_homography
cv2.RANSAC)
cv2.error: OpenCV(3.4.2) /io/opencv/modules/calib3d/src/fundam.cpp:372: error: (-5:Bad argument) The input arrays should be 2D or 3D point sets in function 'findHomography'
The text was updated successfully, but these errors were encountered: