Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Untested. You cannot do exactly from imageio to cv2. The cv2 will take as care of it.

digimg = cv2.imread('cell1.png', cv2.IMREAD_GRAYSCALE))
img_resize = cv2.resize(digimg, (128,128))
img_axis = img_resize[np.newaxis,:,:,np.newaxis]

print(img_axis.shape)
print(np.argmax(model.predict(img_axis)[0]))