Git Product home page Git Product logo

medical-image-registration's People

Contributors

dykuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

medical-image-registration's Issues

3D displacement

Hello, may I ask whether the pixel value of some blocks of the image is 0 after the displacement occurs in the process of debugging the code?Thank you very much!

question about the dice metrix

I find that you calculate the dice based on the label list, and then average each part of a sub-region.Why not first fuse all labels into the five rois, and then calculate the dice?

why jacobian determinant can be computed like this way?

It's like a math question,I thought a lot but can't find the answer.

def Get_Ja(displacement):

'''
Calculate the Jacobian value at each point of the displacement map having

size of b*h*w*d*3 and in the cubic volumn of [-1, 1]^3

'''

D_y = (displacement[:,1:,:-1,:-1,:] - displacement[:,:-1,:-1,:-1,:])

D_x = (displacement[:,:-1,1:,:-1,:] - displacement[:,:-1,:-1,:-1,:])

D_z = (displacement[:,:-1,:-1,1:,:] - displacement[:,:-1,:-1,:-1,:])



D1 = (D_x[...,0]+1)*( (D_y[...,1]+1)*(D_z[...,2]+1) - D_z[...,1]*D_y[...,2])

D2 = (D_x[...,1])*(D_y[...,0]*(D_z[...,2]+1) - D_y[...,2]*D_x[...,0])

D3 = (D_x[...,2])*(D_y[...,0]*D_z[...,1] - (D_y[...,1]+1)*D_z[...,0])

return D1-D2+D3

save checkpoints

Thanks for the code.

I am trying to save the checkpoints after every epoch by the following.

from keras.callbacks import ModelCheckpoint
mc = ModelCheckpoint(outpath+'SDN3d_weights_TVS16_{epoch:02d}.ckpt', save_weights_only=True, verbose=1, period=1)
history = sdn.fit_generator(gen_train, steps_per_epoch=2, callbacks=[mc], epochs=2, verbose=1, validation_data=gen_test, validation_steps=len(f_img_v)/batch_size)

the above code generates the checkpoints file but when I try to load them in the eval.py by sdn.load_weights(r'path_to_file'), there is error

"ValueError: You are trying to load a weight file containing 2 layers into a model with 18 layers."

Thanks in advance

Calculation of Jacobian

Dear @dykuang,
first of all thanks a lot for sharing your code.
I read the two papers in arxiv and I am interested in the problem of the negative Jacobian in the deformation field. Looking at your code I did not really understand the way you calculate the Jacobian and the related function Get_Ja(). Can you please explain me how you

Calculate the Jacobian value at each point of the displacement map

How to preprocess the data?

Dear dykuang,
This repository helps me a lot, but there is something confused me a lot. The question is how to preprocess the data? Can you explain this to me?
Thanks

I'm a little bit confused about your loss function!

Hi! Dear Author. I'm studying your paper<FAIM – A ConvNet Method for Unsupervised
3D Medical Image Registration>.
I'm a little confused about your loss function.

  1. What does -1 in the little box mean?
    image

Looking forward to your reply, thank you

about 'Get_Jac()'

Hi,Dear Author,Your code has helped me a lot.
I noticed that the 'Get_Jac()' in 'Utils.py' appaers '+1'. So...what does this '+1' do.
Just like this picture
image

Which is validation set?

Dear dykuang,
Your work has inspired me a lot, but there is some code I got confused.
1. In train.py, val_files = ['{:03d}'.format(i) for i in range(0, 20)]
Which data subset is it(val_files) in mindboggle? I guess it should not be OASIS-TRT-20, because this subset is used to evaluate the network as test set.
2. In addition. In voxelmorph, when Unet is down-sampling, the image size will be reduced by a factor of 1/2. If the data set is cropped to 144x180x144, when reproducing voxelmorph, the value 180 will produce fractions during down-sampling,which is automatically rounded down by the computer. Then the size of the image after down sampling will not match the up-sampling, wouldn't it make it impossible to train?
Thanks

Can you give me a demo?

Hello, I am very lucky to see your research.If I only want to register a pair of 3D images, which script should I run?

About the grid visualisation

Hello, dykuang:

I'm implementing your vis_grid function in visual.py, The registration field I used is (31,31,3),
and i use the command line vis_grid(flow[:, :, ::2], res=1, direct=2),after that, i got a likely wrong result. The result is:
444

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.