Hi!

A bit of background/motivation: Sharing photos of protests can be an important part of the PR of political organizations. However, not everyone feels safe sharing their faces in connection to political organizing. That’s why usually, faces are pixellated, or people wear face covering masks (which might be illegal on protests in some juristictions). Pixellated/hidden faces are quite ugly to normies, though, which can reduce the effectiveness of the publication.

So I had this idea: What if instead of pixelating the faces, I run some CV software on the image and all the faces get swapped with the faces of Hedy Lamarr, Diego Luna, or JC Denton. I remember that Snapchat could do live faceswaps with the selfie cam ten years ago, so some desktop software like that shouldn’t be too hard to find in 2025, right? /j

Unfortunately, all the stuff I managed to find was some computer science projects in which you train some monster model with one hell of a dataset of each face you want to replace/emplace (which defeats the purpose of anonymizing political activists). Or some obnoxious AI startup which is waaaaay too busy sucking off Elon Musk and/or Sam Altman. I don’t want to give my money/data to some doomed AI startup which ends up selling our likenesses to the NSA.

TL;DR: Is there some kind of desktop software which detects faces in an image and swaps them with another face? It’s ok if there’s only a framework (as long as it’s not as bad as all the horrible OpenCV results you find in online tutorials).

Edit: I found something that I can work with

  • db0@lemmy.dbzer0.comM
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    3 days ago

    You can do something like this easily using stable diffusion and inpainting. Look into comfyUI or the AI horde if you don’t have a GPU. You just mark a spot (a face) and ask the model to generate a face for you on that spot.

    • Prunebutt@slrpnk.netOP
      link
      fedilink
      arrow-up
      1
      ·
      3 days ago

      Thanks for the tip. I’d still prefer to run it locally (considering I want to protect identities… but I guess that you can paint over the faces with blobs and stable diffusion does the rest).

      I’m honestly a bit baffled that it seemed so easy for snapchat 10 years ago and you can’t find this stuff in the frikkin Debian repos.

      • db0@lemmy.dbzer0.comM
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        3 days ago

        In my experience Linux repos don’t tend to include stuff like ComfyUI.

        Thanks for the tip. I’d still prefer to run it locally (considering I want to protect identities… but I guess that you can paint over the faces with blobs and stable diffusion does the rest).

        Them you can run it locally. You might be able to run it on RAM only but it will be very slow, but fort your use case it might be fine.

        • Prunebutt@slrpnk.netOP
          link
          fedilink
          arrow-up
          1
          ·
          3 days ago

          In my experience Linux repos don’t tend to include stuff like ComfyUI

          What I meant is that I’m baffled that the tech from waaay back then isn’t more widely available by now (as widely available as “even the debian repos got a version of it”).

          Them you can run it locally. You might be able to run it on RAM only but it will be very slow, but fort your use case it might be fine.

          I could, but inswapper_128 seems ok to use for nou. Now I need to check if my org would be ok with that approach. 😬

    • Prunebutt@slrpnk.netOP
      link
      fedilink
      arrow-up
      7
      ·
      4 days ago

      If you want to do some PR that appeals to people that aren’t already on the left, then it’s sometimes unavoidable.

        • Prunebutt@slrpnk.netOP
          link
          fedilink
          arrow-up
          5
          ·
          4 days ago

          Especially if both sides are fucking masked!

          I’m not talking about the current situation in the US. I’m talking about e.g. protest in Europe which aren’t necessarily as heated up as the protests in LA right now. That might have not come across, sorry.

          It’s just more friendly to non-radicalised folks if the sharepic of the local union don’t show up in balaclavas.