AttributeError: 'NoneType' object has no attribute 'shape'
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:
- Tensorflow 1.8 in conda environment.
- Python 2.7
- Ubuntu 16.04
- gcc -5.4
- Cuda 9.0
- OpenCV 3.4.2
Did anyone of you has ever met the similar problem? Thanks!
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.
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