Open Oceanswave opened 1 year ago
It's an interesting approach indeed. I think I've pretty much got the idea. From a coding standpoint, it's certainly doable even though it does require quite a lot of adaptations. At first glance, I would say it requires:
A potentially annoying point is the ergonomics of the interface to allow this choice in a comprehensible way. I think we need to keep the interface relatively simple (it's already pretty complicated ^^). Perhaps a checkbox.
I'm not saying that it's not doable or that I won't do it. But it's just too many modifications for now. Let's just say it's a little too ambitious for the moment. However, if you come up with a working prototype, why not :)
This problem comes up with photos of an audience with the subject of interest in the foreground, face is large, but the FaceSwap finds really small faces and it is very hard to even count how many of the background faces are going to be targeted.
It's not easy because partial faces are sometimes targeted, and other times they are not.
I suppose it is not possible to solve this an other problems by (User Option) simply having the user draw a virtual x across the target face(s) or some sort of mark, maybe even M for Male and F for Female.
Is your feature request related to a problem? Please describe. Often a face that is detected isn't the face that I'd like to replace. Face Similarity/Filtering helps, but often I want to replace a face given the actual face size.
Often times a subject face I'd like to swap is the subject, and thus in the foreground, and large. Secondary faces appear in the background, and are smaller.
Describe the solution you'd like Given a small/medium/large 'Size' setting on a Face Swap Unit, Loop through the detected faces in the generated image. Create a histogram of these faces. Bin the faces into small/medium/large bins. Swap the face in the specified size bin at the specified index.
An optional Face Swap Unit setting would sort each bin by either the detected generated face age or the face's euclidean distance from the generated image center.
Psudocode:
Describe alternatives you've considered Face similarity, however this doesn't work on novel faces. Adding a named person, e.g. Albert Einstein, sometimes skews the generated image to contain particulars of that person/training that are undesirable in some instances or make it difficult to combine with other aspects contained in the prompt.
Additional context Upon request.