meetps / pytorch-semseg

Semantic Segmentation Architectures Implemented in PyTorch
https://meetshah.dev/semantic-segmentation/deep-learning/pytorch/visdom/2017/06/01/semantic-segmentation-over-the-years.html
MIT License
3.39k stars 796 forks source link

target representation using one hot encoding instead of class index #229

Open aiwithshekhar opened 5 years ago

aiwithshekhar commented 5 years ago

for this repo targets have shape (M,N) where all the pixels represent class index (0-21) and cross entropy loss has been used. 1) Is it possible to convert targets to one hot encoding with dimension (M,N,21) where all the pixels represent 0 or 1. 2) For this (M,N,21) representation of targets should we use the same loss or we should switch to dice loss?