Closed rithd closed 4 years ago
It is a part of the pre-processing done to the image. Since the input images were pre-processed similarly while training it is necessary to perform these operations on the inputs before passing to the model for inference as well.
The code of the client is that:
if scaling == 'INCEPTION': scaled = (typed / 128) - 1 elif scaling == 'VGG': if c == 1: scaled = typed - np.asarray((128,), dtype=npdtype) else: scaled = typed - np.asarray((123, 117, 104), dtype=npdtype) else: scaled = typed
Before the client sends the array to server, it scales the array with its rule. And if I deploy the Inception or VGG models with local tf enviorment, I needn't to scale the image. So if the scaling is only need for triton?
And I also find that, for a MobileNet image classfication model , if I didn't scale the image, it couldn't classfy the image in order. But if I scaled the array as Inception, it works. Why?