agaldran / lwnet

State-of-the-art retinal vessel segmentation with minimalistic models
MIT License
68 stars 26 forks source link

AV segmentation training #6

Closed smessica closed 2 years ago

smessica commented 2 years ago

Hi Adrian, First of all, your paper and code are great! I'm using your code in order to train an av segmentation model, and you convert the GT segmentation to 1 channel (in label encoding function) but the Unets predictions have 4 channels. Is this on purpose? if not, should I convert the GT segmentation to 4 channels array as well? (and which channel should I assign to each category: vessel, artery, uncertain, background?)

Thanks, Shvat

agaldran commented 2 years ago

Hi Shvat,

Well, yes, in pytorch the cross-entropy loss, which you typically use for multi-class classification problems, expects:

Have a look at the documentation, scroll down to where it explains Shapes. Note that this is different from the binary cross entropy loss, which I use in the vessel segmentation case, in which case both input and target have the same dimension.

agaldran commented 2 years ago

Hi again,

I am closing as this does not seem to be an issue, feel free to reopen if needed.

Adrian