qr-swastika-avoider v0.1.0
19 points by eugeny
19 points by eugeny
I find it confusing that this project avoids the religious version of the swastika, but the actual swastika used by the nazis isn't avoided. Note that the nazis rotated it 45 degrees, which is explicitly marked as "Out of scope" by the project:
45°/diagonal motifs and arbitrary rotations are out of scope.
I noticed that too. I wonder if their detection algorithm is inherently rectangular, like some kind of rolling checksum across rows and columns.
Also, this:
finders, timing, alignment and format/version modules are excluded, so a finder corner is never mistaken for a swastika
…Is this detecting swastikas from a robot's perspective or something? I would think that if a human saw an objectionable symbol in a QR code, their reaction wouldn't be conditional on whether the pixels are data pixels versus timing pattern pixels.
And why would it even be necessary to exclude finder corners from analysis, given that those are just squares? The more I dig, the more it doesn't make any sense. Is this… slop??
I suspect the "from a robot's perspective" part is the key, given the event I mentioned in my other post.
We're seeing more and more computer vision being used for auto-moderation.
This could be a "statement in code form", similar to how cve-rs is meant to demonstrate that sandboxing untrusted code is not part of the threat model for Rust's memory safety guarantees. (Nor for any optimizing compiler backend of note. Nobody is willing to take on the responsibility of ensuring that the emergent complexity of their optimizer passes is flawless enough for that.)
"Rethink your use of computer vision as magic moderation pixie dust. You never considered that every deployed QR code generator in the world can serendipitously produce objectionable patterns. Don't reinvent the Scunthorpe problem for images... especially now that the consequences tend to be more serious than just refusing to transmit the request/data in question but leaving the user free to make another one."
We're seeing more and more computer vision being used for auto-moderation.
Except that doesn't make sense in the context of what I said. Why would a human train an auto-mod to specifically recognize the different components of QR codes, so that it can ban you if a swastika is 25/25 pixels in the data region, but give you a pass if it's 20/25 pixels in the data region and 5/25 pixels in the timing pattern? Why would a human ever think that's a worthwhile distinction?
I don't like jumping to conclusions, but I'm starting to suspect the actual answer is this library is AI slop, and what AI thinks is important is not what humans think is important.
Again, if it's a "statement in code form", then the purpose of it is to get people talking about the growing risk of the image version of the Scunthorpe problem.
The purpose of a political candidate like Count Binface isn't to get elected, but to make a statement and get people talking. Whether something's AI-generated would be more or less irrelevant to such a purpose.
...plus, the examples demonstrated are what I would expect to be yes/no for a computer vision algorithm. I wouldn't expect there to be a high chance of a match for such a low "pixel per arm" count on the diagonal form if something like that shows up in the context of a whole QR code, but I could see computer vision latching onto the grid-aligned version. (So, at the very least, I'd say it's very reasonable to assume this is a human programmer's conception of what computer vision might get a false positive on.)
I'm saddened that projects like this exist. It never even occurred to me that you could be offensive symbols in a QR code.
How many times does it happens ? You want to create a simple QR code and you are faced with a huge unwanted nazi symbol randomly generated in your QR code ??
I wanted to answer the "how many times." Get your pencils out and feel free to check my work.
(QR codes aren't totally random, but we'll ignore that for now.)
Total probability that we find any swastika in a random QR-code-shaped pattern: 0.00006 or about 1 in 14500. It could happen!
We could keep increasing the size (9x9, etc.) but that specific combination of pixels in a larger block is so unlikely that it doesn't meaningfully change the result.
Unfortunately scanning the source it looks like this project is vibe coded, but I did my math by hand.
I find myself curious about the intent behind this project.
Given how specific it is, it seems like there's some kind of story or joke behind it but, given the increasing use of buggy A.I. to do things like suspending Discord users' accounts for screenshots of spreadsheets and Minecraft crafting grids because Microsoft photoDNA's perceptual hashing couldn't handle having grids of CSAM thumbnails filling up its training set, a more broadly useful "risky pattern avoider" is an appealing idea.
I am curious if this webpage itself would be illegal in Germany due to displaying the swastika, despite the whole point being to avoid swastikas in data patterns
Basically the prohibition is context-dependent: https://www.bundesgerichtshof.de/SharedDocs/Pressemitteilungen/DE/2007/2007036.html
The struck-out swastika is ok (as per the decision described in that article by the federal court), and the others are specimen of what the code will detect to filter out, so I wouldn't expect problems.