AliaksandrSiarohin / first-order-model

This repository contains the source code for the paper First Order Motion Model for Image Animation
https://aliaksandrsiarohin.github.io/first-order-model-website/
MIT License
14.56k stars 3.22k forks source link

Question about TPS #508

Open cnnAndBn opened 2 years ago

cnnAndBn commented 2 years ago

hi, thanks for your great and amazing work, in the code https://github.com/AliaksandrSiarohin/first-order-model/blob/ca49071ce60051200f58f03a0e4e65e675a54e27/modules/model.py#L101 I am confused, why compute the distance between the input coordinates and the control points?

  `  result = distances ** 2
        result = result * torch.log(distances + 1e-6) 
        result = result * control_params
        result = result.sum(dim=2).view(self.bs, coordinates.shape[1], 1)
        transformed = transformed + result`

and what is the purpose of these lines? Where can I find the reference ? @AliaksandrSiarohin