Realtime_Multi-Person_Pose_Estimation icon indicating copy to clipboard operation
Realtime_Multi-Person_Pose_Estimation copied to clipboard

TypeError: 'NoneType' object has no attribute '__getitem__'

Open zilesazoyi2 opened this issue 7 years ago • 2 comments

Thanks for you attention!!

Anyone have the same problem?

During trainning ,when i run python genLMDB.py it reports errors ## TypeError: 'NoneType' object has no attribute 'getitem'

sun@sunwin:~/0newcodedown/RealtimePosetrain/training$ python genLMDB.py COCO 126395 121522 /home/sun/0newcodedown/RealtimePosetrain/training/dataset/COCO/images/train2014/COCO_train2014_000000176495.jpg Traceback (most recent call last): File "genLMDB2.py", line 195, in writeLMDB(['COCO'], '/home/sun/0newcodedown/RealtimePosetrain/training/COCO_kpt/lmdb', 1) File "genLMDB2.py", line 168, in writeLMDB img4ch = np.concatenate((img, meta_data, mask_miss[...,None], mask_all[...,None]), axis=2) TypeError: 'NoneType' object has no attribute 'getitem'

you suggest is important for me~thanks ~~~

zilesazoyi2 avatar Jun 21 '17 01:06 zilesazoyi2

I met the same error as you did. My error is caused by wrong image paths and input empty "mask_all". And I solved the issue by correcting "path_header", put the "mask2014" and "train2014" "val2014" into the same folder.

signal926 avatar Jul 28 '17 09:07 signal926

I got the same error last night. And i found it can be fixed by run the code by "sudo python genLMDB.py" Hope it can help you.

xiaojieli0903 avatar Sep 16 '17 01:09 xiaojieli0903