zju3dv / GIFT

Code for "GIFT: Learning Transformation-Invariant Dense Visual Descriptors via Group CNNs" NeurIPS 2019

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running demo.py

BruceWANGDi opened this issue · comments

Hi, thank you for your sharing.
I try to run the demo.py. But there is an issue happened.
I just changed the images in folder 'image' to my own images, but the result just show the keypoint img(kps_img), and no any result about matching lines(gift_img & sup_img).
Could you tell me how to solve this issue? Or something I dismiss?
And another question is that:
Could you tell me about the right form of 'draw_keypoints' function? I prepared to change keypoints' color. My code is: "kps_img0=draw_keypoints(img0, kps0, (255,0,0), radius=4)", but it doesn't work.

Hi, the draw_keypoints takes 3 parameters. The "color" should be an uint8 NumPy array with size [pn, 3] where pn is the point number. You may check the codes in "utils/base_utils.py" to see how these functions work.

Thank you for your reply. I revise the key points color successfully. But I still can not show the matching line result graph.
The code 'plt.imshow(gift_img)' and 'plt.imshow(sup_img)' don't have any response.
Could you give me some advice to solve this problem?

You can try directly save the image by

from skimage.io import imsave
imsave('tmp.jpg',gift_img)

and then you can open the image directly to check whether the problem is caused by plt.
Maybe, you need to run

%matplotlib inline

so that the image will be shown on the page.