chenhsuanlin / inverse-compositional-STN

Inverse Compositional Spatial Transformer Networks :performing_arts: (CVPR 2017 oral)
MIT License
318 stars 63 forks source link

How to use this code to align source image to target image? #17

Closed KakaVlasic closed 5 years ago

KakaVlasic commented 5 years ago

First, thanks for releasing a clean and well trained code for your paper! I have two sets of image(source and target), and I want to align source image to the target image. Should I try to replace data "label" in dataloader to "target/template"? or what I should change?

chenhsuanlin commented 5 years ago

If you're only comparing pixel intensities like in the LK algorithm, you could just remove the classifier parts and use L1/L2 loss between your images (warped source vs. target). If you're doing something fancier like feature losses, you could also modify the classifier to be shallower (and optionally freezing the weights during training, depending on what you want to achieve).