check-face / checkface

Putting a face to a hash
https://checkface.facemorph.me
Other
25 stars 13 forks source link

Morphing does not start at from_value #48

Closed olivercoad closed 4 years ago

olivercoad commented 4 years ago

When doing a morph from A to B using the /api/mp4/ or /api/gif/ endpoints, the resulting video does not start at A.

Expected behaviour

Starts at A, morphs to B, then morphs back to A (-1 frame)

Actual behaviour

Starts halfway between B and A, then goes to A, morphs to B then half way back towards A.

Example: https://api.checkface.ml/api/mp4/?from_value=asdf&to_value=fdsa

morph_asdf_to_fdsa_issue_48

cdilga commented 4 years ago

Picking up this task now. Seems that the code is on https://github.com/check-face/checkface/blob/37c6e7948d8c6c4160d05226a70d128618f02a1d/src/server/checkface.py#L321-L322

cdilga commented 4 years ago

Functions are clearly shown here: https://www.geogebra.org/graphing/takht5yk Where the green function is (math.sin(i) + 1) * 0.5 and the blue function is (math.sin(i + math.pi/2) + 1) * 0.5 ![Uploading Face Interpolation Functions.png…]()

olivercoad commented 4 years ago

Morphing gifs still do not start at from_value. The fix only fixed mp4s