CenterNet icon indicating copy to clipboard operation
CenterNet copied to clipboard

AttributeError: ‘NoneType‘ object has no attribute ‘shape‘

Open BITQinYong opened this issue 4 years ago • 2 comments

这个问题简单来讲其实不是个问题:在各种修改和操作了一番之后,发现coco数据的格式图似乎不太明确,val2017,train2017和test2017这几个存放图片的文件夹应该和 annotations是同一级目录,然后就没有报错了。

BITQinYong avatar Sep 17 '20 14:09 BITQinYong

This is because the path to images in your dataset, then cv2 could not read them. You should:

  1. Check path to the image folder in your <dataset name>.py.
  2. Check all file names in your json files.

cao-nv avatar Sep 22 '20 08:09 cao-nv

这个问题简单来讲其实不是个问题:在各种修改和操作了一番之后,发现coco数据的格式图似乎不太明确,val2017,train2017和test2017这几个存放图片的文件夹应该和 annotations是同一级目录,然后就没有报错了。

遇到这个问题两天了,多谢解答

BrainPotter avatar Jul 24 '21 11:07 BrainPotter