Deep Deformable Image Registration

Image registration is one problem that pops up frequently when you work on image processing solutions. Its basically mapping a moving image on top of fixed image such that they match as perfect as possible. There are serveral flavours of this problem.
Deformable Image Registration
In this flavour of image registration, we find a dense map of every pixel in moving image to that in fixed image. Basically its estimating optical flow from moving image to fixed image. This is better suited for deep learning compared to end to end learning of transformation matrix. Input is fixed and moving image. Output1 is dx and xy for every pixel of moving image. Output2 is moved image. Moved image is created by applying vector field on moving image using spatital transformer layer. This is simply a layer for applying vector filed on moving image to move pixels such that moved image and fixed image match.
Voxelmorph
Voxelmorph is a name for above technique and there is python library in same name that have classes for creating above mentioned models.
MNIST Register Demos
Here is a simple demo code that used voxelmorph,
Using voxelmorph class (Preferred)
```python3 simple_voxelmorph.py```
From scratch demo in tf
```python3 register_basics.py```
Detailed code from voxelmorph tutorial
```python voxelmorph_tutorial.py```
Even more detailed tutorial notebook!
```jupyter notebook```
```VoxelMorph_Tutorial.ipynb```
Realworld image register demo
Read the next post, here.
Thanks for reading!
Be sure to give a clap and start my git repos for motivating me to post more :) See you in next post.