Skip to content

How to use Mixup #1489

@wjzhang-ty

Description

@wjzhang-ty

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')

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions