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

Inference Doubt #18

Open
hari3100 opened this issue Sep 3, 2024 · 2 comments
Open

Inference Doubt #18

hari3100 opened this issue Sep 3, 2024 · 2 comments

Comments

@hari3100
Copy link

hari3100 commented Sep 3, 2024

Hi @baifanxxx @BAAI-DCAI ,
thank you for this amazing work !
Im trying to do the inference of M3D-LaMed-Phi-3-4B
Th question I have is,
image
So to prepare my 3D medical images , which are currently in Nifti format , how can i do these steps?....Do you have any sample of how to convert our own data to this format of .npy, as there are a lot steps to get the nifti file be converted into a .npy without loosing a lot of important things in the nifti file.

I'd be really grateful for any guidance or feedback or help from your end.
Thank you for your time and energy!

@baifanxxx
Copy link
Collaborator

Hi,

For the original CT data, such as in Nifti format, to obtain better performance, we need to adjust the target window to view the corresponding disease, such as the bone window or lung window. Then, If you only focus on specific areas and organs, whole-body CT is unnecessary. You can select slice range, crop to specific areas, and then resize. The above methods aim to retain valid information as much as possible so that the input meets the requirements of M3D. If you do nothing but simply resize the image to the target size and normalize it to 0-1, M3D will still be able to infer the image, even if the results are not as good.

@hari3100
Copy link
Author

hari3100 commented Sep 9, 2024

Hi,

For the original CT data, such as in Nifti format, to obtain better performance, we need to adjust the target window to view the corresponding disease, such as the bone window or lung window. Then, If you only focus on specific areas and organs, whole-body CT is unnecessary. You can select slice range, crop to specific areas, and then resize. The above methods aim to retain valid information as much as possible so that the input meets the requirements of M3D. If you do nothing but simply resize the image to the target size and normalize it to 0-1, M3D will still be able to infer the image, even if the results are not as good.

Okay, I'll try that, I understood the first part you mentioned , was to target the models view to a particular region, suppose I have a CT scan with 300 slices and the lung is only in 250 of those slices in a axial plane, so I should remove those 50 slices for better results..right?

Now on the resizing part , fine suppose I do the slice altering and now have the CTs of just the lung region and resize the imgs to the given size , could you share how can I normalize them to 0-1...or maybe guide me to some script that does some of these preprocessing.?

Thank you for replying and thank you for your time!...Looking forward to using M3D.

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

No branches or pull requests

2 participants