xiaofengShi / CHINESE-OCR

[python3.6] 运用tf实现自然场景文字检测,keras/pytorch实现ctpn+crnn+ctc实现不定长场景文字OCR识别
2.92k stars 964 forks source link

ImportError: cannot import name 'cython_nms' #131

Open qingqing625 opened 4 years ago

qingqing625 commented 4 years ago

D:\Anaconda3\python.exe D:/PycharmProjects/CHINESE-OCR/demo.py Using TensorFlow backend. Traceback (most recent call last): File "D:/PycharmProjects/CHINESE-OCR/demo.py", line 8, in import model File "D:\PycharmProjects\CHINESE-OCR\model.py", line 15, in from ctpn.text_detect import text_detect File "D:\PycharmProjects\CHINESE-OCR\ctpn\text_detect.py", line 3, in from .ctpn.detectors import TextDetector File "D:\PycharmProjects\CHINESE-OCR\ctpn\ctpn\detectors.py", line 10, in from ..lib.fast_rcnn.nms_wrapper import nms File "D:\PycharmProjects\CHINESE-OCR\ctpn\lib__init.py", line 1, in from . import fast_rcnn File "D:\PycharmProjects\CHINESE-OCR\ctpn\lib\fast_rcnn__init__.py", line 2, in from . import nms_wrapper File "D:\PycharmProjects\CHINESE-OCR\ctpn\lib\fast_rcnn\nms_wrapper.py", line 2, in from ..utils.cython_nms import nms as cython_nms File "D:\PycharmProjects\CHINESE-OCR\ctpn\lib\utils\init__.py", line 10, in from . import cython_nms ImportError: cannot import name 'cython_nms'

路径都是对的,也试过把相对路径改为绝对路径,还是无法导入。请问这是什么原因?该怎么修改?求指点

xiaokecui commented 4 years ago

D:\Anaconda3\python.exe D:/PycharmProjects/CHINESE-OCR/demo.py Using TensorFlow backend. Traceback (most recent call last): File "D:/PycharmProjects/CHINESE-OCR/demo.py", line 8, in import model File "D:\PycharmProjects\CHINESE-OCR\model.py", line 15, in from ctpn.text_detect import text_detect File "D:\PycharmProjects\CHINESE-OCR\ctpn\text_detect.py", line 3, in from .ctpn.detectors import TextDetector File "D:\PycharmProjects\CHINESE-OCR\ctpn\ctpn\detectors.py", line 10, in from ..lib.fast_rcnn.nms_wrapper import nms File "D:\PycharmProjects\CHINESE-OCR\ctpn\libinit.py", line 1, in from . import fast_rcnn File "D:\PycharmProjects\CHINESE-OCR\ctpn\lib\fast_rcnninit.py", line 2, in from . import nms_wrapper File "D:\PycharmProjects\CHINESE-OCR\ctpn\lib\fast_rcnn\nms_wrapper.py", line 2, in from ..utils.cython_nms import nms as cython_nms File "D:\PycharmProjects\CHINESE-OCR\ctpn\lib\utilsinit.py", line 10, in from . import cython_nms ImportError: cannot import name 'cython_nms'

路径都是对的,也试过把相对路径改为绝对路径,还是无法导入。请问这是什么原因?该怎么修改?求指点

你好,我也遇到了这个问题,想问你解决了吗

zhuzhengxiong commented 4 years ago

ImportError: cannot import name 'cython_nms'