PSENet icon indicating copy to clipboard operation
PSENet copied to clipboard

a problem about pse

Open huziling opened this issue 5 years ago • 16 comments

当我在编译 pse相关文件的时候遇到了这个报错 adaptor.cpp:35:86: error: ‘connectedComponents’ was not declared in this scope 我的环境中的opencv 分别是pip 安装的opencv-python 版本为4.0.0 和 4.1.0 gcc g++ 版本为5.4 请问这个问题是怎么回事呢? 是否需要安装低版本的opencv 或者是需要 从源码编译opencv @whai362

huziling avatar Apr 14 '19 09:04 huziling

i uninstall opencv 4.xx and try opencv 3.4.5 and it still not work

huziling avatar Apr 14 '19 11:04 huziling

i also try a opecv 3.1.0 and still not work . May you give me a adaptor.so. Thanks

huziling avatar Apr 14 '19 11:04 huziling

I met this too! Make sure your opencv in /usr/include/ dir or modify the Makefile to config your opencv. @ @huziling

JackLongKing avatar Apr 17 '19 09:04 JackLongKing

I met this too! Make sure your opencv in /usr/include/ dir or modify the Makefile to config your opencv. @ @huziling

my opencv is opencv-python, and i find lot`s of file like libopencvxxx.so in /usr/include/ i try pkg-config --cflags --libs opencv and the result is

-I/usr/include/opencv /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so -lopencv_calib3d /usr/lib/x86_64-linux-gnu/libopencv_contrib.so -lopencv_contrib /usr/lib/x86_64-linux-gnu/libopencv_core.so -lopencv_core /usr/lib/x86_64-linux-gnu/libopencv_features2d.so -lopencv_features2d /usr/lib/x86_64-linux-gnu/libopencv_flann.so -lopencv_flann /usr/lib/x86_64-linux-gnu/libopencv_gpu.so -lopencv_gpu /usr/lib/x86_64-linux-gnu/libopencv_highgui.so -lopencv_highgui /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so -lopencv_imgproc /usr/lib/x86_64-linux-gnu/libopencv_legacy.so -lopencv_legacy /usr/lib/x86_64-linux-gnu/libopencv_ml.so -lopencv_ml /usr/lib/x86_64-linux-gnu/libopencv_objdetect.so -lopencv_objdetect /usr/lib/x86_64-linux-gnu/libopencv_ocl.so -lopencv_ocl /usr/lib/x86_64-linux-gnu/libopencv_photo.so -lopencv_photo /usr/lib/x86_64-linux-gnu/libopencv_stitching.so -lopencv_stitching /usr/lib/x86_64-linux-gnu/libopencv_superres.so -lopencv_superres /usr/lib/x86_64-linux-gnu/libopencv_ts.so -lopencv_ts /usr/lib/x86_64-linux-gnu/libopencv_video.so -lopencv_video /usr/lib/x86_64-linux-gnu/libopencv_videostab.so -lopencv it`s seem my opencv is in /usr/include/ ,

thank for your reply, but i still can`t solve this problem

huziling avatar Apr 18 '19 03:04 huziling

if you only use opencv-python, maybe you can use pse module in python way offered by author. If you want to use pse module in C++, modify the Makefile, and my Makefile looks like: ` CXXFLAGS = -I include -std=c++11 -O3 -I/home/gulong/mylib/opencv_ruliang/include

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

OPENCV =-Wl,-rpath=/home/gulong/opencv_ruliang/lib/

LIB_SO = adaptor.so

$(LIB_SO): $(CXX_SOURCES) $(DEPS) $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(CXX_SOURCES) --shared -fPIC $(OPENCV)

