GithubHelp home page GithubHelp logo

Comments (5)

Linaom1214 avatar Linaom1214 commented on May 22, 2024

报错信息: /home/zmw/anaconda3/envs/yolov7/lib/python3.7/site-packages/numpy/core/_asarray.py:83: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray return array(a, dtype, copy=False, order=order) Traceback (most recent call last): File "/home/zmw/tensorrt-python/yolov7/trt.py", line 30, in origin_img = pred.inference(img_path, conf=0.3) File "/home/zmw/tensorrt-python/utils/utils.py", line 87, in inference predictions = np.reshape(data, (1, -1, int(5+self.n_classes)))[0] File "<array_function internals>", line 6, in reshape File "/home/zmw/anaconda3/envs/yolov7/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 299, in reshape return _wrapfunc(a, 'reshape', newshape, order=order) File "/home/zmw/anaconda3/envs/yolov7/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 55, in _wrapfunc return _wrapit(obj, method, *args, **kwds) File "/home/zmw/anaconda3/envs/yolov7/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 44, in _wrapit result = getattr(asarray(obj), method)(*args, **kwds) ValueError: cannot reshape array of size 4 into shape (1,newaxis,85)

完全跟着指导走的,不知道这里要怎么修改代码

检查一下类别数对不对

from tensorrt-for-yolo-series.

mingwz avatar mingwz commented on May 22, 2024

ok,解决了

from tensorrt-for-yolo-series.

hellosuer avatar hellosuer commented on May 22, 2024

ok,解决了
您好,麻烦问一下您是怎么解决这个问题的

from tensorrt-for-yolo-series.

Hieu9825 avatar Hieu9825 commented on May 22, 2024

您好,请问您是怎么​​解决这个问题的,请给我一个解决方案

from tensorrt-for-yolo-series.

mingwz avatar mingwz commented on May 22, 2024

在yolov7里面把yolo.py的返回值改了,按照建议的那样。还有就是现在暂时不支持端到端检测,好像也会报这个错误

from tensorrt-for-yolo-series.

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.