MCPcopy Create free account
hub / github.com/DragonisCV/RAM / _test_processing

Method _test_processing

ram/data/base/base_dataset.py:33–38  ·  view source on GitHub ↗
(self, img_gt, img_lq, scale)

Source from the content-addressed store, hash-verified

31 return img_gt, img_lq
32
33 def _test_processing(self, img_gt, img_lq, scale):
34 if self.opt.get('test_crop', False):
35 gt_size = self.opt['gt_size']
36 img_gt, img_lq = center_crop(img_gt, gt_size), center_crop(img_lq, gt_size)
37 img_gt = img_gt[:img_lq.shape[0] * scale, :img_lq.shape[1] * scale, :]
38 return img_gt, img_lq
39
40 def _process_images(self, img_gt, img_lq):
41 img_gt, img_lq = img2tensor([img_gt, img_lq], bgr2rgb=True, float32=True)

Callers 7

__getitem__Method · 0.80
__getitem__Method · 0.80
__getitem__Method · 0.80
__getitem__Method · 0.80
__getitem__Method · 0.80
__getitem__Method · 0.80
__getitem__Method · 0.80

Calls 2

center_cropFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected