Skip to content

Commit

Permalink
fixed transformation bug
Browse files Browse the repository at this point in the history
Changed the order of interpolation to nearest-neighbour, fixing a bug that shifted the pixel values at the boundaries of masks
  • Loading branch information
nthndy authored Apr 8, 2022
1 parent 9cae310 commit a5e3b12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion octopuslite/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __call__(self, x, idx):
return x

tform = tf.AffineTransform(translation=self.transforms[idx, :2, 2])
return tf.warp(x, tform, preserve_range=True)
return tf.warp(x, tform, order = 0, preserve_range=True)


def parse_transforms(path: os.PathLike) -> StackTransformer:
Expand Down

0 comments on commit a5e3b12

Please sign in to comment.