Skip to content

ENH: Add cerebparc segmentation script fixed DiceCE/Hausdorff weights#41

Open
jhlegarreta wants to merge 1 commit intomainfrom
AddCerebParcScheduler
Open

ENH: Add cerebparc segmentation script fixed DiceCE/Hausdorff weights#41
jhlegarreta wants to merge 1 commit intomainfrom
AddCerebParcScheduler

Conversation

@jhlegarreta
Copy link
Copy Markdown
Collaborator

Add cerebparc segmentation script fixed DiceCE/Hausdorff weights.

@jhlegarreta
Copy link
Copy Markdown
Collaborator Author

jhlegarreta commented May 6, 2024

The Hausdorff (distance map-based) loss computation requires large amounts of GPU memory, and the scripts fail frequently at

File "/home/jhlegarreta/src/dmriseg/scripts/train_cerebparc_scheduler.py", line 436, in <listcomp>
    w * loss_fn(outputs, labels)
        ^^^^^^^^^^^^^^^^^^^^^^^^

even when using the 24 GB GPU.

That is why many of the Hausdorff loss computation implementations that I have seen accept an idc or index parameter, so that the distance map-based losses can be computed separately for each label, and then be added. Something to be taken into account.

Applies to PRs #37, #38 and #40 as well.

Add cerebparc segmentation script fixed DiceCE/Hausdorff weights.
@jhlegarreta jhlegarreta force-pushed the AddCerebParcScheduler branch from 57d01c6 to 47a2753 Compare May 21, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant