Code Monkey home page Code Monkey logo

Comments (2)

glucauze avatar glucauze commented on August 10, 2024 2

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:

  • modifying get_faces in swapper (in swapper.py) to take the bins into account.
  • There also needs to be an option in FaceSwapUnitSettings (in faceswaplab_unit_settings.py) to specify the bin (probably an enum).
  • Changing the parts of the API that correspond to FaceSwapUnitSettings. I use DTOs for the API that must match. It also requires changing the UI part so that it is consistent. So, modify api_utils.py and faceswaplab_unit_ui.py.
  • passing these choices in the swap_face part of swapper.py. That means modifying this method and process_image_unit in swapper.py

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 :)

from sd-webui-faceswaplab.

drdancm avatar drdancm commented on August 10, 2024

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.

from sd-webui-faceswaplab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.