ENHANCE-PET / MOOSE

MOOSE (Multi-organ objective segmentation) a data-centric AI solution that generates multilabel organ segmentations to facilitate systemic TB whole-person research.The pipeline is based on nn-UNet and has the capability to segment 120 unique tissue classes from a whole-body 18F-FDG PET/CT image.
https://enhance.pet
GNU General Public License v3.0
180 stars 28 forks source link

Same error as issue 41 #48

Closed penguin1109 closed 1 year ago

penguin1109 commented 1 year ago

I am currently trying to run your MOOSE software on the PET/CT DICOM Images. However, although I the RESULTS_FOLDER variable has been set, the same index error as issue 41 seems to occur.

Might there be any possible reasons for this? My data folder is

base_folder
 |_ 01
    |- CTIMAGE
       |- xx.dcm 
       ..
    |- PETIMAGE

and I have run the moose -f base_folder command.

Thanks

LalithShiyam commented 1 year ago

Hi there, do you have enough RAM?

penguin1109 commented 1 year ago

I'm sure I have enough RAM - can it be the cause of this issue??

LalithShiyam commented 1 year ago

Sure, there are many reasons why this can fail.

If you have enough RAM, can you just try it with CT? Just remove the PT folder for now. And see if it works. If it still doesn't work, I am happy to look at the anonymized data (if thats ok).

penguin1109 commented 1 year ago

Thanks so much for the quick response!! I have tried with removing the PET folder, and it does not crash. However, it takes quite a lot of time. Approximately how much does it take to process one person's scan set?? (Approximately 300 slices)

LalithShiyam commented 1 year ago

I would say around 30 min. Make sure you have enough RAM (256 GB), if there is not enough memory Ubuntu silently kills the process.

The reason for the long processing time is: there are five models (each takes 6 min) that are being run sequentially. That's why it's super slow. I have to say it's not optimized for speed. I am still working on version 2.0, based on prelim benchmarks I think v2.0 is 6x faster and will work on a 32GB system.

Sorry about the slowness. I really didn't think about the speed with v1.0.

penguin1109 commented 1 year ago

Well, I found that my RAM was only 64GB.. Would it be possible to manually get segmentation results from only the abdominal organs with limited memory? (This is what I actually need)

LalithShiyam commented 1 year ago

Yes, it is possible to get only the abdominal organs, but you might still have memory constraints. I would use a swap file (https://www.techtarget.com/searchwindowsserver/definition/swap-file-swap-space-or-pagefile) to fake your RAM and get it running.

penguin1109 commented 1 year ago

Thanks so much! Can you not close this comment for a while??? I am trying to try out your first solution (using nnUNet_predict), but my GPU is full.

LalithShiyam commented 1 year ago

If nothing works, you can reach me at: lalith.shiyamsundar@meduniwien.ac.at

will close this for now :)

penguin1109 commented 1 year ago

Actually, I have tried out the NNUNet_predict -t 123, but first, because of the RAM memory, the ssh server seemed to have crashed as you told me. Also, I was not able to find where the segmented map is supposed to be saved. (I actually cannot understand why the process has to take the RAM memory - I would appreciate it if you could explain the reason for me?)

If it is possible, if I send you the PET/CT zip file (it contains 54 cases), could you possibly get the inference results for me??? And since the data is actually private, I wish you would be able to delete the files after the process is finished! (Kinda worried because it is the patient's data )

I'll be looking forward for your reply!

Thanks. Jihye Lee

On Thu, Mar 9, 2023 at 7:28 PM nutellaBear @.***> wrote:

Closed #48 https://github.com/QIMP-Team/MOOSE/issues/48 as completed.

— Reply to this email directly, view it on GitHub https://github.com/QIMP-Team/MOOSE/issues/48#event-8706038767, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJFWFZKXUQBYSGIG4BLECTW3GWGRANCNFSM6AAAAAAVUW3YYU . You are receiving this because you authored the thread.Message ID: @.***>

LalithShiyam commented 1 year ago

Sure :)

penguin1109 commented 1 year ago

Thank you so much!!!!!!! This organ segmenting is the essential step for making the pseudo label of prostate cancer, and most high dose CT segmentation models really didn't make good results on low dose PET/CT images, so I was so glad to find your work!!

https://drive.google.com/file/d/1Tj6CI5b_imA1d_LWKF0DKISKT0brniga/view?usp=sharing

The gdrive link above contains the data in zip file!! Would it be possible to get the result of a single sample before all the process ends???? Thanks again !

Jihye Lee

On Fri, Mar 10, 2023 at 4:59 AM nutellaBear @.***> wrote:

Sure :)

— Reply to this email directly, view it on GitHub https://github.com/QIMP-Team/MOOSE/issues/48#issuecomment-1462690598, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJFWFY6UJ5UAW6XN32NCRTW3IZBJANCNFSM6AAAAAAVUW3YYU . You are receiving this because you authored the thread.Message ID: @.***>

penguin1109 commented 1 year ago

Does the data I have given you process well without any errors?? Again, thanks so much for your effort!

On Thu, Mar 9, 2023 at 7:28 PM nutellaBear @.***> wrote:

Closed #48 https://github.com/QIMP-Team/MOOSE/issues/48 as completed.

— Reply to this email directly, view it on GitHub https://github.com/QIMP-Team/MOOSE/issues/48#event-8706038767, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJFWFZKXUQBYSGIG4BLECTW3GWGRANCNFSM6AAAAAAVUW3YYU . You are receiving this because you authored the thread.Message ID: @.***>

