liuheng92 / tensorflow_PSENet

This is a tensorflow re-implementation of PSENet: Shape Robust Text Detection with Progressive Scale Expansion Network.My blog:
https://blog.csdn.net/liuxiaoheng1992/article/details/87646951
MIT License
490 stars 162 forks source link

tensorflow_PSENet-master/pse/pse.so: undefined symbol: _Py_ZeroStruct #48

Closed banbsyip closed 4 years ago

banbsyip commented 4 years ago

Traceback (most recent call last): File "eval.py", line 243, in tf.app.run() File "/home/sas/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "eval.py", line 202, in main boxes, kernels, timer = detect(seg_maps=seg_maps, timer=timer, image_w=w, image_h=h) File "eval.py", line 100, in detect mask_res, label_values = pse(kernals, min_area_thresh) File "/home/sas/桌面/tensorflow_PSENet-master/pse/init.py", line 18, in pse from .pse import pse_cpp ImportError: /home/sas/桌面/tensorflow_PSENet-master/pse/pse.so: undefined symbol: _Py_ZeroStruct

banbsyip commented 4 years ago

解决方法: 1,确保将pse目录下的pse.so删除掉, 2,python3的话,需将pse.makefile中修改下面代码: CXXFLAGS = -I include -std=c++11 -O3 $(shell python3.6-config --cflags) LDFLAGS = $(shell python3.6-config --ldflags) ubuntu系统执行下列指令: sudo apt install python3-dev 确保基于python3 3,用python3 eval.py执行py文件

lipeng1109 commented 3 years ago

我是换了一个pse.so可以了,怀疑是不是要重新生成pse.so才可以使用