dongdonghy / detection-pytorch-notebook Goto Github PK
View Code? Open in Web Editor NEW代码 -《深度学习之PyTorch物体检测实战》
代码 -《深度学习之PyTorch物体检测实战》
在Evaluator.py文件中,函数GetPascalVOCMetrics()中对将dects按照置信度排序,代码有错误!
原代码:
dects = sorted(dects, key=lambda conf: conf[5], reverse=True)
应该为:
dects = sorted(dects, key=lambda conf: conf[4], reverse=True)
如题
自己魔改了一下模块编译的脚本,测试了pytorch 1.8 lts版本使用正常。
链接:https://github.com/Tlntin/yolo2-pytorch/tree/pytorch-1.x
hi, hongyi:
你好, hongyi ,:
在SSD 环境配置为, torch==0.4.0 时候
会出现 这个issue, https://github.com/amdegroot/ssd.pytorch/issues/155。
但是 切到 torch==0.4.1 就可以正常跑了, 是否可以在 ch5,readme 中备注一下, 让小伙伴们 跑跑。
博主你好,我使用的pytorch版本为1.3.1,运行sh make.sh
时碰到错误如下
running build_ext
skipping 'model/utils/bbox.c' Cython extension (up-to-date)
skipping 'pycocotools/_mask.c' Cython extension (up-to-date)
Compiling nms kernels by nvcc...
Traceback (most recent call last):
File "build.py", line 4, in <module>
from torch.utils.ffi import create_extension
File "/home/polly/anaconda3/envs/FasterRCNN/lib/python3.7/site-packages/torch/utils/ffi/__init__.py", line 1, in <module>
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Compiling roi pooling kernels by nvcc...
Traceback (most recent call last):
File "build.py", line 4, in <module>
from torch.utils.ffi import create_extension
File "/home/polly/anaconda3/envs/FasterRCNN/lib/python3.7/site-packages/torch/utils/ffi/__init__.py", line 1, in <module>
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Compiling roi align kernels by nvcc...
Traceback (most recent call last):
File "build.py", line 4, in <module>
from torch.utils.ffi import create_extension
File "/home/polly/anaconda3/envs/FasterRCNN/lib/python3.7/site-packages/torch/utils/ffi/__init__.py", line 1, in <module>
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
Compiling roi crop kernels by nvcc...
Traceback (most recent call last):
File "build.py", line 5, in <module>
from torch.utils.ffi import create_extension
File "/home/polly/anaconda3/envs/FasterRCNN/lib/python3.7/site-packages/torch/utils/ffi/__init__.py", line 1, in <module>
raise ImportError("torch.utils.ffi is deprecated. Please use cpp extensions instead.")
ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.
这个该如何解决呢,求教
我的环境:ubuntu22.04 cuda 11.6 cudnn 8.4.1 pytorch 1.12
代码地址
支持pytorch 1.11以上版本。
已经测试可以正常使用。
Traceback (most recent call last):
File "/home/zhangfei/Code/Detection-PyTorch-Notebook-master/chapter4/faster-rcnn-pytorch/test_net.py", line 28, in
from model.nms.nms_wrapper import nms
File "/home/zhangfei/Code/Detection-PyTorch-Notebook-master/chapter4/faster-rcnn-pytorch/lib/model/nms/nms_wrapper.py", line 10, in
from model.nms.nms_gpu import nms_gpu
File "/home/zhangfei/Code/Detection-PyTorch-Notebook-master/chapter4/faster-rcnn-pytorch/lib/model/nms/nms_gpu.py", line 4, in
from ._ext import nms
File "/home/zhangfei/Code/Detection-PyTorch-Notebook-master/chapter4/faster-rcnn-pytorch/lib/model/nms/_ext/nms/init.py", line 3, in
from ._nms import lib as _lib, ffi as _ffi
ImportError: /home/zhangfei/Code/Detection-PyTorch-Notebook-master/chapter4/faster-rcnn-pytorch/lib/model/nms/_ext/nms/_nms.so: undefined symbol: __cudaRegisterFatBinaryEnd
本人电脑显卡为RTX2060,没有记错的话只支持cuda10.0以上的版本,我安装了cuda10.2,pytorch0.4.0,验证安装成功,但是代码跑不通,求解。
http://m2.ireader.com/readbook/12066123/1.html?p2=104011
希望可以给新人一些资源,促进国内发展。
你好,请问下有PDF版本吗,谢谢啦
代码位置:chapter4/faster-rcnn-pytorch/lib/model/rpn/anchor_target_layer.py 的第166行
num_examples = torch.sum(labels[i] >= 0)
请问方括号里的 i 是在哪里定义的?是上面for语句里面的吗?是不是格式化错了?能否调整下,谢谢!
How to compile the make.sh on windows10 platform?
作者好,请问FasterRCNN中RPN模块计算RPN Loss时候,Anchor的真实分类和预测分类是怎么匹配的?
特征图的一个点对应的9个Anchor,是如何一一对应做完1*1卷积网络之后的18维softmax二分类结果?
谢谢。
SSD lr设置为1e-3时会出现NAN。。改小了之后,为什么训练的过程中,loss震荡,时大时小。。。这怎么解决哇
请问博主为什么按照您的书籍上的代码运行会出现RuntimeError: torch.cuda.FloatTensor is not enabled.没有明白到底是何处出现了问题,请博主指教。
由于F(x)+x是逐通道进行相加, 因此根据两者是否通道数相同, 存在两种Bottleneck结构。 对于通道数不同的情况, 比如每个卷积组的第一个Bottleneck, 需要利用1×1卷积对x进行Downsample操作, 将通道数变为相同, 再进行加操作。 对于相同的情况下, 两者可以直接进行相加。
这是书上第3章的描述,为什么是downsample呢?看代码不是应该对输入x进行了上采样嘛~
谢谢
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.