This forum is for reporting errors with the Extraction process. If you want to get tips, or better understand the Extract process, then you should look in the Extract Discussion forum.
Please mark any answers that fixed your problems so others can find the solutions.
I want to remove the padding from the extracted faces, so that the result will be just the face without any padding, For example this is the image resulting from the extraction:
I need it to be:
The reason for that is that I want to use the resulting extracted face in face recognition using another software that requires the images to be cropped exactly around the face.
You will only be able to do this by editing the code. I'm not going to go into detail about what you have to do, but will point you in the direction of where you need to look.
The extract script does not call this directly, rather it calls the load_aligned function from here: https://github.com/torzdf/faceswap/blob ... ct.py#L254
Most likely just editing the centering here to legacy will get you what you want (or close).
The issue is that the "Sort" tool is not working properly with the faces which are without padding; it mixes faces of different identities.
If I put back the centering to "head" (that results in faces with padding) and run the "Sort" on the padded faces it works properly.
Could you please help me? I want to both crop the faces to be without padding, and then sort them.
This chain of questions sounds like an XY problem ( https://en.wikipedia.org/wiki/XY_problem ). Why don't you ask us for help with what you're actually attempting to do.
If you're just trying to modify the extract process of Faceswap for other extract needs, you're going to have to modify everything yourself. We just don't have time to provide support for modification of the project for other uses.