Giter Site home page Giter Site logo

hanqer / deep-hough-transform Goto Github PK

View Code? Open in Web Editor NEW
339.0 12.0 71.0 13.85 MB

Jittor and Pytorch code for paper "Deep Hough Transform for Semantic Line Detection" (ECCV 2020, PAMI 2021)

Python 53.78% C++ 3.08% Cuda 4.91% Shell 0.17% TeX 38.07%
jittor hough-transform deep-learning

deep-hough-transform's Introduction

Hi there 👋

Anurag's github stats

deep-hough-transform's People

Contributors

garipovroma avatar hanqer avatar zeakey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deep-hough-transform's Issues

python setup.py build的报错问题

在运行pythoin setup.py build的时候最后会报错误,具体如图片所示,网上说的大体三个方法分别是:gcc版本不匹配我查看了我的cuda是10.1 ubuntu18.04 gcc是7.5.0在官方文档中是匹配的,,第二个方法是说环境变量不对,但是跟我的具体问题的显示根本不一样,最后一个犯法噶时说默认python不是3.7这点我也运行python -v 是3.7.6。烦请老师帮忙看看,您当时是否有这样的报错显示呢,您当时又是如何解决的呢
还有一个问题:您的readme文档中对环境包最后两个yml和POT这两个包我好像找不到对应的,请问是对应的pyyaml吗?而POT 我pip install显示ERROR: Could not find a version that satisfies the requirement POT (from versions: none)
ERROR: No matching distribution found for POT

  • [ ]

/usr/include/c++/7/bits/basic_string.tcc:1067:16: error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]’ without object
__p->_M_set_sharable();
~~~~~~~~~^~

