Hi @tulasiram58827 thank you for the awesome work on converting craft to tflite, I am trying to predict images from craft on android devices. I am having trouble converting input images and apply preprocessing before running inference on the model.
Bro can you please guide me on how shall i proceed with converting the following code :
`
image = loadImage(image_path)
image = cv2.resize(image, dsize=(800, 1280), interpolation=cv2.INTER_LINEAR)
img_resized, target_ratio, size_heatmap = resize_aspect_ratio(image, canvas_size, interpolation=cv2.INTER_LINEAR, mag_ratio=mag_ratio)
ratio_h = ratio_w = 1 / target_ratio
preprocessing
x = normalizeMeanVariance(img_resized)
x = torch.from_numpy(x).permute(2, 0, 1) # [h, w, c] to [c, h, w]
x = Variable(x.unsqueeze(0)) # [c, h, w] to [b, c, h, w]
forward pass
x = x.cpu().detach().numpy()
`