MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / __init__

Method __init__

PATH/core/augmentation.py:414–436  ·  view source on GitHub ↗
(self, height, width, re)

Source from the content-addressed store, hash-verified

412
413class ReidAugmentation(object):
414 def __init__(self, height, width, re):
415 normalizer = T.Normalize(mean=[0.485, 0.456, 0.406],
416 std=[0.229, 0.224, 0.225])
417
418 self.train_transformer = T.Compose([
419 T.Resize((height, width)),
420 T.RandomHorizontalFlip(),
421 T.Pad(10),
422 T.RandomCrop((height, width)),
423 T.ToTensor(),
424 normalizer,
425 ])
426
427 if re:
428 self.train_transformer = T.Compose([
429 T.Resize((height, width)),
430 T.RandomHorizontalFlip(),
431 T.Pad(10),
432 T.RandomCrop((height, width)),
433 RandomSizedEarser(),
434 T.ToTensor(),
435 normalizer,
436 ])
437
438 def __call__(self, img):
439 ## transform

Callers

nothing calls this directly

Calls 1

RandomSizedEarserClass · 0.70

Tested by

no test coverage detected