Custom Model Mean/Std
python
tensor = np.array(img, dtype=np.float32) / 255.0
tensor = (tensor.transpose(2, 0, 1) - meta['mean']) / meta['std']
return np.expand_dims(tensor, axis=0)
Some models require this normalization algorithm. Could you please add this part of the algorithm?
Custom Model Mean/Std
python
tensor = np.array(img, dtype=np.float32) / 255.0
tensor = (tensor.transpose(2, 0, 1) - meta['mean']) / meta['std']
return np.expand_dims(tensor, axis=0)
Some models require this normalization algorithm. Could you please add this part of the algorithm?