chore: continued working on #36

This commit is contained in:
2023-10-10 15:56:00 +01:00
parent ef1348fe93
commit 998a583bdb
2 changed files with 8 additions and 1 deletions

View File

@@ -32,7 +32,13 @@ def pathToLabel(path):
#return tf.strings.as_string([path])
def decode_image(img):
{{ if eq .Model.Format "png" }}
img = tf.io.decode_png(img, channels={{.ColorMode}})
{{ else if eq .Model.Format "jpeg" }}
img = tf.io.decode_jpeg(img, channels={{.ColorMode}})
{{ else }}
ERROR
{{ end }}
return tf.image.resize(img, image_size)
def process_path(path):