Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvain-morin committed Feb 15, 2024
1 parent 72922bd commit 6ade4fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/inat_inferrer.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def prepare_image_for_inference(self, file_path):

filename = os.path.basename(file_path)
output_file_path = '/home/inaturalist/vision/save/' + filename
image_bytes = tf.io.encode_jpeg(image)

resized_image_uint8 = tf.cast(image, tf.uint8)
image_bytes = tf.io.encode_jpeg(resized_image_uint8)
with tf.io.gfile.GFile(output_file_path, 'wb') as f:
f.write(image_bytes.numpy())

Expand Down

0 comments on commit 6ade4fb

Please sign in to comment.