chore: continued working on #36
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user