/usr/include/c++/7/bits/basic_string.tcc:1067:16:` error: cannot call member function ‘void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]’ without object
error: command '/usr/local/cuda-10.1/bin/nvcc' failed with exit status 1

论文代码最后结果

老师您好,我最近跑了一遍您原先的代码发现评价指标如下所示:
Mean P: 0.63580007390983
Mean R: 0.7869525443110351
Mean F: 0.7033466363096472
[email protected]: 0.4367617316136169
而这并不能达到您公布的pth文件中所跑出来的
Mean P: 0.6842166184936662
Mean R: 0.766064417762531
Mean F: 0.7228304458943596
[email protected]: 0.46145579498809
请问这样的波动是正常的吗?
我的实验环境是2080ti PyTorch 1.7.0 ubuntu18.04 Cuda 11.0

使用NKL数据集进行Test提示GPU内存不足

单块GPU处于空闲状态,且为一块RTX2080Ti。
提示:
File "forward.py", line 81, in main
total_time = test(test_loader, model, args)
File "forward.py", line 102, in test
key_points = model(images)
……
……
RuntimeError: CUDA error: out of memory
请问如何解决?感谢。

Importing problem

Hi,
Firstly, your fantastic work is really helpful. And there is a small problem with using:

After importing the torch and deep_hough package in python, the error
imtens = imtens.cuda()
RuntimeError: CUDA error: unrecognized error code

occurred when I try to allocate a tensor from CPU to GPU via tensor.cuda().
However, if I just simply do not import deep_hough, the error disappeared. I am sure that my software was set ok.

Here is a small demo:
image

My software setup is:
pytorch 1.7 + cu11
Waiting for some suggestions sincerely.

Why parametric space label is generated?

When we download the dataset, it contains the ground truth.

Kindly enlighten is it necessary to create parametric space label while creating a custom dataset?

Training with multi GPUS

Hi, great work! but I found this error occurred when I modified the 'GPU_ID:0' to 'GPU_ID_:6' in 'config.yml' and tried to run train.py
在尝试使用另一块GPU训练的时候,在修改 'config.yml' 中的 'GPU_ID:0' 为 'GPU_ID_:6'之后报了错
找了半天也没找到为什么还会有tensor被送到别的GPU上

Traceback (most recent call last):
File "train.py", line 326, in
main()
File "train.py", line 121, in main
train(train_loader, model, optimizer, epoch, writer, args)
File "train.py", line 171, in train
keypoint_map = model(images)
File "/x/x.x/x/x/x/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/x/x.x/x/x/x/deep-hough-transform/model/network.py", line 69, in forward
p1 = self.dht_detector1(p1)
File "/x/x.x/x/x/x/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/x/x.x/x/x/x/deep-hough-transform/model/dht.py", line 26, in forward
x = self.convs(x)
File "/x/x.x/x/x/x/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/x/x.x/x/x/x/lib/python3.6/site-packages/torch/nn/modules/container.py", line 139, in forward
input = module(input)
File "/x/x.x/x/x/x/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/x/x.x/x/x/x/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 443, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/x/x.x/x/x/x/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 440, in _conv_forward
self.padding, self.dilation, self.groups)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:6! (when checking arugment for argument weight in method wrapper_cudnn_convolution)

unable to download NKL dataset

Thank you for your nice work,
I am facing a problem with downloading the NKL dataset, i tried as well different browsers and it keep on falling when i try to download.
i tried it on google colab as well and it showing the same problem.

--2022-04-03 16:36:54-- http://data.kaizhao.net/projects/deep-hough-transform/NKL.zip
Resolving data.kaizhao.net (data.kaizhao.net)... 104.21.43.242, 172.67.190.95, 2606:4700:3030::6815:2bf2, ...
Connecting to data.kaizhao.net (data.kaizhao.net)|104.21.43.242|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://data.kaizhao.net/projects/deep-hough-transform/NKL.zip [following]
--2022-04-03 16:36:54-- https://data.kaizhao.net/projects/deep-hough-transform/NKL.zip
Connecting to data.kaizhao.net (data.kaizhao.net)|104.21.43.242|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 581179759 (554M) [application/zip]
Saving to: ‘NKL.zip’

NKL.zip 1%[ ] 6.53M 32.4KB/s in 4m 3s

2022-04-03 16:40:59 (27.5 KB/s) - Connection closed at byte 6842545. Retrying.

--2022-04-03 16:41:00-- (try: 2) https://data.kaizhao.net/projects/deep-hough-transform/NKL.zip
Connecting to data.kaizhao.net (data.kaizhao.net)|104.21.43.242|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 581179759 (554M) [application/zip]
Saving to: ‘NKL.zip’

NKL.zip 0%[ ] 1.19M 53.4KB/s eta 5h 55m ^C

Thanks, you for your time

build error

python setup.py build
python setup.py install --user

Error encountered while compiling and installing the "deep-hough" module.

Thank you for your excellent work.

I'm having problems configuring the runtime environment for the code in the repository according to the Requirements.
During the installation of the deep-hough module by compiling the model/_cdht, I encountered the following error:

1 error detected in the compilation of "C:/Users/Dodo/Desktop/deep-hough-transform/model/_cdht/deep_hough_cuda_kernel.cu".
deep_hough_cuda_kernel.cu
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "D:\ProgramData\Anaconda3\envs\dht\lib\site-packages\torch\utils\cpp_extension.py", line 1516, in _run_ninja_build
    subprocess.run(
  File "D:\ProgramData\Anaconda3\envs\nanodet\lib\subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

...

RuntimeError: Error compiling objects for extension

After some preliminary troubleshooting, it seems to be due to a version mismatch between ninja and pytorch.
I am running this code in Windows system.

What is your version number? Could you please tell me if you have encountered this problem?

Again, my respects.

Error encountered while compiling and installing the "deep-hough" module.

Hey there, thanks for your excellent work, I'm trying to recur this paper, and this problem occurs, during the installation of deep-hough module.


D:\files\python\deep-hough-transform-master\model\_cdht> setup.py install --user
No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1'
running install
running bdist_egg
running egg_info
writing deep_hough.egg-info\PKG-INFO
writing dependency_links to deep_hough.egg-info\dependency_links.txt
writing top-level names to deep_hough.egg-info\top_level.txt
C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py:387: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using th
e slow distutils backend.
  warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'deep_hough.egg-info\SOURCES.txt'
writing manifest file 'deep_hough.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_ext
C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py:322: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
  warnings.warn(f'Error checking compiler version for {compiler}: {error}')
Traceback (most recent call last):
  File "D:\files\python\deep-hough-transform-master\model\_cdht\setup.py", line 4, in <module>
    setup(
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\install.py", line 67, in run
    self.do_egg_install()
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\bdist_egg.py", line 164, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\bdist_egg.py", line 150, in call_command
    self.run_command(cmdname)
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
    self.build()
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\distutils\command\install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\command\build_ext.py", line 79, in run
    _build_ext.run(self)
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\distutils\command\build_ext.py", line 340, in run
    self.build_extensions()
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 410, in build_extensions
    self._check_cuda_version()
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 783, in _check_cuda_version
    torch_cuda_version = packaging.version.parse(torch.version.cuda)
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 56, in parse
    return Version(version)
  File "C:\Users\iif_s\AppData\Local\Programs\Python\Python39\lib\site-packages\pkg_resources\_vendor\packaging\version.py", line 275, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object

It seems like there is something wrong with setuptools.

I have seen the another issue which encountered similar problem. I wander if there would be alternatives for Windows?

And again thanks for your work.

Training code?

How to train model in a new dataset?Where is the training code?

Evaluate result much lower than paper

Im sorry, i have some problem with running forward and evaluate
this is my forward code and evaluate code

CUDA_VISIBLE_DEVICES=0 python forward.py --model  /result/reproduce/model_best.pth --tmp zx_result
python test_nkl.py --pred zx_result/visualize_test/ --gt data/NKL

and then I got the result is lower than paper, the model 'model_best.pth' which is trained by NKL dataset.
the result is below,my backbone is resnet50

Mean P: 0.06213208725364317
Mean R: 0.607581475128645
Mean F: 0.11273550657842578
[email protected]: 0.01540383670898288

提示g++问题

作者您好。在安装deep-hough库时,出现了以下提示:
The current installed version of g++ (9.3.0) is greater than the maximum required version by CUDA 10.2 (8.0.0). Please make sure to use an adequate version of g++ (>=5.0.0, <=8.0.0).
请问应该如何解决?期待您的回复。

setup.py build error

when I run python setup.py build.I referred to other answers, but they were different from my question. it got a failed.the error and environment is below
thank you!
FAILED: /home/cver0/cxy/deep-hough-transform-master/model/_cdht/build/temp.linux-x86_64-3.7/deep_hough_cuda_kernel.o :/usr/local/cuda/bin/nvcc -I/home/cver0/anaconda3/envs/seline/lib/python3.7/site-packages/torch/include -I/home/cver0/anaconda3/envs/seline/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/cver0/anaconda3/envs/seline/lib/python3.7/site-packages/torch/include/TH -I/home/cver0/anaconda3/envs/seline/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda/include -I/home/cver0/anaconda3/envs/seline/include/python3.7m -c -c /home/cver0/cxy/deep-hough-transform-master/model/_cdht/deep_hough_cuda_kernel.cu -o /home/cver0/cxy/deep-hough-transform-master/model/_cdht/build/temp.linux-x86_64-3.7/deep_hough_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -arch=sm_60 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=deep_hough -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 /bin/sh: 1: :/usr/local/cuda/bin/nvcc: not found ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/home/cver0/anaconda3/envs/seline/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1522, in _run_ninja_build env=env) File "/home/cver0/anaconda3/envs/seline/lib/python3.7/subprocess.py", line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
environment
`PyTorch version: 1.7.0
Is debug build: True
CUDA used to build PyTorch: 11.0
ROCM used to build PyTorch: N/A

