arcface-pytorch
arcface-pytorch copied to clipboard
Question of the test.py?
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?