Git Product home page Git Product logo

Comments (16)

zxytim avatar zxytim commented on July 24, 2024 20

I found the source of error: lanms is compiled against python3 by default. I'm using python3-config in Makefile.
You can use python3 or modify the Makefile to use python2-config instead. However, we suggest moving forward and use python3 if you can deal with your legacy python2 code.

from east.

zxytim avatar zxytim commented on July 24, 2024

from east.

ttywhu avatar ttywhu commented on July 24, 2024

I have installed python-dev, but the same error still occur.
And I use python-2.7

from east.

zxytim avatar zxytim commented on July 24, 2024

Have you tried to remove the .so? like
cd EAST/lanms && make clean && make
Also I've been using python3, here is the compilation command output by make:
g++ -o adaptor.so -I include -std=c++11 -O3 -I/usr/include/python3.5m -I/usr/include/python3.5m -Wno-unused-result -Wsign-compare -g -fstack-protector-strong -Wformat -Werror=format-security -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -L/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu -L/usr/lib -lpython3.5m -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions adaptor.cpp include/clipper/clipper.cpp --shared -fPIC

from east.

ttywhu avatar ttywhu commented on July 24, 2024

Thanks a lot. But there some warnings:
g++ -o adaptor.so -I include -std=c++11 -O3 -I/usr/include/python3.4m -I/usr/include/python3.4m -Wno-unused-result -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -L/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu -L/usr/lib -lpython3.4m -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions adaptor.cpp include/clipper/clipper.cpp --shared -fPIC
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from include/pybind11/pytypes.h:12:0,
from include/pybind11/cast.h:13,
from include/pybind11/attr.h:13,
from include/pybind11/pybind11.h:43,
from adaptor.cpp:1:
adaptor.cpp: In function ‘PyObject* PyInit_adaptor()’:
include/pybind11/common.h:232:20: warning: ‘PyObject* pybind11_init()’ is deprecated (declared at adaptor.cpp:53): PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE [-Wdeprecated-declarations]
return pybind11_init();
^
adaptor.cpp:53:1: note: in expansion of macro ‘PYBIND11_PLUGIN’
PYBIND11_PLUGIN(adaptor) {
^
include/pybind11/common.h:232:34: warning: ‘PyObject* pybind11_init()’ is deprecated (declared at adaptor.cpp:53): PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE [-Wdeprecated-declarations]
return pybind11_init();
^
adaptor.cpp:53:1: note: in expansion of macro ‘PYBIND11_PLUGIN’
PYBIND11_PLUGIN(adaptor) {
^
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
include/clipper/clipper.cpp: In member function ‘void ClipperLib::Clipper::FixupFirstLefts3(ClipperLib::OutRec*, ClipperLib::OutRec*)’:
include/clipper/clipper.cpp:3665:13: warning: unused variable ‘firstLeft’ [-Wunused-variable]
OutRec* firstLeft = ParseFirstLeft(outRec->FirstLeft);

And when I python eval.py --test_data_path=/home/nudt/EAST/EAST-master/demo_images/ --gpu_list=0 --checkpoint_path=/home/nudt/EAST/EAST-master/tmp/east_icdar2015_resnet_v1_50_rbox/ --output_path=/home/nudt/EAST/EAST-master/tmp/
this error is still exist: ImportError: /home/nudt/EAST/EAST-master/lanms/adaptor.so: undefined symbol: PyInstanceMethod_Type

from east.

ttywhu avatar ttywhu commented on July 24, 2024

When I change the lanms.merge_quadrangle_n9() in eval.py to nms_locality.nms_locality()
There's no error. But there is no result output

from east.

argman avatar argman commented on July 24, 2024

@ttywhu nms_locality.nms_locality() is a python implemention, its much slower than c++ code, if just want to test, you can use it, these two methods should provide the same result.

from east.

ttywhu avatar ttywhu commented on July 24, 2024

@zxytim I just cannot get the results of test.
python eval.py --test_data_path=/home/nudt/EAST/EAST-master/demo_images/ --gpu_list=0 --checkpoint_path=/home/nudt/EAST/EAST-master/tmp/east_icdar2015_resnet_v1_50_rbox/ --output_path=/home/nudt/EAST/EAST-master/demo_images/
make:进入目录'/home/nudt/EAST/EAST-master/lanms'
make: “adaptor.so”是最新的。
make:离开目录“/home/nudt/EAST/EAST-master/lanms”
('resnet_v1_50/block1', TensorShape([Dimension(None), Dimension(None), Dimension(None), Dimension(256)]))
('resnet_v1_50/block2', TensorShape([Dimension(None), Dimension(None), Dimension(None), Dimension(512)]))
('resnet_v1_50/block3', TensorShape([Dimension(None), Dimension(None), Dimension(None), Dimension(1024)]))
('resnet_v1_50/block4', TensorShape([Dimension(None), Dimension(None), Dimension(None), Dimension(2048)]))
Shape of f_0 (?, ?, ?, 2048)
Shape of f_1 (?, ?, ?, 512)
Shape of f_2 (?, ?, ?, 256)
Shape of f_3 (?, ?, ?, 64)
Shape of h_0 (?, ?, ?, 2048), g_0 (?, ?, ?, 2048)
Shape of h_1 (?, ?, ?, 128), g_1 (?, ?, ?, 128)
Shape of h_2 (?, ?, ?, 64), g_2 (?, ?, ?, 64)
Shape of h_3 (?, ?, ?, 32), g_3 (?, ?, ?, 32)
2017-08-26 15:43:11.632404: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-08-26 15:43:11.632425: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-08-26 15:43:11.632431: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-08-26 15:43:11.632436: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-08-26 15:43:11.632441: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
2017-08-26 15:43:11.740001: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:901] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2017-08-26 15:43:11.740283: I tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 0 with properties:
name: GeForce GTX 1060 6GB
major: 6 minor: 1 memoryClockRate (GHz) 1.7845
pciBusID 0000:01:00.0
Total memory: 5.92GiB
Free memory: 5.52GiB
2017-08-26 15:43:11.740305: I tensorflow/core/common_runtime/gpu/gpu_device.cc:908] DMA: 0
2017-08-26 15:43:11.740311: I tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 0: Y
2017-08-26 15:43:11.740318: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:01:00.0)
Restore from /home/nudt/EAST/EAST-master/tmp/east_icdar2015_resnet_v1_50_rbox/model.ckpt-14141
Find 2 images
32 text boxes before nms
/home/nudt/EAST/EAST-master/demo_images/Train1_30_ang6.jpg : net 481ms, restore 0ms, nms 1ms
[timing] 0.557929039001
0 text boxes before nms
/home/nudt/EAST/EAST-master/demo_images/img_30.jpg : net 456ms, restore 0ms, nms 0ms
[timing] 0.460167884827

But it returns no text of results.

from east.

argman avatar argman commented on July 24, 2024

@ttywhu do you retrain the model ? If not you can test your image in the online demo to see the result. If you train the model by yourself, please check you annotation to see its running correctly.

from east.

ttywhu avatar ttywhu commented on July 24, 2024

@argman I just use your model.could you tell me what makes this error?

from east.

argman avatar argman commented on July 24, 2024

@ttywhu can you give a sample of your test image ?

from east.

ttywhu avatar ttywhu commented on July 24, 2024

@argman I just test the training images of ICDAR2015

from east.

argman avatar argman commented on July 24, 2024

@ttywhu I don't know, whats your tensorflow version?

from east.

ttywhu avatar ttywhu commented on July 24, 2024

@argman my version is tensorflow_gpu-1.1.0

from east.

x2333 avatar x2333 commented on July 24, 2024

@ttywhu 结果可能保存在/tmp/ch4_test_images/images/下了 因为他的输出文件夹路径参数其实是output_dir而不是他readme里面写的output_path 所以结果保存到默认路径了

from east.

AaaGss avatar AaaGss commented on July 24, 2024

0 training images in /data/ocr/icdar2015/
这个是什么原因?怎么解决?

from east.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.