Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SW_FastEdit code #1689

Merged
merged 7 commits into from
Sep 25, 2024
Merged

Add SW_FastEdit code #1689

merged 7 commits into from
Sep 25, 2024

Conversation

matt3o
Copy link
Contributor

@matt3o matt3o commented May 12, 2024

See this discussion for details, also @diazandr3s

Paper link
Link to the full code base.

Current limitations:

  • all parameter are currently tuned for AutoPET
  • currently inference only, I'll see if I can get training to work
  • Pretrained weights only available for AutoPET, can be found here: https://bwsyncandshare.kit.edu/s/Yky4x6PQbtxLj2H , rename it to pretrained_sw_fastedit.pt and put them into the folder radiology/model/. This model was pretrained on tumor-only AutoPET volumes.
    (where do can upload the weights?)
  • main code is not integrated into MONAI, thus some additional transforms have been added

Signed-off-by: Matthias Hadlich <[email protected]>
@SachidanandAlle
Copy link
Collaborator

Can you fix the precommit checks.. you can run locally to identify the issues..

Please check the contrib guidelines to know the command to run the same locally

@matt3o
Copy link
Contributor Author

matt3o commented May 13, 2024 via email

pre-commit-ci bot and others added 2 commits May 20, 2024 08:35
for more information, see https://pre-commit.ci

Signed-off-by: Matthias Hadlich <[email protected]>
Signed-off-by: Matthias Hadlich <[email protected]>
Signed-off-by: Matthias Hadlich <[email protected]>
@matt3o
Copy link
Contributor Author

matt3o commented May 20, 2024

@SachidanandAlle Should work with this commit. If you want to try it yourself, use the following weights file https://drive.google.com/file/d/1p59s-ehEyp39vlqULAd1eB8gV4hkmxR0/view?usp=drive_link
(I changed the code to use the newer, AutoPET 3rd place ScaleIntensityRangePercentilesd, which helps to make the results more robust)

Please tell me if there is anything else you need.

@SachidanandAlle
Copy link
Collaborator

Assigning to @diazandr3s to verify and merge

@diazandr3s diazandr3s marked this pull request as ready for review July 7, 2024 17:04
@diazandr3s
Copy link
Collaborator

Hi @matt3o,

Many thanks for your contribution and sorry I just came back to you.

Just to confirm, this model doesn't have the training class, right? can you please comment more on how you trained the model?

I've uploaded the model to the MONAI Label repository - now users should be able to run inference as the other radiology models. Here is the link to the model for your reference: https://github.com/Project-MONAI/MONAILabel/releases/download/pretrained/radiology_segmentation_sw_fastedit_pet.pt

I've also made a video shwoing how this model works using a sample PET I have:

fastedit_pet.mp4

Many thanks again!

@matt3o
Copy link
Contributor Author

matt3o commented Aug 11, 2024

@diazandr3s Very nice, thanks for the integration :) Sadly I did not find the time to implement the training part. Please ping if someone is asking for it specifically and I'll see if I can get it to work. I think the greatest benefit of the model is specifically the non-interactive pretraining part - the rest is only slightly different from DeepEdit.

About the training: 400 epochs of non-interactive pretraining on all AutoPET samples each epoch, so still with all three channels, but two of them are just zeroed out. Then 200 epochs of interactive training using the DeepEdit interactive sampling of clicks, but in very revamped manner - a lot faster and with some improvements.
Some of the details and data can be found in this paper: https://arxiv.org/abs/2311.14482
What you are seeing is the model on the bottom right, which had the best initial segmentation while still improving a lot with added clicks.
image

@diazandr3s diazandr3s merged commit 4736d5f into Project-MONAI:main Sep 25, 2024
24 checks passed
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.

3 participants