yuxng / PoseCNN

A Convolutional Neural Network for 6D Object Pose Estimation in Cluttered Scenes
https://rse-lab.cs.washington.edu/projects/posecnn/
MIT License
766 stars 246 forks source link

AttributeError: 'NoneType' object has no attribute 'shape' #59

Open hangwudy opened 6 years ago

hangwudy commented 6 years ago

Hello everyone,

when I run the demo.sh, I met the problem:

Loading model weights from /home/ubuntu/PoseCNN/data/demo_models/vgg16_fcn_color_single_frame_2d_pose_add_lov_iter_160000.ckpt Traceback (most recent call last): File "/home/ubuntu/PoseCNN/tools/demo.py", line 129, in test_net_images(sess, network, imdb, weights_filename, rgb_filenames, depth_filenames, meta_data) File "/home/ubuntu/PoseCNN/tools/../lib/fcn/test.py", line 1870, in test_net_images rgba = pad_im(cv2.imread(rgb_filenames[i], cv2.IMREAD_UNCHANGED), 16) File "/home/ubuntu/PoseCNN/tools/../lib/utils/blob.py", line 49, in pad_im height = im.shape[0] AttributeError: 'NoneType' object has no attribute 'shape'

System Environment:

Did anyone of you has ever met the similar problem? Thanks!

iris0329 commented 5 years ago

i meet the same problem. solve

It means that somewhere a function which should return a image just returned None and therefore has no shape attribute. Try "print img" to check if your image is None or an actual numpy object.

ShuhenaAonty commented 3 years ago

I meet the same problem and try "print( img )" and getting image array accurately .But still showing this problem. How can I get ride of this issue?

[[ 70 137 105] [ 71 140 107] [ 69 137 106] ... [114 109 111] [113 106 109] [120 113 118]]] img None Traceback (most recent call last): File "/content/drive/MyDrive/My_project_folder/Chainer_Realtime_Multi-Person_Pose_Estimation/coco_data_loader.py", line 368, in img, img_id, annotations, ignore_mask = data_loader.get_img_annotation(ind=i) File "/content/drive/MyDrive/My_project_folder/Chainer_Realtime_Multi-Person_Pose_Estimation/coco_data_loader.py", line 304, in get_img_annotation ignore_mask = np.zeros(img.shape[:2], 'bool') AttributeError: 'NoneType' object has no attribute 'shape'