ClinicalDataScience / datacentric-challenge

Apache License 2.0
7 stars 3 forks source link

Number of out channels for the dynunet #1

Closed Zhack47 closed 4 months ago

Zhack47 commented 4 months ago

Dear organizers,

I notice you used out_channels=1 Shouldn't this be out_channels=2, 1 channel for the background and 1 for the foreground ? Especially since the fixed loss is using Cross Entropy

Regards

JakobDexl commented 4 months ago

Hi Zhack47,

thanks for the question. We actually formulated the task as binary problem since we just have the classes foreground and background. The CE loss is a BCE loss in our case (ce_loss in the monai forward function) because we do not onehot encode the labels and use the option sigmoid=True in the loss definition (line 52). Because of that the the forward function also uses a torch.ge rather than torch.argmax. This was just a design choice and should be equivalent to out_channels=2, DiceCELoss(softmax=True, batch=True, to_onehot_y=True).

Best Jakob

Zhack47 commented 4 months ago

Thank you for this answer, I had not delved so far in the monai code ! Looking forward to start submitting our work to Autopet !

Best Zhack