huxiaoling / imageseg-2.5d_topo Goto Github PK
View Code? Open in Web Editor NEWAnother implementation of topological loss
License: MIT License
Another implementation of topological loss
License: MIT License
Hi, @HuXiaoling ,
From your code main.py, a dataset called allen
is used. Could you provide the download link for this dataset?
Thanks~
Hi, Xiaoling
Thanks for your excellent work!
Hope there will be 3D tensorflow version of it.
Hi, @HuXiaoling
I found that it import PersistencePython. But it seems that it need to recompile PersistencePython.so?
How can I recompile this file? Could you please give me some details?
Many thanks!
Hi, @HuXiaoling ,
When running main.py, this line, requires the file "train-labels_thin.tif". Where could we download it?
Thanks!
Hi Hu,
I have read your paper (Topology-preserving Deep Image Segmentation).
I really appreciate your work.
Is this code repository for your paper?
Many thanks!
论文中提及为了让网络学习到更有意义的拓扑结构,在mask的周围添加了一圈黑色的边框(应该指的就是前景类的边框是么?)这一部分内容在这份代码里似乎并没有体现?其次,是否需要对原图也添加这样的边框呢?在betti number计算的代码中,我看到您在周围添加了一圈黑色边框,我不理解为什么在测试过程中计算betti error的时候也需要这样做
I am currently using pix2pix to deal with the problem of image segmentation. I want to add the topological loss to the loss of the generator. Does this apply to such a problem?
Hi, @HuXiaoling
I got some problems about the use for binary classification.
how to calculate the β-error metric?
Hello, I use a simple image to test the code as follows,
persistence_result = cubePers(np.reshape(f_padded, f_padded.size).tolist(), list(f_padded.shape), 0.001)
And I find the output (only one 1-dimension topology) is not the same as gudhi.CubicalComplex
(output 3 1-dimension topology). Are there any bugs in this repository?
By the way, I wonder the meaning of critical points, can you please explain critical points
and topology loss can be calculated without critical points?
Look forward to your reply.
Thank you!
Hello, thank you for your works!
can you write some comments on the Topoloss.py file? Since I am not very familiar with the calculation of PH, I hope you can write some notes.
When training, what's wrong with errors like that?
not scape per: 0.015384615384615385 loss_topo tensor(0., device='cuda:0', grad_fn=)
CE: 0.0009232205338776112 Topo: 0.0
row: 0 col: 0
torch.Size([65, 65])
dimension: 2
0 4761
1 9384
2 4624
reduced dimension 2
saved dimension 2
reduced dimension 1
saved dimension 1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Filtration building time = 0 Min
Reduction time = 0 Min
@@@@@@@@@@@@@@@@@@@@@@@@@@@@
All calculations computed in 0
Number of errors = 9384
If error happens, please contact the author.
(0,)
File "topoLoss.py", line 47, in getPers
pd_lh, bcp_lh, dcp_lh = compute_persistence_2DImg_1DHom_lh(likelihood)
File "TDFMain_pytorch.py", line 49, in compute_persistence_2DImg_1DHom_lh
dgm = persistence_result_filtered[:, 1:3]
IndexError: too many indices for array
Hello, Huxiaoling
Thank you for your works! This is a very innovative article.
My subject is cortical segmentation of healthy brains, and plan to use peresistent homoly to optimize it.
Your input is a picture, but my input is a graph (trisurf composed of vertex and triangle) in graph theory. I think you mentioned that using TopoLoss should be derived from the predicted likelihood map and GT to obtain the betti number using PH. What is the form of your likelihood map? The soft segmentation I get now is (10242, 36) the probability that each node (10242) belongs to each category (36). This form of TDA? Or use trisurf? And my GT is a one-hot form of (10242, 36), can PH be used in this form?
Secondly, for graph instead of image, what steps should be followed to get the betti number? I have consulted some documents, and I need to filter first, then how to set the filter value here? How big is a perfect threshold? If you don’t mind, I uploaded some pictures on github(https://github.com/tanjia123456/Brain), please help me to see if I can use PH for a post-processing
Finally, can you please share the following ideas or source code for your tploloss? I will only use it for academic research.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.