Pytorch-UNet icon indicating copy to clipboard operation
Pytorch-UNet copied to clipboard

mask format problem

Open way790110 opened this issue 3 years ago • 1 comments

i hava a some question.

I want to create my own dataset for trainnig.

my dataset only have one class(set class to 2). if i set class to 1 ,loss is always zero, there wiil be no change.

when mask format is boolean , my mask is all black. but this can training.

when mask format is only 0 and 255, my mask is normal (black and white), but this setting have error.

Screenshot from 2021-11-18 20-21-22

when mask format is only 0 and 255 and setting class to 255. that can training, but set class to 255 is strange.

how to setting the model , i can use normal mask and set class to 2 ?

Can someone help me or give me some suggestions?

way790110 avatar Nov 18 '21 12:11 way790110

Your mask should be boolean: 0/1. Not 0/2, not 0/255. You say that it's training fine with a boolean mask. What is the issue then?

milesial avatar Nov 18 '21 13:11 milesial