EAST icon indicating copy to clipboard operation
EAST copied to clipboard

Import error when trying eval.py

Open roger12337 opened this issue 5 years ago • 6 comments

I have got the error below when I try eval.py.

Find 5 images 194 text boxes before nms Traceback (most recent call last): File "eval.py", line 194, in tf.app.run() File "D:\Software\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run sys.exit(main(argv)) File "eval.py", line 160, in main boxes, timer = detect(score_map=score, geo_map=geometry, timer=timer) File "eval.py", line 98, in detect boxes = lanms.merge_quadrangle_n9(boxes.astype('float32'), nms_thres) File "D:\Tensorflow\text-detection\EAST-master\lanms_init.py", line 12, in merge_quadrangle_n9 from .adaptor import merge_quadrangle_n9 as nms_impl ImportError: DLL load failed: 找不到指定的模块。

It seems I do not import adaptor correctly. I have compiled lamns and adaptor.pyd is generated. I run in Win10 environment. Can anyone help me on this? Thanks a lot!

roger12337 avatar Feb 10 '19 12:02 roger12337

I encounter the same question, have you solved it? Thank you!!!!!!!!!!

JJuaner avatar Mar 09 '19 01:03 JJuaner

bump! anyone solved this yet?

AlexanderMakarov95 avatar Mar 13 '19 03:03 AlexanderMakarov95

Me also waiting for a life saver, and before that, using locality_aware_nms.py instead of lanms might be a sloowwwww solution

BYJRK avatar Mar 31 '19 12:03 BYJRK

in lanms/, edit the Makefile, and the script looks like:

CXXFLAGS = -I include  -std=c++11 -O3 $(shell python3-config --cflags)
LDFLAGS = $(shell python3-config --ldflags)

DEPS = lanms.h $(shell find include -xtype f)
CXX_SOURCES = adaptor.cpp include/clipper/clipper.cpp

...

Notice the $(shell python-config --cflags) at line 1. Try this command in your terminal, and you'll get information like:

-I/data/home/username/anaconda3/include/python3.7m -I/data/home/username/anaconda3/include/python3.7m  -Wno-unused-result -Wsign-compare -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe  -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -flto -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -DNDEBUG -fwrapv -O3 -Wall

Here, remove -fno-plt, -mtune=haswell, and paste the rest of information into Makefile and replace $(shell python3-config --cflags) at line 1 (line 2 doesn't really matter). Save and quit. I hope then you can make.

BYJRK avatar Apr 04 '19 07:04 BYJRK

I have same error, do you solve it?

KKDDD avatar Apr 22 '20 11:04 KKDDD

File "D:\Tensorflow\text-detection\EAST-master\lanms_init.py", line 12, in merge_quadrangle_n9 from .adaptor import merge_quadrangle_n9 as nms_impl ImportError: DLL load failed How can I solve it on windows 10?

soliddev66 avatar Jun 18 '21 08:06 soliddev66