In the paper, it introduce a corruption function that generates masks for non-acquired slices, enabling our method to in-paint the missing slices. For instance, on 1 × 1 × 4mm3 undersampled volumes, we create masks for three slices every four slices on the generated HR 1 × 1 × 1mm3 volumes.
but I cannot find it in code. I do found a downsample function though, but it downsamples all the planes.
`class ForwardDownsample(ForwardAbstract):
def init(self, factor):
self.factor = factor
# resolution of input x can be anything, but aspect ratio should be 1:1
def __call__(self, x):
x_down = F.interpolate(
x,
scale_factor=1 / self.factor,
mode="trilinear",
recompute_scale_factor=True,
align_corners=False,
) # BCHW
return x_down`
In the paper, it introduce a corruption function that generates masks for non-acquired slices, enabling our method to in-paint the missing slices. For instance, on 1 × 1 × 4mm3 undersampled volumes, we create masks for three slices every four slices on the generated HR 1 × 1 × 1mm3 volumes.
but I cannot find it in code. I do found a downsample function though, but it downsamples all the planes. `class ForwardDownsample(ForwardAbstract): def init(self, factor): self.factor = factor