pred is an array type, first converted to 8 bits.
pred = np.array(pred, np.uint8) cv2.imshow(“123”, pred) cv2.waitKey(0)