How to use Mixup #1490
Unanswered
wjzhang-ty
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I tried a three-class semantic segmentation, and the target image lost a class after Mixup (Output Image contains only RB no B). Hope you can give me some hints. thank you for your time
code↓
mixup_fn = Mixup(num_classes=cfg['classes'], mixup_alpha=0.8, cutmix_alpha=1.0,
cutmix_minmax=None,
prob=1.0,
switch_prob=0.5,
mode='batch',
label_smoothing=0)
// image shape: 6,3,256,256; mask.shape:6,1,256,256; output.shape:393216,3
// The values in the mask are 0, 1, 2
image, mask = mixup_fn(image, mask)
// save img
vutils.save_image(mask.reshape(6,256,256,3).contiguous().permute(0, 3, 1, 2), './imgs/mixup_mask.png')
Beta Was this translation helpful? Give feedback.
All reactions