I am making an application that compares two images to find the similarity.
My model has been trained without image normalization.
I want convert to image to Tensor without normalization.
What should I do?
public Tensor recognize(Bitmap image){
// Tensor input = TensorImageUtils.bitmapToFloat32Tensor(
// image,
// TensorImageUtils.TORCHVISION_NORM_MEAN_RGB,
// TensorImageUtils.TORCHVISION_NORM_STD_RGB);
float[] a = new float[]{1.0f, 1.0f, 1.0f};
float[] b = new float[]{1.0f, 1.0f, 1.0f};
Tensor input = TensorImageUtils.bitmapToFloat32Tensor(
image, a, b);
Tensor output = module.forward(IValue.from(input)).toTensor();
return output;
}