Thinklab-SJTU / pygmtools

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

How do I use coordinate points in both images to discover subgraphs #61

Closed xielinzhen closed 1 year ago

xielinzhen commented 1 year ago

I have the coordinates of a feature point on a larger graph and the coordinates of a feature point on a smaller graph, how do I use those coordinates to detect the position of the smaller graph on the larger graph?

See the official document for example: https://pygmtools.readthedocs.io/en/latest/auto_examples/pytorch/plot_subgraphs_pytorch.html#sphx-glr-auto-examples-pytorch-plot-subgraphs-pytorch-py

In the example, I used a square matrix to generate the graph, but what I have now are coordinates [(x1,y1),(x2,y2)....] How should I generate a graph of these coordinate points and then make subgraph discovery

rogerwwww commented 1 year ago

Hi there, your next step is to build two graphs (especially the edges), then you will have two adjacency matrices and you can use pygm.util.build_aff_mat to formulate the GM problem.

There is no golden standard for this step because the problem setting may vary. One possible direction I could suggest is building graphs by Delaunay triangulation, and computing the edge weights as the distances between coordinates.

xielinzhen commented 1 year ago

Hi there, your next step is to build two graphs (especially the edges), then you will have two adjacency matrices and you can use pygm.util.build_aff_mat to formulate the GM problem.

There is no golden standard for this step because the problem setting may vary. One possible direction I could suggest is building graphs by Delaunay triangulation, and computing the edge weights as the distances between coordinates.

Thank you very much. Your reply is very helpful to me