milesial / Pytorch-UNet

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

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

Closed g-mero closed 10 months ago

g-mero commented 10 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 10 months ago

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

BenjaminSchaar commented 4 months ago

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