Open Eming404 opened 2 weeks ago
from setuptools import setup from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import os.path as osp ROOT = osp.dirname(osp.abspath(file))
setup( name='gaussianpro', ext_modules=[ CUDAExtension('gaussianpro', include_dirs=['/home/ubuntu/anaconda3/envs/gaussianpro/include/opencv4', '/usr/local/cuda-11.3/include', '.'], library_dirs=['/home/ubuntu/anaconda3/envs/gaussianpro/lib'], libraries=['opencv_core', 'opencv_imgproc', 'opencv_highgui', 'opencv_imgcodecs'], sources=[ 'PatchMatch.cpp', 'Propagation.cu', 'pro.cpp' ], extra_compile_args={ 'cxx': ['-O3'], 'nvcc': ['-O3', '-gencode=arch=compute_75,code=sm_75', ] }), ], cmdclass={ 'build_ext' : BuildExtension } )
ImportError: /home/ubuntu/anaconda3/envs/gaussianpro/lib/python3.7/site-packages/gaussianpro.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2cv3MatC1Ev
Hi, the opencv library in setup.py is C++ version. So it could be installed by "conda install -c conda-forge opencv".
Thanks for your amazing works! I have some troubles in the environment. There was no error during installing the modules. But when I run demo.sh in youtube01, the error occurred and the training progress was terminated:
Then I debug the code and found the error was raised in the line 436 of utils/graphics_utils.py:
I guess there are some wrong configurations when I build the "gaussianpro" module.
Here is my configs:
I followed the readme to install those modules:
I modified the submodules/Propagation/setup.py as bellow:
It is strange that the building progress could not find my opencv and torch, so I add the path in my ~/.bashrc:
Then the gaussianpro was installed successfully.
I think there must be some error when I build the gaussianpro but I cannot fix it. Any help on this would be greatly appreciated.