You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def normalize(img, mean, std):
# pytorch pretrained model need the input range: 0-1
img = img - mean
img = img.astype(np.float32) / 255.0
# img = img / std
return img
hi ycszen, i feel that there is a problem about the normalize function, the img passed into the function is lied in 0-255, while the mean found in the config.py is typically 0.4-0.5, so if the normalize should be changed into
def normalize(img, mean, std):
# pytorch pretrained model need the input range: 0-1
def normalize(img, mean, std):
# pytorch pretrained model need the input range: 0-1
img = img - mean
img = img.astype(np.float32) / 255.0
# img = img / std
hi ycszen, i feel that there is a problem about the normalize function, the img passed into the function is lied in 0-255, while the mean found in the config.py is typically 0.4-0.5, so if the normalize should be changed into
def normalize(img, mean, std):
# pytorch pretrained model need the input range: 0-1
thank you very much
The text was updated successfully, but these errors were encountered: