milesial / Pytorch-UNet

PyTorch implementation of the U-Net for image semantic segmentation with high quality images
GNU General Public License v3.0
9.01k stars 2.47k forks source link

Always [0,1] mask on mutil-classes models #471

Closed g-mero closed 8 months ago

g-mero commented 9 months ago

expect: 124

but result: res

train script python train.py -e 5 -b 10 -s 1 -v 10 -c 4 --amp

predict script python predict.py -m checkpoints/checkpoint_epoch4.pth -s 1 -c 4 -i data/imgs/124.jpg -o res.png

g-mero commented 8 months ago

cause by data under-fitting. improve dataset and increase epochs fix this

BenjaminSchaar commented 2 months ago

I have the same problem! I changed the color mapping to fit multiple classes but I only get 2 classes :(