Comments (5)
https://github.com/cmpute/d3d/blob/master/d3d/box/__init__.py
我写的版本,目前支持torch1.4+,理论上再往下支持也可以,只不过要改CMake
from rotated_iou.
你好,我只写了CUDA的版本。按照你的问题,我有三个建议,优先级依次递减:
- 尝试用低版本torch进行编译。我给torch的版本限定了1.5是因为我只在这个版本下测试过,低版本的torch可能也能编译。
- 尝试安装torch 1.5。无法安装torch 1.5常见的原因有Nvidia驱动版本不符,python环境冲突等等,经过排查一般是可以安装的。
- 如果实在搞不定可以自己用C++进行重构。因为CUDA版本和C++的核心逻辑是一致的, 只是CUDA版本可以自动并行化而已,在C下可以使用循环代替CUDA的并行运算。添加Pytorch C++拓展的具体操作可以参考这个教程。但是这是最不推荐的,因为不能使用GPU加速,数据在CPU和GPU之间来回传递也会产生Overhead。如果需要计算的Bounding Box多的话会非常慢。
祝好
from rotated_iou.
你好,我只写了CUDA的版本。按照你的问题,我有三个建议,优先级依次递减:
- 尝试用低版本torch进行编译。我给torch的版本限定了1.5是因为我只在这个版本下测试过,低版本的torch可能也能编译。
- 尝试安装torch 1.5。无法安装torch 1.5常见的原因有Nvidia驱动版本不符,python环境冲突等等,经过排查一般是可以安装的。
- 如果实在搞不定可以自己用C++进行重构。因为CUDA版本和C++的核心逻辑是一致的, 只是CUDA版本可以自动并行化而已,在C下可以使用循环代替CUDA的并行运算。添加Pytorch C++拓展的具体操作可以参考这个教程。但是这是最不推荐的,因为不能使用GPU加速,数据在CPU和GPU之间来回传递也会产生Overhead。如果需要计算的Bounding Box多的话会非常慢。
祝好
非常感谢您的回答,但是我用的是实验室的服务器,不敢自己改配置......,您感觉这个排序只用pytorch能实现吗? 我发现pytorch好像只有一个sort函数,无法实现自定义排序,而且最终还需要代码在模型运行时能够正常执行,不知道您有没有什么好的思路能分享一下,万分感谢
from rotated_iou.
你好,我只写了CUDA的版本。按照你的问题,我有三个建议,优先级依次递减:
- 尝试用低版本torch进行编译。我给torch的版本限定了1.5是因为我只在这个版本下测试过,低版本的torch可能也能编译。
- 尝试安装torch 1.5。无法安装torch 1.5常见的原因有Nvidia驱动版本不符,python环境冲突等等,经过排查一般是可以安装的。
- 如果实在搞不定可以自己用C++进行重构。因为CUDA版本和C++的核心逻辑是一致的, 只是CUDA版本可以自动并行化而已,在C下可以使用循环代替CUDA的并行运算。添加Pytorch C++拓展的具体操作可以参考这个教程。但是这是最不推荐的,因为不能使用GPU加速,数据在CPU和GPU之间来回传递也会产生Overhead。如果需要计算的Bounding Box多的话会非常慢。
祝好
大佬 您好 能帮忙看看这个错误吗 这是用torch1.5 ,install之后报的错误
running install
running bdist_egg
running egg_info
writing sort_vertices.egg-info/PKG-INFO
writing dependency_links to sort_vertices.egg-info/dependency_links.txt
writing top-level names to sort_vertices.egg-info/top_level.txt
reading manifest file 'sort_vertices.egg-info/SOURCES.txt'
writing manifest file 'sort_vertices.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
building 'sort_vertices' extension
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/user1/anaconda3/lib/python3.6/site-packages/torch/include -I/home/user1/anaconda3/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/user1/anaconda3/lib/python3.6/site-packages/torch/include/TH -I/home/user1/anaconda3/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda-10.1/include -I/home/user1/anaconda3/include/python3.6m -c sort_vert.cpp -o build/temp.linux-x86_64-3.6/sort_vert.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=sort_vertices -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++
In file included from sort_vert.cpp:1:0:
utils.h:27:64: warning: backslash-newline at end of file
#define CHECK_IS_BOOL(x)
^
sort_vert.cpp: In function ‘at::Tensor sort_vertices(at::Tensor, at::Tensor, at::Tensor)’:
utils.h:12:73: error: ‘TORCH_CHECK’ was not declared in this scope
TORCH_CHECK(x.is_contiguous(), #x " must ne a contiguous tensor");
^
sort_vert.cpp:7:5: note: in expansion of macro ‘CHECK_CONTIGUOUS’
CHECK_CONTIGUOUS(vertices);
^
utils.h:12:73: error: ‘TORCH_CHECK’ was not declared in this scope
TORCH_CHECK(x.is_contiguous(), #x " must ne a contiguous tensor");
^
sort_vert.cpp:8:5: note: in expansion of macro ‘CHECK_CONTIGUOUS’
CHECK_CONTIGUOUS(mask);
^
utils.h:12:73: error: ‘TORCH_CHECK’ was not declared in this scope
TORCH_CHECK(x.is_contiguous(), #x " must ne a contiguous tensor");
^
sort_vert.cpp:9:5: note: in expansion of macro ‘CHECK_CONTIGUOUS’
CHECK_CONTIGUOUS(num_valid);
^
utils.h:7:61: error: ‘TORCH_CHECK’ was not declared in this scope
TORCH_CHECK(x.is_cuda(), #x " must be a CUDA tensor");
^
sort_vert.cpp:10:5: note: in expansion of macro ‘CHECK_CUDA’
CHECK_CUDA(vertices);
^
utils.h:7:61: error: ‘TORCH_CHECK’ was not declared in this scope
TORCH_CHECK(x.is_cuda(), #x " must be a CUDA tensor");
^
sort_vert.cpp:11:5: note: in expansion of macro ‘CHECK_CUDA’
CHECK_CUDA(mask);
^
utils.h:7:61: error: ‘TORCH_CHECK’ was not declared in this scope
TORCH_CHECK(x.is_cuda(), #x " must be a CUDA tensor");
^
sort_vert.cpp:12:5: note: in expansion of macro ‘CHECK_CUDA’
CHECK_CUDA(num_valid);
^
utils.h:24:49: error: ‘TORCH_CHECK’ was not declared in this scope
#x " must be a float tensor");
^
sort_vert.cpp:13:5: note: in expansion of macro ‘CHECK_IS_FLOAT’
CHECK_IS_FLOAT(vertices);
^
utils.h:30:48: error: ‘TORCH_CHECK’ was not declared in this scope
#x " must be a bool tensor");
^
sort_vert.cpp:14:5: note: in expansion of macro ‘CHECK_IS_BOOL’
CHECK_IS_BOOL(mask);
^
utils.h:18:47: error: ‘TORCH_CHECK’ was not declared in this scope
#x " must be a int tensor");
^
sort_vert.cpp:15:5: note: in expansion of macro ‘CHECK_IS_INT’
CHECK_IS_INT(num_valid);
^
sort_vert.cpp:23:54: error: expected primary-expression before ‘float’
sort_vertices_wrapper(b, n, m, vertices.data_ptr(), mask.data_ptr(),
^
sort_vert.cpp:23:78: error: expected primary-expression before ‘bool’
sort_vertices_wrapper(b, n, m, vertices.data_ptr(), mask.data_ptr(),
^
sort_vert.cpp:24:45: error: expected primary-expression before ‘int’
num_valid.data_ptr(), idx.data_ptr());
^
sort_vert.cpp:24:66: error: expected primary-expression before ‘int’
num_valid.data_ptr(), idx.data_ptr());
^
error: command 'gcc' failed with exit status 1
from rotated_iou.
关键的报错是这一句:
/bin/sh: /usr/local/cuda-8.0/bin/nvcc: No such file or directory
nvcc是nvidia的CUDA编译器,类似于c语言的gcc。这里的报错表示找不到nvcc。最可能的原因是没有安装cuda-toolkit。
安装方法参考官网的教程。注意必须使用10.2版本。
https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
from rotated_iou.
Related Issues (20)
- loss suddenly increase? HOT 2
- box3d的维度(x,y,z,l,w,h,alpha) HOT 2
- The computational cost of accurate rotated iou? HOT 2
- ModuleNotFoundError: No module named 'sort_vertices'
- box_intersection_2d 中的box1_in_box2存在bug, box1_in_box2(box1,box1), 在特定数据下返回的不是[true,true,true,true] HOT 1
- 在做批量的旋转iou计算时,计算的inter_area会出现nan值,导致loss变为nan,但是在把计算为nan的两个box的x,y,w,h,angle提出来单个计算的话就会出现正常的inter_area。请问这是什么原因导致的呢,还请解答 HOT 7
- is this result correct? HOT 2
- Inaccurate IoU in some cases HOT 8
- Wrong IoU calculation when corners are smaller than 0 HOT 6
- Yolact
- About the 2D coordinates (x, y, w, h, alpha) HOT 2
- 请教大佬代码实现问题 HOT 2
- Please Help HOT 1
- warning: missing return statement at end of non-void function "compare_vertices" HOT 6
- debug版本报错 HOT 3
- a problem when using 3d-giou for regression training HOT 2
- 大佬,求助,CUDA out of memory HOT 12
- inf bbox loss when using cal_giou_3d ( but the iou is right)
- Batch computation for IoU Loss HOT 1
- debug版本和老的版本计算结果不一致
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rotated_iou.