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

[Hint] Data Pre-processing Details #20

Closed
youli22 opened this issue Dec 6, 2023 · 3 comments
Closed

[Hint] Data Pre-processing Details #20

youli22 opened this issue Dec 6, 2023 · 3 comments
Labels

Comments

@youli22
Copy link

youli22 commented Dec 6, 2023

Dear team,
I hope this message finds you well. I recently read the SAM-Med3D paper and came across an intriguing detail in Section 3.2. It was mentioned that cases with a physical size below 1 square cm or with any single dimension shorter than 1.5 cm were removed to enhance the visibility of target masks. I found this approach quite interesting and was wondering if there are any plans to release the code for processing the data?
Thank you for your time and consideration.
Best regards,
You Li

@blueyo0
Copy link
Collaborator

blueyo0 commented Dec 6, 2023

Hi, You Li,

I have received your request. I plan to provide more example data with the process scripts. This will take some time 😢, so I hope you can wait for a while. Thank you.

@blueyo0 blueyo0 pinned this issue Dec 6, 2023
@blueyo0
Copy link
Collaborator

blueyo0 commented Dec 10, 2023

Hi, the preprocess script is uploaded into the util folder 😉 ~

BYI, for the details of smaller volumetric target, we first offline summarize the size and volume like this:

gtSize_Ts = {
'face/ct_Totalsegmentator_dataset/imagesTs/s0543.nii.gz': (4, 17, 34, 1025),
'gallbladder/ct_Totalsegmentator_dataset/imagesTs/s1176.nii.gz': (44, 43, 48, 26463),
}

Then we filter these files like this:

max_size = int(128*0.95)
min_size = 10
min_volume = 1000
for k, v in gtSize_Ts.items():
    h, w, d, sz = v
    if(h>max_size or w>max_size or d>max_size):
        oversize_list.append(k)
    elif(h<min_size or w<min_size or d<min_size):
        oversize_list.append(k)
    elif(sz<min_volume):
        oversize_list.append(k)

Hope these details help you.

@blueyo0 blueyo0 changed the title About data preprocessing - mask removing Data Pre-processing Details Dec 10, 2023
@blueyo0 blueyo0 added the hint label Dec 10, 2023
@youli22
Copy link
Author

youli22 commented Dec 11, 2023

Thank you so much for sharing the code!
I'm going to try it out and see how it goes. If I encounter any issues, I'll be sure to reach back out. Really appreciate your help on this.
Wishing you all the best!

@blueyo0 blueyo0 changed the title Data Pre-processing Details [Hint] Data Pre-processing Details Dec 20, 2023
@blueyo0 blueyo0 closed this as completed May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants