• 做数据集增强时,训练一半出现IndexError: tuple index out of range这种错误,不知道怎么改,有神仙赐教一下嘛?


    在用YOLOv5做图像训练时,首先做了数据集的增强,但是增强中出现了如下的错误
    首先出现这样的警告
    (A:/stdy py37-g/agu_img.py:153: DeprecationWarning: An exception was ignored while fetching the attribute __array_interface__ from an object of type ‘JpegImageFile’. With the exception of AttributeError NumPy will always raise this exception in the future. Raise this deprecation warning to see the original exception. (Warning added NumPy 1.21)
    img = np.array(img)
    ![Alt]在这里插入图片描述
    然后出现这样报错,就很懵逼,具体报错如下,不知道怎么下手改
    A:/stdy py37-g/agu_img.py:153: DeprecationWarning: An exception was ignored while fetching the attribute __array_interface__ from an object of type ‘JpegImageFile’. With the exception of AttributeError NumPy will always raise this exception in the future. Raise this deprecation warning to see the original exception. (Warning added NumPy 1.21)
    img = np.array(img)
    Traceback (most recent call last):
    File “”, line 1, in
    File “A:\PyCharm 2019\helpers\pydev_pydev_bundle\pydev_umd.py”, line 197, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
    File “A:\PyCharm 2019\helpers\pydev_pydev_imps_pydev_execfile.py”, line 18, in execfile
    exec(compile(contents+“\n”, file, ‘exec’), glob, loc)
    File “A:/stdy py37-g/agu_img.py”, line 161, in
    bbs_aug = seq_det.augment_bounding_boxes([bbs])[0]
    File “A:\Anaconda3\envs\pytorch_gpu\lib\site-packages\imgaug\augmenters\meta.py”, line 1183, in augment_bounding_boxes
    hooks=hooks
    File “A:\Anaconda3\envs\pytorch_gpu\lib\site-packages\imgaug\augmenters\meta.py”, line 645, in augment_batch_
    hooks=hooks)
    File “A:\Anaconda3\envs\pytorch_gpu\lib\site-packages\imgaug\augmenters\meta.py”, line 3127, in augment_batch
    hooks=hooks
    File “A:\Anaconda3\envs\pytorch_gpu\lib\site-packages\imgaug\augmenters\meta.py”, line 645, in augment_batch_
    hooks=hooks)
    File “A:\Anaconda3\envs\pytorch_gpu\lib\site-packages\imgaug\augmenters\flip.py”, line 1016, in augment_batch
    height = bbsoi.shape[0]
    IndexError: tuple index out of range

    求各路大神赐教

  • 相关阅读:
    Spring JDBC
    Python之哈希表-字典
    tiup cluster scale-in
    力扣刷题之求两数之和
    pybind11-c++封装python可用的包
    关于Unity 如何与Blazor Server结合
    5-1.(OOP)初步分析MCV架构模式
    详解VQVAE:Neural Discrete Representation Learning
    Go 中的数据竞争模型
    AI问答-ERP:理解 ERP / 我国ERP发展现状 / ERP软件有哪些 / 华为自研ERP
  • 原文地址:https://blog.csdn.net/weixin_44386584/article/details/128085426