## Deformable Convolutional Networks V2 with Pytorch 1.0
### Build
```bash
./make.sh # build
python test.py # run examples and gradient check
```
### An Example
- deformable conv
```python
from dcn_v2 import DCN
input = torch.randn(2, 64, 128, 128).cuda()
# wrap all things (offset and mask) in DCN
dcn = DCN(64, 64, kernel_size=(3,3), stride=1, padding=1, deformable_groups=2).cuda()
output = dcn(input)
print(output.shape)
```
- deformable roi pooling
```python
from dcn_v2 import DCNPooling
input = torch.randn(2, 32, 64, 64).cuda()
batch_inds = torch.randint(2, (20, 1)).cuda().float()
x = torch.randint(256, (20, 1)).cuda().float()
y = torch.randint(256, (20, 1)).cuda().float()
w = torch.randint(64, (20, 1)).cuda().float()
h = torch.randint(64, (20, 1)).cuda().float()
rois = torch.cat((batch_inds, x, y, x + w, y + h), dim=1)
# mdformable pooling (V2)
# wrap all things (offset and mask) in DCNPooling
dpooling = DCNPooling(spatial_scale=1.0 / 4,
pooled_size=7,
output_dim=32,
no_trans=False,
group_size=1,
trans_std=0.1).cuda()
dout = dpooling(input, rois)
```
### Note
Now the master branch is for pytorch 1.0 (new ATen API), you can switch back to pytorch 0.4 with,
```bash
git checkout pytorch_0.4
```
### Known Issues:
- [x] Gradient check w.r.t offset (solved)
- [ ] Backward is not reentrant (minor)
This is an adaption of the official [Deformable-ConvNets](https://github.com/msracver/Deformable-ConvNets/tree/master/DCNv2_op).
<s>I have ran the gradient check for many times with DOUBLE type. Every tensor **except offset** passes.
However, when I set the offset to 0.5, it passes. I'm still wondering what cause this problem. Is it because some
non-differential points? </s>
Update: all gradient check passes with double precision.
Another issue is that it raises `RuntimeError: Backward is not reentrant`. However, the error is very small (`<1e-7` for
float `<1e-15` for double),
so it may not be a serious problem (?)
Please post an issue or PR if you have any comments.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
教育部认可的大学生竞赛备赛资料代码,源码,竞赛总结,所有源码均经过严格测试,可以直接运行,可以放心下载使用。有任何使用问题欢迎随时与博主沟通 全国电子设计大赛、全国大学生智能汽车竞赛、蓝桥杯、集成电路创新创业大赛、光电设计竞赛、挑战杯、大创项目、互联网+、三创赛、计算机设计竞赛、创新创业大赛、ACM-ICPC国际大学生程序设计竞赛、全国大学生数学建模竞赛、全国大学生电子商务“创新、创意及创业”挑战赛、全国大学生节能减排社会实践与科技竞赛、全国大学生工程训练综合能力竞赛、全国大学生机器人大赛-RoboMaster、RoboCon、“西门子杯”中国智能制造挑战赛、中国大学生计算机设计大赛、世界技能大赛、中国高校计算机大赛-大数据挑战赛、团体程序设计天梯赛、移动应用创新赛、网络技术挑战赛、全国大学生信息安全竞赛、“中国软件杯”大学生软件设计大赛、全国大学生光电设计竞赛、中国机器人及人工智能大赛、“大唐杯”全国大学生移动通信5G技术大赛、华为ICT大赛、全国大学生嵌入式芯片与系统设计竞赛、中国高校智能机器人创意大赛
资源推荐
资源详情
资源评论
收起资源包目录
竞赛资料源码-首届“全国人工智能大赛”(AI+4K HDR赛项).zip (106个子文件)
dcn_v2_cpu.cpp 3KB
vision.cpp 405B
dcn_v2_im2col_cuda.cu 20KB
dcn_v2_psroi_pooling_cuda.cu 16KB
dcn_v2_cuda.cu 14KB
dcn_v2.h 5KB
dcn_v2_im2col_cuda.h 5KB
vision.h 3KB
vision.h 3KB
LICENSE 1KB
generate_LR_Vimeo90K.m 1KB
README.md 2KB
README.md 70B
readme.md 32B
readme.md 19B
readme.md 19B
readme.md 15B
readme.md 15B
readme.md 15B
readme.md 15B
readme.md 15B
readme.md 15B
readme.md 9B
readme.md 9B
vision.o 6.67MB
dcn_v2_psroi_pooling_cuda.o 535KB
dcn_v2_cpu.o 520KB
dcn_v2_cuda.o 469KB
dcn_v2_im2col_cuda.o 276KB
PKG-INFO 238B
Vimeo90K_train_keys.pkl 1.23MB
REDS_trainval_keys.pkl 579KB
meta_info.pkl 114KB
DUF_arch.py 15KB
EDVR_arch.py 14KB
dcn_v2.py 11KB
create_lmdb_mp.py 11KB
REDS_dataset.py 9KB
util.py 9KB
train.py 8KB
Vimeo90K_dataset.py 7KB
util.py 7KB
VideoSR_base_model.py 6KB
lr_scheduler.py 6KB
TOF_arch.py 5KB
base_model.py 5KB
options.py 4KB
test_util.py 4KB
TEST_AI4K.py 4KB
wr_lmdb.py 4KB
module_util.py 3KB
data_sampler.py 2KB
setup.py 2KB
__init__.py 2KB
video2pngs_choice.py 1KB
networks.py 754B
example.py 557B
makevideo.py 464B
regroup_REDS.py 404B
__init__.py 385B
loss.py 341B
EDVR_arch.cpython-36.pyc 9KB
EDVR_arch.cpython-37.pyc 9KB
util.cpython-36.pyc 9KB
util.cpython-37.pyc 8KB
dcn_v2.cpython-36.pyc 8KB
util.cpython-36.pyc 7KB
util.cpython-37.pyc 7KB
base_model.cpython-37.pyc 5KB
base_model.cpython-36.pyc 5KB
lr_scheduler.cpython-36.pyc 5KB
lr_scheduler.cpython-37.pyc 5KB
VideoSR_base_model.cpython-37.pyc 5KB
VideoSR_base_model.cpython-36.pyc 5KB
Vimeo90K_dataset.cpython-36.pyc 5KB
Vimeo90K_dataset.cpython-37.pyc 5KB
options.cpython-37.pyc 4KB
options.cpython-36.pyc 4KB
module_util.cpython-37.pyc 3KB
module_util.cpython-36.pyc 3KB
data_sampler.cpython-37.pyc 3KB
data_sampler.cpython-36.pyc 3KB
__init__.cpython-37.pyc 1KB
__init__.cpython-36.pyc 1KB
loss.cpython-37.pyc 802B
loss.cpython-36.pyc 789B
networks.cpython-37.pyc 680B
networks.cpython-36.pyc 663B
__init__.cpython-37.pyc 575B
__init__.cpython-36.pyc 564B
__init__.cpython-37.pyc 142B
__init__.cpython-36.pyc 137B
__init__.cpython-37.pyc 135B
__init__.cpython-37.pyc 133B
__init__.cpython-36.pyc 131B
__init__.cpython-36.pyc 124B
__init__.cpython-36.pyc 122B
readme,md 17B
make.sh 245B
_ext.cpython-36m-x86_64-linux-gnu.so 5.4MB
共 106 条
- 1
- 2
资源评论
妄北y
- 粉丝: 1w+
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 人工智能开发项目深度学习项目源码带指导视频DCGAN人脸图片生成
- 数据库设计管理课程设计系统设计报告(powerdesign+sql+DreamweaverCS)证券业务管理系统设计与开发
- 数据库设计管理课程设计系统设计报告(powerdesign+sql+DreamweaverCS)银行储蓄业务管理系统2
- Rust编写的一个todo程序源代码解读
- 小程序源码2-备忘录模板
- 数据库设计管理课程设计系统设计报告(powerdesign+sql+DreamweaverCS)银行储蓄业务管理系统
- 数据库设计管理课程设计系统设计报告(powerdesign+sql+DreamweaverCS)医院管理系统设计与开发
- VMware 学习教程(入门到实践)
- 数据库设计管理课程设计系统设计报告(powerdesign+sql+DreamweaverCS)学生选课管理系统2
- LLMS&隐写术12345
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功