adding spatial_transformer 3d layer
Hi everyone,
I am reaching you on behalf of my employer (https://github.com/SIMEXP) for a potential contribution to the tensorflow/graphics package.
Based from the work of Jaderberg et al., this PR implements a derivable spatial transformer layer to perform the (quaternion) transformation and resampling of an input 3D volume. This type of neural network layer can be either used as a module to make spatial invariant data (with slightly modifification so transformation parameters are not input, but learnable parameters), or to be able to perform unsupervised 3D registration (where this layer acts as a derivable 3D interpolator).
Similar implementation can be found for pytorch, but not yet for tensorflow.
Current limitations:
- Inputs needs to be a valid quaternion, following tensorflow/graphics convention.
- Non-linear resampling is not supported, but can be integrated if needed.
- 1D and 2D case are not yet implemented.
We'd be glad to hear your opinion to improve our solution and translate it to a contribution, if the community regards this as a useful addition.