tf_ThinPlateSpline icon indicating copy to clipboard operation
tf_ThinPlateSpline copied to clipboard

3d thin plate spline

Open sedghi opened this issue 7 years ago • 4 comments

I was wondering whether you can give me direction how to make the current implementation for 3D images. is there any thought on how a 3d mesh-grid can be used instead of 2d for thin plate spline transformation?

sedghi avatar Aug 30 '18 15:08 sedghi

Many modifications will be required to apply to the 3d image. You need to write the whole code again based on my implementation. However, it can be done by a relatively simple approach. You can change all codes about (x, y) to (x, y, z) and (height, width) to (height, width, depth).

(However, I'm worried that even if you build TPS code for 3D image, it is not easy to train something with that codes. Because 3D tensor is too much big to handle with a GPU.)

iwyoo avatar Aug 30 '18 16:08 iwyoo

thanks, I was thinking the same too. There are couple of 2D to 3D changes in the functions. Something that is not clear for me is the _solve_system function. Is there any documentation explaining the purpose of this function? (The original STN does not have this at all, but it was written for Affine not Spline)

sedghi avatar Aug 30 '18 16:08 sedghi

You can check https://arxiv.org/abs/1603.03915 in the references. I implemented that function based on this paper. You can also see my another (simpler) implementation https://github.com/iwyoo/TPS_STN-tensorflow.

iwyoo avatar Aug 30 '18 16:08 iwyoo

Thank you, I'll do so and will give an update here

sedghi avatar Aug 30 '18 16:08 sedghi