(self, use_cuda=True, geometric_model='affine', crop_factor=9 / 16, output_size=(240, 240),
padding_factor=0.5)
| 150 | """ |
| 151 | |
| 152 | def __init__(self, use_cuda=True, geometric_model='affine', crop_factor=9 / 16, output_size=(240, 240), |
| 153 | padding_factor=0.5): |
| 154 | assert isinstance(use_cuda, (bool)) |
| 155 | assert isinstance(crop_factor, (float)) |
| 156 | assert isinstance(output_size, (tuple)) |
| 157 | assert isinstance(padding_factor, (float)) |
| 158 | self.use_cuda = use_cuda |
| 159 | self.crop_factor = crop_factor |
| 160 | self.padding_factor = padding_factor |
| 161 | self.out_h, self.out_w = output_size |
| 162 | self.rescalingTnf = GeometricTnf('affine', out_h=self.out_h, out_w=self.out_w, |
| 163 | use_cuda=self.use_cuda) |
| 164 | self.geometricTnf = GeometricTnf(geometric_model, out_h=self.out_h, out_w=self.out_w, |
| 165 | use_cuda=self.use_cuda) |
| 166 | |
| 167 | def __call__(self, batch): |
| 168 | image_batch, theta_batch = batch['image'], batch['theta'] |
nothing calls this directly
no test coverage detected