xamyzhao / brainstorm

Implementation of "Data augmentation using learned transforms for one-shot medical image segmentation"
MIT License
392 stars 91 forks source link

problems with package dependencies #30

Open gonlairo opened 3 years ago

gonlairo commented 3 years ago

I would like to use your method to perform data augmentation on my dataset but I am running into a lot of errors due to package dependencies e.g pytools-lib is now called pystrum or the new version of neurite does not have the SpatialTransformer layer. What is the best approach to run your code?

xamyzhao commented 3 years ago

You should be able to find the SpatialTransformer in neurite's legacy branch, or in the voxelmorph package. pystrum should have most of the same functionality as pytools-lib; is there a particular function that is missing?

gonlairo commented 3 years ago

I found everything, and I made it work, so thank you. I also wanted to ask it is possible to implement the paper using voxelmorph directly (i.e. using VxmDense instead of TransformModelTrainer.) I am in general a bit confused with all the voxelmorph ecosystem.

z191250124 commented 3 years ago

@gonlairo I had the same problems as you, and I spent a lot of time fixing them but it still could't work. Could you please upload the runnable code in your git

xamyzhao commented 3 years ago

I found everything, and I made it work, so thank you. I also wanted to ask it is possible to implement the paper using voxelmorph directly (i.e. using VxmDense instead of TransformModelTrainer.) I am in general a bit confused with all the voxelmorph ecosystem.

Great! Absolutely, if you want to implement the training code yourself using voxelmorph, that is possible. Most of the code in this repo deals with the application of random spatial and appearance transformations for model training and inference, and it uses voxelmorph for the spatial transformations.

gonlairo commented 2 years ago

Thank you! I am trying to implement the appearance (intensity) model using voxelmorph and in the paper, you state that "[to learn the appearance model] we use an image similarity loss as well as a semantically-aware smoothness regularization.". Is it possible then to train an appearance model with voxelmorph using just SpatialSegmentSmoothness loss instead of MSE or NCC? Any tips would be appreciated :)

dyhan316 commented 2 years ago

@gonlairo Have you been able to implement using voxelmorph? Thank you!