Thinklab-SJTU / pygmtools

A Python Graph Matching Toolkit.
https://pygmtools.readthedocs.io/
Other
294 stars 19 forks source link

connected matching nodes #97

Closed smujiang closed 7 months ago

smujiang commented 7 months ago

Hi, thanks for developing this wonderful tool. I'm working on mapping a subgraph to a whole graph. As showing in the figure, the topology/structure of the subgraph is very similar to the corresponding part of whole graph. So, the adjacent nodes in the subgraph should be mapped to the adjacent nodes in the whole graph as well. However, by mimicing the documented example , the best result I can get likes the figure pasted here. Could you recommend the best way to solve this issue? like, what node/edge features I'd better to provide, which solver I'd better to use and parameters I need to tune? image

rogerwwww commented 7 months ago

Hi Jun,

Thank you so much for using our toolkit.

Is the subgraph exactly the same as graph 2?

smujiang commented 7 months ago

Hi Jun,

Thank you so much for using our toolkit.

Is the subgraph exactly the same as graph 2?

Hi Runzhong, Thanks for your prompt response. Generally, I'm trying to use this tool for rigid image registration. Nodes in subgraph are key points from a image, Nodes in Graph 2 are key points from another image modality.
Subgraph is not necessarily the same as graph 2. Only in some extrem cases, the nodes in subgraph have one-on-one correspondence in graph 2. In most cases, the one-on-one correspondence is more than 90%.

rogerwwww commented 7 months ago

Thanks for the update. Image registration from different modalities is expected to be a challenging task, and my personal suggestion will be to try to include all the available node & edge features and tune the hyper-parameter of the affinity function (I assume you are using the Gaussian affinity function, so tune the sigma parameter)

It is also possible that the traditional affinity function does not have enough capacity, and you may refer to some deep graph matching methods in this repo. Those deep graph matching methods have been trained and validated on image matching tasks so they should be a good candidate for your task.

smujiang commented 7 months ago

Thank you so much for your recommendations. I will work on and ask if I have further questions.

rogerwwww commented 7 months ago

You are welcome. Feel free to reopen this issue / open another issue if there are any further questions.