Keras-YOLOv4 icon indicating copy to clipboard operation
Keras-YOLOv4 copied to clipboard

请问一下,按照步骤执行1_txt2json.py报错如下,这个怎么解,路径都换成自己的了

Open Xu-Fengnian opened this issue 4 years ago • 7 comments

Convert annotation files (txt format) into coco json format... Traceback (most recent call last): File "C:/Users/xdtech/Desktop/Keras-YOLOv4-master/1_txt2json.py", line 77, in img_h, img_w, _ = ndarr.shape AttributeError: 'NoneType' object has no attribute 'shape'

Xu-Fengnian avatar Oct 15 '20 04:10 Xu-Fengnian

Convert annotation files (txt format) into coco json format... Traceback (most recent call last): File "C:/Users/xdtech/Desktop/Keras-YOLOv4-master/1_txt2json.py", line 77, in img_h, img_w, _ = ndarr.shape AttributeError: 'NoneType' object has no attribute 'shape'

找不到图片,请再检查一下

miemie2013 avatar Oct 15 '20 11:10 miemie2013

Convert annotation files (txt format) into coco json format... Traceback (most recent call last): File "C:/Users/xdtech/Desktop/Keras-YOLOv4-master/1_txt2json.py", line 77, in img_h, img_w, _ = ndarr.shape AttributeError: 'NoneType' object has no attribute 'shape'

找不到图片,请再检查一下 好的,非常感谢,我再去尝试一下

Xu-Fengnian avatar Oct 16 '20 03:10 Xu-Fengnian

你好,我的训练集和验证集的图片是放在一起的,我将路径改为绝对路径后仍然报这个错。

Xu-Fengnian avatar Oct 16 '20 04:10 Xu-Fengnian

你好,我的训练集和验证集的图片是放在一起的,我将路径改为绝对路径后仍然报这个错。

Xu-Fengnian avatar Oct 16 '20 04:10 Xu-Fengnian

你好,我的训练集和验证集的图片是放在一起的,我将路径改为绝对路径后仍然报这个错。

这个错误更像是由于版本不对导致的。建议检查一下版本兼容

ignbxxx avatar Oct 25 '20 07:10 ignbxxx

将注释文件(txt格式)转换为可可json格式... 追溯(最近一次调用): 文件“ C:/Users/xdtech/Desktop/Keras-YOLOv4-master/1_txt2json.py”,行 img_h中的77 , img_w,_ = ndarr.shape AttributeError:“ NoneType”对象没有属性“ shape”

找不到图片,请再检查一下 好的,非常感谢,我再去尝试一下

我也出现这个问题了,不知道您解决了没?

ppy2017 avatar Nov 04 '20 13:11 ppy2017

Convert annotation files (txt format) into coco json format... Traceback (most recent call last): File "C:/Users/xdtech/Desktop/Keras-YOLOv4-master/1_txt2json.py", line 77, in img_h, img_w, _ = ndarr.shape AttributeError: 'NoneType' object has no attribute 'shape'

找不到图片,请再检查一下

你好,我也是遇到这个问题,检查了路径没问题但是还是这样

ppy2017 avatar Nov 04 '20 13:11 ppy2017