LalithShiyam commented 1 year ago

Hi Jihye, I am downloading your dataset now, I will run it and keep you posted via your mail.

Also, MOOSE was never meant to run on PSMA-PET, it was built for FDG-PET/CT only :D! Just clarifying.

penguin1109 commented 1 year ago

Thanks a lot! I’m concerned that this might be too time consuming for you..

On Fri, 10 Mar 2023 at 19:15, nutellaBear @.***> wrote:

Hi Jihye, I am downloading your dataset now, I will run it and keep you posted via your mail.

— Reply to this email directly, view it on GitHub https://github.com/QIMP-Team/MOOSE/issues/48#issuecomment-1463580965, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJFWF2RVV36FUWEUKQ5HA3W3L5N5ANCNFSM6AAAAAAVUW3YYU . You are receiving this because you authored the thread.Message ID: @.***>

Keyn34 commented 1 year ago

Hello @penguin1109,

You can download the segmentation results of MOOSE here: https://filesender.aco.net/?s=download&token=73cdc98e-f5ed-40e1-bb0d-37490be1c62c

Please note that I had to remove the PET folder, as MOOSE does not support PSMA. The segmentations are in the labels folder within the respective MOOSE-X folder.

penguin1109 commented 1 year ago

I am so grateful for the PERFECT RESULTS!!!! It's so surprising that the difference of pretrained models trained on either PET/CT images or plain CT images are so different! I have trained some segmentation models on the BTCV dataset, and though it worked well on that data, it failed to work properly on ours PSMA PET/CT dataset.

I am currently doing a research on segmenting organs from PET images, and do you suppose it would at least be possible? What I am planning to try out on is PET to CT style transfer and segmentation task at the same time!! I was so impressed by your software that I wanted to get some small advice from you..!! :)

Again, thank you so so so much for the fabulous results... Without your help, I could not have stepped forward on the research project..

Jihye Lee

On Sat, Mar 11, 2023 at 10:36 PM Sebastian Gutschmayer < @.***> wrote:

Hello @penguin1109 https://github.com/penguin1109,

You can download the segmentation results of MOOSE here: https://filesender.aco.net/?s=download&token=73cdc98e-f5ed-40e1-bb0d-37490be1c62c

Please note that I had to remove the PET folder, as MOOSE does not support PSMA. The segmentations are in the labels folder within the respective MOOSE-X folder.

— Reply to this email directly, view it on GitHub https://github.com/QIMP-Team/MOOSE/issues/48#issuecomment-1464913640, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJFWFZIKMOM3EGUP56GIMDW3R5XNANCNFSM6AAAAAAVUW3YYU . You are receiving this because you were mentioned.Message ID: @.***>

LalithShiyam commented 1 year ago

Thank you @Keyn34 for sending @penguin1109 her data back. Much appreciated as usual ✌🏼🫶🏽

@penguin1109 every PET study comes with a CT. You can just transfer the CT segmentations back to the PET, since they are acquired fairly together. If you are just interested in getting the abdominal organs, I would just use CT and transfer the segmentation to the corresponding PT, using the reslice filters from simpleitk. PT is useful when you want to segment something like prostate lesions/tumors.

This would be my two cents.

penguin1109 commented 1 year ago

My research topic is segmenting all organs only with the PET since there seems to be for my information, no research done on it! So I was planning to train my model to get segmented results of all organs only with the PET inputs, which was why I needed labels generated from the ct images!!

Do you possibly think this would be at least possible??

Thanks so much for your help!

On Sat, 11 Mar 2023 at 23:52, nutellaBear @.***> wrote:

Thank you @Keyn34 https://github.com/Keyn34 for sending @penguin1109 https://github.com/penguin1109 her data back.

@penguin1109 https://github.com/penguin1109 every PET study comes with a CT. You can just transfer the CT segmentations back to the PET, since they are acquired fairly together. If you are just interested in getting the abdominal organs, I would just use CT and transfer the segmentation to the corresponding PT, using the reslice filters from simpleitk. PT is useful when you want to segment something like prostate lesions/tumors.

This would be my two cents.

— Reply to this email directly, view it on GitHub https://github.com/QIMP-Team/MOOSE/issues/48#issuecomment-1464927913, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJFWFYAOIOLVO6F2BAD3KTW3SGSHANCNFSM6AAAAAAVUW3YYU . You are receiving this because you were mentioned.Message ID: @.***>

LalithShiyam commented 1 year ago

Sure it's possible and there has been research done on it. I would suggest you to google the PSMA-HORNET paper. They did the segmentations based on only PT as far as I remember.

penguin1109 commented 1 year ago

Oh I see!! I will check out that paper!

I really appreciate all the help you gave me! :D I will be looking for your MOOSE version 2!😆

Jihye Lee

On Sun, 12 Mar 2023 at 00:08, nutellaBear @.***> wrote:

Sure it's possible and there has been research done on it. I would suggest you to google the PSMA-HORNET paper. They did the segmentations based on only PT as far as I remember.

— Reply to this email directly, view it on GitHub https://github.com/QIMP-Team/MOOSE/issues/48#issuecomment-1464931223, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJFWFY4N3TWQR4ZEMEJMBLW3SIPPANCNFSM6AAAAAAVUW3YYU . You are receiving this because you were mentioned.Message ID: @.***>

LalithShiyam commented 1 year ago

Stay tuned ✌🏼cool things underway!

LalithShiyam commented 11 months ago

Hi @penguin1109, moosev2 is online ;) just thought i would reach out to you!