Skip to content

Instantly share code, notes, and snippets.

@level14taken
Last active December 29, 2020 11:00
Show Gist options
  • Select an option

  • Save level14taken/2aa6da23c05256b6f4b9f1acae9aecf0 to your computer and use it in GitHub Desktop.

Select an option

Save level14taken/2aa6da23c05256b6f4b9f1acae9aecf0 to your computer and use it in GitHub Desktop.
test_transforms=PadIfNeeded(128,128,cv2.BORDER_REPLICATE),
Normalize(mean=(0,0,0),std=(1,1,1,))])
transform_train = Compose([
HorizontalFlip(p=.5),
Compose([RandomCrop(90,90),
Resize(101,101)],p=.3),
OneOf([RandomBrightness(.1),
RandomContrast(.1),RandomGamma()],p=.2),
PadIfNeeded(256//2,256//2,cv2.BORDER_REPLICATE),
Normalize(mean=(0,0,0),std=(1,1,1,))])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment