Gonna catch em all.

This commit is contained in:
Casper 2019-04-24 09:41:57 +02:00
parent f2a2534c34
commit cde518c14e

View File

@ -7,10 +7,11 @@ import numpy as np
from main import find_occupied_squares
from runner import find_homography, warp_board
# Load base64 encoded image from stdin
from tensor_classifier import predict_board
while True:
try:
stdin = sys.stdin.readline()
stdin_decoded = base64.b64decode(stdin)
img_array = np.frombuffer(stdin_decoded, dtype=np.uint8)
@ -30,3 +31,5 @@ while True:
}
print(json.dumps(result))
except Exception as e:
print(e)