this post was submitted on 14 Jun 2025
24 points (96.2% liked)

Anarchism

2199 readers
25 users here now

Discuss anarchist praxis and philosophy. Don't take yourselves too seriously.


Other anarchist comms


Join the matrix room for some real-time discussion.

founded 2 years ago
MODERATORS
 

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

top 38 comments
sorted by: hot top controversial new old
[–] db0@lemmy.dbzer0.com 4 points 1 day ago* (last edited 1 day ago) (1 children)

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.net 1 points 1 day ago (1 children)

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.com 3 points 1 day ago* (last edited 1 day ago) (1 children)

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.net 1 points 1 day ago (1 children)

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. 😬

[–] db0@lemmy.dbzer0.com 2 points 1 day ago (1 children)

aighte, if it doesn't and you need a trusted GPU to use, lemme know and I can hook you up with mine.

[–] Prunebutt@slrpnk.net 2 points 1 day ago

That's nice of you, thx!

[–] Prunebutt@slrpnk.net 4 points 1 day ago (1 children)

I found a github repo which uses insightface to do the exact job I wanted. I needed to fix the code a bit, but I managed to faceswap the crew of Star Trek TNG on the faces of these protestors who I found on a image search engine:

Bonus - Diego Luna on some stock image:

[–] AntiBullyRanger@ani.social 2 points 1 day ago* (last edited 1 day ago) (1 children)

GL🖖 on your AI ~~slop~~ project!🤭😉 It missed a few spots!

[–] Prunebutt@slrpnk.net 2 points 1 day ago (2 children)

Where exactly? I couldn't find any missed faces.

[–] acockworkorange@mander.xyz 3 points 1 day ago* (last edited 1 day ago) (2 children)

I think leaving hair and other features makes it a poor anonymizing tool. The faces may have been altered, but there's still information that can be used my motivated actors to correlate identities.

[–] AntiBullyRanger@ani.social 2 points 1 day ago

apparel, keepsakes, skeletal structures, gait, stylometry/graphy, etc.

Even the SIM & IMEI/ESN owners in this picture can be precisely tracked by geolocation of the time the picture was taken, since we know the date&hour of when the protest took place.

[–] Prunebutt@slrpnk.net 1 points 1 day ago

True. But depending on how much you pixellate that, those features are still commonlyseen when the faces are blurred.

[–] AntiBullyRanger@ani.social 1 points 1 day ago (1 children)
[–] Prunebutt@slrpnk.net 3 points 1 day ago* (last edited 1 day ago) (1 children)

Those are faceswapped. (Which shows how effective this is ;)

Check it with the original.

[–] AntiBullyRanger@ani.social 0 points 1 day ago (1 children)

I did… Are you colorblind? I used purple to signify errors.

[–] Prunebutt@slrpnk.net 2 points 1 day ago* (last edited 1 day ago)

But those faces were swapped. (E.g.: that's whoppie Goldberg to the far left)

[–] AntiBullyRanger@ani.social 8 points 2 days ago* (last edited 2 days ago) (1 children)

You can also just literally edit in any mask you want on photos. E.g. Stephen St. Clair@wsws.org posted this candid of protestors on August 28th against the genocide in Gaza: The protest at the University of Michigan, Ann Arbor, on August 28

And he could have protected them more than Laurence B. Alexander did hiring saboteurs, e.g.: Same image as above, but protecting students more

But always be mindful about of authoritarians hiring saboteurs at any protest. Lemmy thread discussing this.

[–] Prunebutt@slrpnk.net 3 points 1 day ago

I was hoping for some more automated and clean looking solution. But thanks anyway.

[–] outhouseperilous@lemmy.dbzer0.com 5 points 2 days ago (1 children)

What about just not taking pictures or video of faces?

[–] Prunebutt@slrpnk.net 6 points 2 days ago (1 children)

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

[–] outhouseperilous@lemmy.dbzer0.com -4 points 2 days ago (1 children)

I remember not being on the left. I didn't need to see faces to feel ways about stuff.

Especially if both sides are fucking masked!

[–] Prunebutt@slrpnk.net 5 points 2 days ago (1 children)

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.

[–] outhouseperilous@lemmy.dbzer0.com -4 points 2 days ago (1 children)

Still, i remember before i was quite so radical, and i don't think that would have been true for me?

[–] Prunebutt@slrpnk.net 5 points 2 days ago (1 children)

That's good for you, butedoesn't apply to everyone.

[–] outhouseperilous@lemmy.dbzer0.com -3 points 2 days ago (1 children)

Okay, but if we're speaking for people who are presumably neither of us, then that's my best tool.

What did you think, when you first saw masked protestors?

[–] Prunebutt@slrpnk.net 3 points 2 days ago (2 children)

I'm not really interested in this kind of discussion. I was asking for a tool, not for a discussion of wether or not to use that tool.

[–] db0@lemmy.dbzer0.com 3 points 1 day ago* (last edited 1 day ago)

FYI: In our instance, can reply with 'disengage' to end a discussion without conceding it.

[–] outhouseperilous@lemmy.dbzer0.com -2 points 2 days ago* (last edited 2 days ago) (1 children)

But if you're saying it's effective, was it effective on you? What was your experience when you were the target audience you're talking about?

[–] Prunebutt@slrpnk.net 1 points 2 days ago (1 children)

I already saidethat I am not interested in this discussion. Ask the people in my org. It always comes up when we're doing some solidarity photo.

[–] outhouseperilous@lemmy.dbzer0.com -2 points 2 days ago (1 children)

So you just want to endanger people... So your job is easier?

Are you a serial killer who ritually murders OSHA inspectors in your free time? That seems like it would ve like 5% less evil

[–] Prunebutt@slrpnk.net 2 points 1 day ago* (last edited 1 day ago) (1 children)

How do I want to "endanger people" if I want to hide the faces of people in my org? WTF is wrong with you?

[–] outhouseperilous@lemmy.dbzer0.com -2 points 1 day ago (1 children)

Okay so that's people making videos of themselves on purpose to associate their identities? And nobody who didn't opt in? Then why does any measure of caution apply? What am i missing?

[–] Prunebutt@slrpnk.net 3 points 1 day ago (1 children)

What am i missing?

Basically every bit of context.

I asked about software to faceswap photos for when my org wants to publish a pic were everyone who is on it doesn't have to pixellate the faces, but rather faceswap the faces with other people (generated faces, historical figures, etc.).

I'd like to try that since everytime my org wants to take a photo (e.g. for showing international solidarity on social media), an argument arises of whether or not to pixellate the faces. Some people want their identities protected, other people think that pixellated faces damages public perception of the org.

How is that relating to anything you say?

[–] outhouseperilous@lemmy.dbzer0.com -1 points 1 day ago (1 children)

The point of blurring your face is to not attach it to your identity. It works or it doesn't. That's the part I'm missing.

[–] Prunebutt@slrpnk.net 1 points 1 day ago (1 children)

The point of blurring your face is to not attach it to your identity.

So is faceswapping

[–] outhouseperilous@lemmy.dbzer0.com 0 points 1 day ago (1 children)

But if your face is blurred, what's the value of being on camera at all?

And if you're face swapping, why not just 'based on a true story' the whole thing?

[–] Prunebutt@slrpnk.net 2 points 1 day ago* (last edited 1 day ago)
[–] chonkyninja@lemmy.world -4 points 2 days ago