Open abhigoku10 opened 3 years ago
Hi @abhigoku10,
Using Open3D's lineset, we can visualize the graph. It allows you to specify a set of RGB points and lines between them. For example:
def show_graph(src_points, des_points, edges):
"""
:param src_points: [N, 3] src_points.
:param des_points: [N, 3] des_points.
:param edges: [M, 2],M pairs of connections src_points[edges[0]] -> des_points[edges[1]]
:return: None
"""
points = np.concatenate([src_points, des_points])
edges[:, 1] += src_points.shape[0]
line_set = open3d.LineSet()
line_set.points = open3d.Vector3dVector(points)
line_set.lines = open3d.Vector2iVector(edges)
# add color if wanted
# line_set.colors = np.zeros((edges.shape[0], 3), dtype=np.float32)
def custom_draw_geometry_load_option(geometry_list):
vis = open3d.Visualizer()
vis.create_window()
for geometry in geometry_list:
vis.add_geometry(geometry)
vis.run()
vis.destroy_window()
custom_draw_geometry_load_option([line_set])
The first layer work on an input graph (graphlevel0) which is between the input points and the downsampled points. We pool the features from the input points to the downsampled points. Next are the GNN iterations. Three iterations all work on the same graph (graph level 1), where the downsampled points are connected to each other.
@WeijingShi thanksfor sharing the source code i have a query 1.can we visualize the graph structure of PointGNN