-
Notifications
You must be signed in to change notification settings - Fork 569
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
VoxelMorph Atlas is just a slightly blurred version of the fixed image #589
Comments
I am facing exactly the same problem as well in my application ! My outputs are blurred versions of the images I provide. |
two quick questions -- are the images normalized in [0, 1], and are they affinely aligned? @wilcamsdington in your example, original 1 and 2 seem to be very out of alignment |
Yes, all images are normalized in [0, 1] and affinely aligned. and all images are 3D images, in my example original 1 and 2 are different slices from the same 3D image |
In order to help, i need to see a few images to understand what is happening. Could you show a middle slice of the atlas and maybe 2-3 subjects at that slice and their deformation fields? are they super stiff? |
|
@wilcamsdington I'm sorry, we dont have the bandwith to help go through other people's jupyters and help debug these things, although I'd love to. It would really help us if you give us as much information as possible We need to see a few of the subjects so we understand the diversity, the size of the images to understand the deformations you expect. We have a tutorial on visualizing deformation fields here: https://colab.research.google.com/drive/1F8f1imh5WfyBv-crllfeJBFY16-KHl9c?usp=sharing |
Thanks. I only see two subjects and it's hard to understand what those deformations are doing -- I personally can read the grid visualization much better. My suspicion is that the regularization is too strong. Also note that your images include everything, not just the brain, which will make it difficult for any algorithm to do a good job since it will try to match all kinds of anatomy that has substantial deformations, like the neck and such. I would recommend running synthstrip on the images first. |
Thank you for your suggestion. I've attempted running synthstrip on the images, but encountered similar outcomes. I share your suspicion that the strong regularization might be the cause. I appreciate your advice, and I'll try reducing the regularization term to see if it yields better results. |
Hi, After looking at the voxelmorph code I note than TemplateCreation expects a single input, whereas the generator provided in all tutorials provide a list of length two as input: [mean_atlas, img], where mean_atlas is an average of all images in the dataset. Which I guess can serve as an initial guess for an atlas, but i'm not sure what purpose this serves. I have been able to reproduce the MNIST tutorial successfully by changing the code in the generator from:
Please let me know if this works on your end as I am also working on a similar problem of atlas creation currently! |
I have try it, the results are still blur and lack of details(like #587) |
This is very weird, I wonder if its a change in tf, or something we pushed but missed it. |
Do we have any updates regarding the blurring problem ? |
Hmm, I'm not quite sure what to say -- I re-went through our template atlas, which you can see here The MNIST template looks good to me --- can you verify you can replicate this? I am still running the 2D OASIS brain atlas in that jupyter right now (I dont have access to fancy GPUs on google colab so it's slow) and will update here when it's done. |
@LRB13 @vsleios @wilcamsdington can you all check out this tutorial and tell me if it works for you? The only updates i made was
So it works for both MNIST and the brain for me. Does it still post a problem for you all? |
I am not able to check the tutorials again til Monday but I am quite
convinced that the problem was the generator feeding in the blurry average.
Since making the change to only feeding images in as input I've been able
to train good atlases on my own dataset.
The conditional template network seems to take the initial atlas as input
whereas the vanilla TemplateCreation network needs just the image.. maybe
this is where the mistake has come from?
…On Thu, 4 Apr 2024, 20:09 Adrian Dalca, ***@***.***> wrote:
@LRB13 <https://github.com/LRB13> @vsleios <https://github.com/vsleios>
@wilcamsdington <https://github.com/wilcamsdington> can you all check out
this tutorial and tell me if it works for you?
The only updates i made was
- change the generator to only give as input the image instead of
image and initial-blur, just as @wilcamsdington
<https://github.com/wilcamsdington> suggested
- change the tf version
So it works for both MNIST and the brain for me. Does it still post a
problem for you all?
—
Reply to this email directly, view it on GitHub
<#589 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANSS6JRXLI346QRMOBHLJM3Y3WQP7AVCNFSM6AAAAABDVNAVLCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZYGAYDONBWG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It would be great to maybe see a few brain images side by side from your dataset. Are they very different? are their intensities in different ranges? The same code should work decently well for 3D atlases |
Here are a few examples of our dataset, and intensities are in the same ranges. |
@wilcamsdington They are not affinely aligned, which is likely causing the problem. I'd recommend the following:
|
Thank you for your guidance. I followed your suggestions, and the results indeed showed improvement(more details). However, some blurriness persists in the overall output. I will attempt to adjust the parameters to further optimize the process and see if it can be improved. |
Task (what are you trying to do/register?)
I am trying to build a template from 3D brain T1 MRI dataset of around 100 images. size of (224,224,224).
What have you tried
I ran the unconditional template code for brain 3D data, followed the code in this colab
I used one of brain MRI image as template(fixed image) during the training.
Otherwise, I encounter the same issue as described in #587
Details of experiments
vxm.py.utils.save_volfile(model.get_atlas(), 'slice_224.nii.gz')
The final VoxelMorph template is just a slightly blurred version of the fixed image
The text was updated successfully, but these errors were encountered: