Solved by vmirly1 in post #2 
              
              
                Since your image has only 1 channel, then you should remove the last channel. So instead of having shape (640, 640, 1) you should have (640, 640): 
np_img = np_img[:, :, 0]
plt.imshow(np_img)