I have the following code, I am trying to receive predictions through the TCP socket. While doing so I am able to receive the data but I retrieve error
while True:
frame = footage_socket.recv_pyobj()
print(type(frame)) # <class 'numpy.ndarray'>
predictions = img_to_array(frame)
tmp = np.zeros( predictions.shape )
for i in range( 0, 1 ):
tmp[i,:] = predictions[i, :]
predictions_result = m2.predict( tmp )
label_vgg16 = decode_predictions( predictions_result )
footage_socket.close()
Error
predictions = img_to_array(frame) ValueError: Unsupported image shape: (1, 224, 224, 64)
Thanks, help is highly appreciated.