cherubicxn / afm_cvpr2019 Goto Github PK
View Code? Open in Web Editor NEWOfficial implementation of paper "Learning Attraction Field Map for Robust Line Segment Detection" (CVPR 2019)
License: MIT License
Official implementation of paper "Learning Attraction Field Map for Robust Line Segment Detection" (CVPR 2019)
License: MIT License
Hi, I also met the same problem.
And when I run make under <AFM_root>/lib, my output has this error:
"error: command 'g++' failed with exit status 1"
Does it mean make is not successful and cause the subsequent problem?
Originally posted by @ShidiDaisy in #4 (comment)
when I run "python train.py --config-file experiments/afm_atrous.yaml --gpu 0"
it shows that "Constructing DeepLabv3+ model...
Number of output channels: 2
Output stride: 16
Number of Input Channels: 3
Training AT epoch = 1
current learning rate = [0.01]
/home/zgz/anaconda3/envs/afm/lib/python3.5/site-packages/torch/nn/functional.py:2457: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.")
Traceback (most recent call last):
File "train.py", line 38, in
system.train(cfg, args.epoch)
File "/home/zgz/Documents/catkin_ws/cvpr2019_line_detector/afm_cvpr2019/modeling/afm.py", line 117, in train
avgLoss = step(epoch)
File "/home/zgz/Documents/catkin_ws/cvpr2019_line_detector/afm_cvpr2019/modeling/afm.py", line 94, in step
loss.backward()
File "/home/zgz/anaconda3/envs/afm/lib/python3.5/site-packages/torch/tensor.py", line 107, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/zgz/anaconda3/envs/afm/lib/python3.5/site-packages/torch/autograd/init.py", line 93, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: cuDNN error: CUDNN_STATUS_EXECUTION_FAILED
"
why ?
I appreciate your favor
I followed your steps in INSTALL.md, but I met the error above every time. Could you tell me what the problem and what I should do? A thousand thanks for your help!
My installation procedures:
(base) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master# conda create --name afm python=3.5
Collecting package metadata: done
Solving environment: done
environment location: /home/mq/anaconda3/envs/afm
added / updated specs:
- python=3.5
The following NEW packages will be INSTALLED:
ca-certificates pkgs/main/linux-64::ca-certificates-2019.1.23-0
certifi pkgs/main/linux-64::certifi-2018.8.24-py35_1
libedit pkgs/main/linux-64::libedit-3.1.20181209-hc058e9b_0
libffi pkgs/main/linux-64::libffi-3.2.1-hd88cf55_4
libgcc-ng pkgs/main/linux-64::libgcc-ng-8.2.0-hdf63c60_1
libstdcxx-ng pkgs/main/linux-64::libstdcxx-ng-8.2.0-hdf63c60_1
ncurses pkgs/main/linux-64::ncurses-6.1-he6710b0_1
openssl pkgs/main/linux-64::openssl-1.0.2r-h7b6447c_0
pip pkgs/main/linux-64::pip-10.0.1-py35_0
python pkgs/main/linux-64::python-3.5.6-hc3d631a_0
readline pkgs/main/linux-64::readline-7.0-h7b6447c_5
setuptools pkgs/main/linux-64::setuptools-40.2.0-py35_0
sqlite pkgs/main/linux-64::sqlite-3.27.2-h7b6447c_0
tk pkgs/main/linux-64::tk-8.6.8-hbc83047_0
wheel pkgs/main/linux-64::wheel-0.31.1-py35_0
xz pkgs/main/linux-64::xz-5.2.4-h14c3975_4
zlib pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
# $ conda activate afm
#
# To deactivate an active environment, use
#
# $ conda deactivate
(base) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master# conda activate afm
(afm) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master# pip install -r requirements.txt
Collecting yacs (from -r requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/2f/51/9d613d67a8561a0cdf696c3909870f157ed85617fea3cff769bb7de09ef7/yacs-0.1.6-py3-none-any.whl
Collecting cython (from -r requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/c2/34/99ced126b3f41a908d8883570a67fbf900f10eea3cfdd11e388eb8ae9aac/Cython-0.29.6-cp35-cp35m-manylinux1_x86_64.whl
Collecting matplotlib (from -r requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/89/61/465fb3bfba684b0f53b5c4829c3c89e86e6fe9fdcdfda93e38f1788090f0/matplotlib-3.0.3-cp35-cp35m-manylinux1_x86_64.whl
Collecting tqdm (from -r requirements.txt (line 4))
Using cached https://files.pythonhosted.org/packages/6c/4b/c38b5144cf167c4f52288517436ccafefe9dc01b8d1c190e18a6b154cd4a/tqdm-4.31.1-py2.py3-none-any.whl
Collecting scikit-image (from -r requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/82/73/4fbb789c741daf2530a96c74d37f2143162c30d512e68ac6cf3bbb9bf3dc/scikit_image-0.14.2-cp35-cp35m-manylinux1_x86_64.whl
Collecting opencv-python (from -r requirements.txt (line 6))
Using cached https://files.pythonhosted.org/packages/59/de/208f66a8f57a8b32536c5f7ca5e883cb15ddae8032164ea192fa103d50f6/opencv_python-4.0.0.21-cp35-cp35m-manylinux1_x86_64.whl
Collecting PyYAML (from yacs->-r requirements.txt (line 1))
Collecting kiwisolver>=1.0.1 (from matplotlib->-r requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/7e/31/d6fedd4fb2c94755cd101191e581af30e1650ccce7a35bddb7930fed6574/kiwisolver-1.0.1-cp35-cp35m-manylinux1_x86_64.whl
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 (from matplotlib->-r requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/de/0a/001be530836743d8be6c2d85069f46fecf84ac6c18c7f5fb8125ee11d854/pyparsing-2.3.1-py2.py3-none-any.whl
Collecting numpy>=1.10.0 (from matplotlib->-r requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/e3/18/4f013c3c3051f4e0ffbaa4bf247050d6d5e527fe9cb1907f5975b172f23f/numpy-1.16.2-cp35-cp35m-manylinux1_x86_64.whl
Collecting python-dateutil>=2.1 (from matplotlib->-r requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Collecting cycler>=0.10 (from matplotlib->-r requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/f7/d2/e07d3ebb2bd7af696440ce7e754c59dd546ffe1bbe732c8ab68b9c834e61/cycler-0.10.0-py2.py3-none-any.whl
Collecting cloudpickle>=0.2.1 (from scikit-image->-r requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/47/d5/efa7cacef5d3bdcd71d7053a698fb9b64a20fff5cb3c592efefa53ea5578/cloudpickle-0.8.0-py2.py3-none-any.whl
Collecting dask[array]>=1.0.0 (from scikit-image->-r requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/b9/bc/0d747625c18397ed548c7890bf984a40d931b9ebac236c570a07565b0cc8/dask-1.1.4-py2.py3-none-any.whl
Collecting six>=1.10.0 (from scikit-image->-r requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting pillow>=4.3.0 (from scikit-image->-r requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/8b/e9/5c47710fe383f0582da668302a80a6355fe15c2ce2dde89b50fe34acefa6/Pillow-5.4.1-cp35-cp35m-manylinux1_x86_64.whl
Collecting networkx>=1.8 (from scikit-image->-r requirements.txt (line 5))
Collecting PyWavelets>=0.4.0 (from scikit-image->-r requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/74/58/962c64db493e164ad46dc862bdffd823037536f2884f1c59be442f06a42d/PyWavelets-1.0.2-cp35-cp35m-manylinux1_x86_64.whl
Collecting scipy>=0.17.0 (from scikit-image->-r requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/f0/30/526bee2ce18c066f9ff13ba89603f6c2b96c9fd406b57a21a7ba14bf5679/scipy-1.2.1-cp35-cp35m-manylinux1_x86_64.whl
Requirement already satisfied: setuptools in /home/mq/anaconda3/envs/afm/lib/python3.5/site-packages (from kiwisolver>=1.0.1->matplotlib->-r requirements.txt (line 3)) (40.2.0)
Collecting toolz>=0.7.3; extra == "array" (from dask[array]>=1.0.0->scikit-image->-r requirements.txt (line 5))
Collecting decorator>=4.3.0 (from networkx>=1.8->scikit-image->-r requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/f1/cd/7c8240007e9716b14679bc217a1baefa4432aa30394f7e2ec40a52b1a708/decorator-4.3.2-py2.py3-none-any.whl
Installing collected packages: PyYAML, yacs, cython, kiwisolver, pyparsing, numpy, six, python-dateutil, cycler, matplotlib, tqdm, cloudpickle, toolz, dask, pillow, decorator, networkx, PyWavelets, scipy, scikit-image, opencv-python
Successfully installed PyWavelets-1.0.2 PyYAML-5.1 cloudpickle-0.8.0 cycler-0.10.0 cython-0.29.6 dask-1.1.4 decorator-4.3.2 kiwisolver-1.0.1 matplotlib-3.0.3 networkx-2.2 numpy-1.16.2 opencv-python-4.0.0.21 pillow-5.4.1 pyparsing-2.3.1 python-dateutil-2.8.0 scikit-image-0.14.2 scipy-1.2.1 six-1.12.0 toolz-0.9.0 tqdm-4.31.1 yacs-0.1.6
You are using pip version 10.0.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(afm) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master# conda install pytorch torchvision cudatoolkit=9.0 -c pytorch
Collecting package metadata: done
Solving environment: done
## Package Plan ##
environment location: /home/mq/anaconda3/envs/afm
added / updated specs:
- cudatoolkit=9.0
- pytorch
- torchvision
The following NEW packages will be INSTALLED:
blas pkgs/main/linux-64::blas-1.0-mkl
cffi pkgs/main/linux-64::cffi-1.11.5-py35he75722e_1
cudatoolkit pkgs/main/linux-64::cudatoolkit-9.0-h13b8566_0
freetype pkgs/main/linux-64::freetype-2.9.1-h8a8886c_1
intel-openmp pkgs/main/linux-64::intel-openmp-2019.1-144
jpeg pkgs/main/linux-64::jpeg-9b-h024ee3a_2
libgfortran-ng pkgs/main/linux-64::libgfortran-ng-7.3.0-hdf63c60_0
libpng pkgs/main/linux-64::libpng-1.6.36-hbc83047_0
libtiff pkgs/main/linux-64::libtiff-4.0.10-h2733197_2
mkl pkgs/main/linux-64::mkl-2018.0.3-1
mkl_fft pkgs/main/linux-64::mkl_fft-1.0.6-py35h7dd41cf_0
mkl_random pkgs/main/linux-64::mkl_random-1.0.1-py35h4414c95_1
ninja pkgs/main/linux-64::ninja-1.8.2-py35h6bb024c_1
numpy pkgs/main/linux-64::numpy-1.15.2-py35h1d66e8a_0
numpy-base pkgs/main/linux-64::numpy-base-1.15.2-py35h81de0dd_0
olefile pkgs/main/linux-64::olefile-0.46-py35_0
pillow pkgs/main/linux-64::pillow-5.2.0-py35heded4f4_0
pycparser pkgs/main/linux-64::pycparser-2.19-py35_0
pytorch pytorch/linux-64::pytorch-1.0.1-py3.5_cuda9.0.176_cudnn7.4.2_2
six pkgs/main/linux-64::six-1.11.0-py35_1
torchvision pytorch/noarch::torchvision-0.2.2-py_3
zstd pkgs/main/linux-64::zstd-1.3.7-h0b5b093_0
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(afm) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master# cd lib
(afm) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master/lib# make
cd afm_op; python setup.py build_ext --inplace; rm -rf build; cd ../../
/home/mq/anaconda3/envs/afm/lib/python3.5/distutils/extension.py:132: UserWarning: Unknown Extension options: 'defined_macros'
warnings.warn(msg)
running build_ext
building 'CUDA' extension
creating build
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/cuda
gcc -pthread -B /home/mq/anaconda3/envs/afm/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include/torch/csrc/api/include -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include/TH -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/mq/anaconda3/envs/afm/include/python3.5m -c ./vision.cpp -o build/temp.linux-x86_64-3.5/./vision.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=CUDA -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/usr/local/cuda/bin/nvcc -I. -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include/torch/csrc/api/include -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include/TH -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/mq/anaconda3/envs/afm/include/python3.5m -c ./cuda/afm.cu -o build/temp.linux-x86_64-3.5/./cuda/afm.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=CUDA -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
creating build/lib.linux-x86_64-3.5
g++ -pthread -shared -L/home/mq/anaconda3/envs/afm/lib -B /home/mq/anaconda3/envs/afm/compiler_compat -Wl,-rpath=/home/mq/anaconda3/envs/afm/lib,--no-as-needed build/temp.linux-x86_64-3.5/./vision.o build/temp.linux-x86_64-3.5/./cuda/afm.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.5/CUDA.cpython-35m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.5/CUDA.cpython-35m-x86_64-linux-gnu.so ->
cd squeeze/; python setup.py build_ext --inplace; rm -rf build; cd ../../
running build_ext
skipping 'squeeze.cpp' Cython extension (up-to-date)
building 'squeeze' extension
creating build
creating build/temp.linux-x86_64-3.5
gcc -pthread -B /home/mq/anaconda3/envs/afm/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/numpy/core/include -I/home/mq/anaconda3/envs/afm/include/python3.5m -c kernel.cpp -o build/temp.linux-x86_64-3.5/kernel.o -Wno-unused-function
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
kernel.cpp: In function ‘void region_grow(int, int, float, float&, std::vector&, std::vector&, std::vector&, PoLsMap&, float)’:
kernel.cpp:132:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int id = 0; id < map(x,y).size(); ++id) {
~~~^~~~~~~~~~~~~~~~~
kernel.cpp:154:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < reg_int.size(); ++i)
~~^~~~~~~~~~~~~~~~
kernel.cpp:164:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int k = 0; k < map(xx,yy).size(); ++k) {
~~^~~~~~~~~~~~~~~~~~~
kernel.cpp: In function ‘bool region2rect(const std::vector&, const std::vector&, float, float, float, Rectangle&)’:
kernel.cpp:199:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<reg_int.size(); ++i)
^~~~~~~~~~~~~~~
kernel.cpp:218:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<reg_int.size(); ++i)
^~~~~~~~~~~~~~~
kernel.cpp: In function ‘void refine(std::vector&, Rectangle&, std::vector&, PoLsMap&)’:
kernel.cpp:277:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < reg_int.size(); ++i)
~~^~~~~~~~~~~~~~~~
kernel.cpp:291:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < reg_rot.size(); ++i)
~~^~~~~~~~~~~~~~~~
kernel.cpp:312:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < local_ind.size();++i)
~~^~~~~~~~~~~~~~~~~~
kernel.cpp:317:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int n = 0; n < map(x,y).size();++n)
~~^~~~~~~~~~~~~~~~~
kernel.cpp:267:11: warning: unused variable ‘x1’ [-Wunused-variable]
float x1 = rect.l_mindx - rect.w_mindy;
^~
kernel.cpp:268:11: warning: unused variable ‘y1’ [-Wunused-variable]
float y1 = rect.l_mindy + rect.w_mindx;
^~
kernel.cpp:269:11: warning: unused variable ‘x2’ [-Wunused-variable]
float x2 = rect.l_maxdx - rect.w_mindy;
^~
kernel.cpp:270:11: warning: unused variable ‘y2’ [-Wunused-variable]
float y2 = rect.l_maxdy + rect.w_mindx;
^~
kernel.cpp:271:11: warning: unused variable ‘x3’ [-Wunused-variable]
float x3 = rect.l_maxdx - rect.w_maxdy;
^
kernel.cpp:272:11: warning: unused variable ‘y3’ [-Wunused-variable]
float y3 = rect.l_maxdy + rect.w_maxdx;
^
kernel.cpp:273:11: warning: unused variable ‘x4’ [-Wunused-variable]
float x4 = rect.l_mindx - rect.w_maxdy;
^~
kernel.cpp:274:11: warning: unused variable ‘y4’ [-Wunused-variable]
float y4 = rect.l_mindy + rect.w_maxdx;
^~
kernel.cpp: In function ‘void _region_grow(int, int, const float*, const float*, const float*, int, float*, int*)’:
kernel.cpp:364:15: warning: unused variable ‘length’ [-Wunused-variable]
float length = sqrt((vec_rects[i].x1-vec_rects[i].x2)*(vec_rects[i].x1-vec_rects[i].x2) +
^~~~~~
gcc -pthread -B /home/mq/anaconda3/envs/afm/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/numpy/core/include -I/home/mq/anaconda3/envs/afm/include/python3.5m -c squeeze.cpp -o build/temp.linux-x86_64-3.5/squeeze.o -Wno-unused-function
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/numpy/core/include/numpy/ndarraytypes.h:1823:0,
from /home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
from /home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from squeeze.cpp:581:
/home/mq/anaconda3/envs/afm/lib/python3.5/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^~~~~~~
g++ -pthread -shared -L/home/mq/anaconda3/envs/afm/lib -B /home/mq/anaconda3/envs/afm/compiler_compat -Wl,-rpath=/home/mq/anaconda3/envs/afm/lib,--no-as-needed build/temp.linux-x86_64-3.5/kernel.o build/temp.linux-x86_64-3.5/squeeze.o -o /home/mq/Project/Afm/afm_cvpr2019-master/lib/squeeze/squeeze.cpython-35m-x86_64-linux-gnu.so
(afm) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master/lib# conda develop . ./lib
added /home/mq/Project/Afm/afm_cvpr2019-master/lib
completed operation for: /home/mq/Project/Afm/afm_cvpr2019-master/lib
added /home/mq/Project/Afm/afm_cvpr2019-master/lib/lib
completed operation for: /home/mq/Project/Afm/afm_cvpr2019-master/lib/lib
(afm) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master/lib# cd ..
(afm) root@mq-ubuntu:/home/mq/Project/Afm/afm_cvpr2019-master# python test.py --config-file experiments/afm_atrous.yaml --gpu 0
Traceback (most recent call last):
File "test.py", line 2, in
from modeling.afm import AFM
File "/home/mq/Project/Afm/afm_cvpr2019-master/modeling/afm.py", line 3, in
from dataset.build import build_train_dataset, build_test_dataset
File "/home/mq/Project/Afm/afm_cvpr2019-master/dataset/build.py", line 3, in
from .afmDataset import AFMTrainDataset, AFMTestDataset, collect_fn
File "/home/mq/Project/Afm/afm_cvpr2019-master/dataset/afmDataset.py", line 10, in
from .cache import AfmTrainCache
File "/home/mq/Project/Afm/afm_cvpr2019-master/dataset/cache.py", line 6, in
from lib.afm_op import afm
File "/home/mq/Project/Afm/afm_cvpr2019-master/lib/afm_op/init.py", line 2, in
from .CUDA import afm
ImportError: /home/mq/Project/Afm/afm_cvpr2019-master/lib/afm_op/CUDA.cpython-35m-x86_64-linux-gnu.so: undefined symbol: __cudaPopCallConfiguration
Hi, thanks to your work. I wanna test my data with your method. while I noticed in the paper mentioned using aspect ratio to ensure the rectangle is "thin enough", and also use it as threshold to get line output.
However, I didn't find "aspect ratio" in your code, I think it is related to "region2rect" function in squeeze/kernel.cpp, while it is just set to True.
// return rect.width/(rect.l_max-rect.l_min)<0.3; return true;
If I wanna test or evalute the result, should I change the return condition?
Really thanks.
您好,我想用您的代码在自己图像上测试线段的检测效果,请问咱们有相关的代码吗,非常感谢
I run the code and get this error.
from squeeze.squeeze import region_grow ImportError: No module named 'squeeze'
I saw in the squeeze folder don't have any squeeze.py
Can you give me some help?
Thank u for u reply.
RuntimeError: CUDA out of memory. Tried to allocate 25.00 MiB (GPU 0; 3.94 GiB total capacity; 3.14 GiB already allocated; 21.56 MiB free; 634.00 KiB cached)
do you have this problem?how to deal with it?
Originally posted by @zhiyunpengpeng in #4 (comment)
York Urban的数据格式编排,有些歧义,整理过后还是跑不了预处理,望您能给终于帮助,万分感谢
how to make the cache folder
Hey, I compared the results between Atrous Residual and ori Unet, Respectively. The PR cure is like what your paper said. However, the Atrous Residual of visulization result is strange.
Below is some examples, pics is followed by [GT, Atrous Residual, Unet] order. (I use 0.9 respect-ratio)
It seems like that why Atrous's precision is higher than Unet, is they filiter more line segments and more clean. In other way, it tends to detect less line segment.
And also the direction is less accurate than Unet! Obviously, some of line segments are located at the object egde.
Is my observation right? Or any where I am wrong... Thanks for your help.
Hey, excellent work and great thanks for the open sourced code. I can get outputs as following after executing python test.py --config-file experiments/afm_atrous.yaml --gpu 0
Yet these are images from the wireframe dataset, I am wondering if there is a straightforward way to evaluate the pre-trained model on my own images? Thanks a lot in advance.
The pretrained models for U-Net and atrous Residual U-Net can be unzip
I see that test a photo use the function AFM which need the information about some known lines.But I want to test the photo which I dont have the line information.
Although project https://github.com/huangkuns/wireframe provides dataset link, it's unavailable now.
Could you create one? Thanks
Hi, I want to test on some other images. When I use the default settings, the result is ok but there are some drifts from the actual edges. I guess it may due to the testing image resolution is too small, so I set the input and output resolutions to 640 and the output is meaningless. Do you have any idea about this? Thank you.
cd afm_op; python setup.py build_ext --inplace; rm -rf build; cd ../../
/home/zgz/anaconda3/envs/afm/lib/python3.5/distutils/extension.py:132: UserWarning: Unknown Extension options: 'defined_macros'
warnings.warn(msg)
running build_ext
building 'CUDA' extension
creating build
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/cuda
gcc -pthread -B /home/zgz/anaconda3/envs/afm/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -I/home/zgz/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include -I/home/zgz/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include/torch/csrc/api/include -I/home/zgz/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include/TH -I/home/zgz/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/zgz/anaconda3/envs/afm/include/python3.5m -c ./vision.cpp -o build/temp.linux-x86_64-3.5/./vision.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=CUDA -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/usr/local/cuda/bin/nvcc -I. -I/home/zgz/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include -I/home/zgz/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include/torch/csrc/api/include -I/home/zgz/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include/TH -I/home/zgz/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/zgz/anaconda3/envs/afm/include/python3.5m -c ./cuda/afm.cu -o build/temp.linux-x86_64-3.5/./cuda/afm.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=CUDA -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
creating build/lib.linux-x86_64-3.5
g++ -pthread -shared -L/home/zgz/anaconda3/envs/afm/lib -B /home/zgz/anaconda3/envs/afm/compiler_compat -Wl,-rpath=/home/zgz/anaconda3/envs/afm/lib,--no-as-needed build/temp.linux-x86_64-3.5/./vision.o build/temp.linux-x86_64-3.5/./cuda/afm.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.5/CUDA.cpython-35m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.5/CUDA.cpython-35m-x86_64-linux-gnu.so ->
cd squeeze/; python setup.py build_ext --inplace; rm -rf build; cd ../../
running build_ext
skipping 'squeeze.cpp' Cython extension (up-to-date)
then , I run "conda develop ../lib"
it shows "added /home/zgz/Documents/catkin_ws/cvpr2019_line_detector/afm_cvpr2019/lib
completed operation for: /home/zgz/Documents/catkin_ws/cvpr2019_line_detector/afm_cvpr2019/lib
"
Hello! When I run "make" in /lib I have some problem:
cd afm_op; python setup.py build_ext --inplace; rm -rf build; cd ../../
No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-10.1'
/home/user/anaconda3/envs/afm/lib/python3.5/distutils/extension.py:132: UserWarning: Unknown Extension options: 'defined_macros'
warnings.warn(msg)
running build_ext
building 'CUDA' extension
creating build
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/cuda
gcc -pthread -B /home/user/anaconda3/envs/afm/compiler_compat -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -I/home/user/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include -I/home/user/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include/torch/csrc/api/include -I/home/user/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include/TH -I/home/user/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include/THC -I/usr/local/cuda-10.1/include -I/home/user/anaconda3/envs/afm/include/python3.5m -c ./vision.cpp -o build/temp.linux-x86_64-3.5/./vision.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=CUDA -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/usr/local/cuda-10.1/bin/nvcc -I. -I/home/user/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include -I/home/user/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include/torch/csrc/api/include -I/home/user/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include/TH -I/home/user/anaconda3/envs/afm/lib/python3.5/site-packages/torch/include/THC -I/usr/local/cuda-10.1/include -I/home/user/anaconda3/envs/afm/include/python3.5m -c ./cuda/afm.cu -o build/temp.linux-x86_64-3.5/./cuda/afm.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=CUDA -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
creating build/lib.linux-x86_64-3.5
g++ -pthread -shared -L/home/user/anaconda3/envs/afm/lib -B /home/user/anaconda3/envs/afm/compiler_compat -Wl,-rpath=/home/user/anaconda3/envs/afm/lib,--no-as-needed build/temp.linux-x86_64-3.5/./vision.o build/temp.linux-x86_64-3.5/./cuda/afm.o -L/usr/local/cuda-10.1/lib64 -lcudart -o build/lib.linux-x86_64-3.5/CUDA.cpython-35m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.5/CUDA.cpython-35m-x86_64-linux-gnu.so ->
cd squeeze/; python setup.py build_ext --inplace; rm -rf build; cd ../../
running build_ext
skipping 'squeeze.cpp' Cython extension (up-to-date)
Tell me please, what I have to do?
Dear author:
I have run your experiment and output the result in <AFM_root>/experiments/unet/results(the result are .mat format as below),
then i want to do the evaluation,but I did not find your code for evaluation , i read your article but i still do not know how to compute the eval metric, may I ask if you have relevant code?
(And I also want to ask if the output result have the line score,cause i didn't find the score in my results,my result are like this below )
looking for your responding
THANKS A LOT!
while i download the dataset,but the link of dataset is not exist. can you help me?,I want train the dataset
Hi, I have run into this following error when trying to execute python test.py --config-file experiments/afm_atrous.yaml --gpu 0
:
Traceback (most recent call last):
File "test.py", line 2, in <module>
from modeling.afm import AFM
File "/home/afm_cvpr2019-master/modeling/afm.py", line 3, in <module>
from dataset.build import build_train_dataset, build_test_dataset
File "/home/afm_cvpr2019-master/dataset/build.py", line 3, in <module>
from .afmDataset import AFMTrainDataset, AFMTestDataset, collect_fn
File "/home/afm_cvpr2019-master/dataset/afmDataset.py", line 10, in <module>
from .cache import AfmTrainCache
File "/home/afm_cvpr2019-master/dataset/cache.py", line 6, in <module>
from lib.afm_op import afm
File "/home/afm_cvpr2019-master/lib/afm_op/__init__.py", line 2, in <module>
from .CUDA import afm
ImportError: /home/afm_cvpr2019-master/lib/afm_op/CUDA.cpython-36m-x86_64-linux-gnu.so: undefined symbol: __cudaRegisterFatBinaryEnd
I have followed the INSTALL.md without errors.
Any idea why this happens? Thank you in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.