Comments (6)
from rotated_iou.
hi, my code doesn't support Pytorch 1.2, because some C++ APIs of Pytorch have been changed somewhere between 1.4 and 1.5 if I remember it correctly. The CUDA 10.0 is probably OK, because I only use very basic CUDA features.
I think it's possible to make it work with Pytorch 1.2. At least two places should be modified:
- all
tensor.data_ptr<T>()
should be replaced withtensor.data<T>()
. - all
TORCH_CHECK
macro inutils.h
should be replaced withAT_CHECK
.
Other modifications can be done by trial and error.
from rotated_iou.
hi, my code doesn't support Pytorch 1.2, because some C++ APIs of Pytorch have been changed somewhere between 1.4 and 1.5 if I remember it correctly. The CUDA 10.0 is probably OK, because I only use very basic CUDA features.
I think it's possible to make it work with Pytorch 1.2. At least two places should be modified:
- all
tensor.data_ptr<T>()
should be replaced withtensor.data<T>()
.- all
TORCH_CHECK
macro inutils.h
should be replaced withAT_CHECK
.Other modifications can be done by trial and error.
Many thanks.
- CUDA10 encountered error information like: 'CUDA kernel failed, invalid device function';
Any helps would be appreciated sincerely!
from rotated_iou.
hi, I mean you should modify the C++ source code.
First, change line 23-24 of cuda_op/sort_vert.cpp from
sort_vertices_wrapper(b, n, m, vertices.data_ptr<float>(), mask.data_ptr<bool>(),
num_valid.data_ptr<int>(), idx.data_ptr<int>());
to
sort_vertices_wrapper(b, n, m, vertices.data<float>(), mask.data<bool>(),
num_valid.data<int>(), idx.data<int>());
Since tensor.data_ptr<T>
is a new API and not supported in old Pytorch versions.
Second, cuda_op/utils.h uses the macro TORCH_CHECK
, which is probably not supported in old Pytorch versions. You should replace all TORCH_CHECK
in the file to AT_CHECK
.
I don't have CUDA-toolkit 10.0 on my machine so I cannot test these changes. I'm not sure if they would work. If you meet further issues, I recommend you to focus on the C++ APIs of Pytorch. Other parts should be OK.
from rotated_iou.
Many thanks! It is successful to compile on the PyTorch1.2 and CuDA10.0 by converting 'tensor.data_ptr<>' and 'TORCH_CHECK' that you mentioned, and another data type in 'box_intersection_2d.py' and 'min_enclosing_box.py'.
Thanks again for your help.
from rotated_iou.
By the way, if I want to use it for KITTI loss calculation, how should I do?
from rotated_iou.
Related Issues (20)
- 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版本和老的版本计算结果不一致
- 为什么input shape是 B,N,4,2?
- Segmentation fault
- `np.bool` was a deprecated alias for the builtin `bool`.
- problems with the import of sort_vertices HOT 1
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.