GithubHelp home page GithubHelp logo

Comments (5)

floatGray avatar floatGray commented on September 25, 2024

训练的是两个种类的检测,该改变的都改变了

from faster-rcnn-pytorch.

floatGray avatar floatGray commented on September 25, 2024

训练一切正常

from faster-rcnn-pytorch.

floatGray avatar floatGray commented on September 25, 2024

重新训练之后有报错:
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.

YadongLau avatar YadongLau commented on September 25, 2024

重新训练之后有报错:
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.

YadongLau avatar YadongLau commented on September 25, 2024

重新训练之后有报错:
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.