matthewearl / faceswap

Python script to put facial features from one face onto another
MIT License
1.4k stars 496 forks source link

Matrix multiplication #21

Closed roodrallec closed 5 years ago

roodrallec commented 5 years ago

https://github.com/matthewearl/faceswap/blob/00cd82651d7640159739066d855162333e104d98/faceswap.py#L156

https://github.com/matthewearl/faceswap/blob/00cd82651d7640159739066d855162333e104d98/faceswap.py#L162

Numpy element wise multiplication (*) is not appropriate here according to the Orthogonal Procrustes problem (https://en.wikipedia.org/wiki/Orthogonal_Procrustes_problem).

I think the np.matmul function should be used instead of the * operator. Not 100% sure though...