clean: rm -rf $(LIB_SO) ` Modify the path of opencv, and make again. @ huziling

JackLongKing avatar Apr 18 '19 06:04 JackLongKing

Thanks for your help!!! I will try install opencv with source code

huziling avatar Apr 18 '19 11:04 huziling

当我在编译 pse相关文件的时候遇到了这个报错 adaptor.cpp:35:86: error: ‘connectedComponents’ was not declared in this scope 我的环境中的opencv 分别是pip 安装的opencv-python 版本为4.0.0 和 4.1.0 gcc g++ 版本为5.4 请问这个问题是怎么回事呢? 是否需要安装低版本的opencv 或者是需要 从源码编译opencv @whai362

Did you solve it ?

soldier828 avatar May 06 '19 12:05 soldier828

hi! 我最近下载了opencv的源码 并且make了 我下载的位置在 /mnt/3T/xxx/opencv 其中有 /mnt/3T/xxx/opencv/include 和 /mnt/3T/xxx/opencv/build/lib/ 这是是否意味着我应该修改Makefile 为: CXXFLAGS = -I include -std=c++11 -O3 -I /mnt/3T/xxx/opencv/include DEPS = lanms.h $(shell find include -xtype f) CXX_SOURCES = adaptor.cpp include/clipper/clipper.cpp OPENCV =-Wl,-rpath=/mnt/3T/xxx/opencv/build/lib/ LIB_SO = adaptor.so $(LIB_SO): $(CXX_SOURCES) $(DEPS) $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(CXX_SOURCES) --shared -fPIC $(OPENCV) clean: rm -rf $(LIB_SO) 我在尝试如此修改后 会提示 /bin/sh: 1: /mnt/3T/xxx/opencv/include: Permission denied /bin/sh: 1: /mnt/3T/xxx/opencv/build/lib/: Permission denied cc1plus: warning: adaptor.cpp: not a directory 并且在测试时会出现dynamic module does not define init function (initadaptor) 请问你有什么见解吗 @JackLongKing @whai362

huziling avatar May 10 '19 09:05 huziling

当我在编译 pse相关文件的时候遇到了这个报错 adaptor.cpp:35:86: error: ‘connectedComponents’ was not declared in this scope 我的环境中的opencv 分别是pip 安装的opencv-python 版本为4.0.0 和 4.1.0 gcc g++ 版本为5.4 请问这个问题是怎么回事呢? 是否需要安装低版本的opencv 或者是需要 从源码编译opencv @whai362

Did you solve it ? 我仍未解决这个问题,只能采用了另外一个使用python版 opencv的pse,虽然比起纯python的pse快,但是仍然达不到纯c++版本的速度

huziling avatar May 10 '19 09:05 huziling

@JackLongKing,我用你所提到,MAKE了OPENCV,然后Makefile如你所说修改,结果adaptor.so生成了。可是运行test_ic15.py的时候,又发生了错误: ImportError: ………………/PSENet/pse/adaptor.so: undefined symbol: _ZN2cv8fastFreeEPv 我是CUDA10,PYTHON2.7

duoduo1234 avatar May 24 '19 01:05 duoduo1234

@JackLongKing,我用你所提到,MAKE了OPENCV,然后Makefile如你所说修改,结果adaptor.so生成了。可是运行test_ic15.py的时候,又发生了错误: ImportError: ………………/PSENet/pse/adaptor.so: undefined symbol: _ZN2cv8fastFreeEPv 我是CUDA10,PYTHON2.7 我也遇到了这个问题,我最终的解决方法是删除了所有旧版本的opencv文件,将编译的opencv装进user/local 并写道全局路径中,然后不改动makefile

huziling avatar May 24 '19 02:05 huziling

@huziling 那你的FPS值正常吗?

duoduo1234 avatar May 24 '19 04:05 duoduo1234

font{
    line-height: 1.6;
}
ul,ol{
    padding-left: 20px;
    list-style-position: inside;
}




    我没有测试过,我试过另外一个版本的fps稍低于论文,理论上讲这个肯定比那个好
    

    
        
    


 

    
                
        
            
                
                        
                            
                        
                        
                            278820314
                        
                
                    
                        
                                [email protected]
                        
                    
            
        
    
    


    签名由
    网易邮箱大师
    定制



On 5/24/2019 12:18,duoduo1234<[email protected]> wrote: 

@huziling 那你的FPS值正常吗?

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.

huziling avatar May 24 '19 06:05 huziling

@JackLongKing,我用你所提到,MAKE了OPENCV,然后Makefile如你所说修改,结果adaptor.so生成了。可是运行test_ic15.py的时候,又发生了错误: ImportError: ………………/PSENet/pse/adaptor.so: undefined symbol: _ZN2cv8fastFreeEPv 我是CUDA10,PYTHON2.7

你好,你的问题解决了吗 我的情况和你一样

hetianduan avatar Aug 09 '19 09:08 hetianduan

try this.

  1. install opencv 3.4 from source
  2. modify pse/Makefile from OPENCV = pkg...blabla to OPENCV = -I/usr/local/include/opencv -I/usr/local/include -L/usr/local/lib64 -lopencv_dnn -lopencv_highgui -lopencv_ml -lopencv_objdetect -lopencv_stitching -lopencv_shape -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_videoio -lopencv_imgcodecs -lopencv_features2d -lopencv_video -lopencv_photo -lopencv_imgproc -lopencv_flann -lopencv_core
  3. at command line, export LD_LIBRARY_PATH=/usr/local/lib64
  4. then make (be sure that pse/adaptor.so does not exist. After the make you will have one.)

pilhoon avatar Sep 05 '19 08:09 pilhoon

@JackLongKing,我用你所提到,MAKE了OPENCV,然后Makefile如你所说修改,结果adaptor.so生成了。可是运行test_ic15.py的时候,又发生了错误: ImportError: ………………/PSENet/pse/adaptor.so: undefined symbol: _ZN2cv8fastFreeEPv 我是CUDA10,PYTHON2.7

你好,你的问题解决了吗 我的情况和你一样 我的问题和你们一样, 请问你们解决了没?

HongChow avatar May 16 '20 11:05 HongChow