DeepAlignmentNetwork icon indicating copy to clipboard operation
DeepAlignmentNetwork copied to clipboard

question about AffineTransformLayer.py

Open hzh8311 opened this issue 8 years ago • 5 comments

hi, in my view, the AffineTransformLayer.py is used to apply the affine/similiarity transform on original training image, but why the affine transform matrix be inversed in lines 59-60?

hzh8311 avatar Jul 26 '17 07:07 hzh8311

@MarekKowalski

hzh8311 avatar Jul 26 '17 07:07 hzh8311

Hi,

Yes, that is the purpose of the AffineTransformLayer. Let's say transform parameters given to that layer transform A into B. What the layer does is generate image B based on image A. To do that the layer finds the location of each pixel of image B in image A. To do that the transform needs to be inversed.

If the layer did the opposite, take each pixel in A and transform it into B, we would end up with holes in image B.

Does that explain the problem a bit?

Best regards,

Marek

MarekKowalski avatar Aug 01 '17 06:08 MarekKowalski

@MarekKowalski Still confused, can you share some paper or blog, or explain a bit more?

Best, Lew

mariolew avatar Jan 23 '18 07:01 mariolew

Hi,

What is the thing that confuses you exactly? Is it the reason why the layer is used, or is it something else?

You can take a look at the article describing Deep Alignment Network, here: https://arxiv.org/abs/1706.01789 where the idea behind this layer is explained.

Marek

MarekKowalski avatar Jan 23 '18 12:01 MarekKowalski

@MarekKowalski Now, I figure it out, thanks.

Lew

mariolew avatar Jan 24 '18 01:01 mariolew