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
if range of values in uint8 is between 0-255, then using 127.5 as mean makes minimum to be -127.5 and maximum to 127.5. try it with 128, and it wont be equal
sorry @mtalhaubaid am not a maintainer of the repo, and since i tried running it within an existing environment, the requirements will be cluttered with other libraries as well as conda installed libraries.
def load_image(img_path):
image = cv2.imread(img_path, 0)
#image = cv2.resize(image, (112,112)).astype('float32')
image = cv2.resize(image, (128,128)).astype('float32')
if image is None:
return None
image = np.dstack((image, np.fliplr(image)))
image = image.transpose((2, 0, 1))
image = image[:, np.newaxis, :, :]
image = image.astype(np.float32, copy=False)
image -= 127.5
image /= 127.5
return image
why the number is 127.5 but not 128?
The text was updated successfully, but these errors were encountered: