How does the target look like for the dice loss ?
I can't find how the target should look like when given to the loss. Should it have 4 dimensions where every cell is either a 1 or a 0 ? Or should it be layer 0 has all value 0, layer 1 has value 1 where it is the eye, layer 2 has value 2 on cells that are the iris and layer 3 has value 3 on cells that are the iris ?
In my source code,
The target (ground truth) can have size batch x H x W - with values of (0, 1, 2, 3) for 4 classes, or batch x 4 x H x W - onehot encoding of batch x H x W. You can check line 287-290 in utils.py for the convert from batch x H x W to batch x 4 x H x W.
@th2l Thank you. I figured that out myself after looking at the code and paper. One thing that is not clear for me is in the table 1 from this paper: https://arxiv.org/abs/1911.01049. The first layer is a conv2d with stride 2 but the input size stays the same. How is this done ? Did you guys add a lot of padding ?
It's our typo error, It should be 320 x 200, 160 x 100, 160 x 100, 80 x 50, 40 x 25