Skip to content
Discussion options

You must be logged in to vote

Hi @Spawnfile, yeah that's right. I just missed that. There is an interpolation mode used in Resize which defaults is area. You need to set it to "nearest" for the label.

mode: {``"nearest"``, ``"nearest-exact"``, ``"linear"``, ``"bilinear"``, ``"bicubic"``, ``"trilinear"``, ``"area"``}
The interpolation mode. Defaults to ``"area"``.

Something like:

Resized(keys=["img", "seg"], spatial_size=[128, 128], mode=["bilinear", "nearest"])

Thanks!

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@Spawnfile
Comment options

@KumoLiu
Comment options

@Spawnfile
Comment options

@KumoLiu
Comment options

Answer selected by Spawnfile
@Spawnfile
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #6940 on September 05, 2023 02:32.