Hello,
I am having raw JPEG bytes (as byte[]
), which I am trying to decode for inference.
I was thinking of loading them into a TString tensor
and using tf.image.DecodeImage
. Or is there a better way?
I’m trying to read bytes content to a Tensor. Looking at legacy samples it used to be possible to simply do:
byte[] bytes = Files.readAllBytes(Paths.get(filename));
try (Tensor<String> input = Tensors.create(bytes);
However on newer versions there doesn’t seem to be Tensor.create
. Is there a newer equivalent?