OS: Ubuntu 16.04.4 LTS (x86_64)
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Clang version: Could not collect
CMake version: version 3.5.1
Libc version: glibc-2.17

Python version: 3.7.11 (default, Jul 27 2021, 14:32:16) [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-4.15.0-142-generic-x86_64-with-debian-stretch-sid
Is CUDA available: True
CUDA runtime version: 10.1.105
GPU models and configuration: GPU 0: Quadro RTX 4000
Nvidia driver version: 450.57
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.20.3
[pip3] torch==1.7.0
[pip3] torchaudio==0.7.0a0+ac17b64
[pip3] torchvision==0.8.0
[conda] blas 1.0 mkl defaults
[conda] cudatoolkit 11.0.221 h6bb024c_0 defaults
[conda] mkl 2021.3.0 h06a4308_520 defaults
[conda] mkl-service 2.4.0 py37h7f8727e_0 defaults
[conda] mkl_fft 1.3.0 py37h42c9631_2 defaults
[conda] mkl_random 1.2.2 py37h51133e4_0 defaults
[conda] numpy 1.20.3 py37hf144106_0 defaults
[conda] numpy-base 1.20.3 py37h74d4b33_0 defaults
[conda] pytorch 1.7.0 py3.7_cuda11.0.221_cudnn8.0.3_0 pytorch
[conda] torchaudio 0.7.0 py37 pytorch
[conda] torchvision 0.8.0 py37_cu110 pytorch
`

环境配置问题

作者您好,我最近也在尝试复现您这篇论文,但是在环境中遇到些许问题,目前就是我的python版本3.7和Ubuntu系统版本16.4 但是cuda版本和anaconda版本无法确定,之前尝试下载过cuda11.0后提示报错,请问您当时运行的这些cuda和anaconda的版本是什么版本的呢

g++版本问题

作者您好。在安装deep-hough库时出现了以下的错误提示:
RuntimeError: The current installed version of g++ (9.3.0) is greater than the maximum required version by CUDA 10.2 (8.0.0). Please make sure to use an adequate version of g++ (>=5.0.0, <=8.0.0).
请问这是pytorch版本导致的错误吗?如何修复?等待您的反馈。

deep hough安装环境

您好!请问您CUDA、CUDNN和torch的版本具体是啥?安装deep hough一直在出错,已经更新了VC版本了,又报错了

TorchScript

Hi! Is it possible to convert trained model to torchscript using torch.jit.trace or torch.jit.script ? I tried to convert trained model, it can be converted using torch.jit.trace but I can't save it. Saving gives an error:

RuntimeError: 
Could not export Python function call 'C_dht_Function'. Remove calls to Python functions before export. Did you forget to add @script or @script_method annotation? If this is a nn.ModuleList, add it to __constants__:

deep_hough_cuda_kernel.o: No such file or directory

Thank you for help me solve the last problem,but I get a new error,the error is below
g++: error: /home/cver0/cxy/deep-hough-transform-master/model/_cdht/build/temp.linux-x86_64-3.6/deep_hough_cuda_kernel.o: No such file or directory error: command 'g++' failed with exit status 1
and gcc version is 5.4.0

Experiments on models of smaller size

Great work! I am wondering if you have had a chance to do any experiments and get some results by using a more lightweight network such as MobileNet as the backbone?

Want to test images, but the output of pretrained model is same, and .npy is empty, don't know why

python forward.py --model /home/wh/LX/deep-hough-transform/dht_r50_nkl_d97b97138.pth --tmp result --align
forward.py:34: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
CONFIGS = yaml.load(open(args.config))
2021-06-19 21:44:12,674 INFO Namespace(align=True, config='./config.yml', model='/home/wh/LX/deep-hough-transform/dht_r50_nkl_d97b97138.pth', tmp='result')
2021-06-19 21:44:14,885 INFO => loading pretrained model '/home/wh/LX/deep-hough-transform/dht_r50_nkl_d97b97138.pth'
2021-06-19 21:44:14,981 INFO => loaded checkpoint '/home/wh/LX/deep-hough-transform/dht_r50_nkl_d97b97138.pth'
2021-06-19 21:44:14,982 INFO Data loading done.
2021-06-19 21:44:14,982 INFO Start testing.
0%| | 0/1 [00:00<?, ?it/s]/home/wh/anaconda3/envs/dht/lib/python3.7/site-packages/torch/nn/functional.py:2351: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.")
/home/wh/anaconda3/envs/dht/lib/python3.7/site-packages/torch/nn/functional.py:2423: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
key_points tensor([[[[-21.1735, -17.2324, -17.1631, ..., -17.6154, -17.7940, -21.5696],
[-22.0821, -20.7443, -22.0057, ..., -22.1724, -20.9939, -22.0742],
[-22.0821, -20.7443, -22.0057, ..., -22.1724, -20.9939, -22.0742],
...,
[-22.0821, -20.7443, -22.0057, ..., -22.1724, -20.9939, -22.0742],
[-22.0821, -20.7443, -22.0057, ..., -22.1724, -20.9939, -22.0742],
[-21.3498, -17.6830, -17.8845, ..., -18.3267, -18.3589, -22.4652]]]],
device='cuda:0')
key_points tensor([[[[6.3746e-10, 3.2814e-08, 3.5167e-08, ..., 2.2374e-08,
1.8713e-08, 4.2897e-10],
[2.5696e-10, 9.7915e-10, 2.7737e-10, ..., 2.3477e-10,
7.6293e-10, 2.5900e-10],
[2.5696e-10, 9.7915e-10, 2.7737e-10, ..., 2.3477e-10,
7.6293e-10, 2.5900e-10],
...,
[2.5696e-10, 9.7915e-10, 2.7737e-10, ..., 2.3477e-10,
7.6293e-10, 2.5900e-10],
[2.5696e-10, 9.7915e-10, 2.7737e-10, ..., 2.3477e-10,
7.6293e-10, 2.5900e-10],
[5.3442e-10, 2.0911e-08, 1.7095e-08, ..., 1.0985e-08,
1.0637e-08, 1.7518e-10]]]], device='cuda:0')
binary_kmap [[False False False ... False False False]
[False False False ... False False False]
[False False False ... False False False]
...
[False False False ... False False False]
[False False False ... False False False]
[False False False ... False False False]]
len(b_points) 0
100%|█████████████████████████████████████████████| 1/1 [00:00<00:00, 3.77it/s]
forward time for total images: 0.088414
post-processing time for total images: 0.063351
2021-06-19 21:44:15,296 INFO Test done! Total 1 imgs at 0.1518 secs without image io, fps: 6.589

ModuleNotFoundError: No module named 'ot' on Colab

I implemented this architecture on Google Colab. Everything got installed successfully just by installing the deep-hough-transform except "ot". I tried to install using the !pip install ot but it did not work.

训练好的pth文件

作者您好,不知道您有没有训练的模型,可否发我一份,我test一下我的场景下的效果

AttributeError: 'int' object has no attribute 'mean'

Hi,
I'm trying to train my custom dataset but I'm getting an error.
I am using Google Colaboratory

Error :
/content/deep-hough-transform 2021-04-11 10:48:25,507 INFO {'DATA': {'DIR': 'data/training/', 'VAL_DIR': 'data/training/', 'TEST_DIR': 'data/training/', 'LABEL_FILE': 'data/training/train_1716_100_100.txt', 'VAL_LABEL_FILE': 'data/training/test_1716_100_100.txt', 'TEST_LABEL_FILE': 'data/training/test_1716_100_100.txt', 'BATCH_SIZE': 8, 'WORKERS': 8}, 'OPTIMIZER': {'LR': 0.0002, 'MOMENTUM': 0.9, 'GAMMA': 0.1, 'WEIGHT_DECAY': 0.0, 'STEPS': []}, 'MODEL': {'NUMANGLE': 100, 'NUMRHO': 100, 'THRESHOLD': 0.01, 'BACKBONE': 'resnet50'}, 'TRAIN': {'EPOCHS': 30, 'PRINT_FREQ': 50, 'TEST': False, 'SEED': 1997, 'GPU_ID': 0, 'DATA_PARALLEL': False, 'RESUME': None}, 'MISC': {'TMP': '/content/drive/MyDrive/Deep_Hough_Transform/11_04_2021_13_47/results'}} 2021-04-11 10:48:25,509 INFO Namespace(config='./config.yml', resume='', tmp='') Downloading: "https://download.pytorch.org/models/resnet50-19c8e357.pth" to /root/.cache/torch/hub/checkpoints/resnet50-19c8e357.pth 100% 97.8M/97.8M [00:01<00:00, 71.4MB/s] /usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py:477: UserWarning: This DataLoader will create 8 worker processes in total. Our suggested max number of worker in current system is 2, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary. cpuset_checked)) 2021-04-11 10:48:36,811 INFO Data loading done. 2021-04-11 10:48:36,816 INFO Start training. 0% 0/93 [00:00<?, ?it/s]/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py:3328: UserWarning: nn.functional.upsample is deprecated. Use nn.functional.interpolate instead. warnings.warn("nn.functional.upsample is deprecated. Use nn.functional.interpolate instead.") /usr/local/lib/python3.7/dist-packages/torch/nn/functional.py:3458: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details. "See the documentation of nn.Upsample for details.".format(mode) Training Loss:0.11952034384012222: 100% 93/93 [02:14<00:00, 1.45s/it] 100% 200/200 [00:14<00:00, 14.19it/s] Traceback (most recent call last): File "train.py", line 302, in <module> main() File "train.py", line 121, in main acc = validate(val_loader, model, epoch, writer, args) File "train.py", line 273, in validate writer.add_scalar('val/total_recall', total_recall.mean(), epoch) AttributeError: 'int' object has no attribute 'mean'

What if I labeled finite-line?

Hello Sir, I am a reader of your nice paper. Also I am studying your codes these days, it looks really interesting!

By the way, I have a question about annotation of training datasets.

Your training datasets and the inference results are showing infinite line which are reaching to edge of the image.

Then, if I labeled 'finite' lines which are not reaching to the edge of the images, what will be the results of the inference?

Because I don't want to waste time for labeling so much images..

I just want to listen to your idea about my question!

Thank you so much again :)

有关论文的一些问题

作者您好,在阅读论文的时候遇到了一些问题,想找您请教一下:

  1. 请问之前issues提到的“遍历每个像素点可能存在的直线参数,对该点特征投票到参数空间可能存在的直线进行投票”是什么意思,这跟论文中说的将可能存在直线上的所有特征汇聚起来转换到参数空间好像不太一样。
  2. DHT模块的反向传播部分是不是没有可供训练的参数,只是简单的映射?

是否可以上传一下deep hough的包或者轮子?实在找不到

------------------ 原始邮件 ------------------
发件人: "Hanqer/deep-hough-transform" @.>;
发送时间: 2021年9月11日(星期六) 下午3:15
@.
>;
@.@.>;
主题: Re: [Hanqer/deep-hough-transform] test_sel.py和test_nkl.py找不到gt_path路径 (#23)

如有错误,请附error log和目录结构,我这边验证没有问题。


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Originally posted by @Hou12378 in #23 (comment)

编译和安装“deep-hough”模块时遇到错误。

您好,感谢您的工作。
我在尝试复现代码时,按照指示安装deep-hough模块时,总是出现一些错误:
1
我所使用的cuda=10.1 pytorch=1.7.1 gcc=5.4.0 python=3.8
想请教一下是哪里出了问题呢
祝好~

Preprocessing code for the dataset SL5K

I also want to learn the preprocessing code for the dataset SL5K. Can you provide the preprocessing code for the dataset SL5K.. Thanks very much! Thanks for your wonderful work and sharing!

霍夫圆

作者您好,如果我想做圆的话是否需要自己重新设计一个霍夫空间呢?

deep-hough build error

按照readme步骤构建deep-hough模块,发生了一个错误,请问该怎么解决?
错误信息:

1 error detected in the compilation of "C:/Users/yang/AppData/Local/Temp/tmpxft_00001858_00000000-10_deep_hough_cuda_kernel.cpp1.ii".
deep_hough_cuda_kernel.cu
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\cpp_extension.py", line 1517, in _run_ninja_build
    subprocess.run(
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "setup.py", line 4, in <module>
    setup(
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\site-packages\setuptools\__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\site-packages\setuptools\command\build_ext.py", line 79, in run
    _build_ext.run(self)
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\distutils\command\build_ext.py", line 340, in run
    self.build_extensions()
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\cpp_extension.py", line 654, in build_extensions
    build_ext.build_extensions(self)
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\distutils\command\build_ext.py", line 449, in build_extensions
    self._build_extensions_serial()
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\distutils\command\build_ext.py", line 474, in _build_extensions_serial    self.build_extension(ext)
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\site-packages\setuptools\command\build_ext.py", line 196, in build_extension
    _build_ext.build_extension(self, ext)
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\distutils\command\build_ext.py", line 528, in build_extension
    objects = self.compiler.compile(sources,
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\cpp_extension.py", line 627, in win_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\cpp_extension.py", line 1234, in _write_ninja_file_and_compile_objects
    _run_ninja_build(
  File "D:\ProgramFile\Anaconda3\envs\pytorch\lib\site-packages\torch\utils\cpp_extension.py", line 1539, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

糟糕的代码~

deep hough transform是个很nice的工作,但是这个代码实在有些乱~

Deep-hough?

Great work! However, I have trouble installing deep-hough (in Windows10, with Visual Studio 2019),Could you please give more details about the installation? Thank you!

python setup.py build error

When I run python setup.py build to install deep_hough, it got a error problem, what should i do to this ,the error is below.
thank you.

deep_hough_cuda_kernel.cu(77): error: calling a constexpr __host__ function("round") from a __global__ function("line_accum_forward_kernel") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

deep_hough_cuda_kernel.cu(148): error: calling a constexpr __host__ function("round") from a __global__ function("line_accum_backward_kernel") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this.

2 errors detected in the compilation of "/tmp/tmpxft_00009123_00000000-6_deep_hough_cuda_kernel.cpp1.ii".
error: command '/usr/local/cuda-9.0/bin/nvcc' failed with exit status 1`

论文算法相关问题?

老师您好,目前我在看论文和代码的时候有以下问题?
您深度霍夫变换是对这个图片的所有像素点进行的直线转换吗,就是我对论文里深度霍夫算法的理解是将线转换成参数空间的点,但是这个线我们是怎么得到的呢?
另外就是深度霍夫变换到参数空间还会进行训练吗?还是说当转换到参数空间之后直接与label进行loss的计算呢?

ImportError: No module named 'cd

This error occurs when I execute train.py
Because I can't install tensorboardX. So i removed the code in train.py that used tensorboardX. But I don't think this operation has anything to do with this error.
the error is below
Traceback (most recent call last): File "train.py", line 24, in <module> from hungarian_matching import caculate_tp_fp_fn File "/home/cver0/cxy/deep-hough-transform-master/hungarian_matching.py", line 4, in <module> from metric import EA_metric, Chamfer_metric, Emd_metric File "/home/cver0/cxy/deep-hough-transform-master/metric.py", line 6, in <module> from chamfer_distance import ChamferDistance File "/home/cver0/cxy/deep-hough-transform-master/chamfer_distance/__init__.py", line 1, in <module> from .chamfer_distance import ChamferDistance File "/home/cver0/cxy/deep-hough-transform-master/chamfer_distance/chamfer_distance.py", line 7, in <module> "chamfer_distance/chamfer_distance.cu"]) File "/home/cver0/anaconda3/envs/volo/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1091, in load keep_intermediates=keep_intermediates) File "/home/cver0/anaconda3/envs/volo/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1317, in _jit_compile return _import_module_from_library(name, build_directory, is_python_module) File "/home/cver0/anaconda3/envs/volo/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1699, in _import_module_from_library file, path, description = imp.find_module(module_name, [path]) File "/home/cver0/anaconda3/envs/volo/lib/python3.6/imp.py", line 297, in find_module raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named 'cd'

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.