Comments (5)
训练的是两个种类的检测,该改变的都改变了
from faster-rcnn-pytorch.
训练一切正常
from faster-rcnn-pytorch.
重新训练之后有报错:
Traceback (most recent call last): File "/home/floatgray/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3326, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-2-e3285b8876a2>", line 1, in <module> runfile('/home/floatgray/helmet_detection/faster-rcnn-pytorch-master/video.py', wdir='/home/floatgray/helmet_detection/faster-rcnn-pytorch-master') File "/home/floatgray/文档/pycharm-professional-2019.3/pycharm-2019.3/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "/home/floatgray/文档/pycharm-professional-2019.3/pycharm-2019.3/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/home/floatgray/helmet_detection/faster-rcnn-pytorch-master/video.py", line 23, in <module> frame = np.array(frcnn.detect_image(frame)) File "/home/floatgray/helmet_detection/faster-rcnn-pytorch-master/frcnn.py", line 96, in detect_image score_thresh=self.confidence) File "/home/floatgray/helmet_detection/faster-rcnn-pytorch-master/utils/utils.py", line 105, in forward cls_bbox[:, 3] = (cls_bbox[:, 3]).clamp(min=0, max=height) IndexError: index 3 is out of bounds for dimension 1 with size 3
from faster-rcnn-pytorch.
重新训练之后有报错:
Traceback (most recent call last): File "/home/floatgray/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3326, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-2-e3285b8876a2>", line 1, in <module> runfile('/home/floatgray/helmet_detection/faster-rcnn-pytorch-master/video.py', wdir='/home/floatgray/helmet_detection/faster-rcnn-pytorch-master') File "/home/floatgray/文档/pycharm-professional-2019.3/pycharm-2019.3/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "/home/floatgray/文档/pycharm-professional-2019.3/pycharm-2019.3/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/home/floatgray/helmet_detection/faster-rcnn-pytorch-master/video.py", line 23, in <module> frame = np.array(frcnn.detect_image(frame)) File "/home/floatgray/helmet_detection/faster-rcnn-pytorch-master/frcnn.py", line 96, in detect_image score_thresh=self.confidence) File "/home/floatgray/helmet_detection/faster-rcnn-pytorch-master/utils/utils.py", line 105, in forward cls_bbox[:, 3] = (cls_bbox[:, 3]).clamp(min=0, max=height) IndexError: index 3 is out of bounds for dimension 1 with size 3
老哥,我存在的问题和你一样,你解决了吗?
from faster-rcnn-pytorch.
重新训练之后有报错:
Traceback (most recent call last): File "/home/floatgray/anaconda3/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3326, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-2-e3285b8876a2>", line 1, in <module> runfile('/home/floatgray/helmet_detection/faster-rcnn-pytorch-master/video.py', wdir='/home/floatgray/helmet_detection/faster-rcnn-pytorch-master') File "/home/floatgray/文档/pycharm-professional-2019.3/pycharm-2019.3/plugins/python/helpers/pydev/_pydev_bundle/pydev_umd.py", line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "/home/floatgray/文档/pycharm-professional-2019.3/pycharm-2019.3/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/home/floatgray/helmet_detection/faster-rcnn-pytorch-master/video.py", line 23, in <module> frame = np.array(frcnn.detect_image(frame)) File "/home/floatgray/helmet_detection/faster-rcnn-pytorch-master/frcnn.py", line 96, in detect_image score_thresh=self.confidence) File "/home/floatgray/helmet_detection/faster-rcnn-pytorch-master/utils/utils.py", line 105, in forward cls_bbox[:, 3] = (cls_bbox[:, 3]).clamp(min=0, max=height) IndexError: index 3 is out of bounds for dimension 1 with size 3
cls_bbox【..., 0】 = (cls_bbox【..., 0】).clamp(min=0, max=width)
cls_bbox【..., 2】 = (cls_bbox【..., 2】).clamp(min=0, max=width)
cls_bbox【..., 1】 = (cls_bbox【..., 1】).clamp(min=0, max=height)
cls_bbox【..., 3】 = (cls_bbox【..., 3】).clamp(min=0, max=height)
修改成这样
up给的解决办法,我的可以预测了,你也试试看吧。
from faster-rcnn-pytorch.
Related Issues (20)
- 只训练了两个epoch的map就到了87.19%???
- 训练样本的划分
- 您好,我发现voc_weights_resnet.pth的权重载入不了网络,请问这是什么原因?
- 未检测到任何目标。 HOT 4
- fastrcnn的getmap.py报错
- AttributeError: 'ImageDraw' object has no attribute 'textsize' HOT 2
- 请问运行train.py告诉我torch和torchvision版本不匹配是什么问题,我运行其他涉及torch的文件是没这个报错的呀
- 计算模型参数量报错
- predict.py运行正常但是没有结果
- 训练时loss值很低,得到的模型形同虚设,检测不到目标 HOT 1
- 无
- 请问如何检测模型的FPS HOT 2
- 运行train.py报错。FileNotFoundError: [Errno 2] No such file or directory: 'D:\\pycharm' HOT 1
- tain.py开始训练后,一个上午一直卡在第一个Epoch不动。是什么原因?
- 剪枝后的模型训练问题
- 关于batchsize问题
- AttributeError: 'FasterRCNN' object has no attribute 'extractor'
- map
- map太低,是train里的参数没设置好吗
- 百度网盘中并没有“frcnn_weights.pth”这个文件
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 faster-rcnn-pytorch.