Info in json files.

Discussions about research, Faceswapping and things that don't fit in the other categories here.


Locked
User avatar
akatray
Posts: 4
Joined: Thu Oct 10, 2019 9:04 pm
Has thanked: 1 time

Info in json files.

Post by akatray »

Can you place back face back to frame with data in json file.
It seems it only contains where face is in frame and not rotation or scale of cut face.

Or do I need to recut face from frame, scale rotate using landmarks, fit model onto it and place back as now I have rotation and scale.

by torzdf » Thu Oct 10, 2019 9:54 pm

The code which does the rotation/warping is referenced from lib.faces_detect https://faceswap.readthedocs.io/en/late ... etect.html

Go to full post
User avatar
akatray
Posts: 4
Joined: Thu Oct 10, 2019 9:04 pm
Has thanked: 1 time

Info in json files.

Post by akatray »

Does json file have information how to place cut face back to frame. Or just info about face in frame.

User avatar
torzdf
Posts: 2649
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 128 times
Been thanked: 622 times

Re: Info in json files.

Post by torzdf »

Json file contains where the face and landmarks are in the original frame. The cropping of the face from the frame is calculated from this information

My word is final

User avatar
akatray
Posts: 4
Joined: Thu Oct 10, 2019 9:04 pm
Has thanked: 1 time

Re: Info in json files.

Post by akatray »

Image
Is there is some reference values for these points to compare against?
Could get rotation by rotating 2 and 14 until they are in same y coordinates.
Not really have idea how to get scale. As relations will be different between faces.

And I know its stupid questions, but I only use faceswap just to extract faces to use in my program that does transformation.
Would like it to be able to add them back.

User avatar
torzdf
Posts: 2649
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 128 times
Been thanked: 622 times

Re: Info in json files.

Post by torzdf »

The code which does the rotation/warping is referenced from lib.faces_detect https://faceswap.readthedocs.io/en/late ... etect.html

My word is final

User avatar
akatray
Posts: 4
Joined: Thu Oct 10, 2019 9:04 pm
Has thanked: 1 time

Re: Info in json files.

Post by akatray »

Well thanks for help. It seems I found function that transform landmarks to cut face. Will try to find point where it save to json so I can have originals and transformed. That should be all I need.

Locked