Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
prashkmr opened this issue Jan 5, 2023 · 0 comments
Open

Comments

@prashkmr
Copy link

prashkmr commented Jan 5, 2023

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant