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

Method __call__

PATH/core/augmentation.py:584–594  ·  view source on GitHub ↗
(self, img)

Source from the content-addressed store, hash-verified

582 std=[0.229, 0.224, 0.225])
583
584 def __call__(self, img):
585 ## transform
586 img = img[:,:,::-1]
587 img = cv2.resize(img, (self.width, self.height))
588 img = img.transpose((2,0,1))
589 if self.vit:
590 img = torch.Tensor(img/255.)
591 img = self.normalizer(img)
592 else:
593 img = torch.Tensor(img)
594 return img
595
596
597## Author: liuyakun1

Callers

nothing calls this directly

Calls 1

resizeMethod · 0.80

Tested by

no test coverage detected