Hierakonpolis / MU-Net

Multi-task U-Net for the simultaneous segmentation and skull-stripping of mouse brain MRI
MIT License
22 stars 6 forks source link

Bounding box fails #3

Closed araikes closed 2 years ago

araikes commented 3 years ago

Hi,

I have been looking for a tool to generate masks for our T2 RARE mouse brain data and haven't been successful in identifying any softwares that perform as described (typically, under segmenting areas while including lots of non-brain areas). I'm optimistic MU-Net could solve my need.

However, bounding box creation failed and therefore can't proceed. Example mouse nifti is linked below. Is it just an orientation issue compared to the trained model (basing this on the Jupyter notebook for training)?

Any help you can be would be terrific.

Thanks

https://arizona.box.com/s/xrnekw5tufxzi92grm0wt27xnq3evzog

araikes commented 3 years ago

Bump for this question @Hierakonpolis

Thanks

Hierakonpolis commented 3 years ago

Hi, sorry for not getting back to you earlier on this. If it is an orientation issue, you can just as well change it with any utilities you might already have to work on nii files and see what happens. It is probably the case though that you might need to retrain the model using your own data. As we mentioned in the paper, these models can still be highly specialized for the specific distribution of the training data. I will upload an updated version in the near future to do that more conveniently, but in the meantime I could just send it to you if you want to try training a network ensemble yourself.

Best,

Riccardo

araikes commented 3 years ago

Hi @Hierakonpolis,

I think training a model on our data may be a beneficial approach and would be open to testing it with our data. I've tried a bunch of methods (RBM from UNC's CAMRI lab, SHERM, atlasBREX) and none are doing an exceptional job of even semi-automated masking so I'm open to anything at this point.

At a conceptual level, would an orientation difference be enough for the automatic bounding box network creation to fail?

Hierakonpolis commented 3 years ago

It would, but having looked at your data I don't believe it will be enough. Still, it's probably worth a try :)

araikes commented 3 years ago

Understood. Our data is LPI (according to c3d). What orientation do I need to match yours (don't want to try to guess of images on a Jupyter notebook)?

Hierakonpolis commented 3 years ago

It should be RSA.

angli1993 commented 2 years ago

@araikes @Hierakonpolis

Have you fixed this problem? I tried example T2 data in tutorial (https://github.com/Hierakonpolis/NN4Kubiac/tree/master/TutorialMUNet/in_vivo/template), but also got such 'Bounding box fails'.

Hierakonpolis commented 2 years ago

@angli1993 Very likely, you might need to retrain the neural network on your own data. This is easier to do with the updated version you can find here: https://github.com/Hierakonpolis/MU-Net-R

Pbill123 commented 1 year ago

@araikes @Hierakonpolis

Have you fixed this problem? I tried example T2 data in tutorial (https://github.com/Hierakonpolis/NN4Kubiac/tree/master/TutorialMUNet/in_vivo/template), but also got such 'Bounding box fails'.

I also tried the example data (https://github.com/Hierakonpolis/NN4Kubiac/tree/master/TutorialMUNet/in_vivo/template), and got the same 'Bounding box fails' error. It seems that there is something wrong with the code. Hopefully, you can fix it in the future.

Hierakonpolis commented 1 year ago

You need to retrain the network to work with your data. The link above will get you to a more recent implementation that should make this easier. It was only tested for the same setup as the one used in the paper (brain mask + ROIs) but if it fails in your case I could spend some time on that one. However, I will not maintain two projects doing essentially the same thing at the same time.

I would not be optimistic on this working out of the box without training a new neural network.