HuXiaoling / TopoLoss

Code for the NeurIPS 2019 paper: Topology-Preserving Deep Image Segmentation
MIT License
146 stars 22 forks source link

from PersistencePython import cubePers 这里需要进行提前编译 PersistencePython.so 的吗 #11

Closed PhilChina closed 2 years ago

PhilChina commented 2 years ago

您好,我想问下这里的编译的具体过程:直接使用 sh compile_pers_lib.sh 就可以了吗? 是否还需要安装cmake、编译pybind11等操作;

还有这里的cubePers是为了计算持久图吗?我理解这里转成使用C++的代码来加速计算,我是否可以用 https://github.com/scikit-tda/persim来替代呢

PhilChina commented 2 years ago

因为,我在编译的时候,提示: pybind11-stable/include/pybind11/common.h:47:10: fatal error: Python.h: No such file or directory

include

缺少这个文件

HuXiaoling commented 2 years ago

You are right that cubePers is used to compute the persistence diagrams. You could use other libraries to replace cubePers. I would also recommend you to have a look at the more efficient version: https://github.com/HuXiaoling/TopoLoss/blob/master/topoloss_pytorch.py (use GUDHI library to compute the persistence diagrams.)

PhilChina commented 2 years ago

太感谢啦!