mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-24 07:36:24 +01:00
Rename image.bin -> image-idx3-ubyte
This commit is contained in:
parent
6652488b44
commit
4195dc91da
@ -34,14 +34,14 @@ def post_json_handler():
|
||||
def recognize_mnist(image):
|
||||
"""Appelle le programme C reconnaissant les images"""
|
||||
# Créer le fichier binaire
|
||||
write_image_to_binary(image, ".cache/image.bin")
|
||||
write_image_to_binary(image, ".cache/image-idx3-ubyte")
|
||||
|
||||
try:
|
||||
output = subprocess.check_output([
|
||||
'out/main',
|
||||
'recognize',
|
||||
'--modele', '.cache/reseau.bin',
|
||||
'--in', '.cache/image.bin',
|
||||
'--in', '.cache/image-idx3-ubyte',
|
||||
'--out', 'json'
|
||||
]).decode("utf-8")
|
||||
json_data = json.loads(output.replace("nan", "0.0"))["0"]
|
||||
|
Loading…
Reference in New Issue
Block a user