TopologyLayer icon indicating copy to clipboard operation
TopologyLayer copied to clipboard

What does this do intutively do wrt persistent Homology on images.

Open prashkmr opened this issue 2 years ago • 0 comments

I was going thorugth the examples and am anot able to understand what this code does on the ouptu t reocsntucted images and contributes to the topoloss. Can the authors shed light on this code and how it is used in the topological loss calculation.

''' Diagramlayer Toplevel Setup''' dtype=torch.float32 width, height = 28, 28 axis_x = np.arange(0, width) axis_y = np.arange(0, height) grid_axes = np.array(np.meshgrid(axis_x, axis_y)) grid_axes = np.transpose(grid_axes, (1, 2, 0)) from scipy.spatial import Delaunay tri = Delaunay(grid_axes.reshape([-1, 2])) faces = tri.simplices.copy() F = DiagramlayerToplevel().init_filtration(faces) diagramlayerToplevel = DiagramlayerToplevel.apply ''' '''

It is used with the generated image as : top_loss = top_batch_cost(gen_image, diagramlayerToplevel, F)

How to interpret this code and the implementation/

prashkmr avatar Jan 05 '23 05:01 prashkmr