text-detection-ctpn icon indicating copy to clipboard operation
text-detection-ctpn copied to clipboard

run demo.py, an error occured!

Open hsyy673150343 opened this issue 4 years ago • 5 comments

Traceback (most recent call last): File "/home/hs/PycharmProjects/text-detection-ctpn/main/demo.py", line 12, in from nets import model_train as model File "/home/hs/PycharmProjects/text-detection-ctpn/nets/model_train.py", line 2, in from tensorflow.contrib import slim ImportError: cannot import name 'slim'

hsyy673150343 avatar Apr 08 '20 07:04 hsyy673150343

what is your tensorflow version ? try use tensorflow==1.15 , i think it is the most stable and compatible version

Mohamed209 avatar Apr 08 '20 13:04 Mohamed209

Traceback (most recent call last): File "demo.py", line 12, in from nets import model_train as model ModuleNotFoundError: No module named 'nets'

sevany avatar Apr 16 '20 06:04 sevany

@sevany make sure you run the file demo from project root

Python ./main/demo.py

Mohamed209 avatar Apr 16 '20 08:04 Mohamed209

root@test:~/text-detection-ctpn# python2 ./main/demo.py Traceback (most recent call last): File "./main/demo.py", line 12, in from nets import model_train as model File "/root/text-detection-ctpn/nets/model_train.py", line 5, in from utils.rpn_msr.anchor_target_layer import anchor_target_layer as anchor_target_layer_py ImportError: No module named utils.rpn_msr.anchor_target_layer

yujmo avatar Apr 18 '20 14:04 yujmo

@yujmo nms and bbox utils are written in cython, hence you have to build the scripts first have you built them cd utils/bbox

chmod +x make.sh

./make.sh

Mohamed209 avatar Apr 19 '20 20:04 Mohamed209