Culture Redditor creates working anime QR codes using Stable Diffusion - Image-synthesis technique relies upon QR's natural error-correction properties.


BENJ EDWARDS - 6/6/2023

qr_code_lady.jpg
An AI-generated image of an anime-style woman that also functions as a working QR code. If you have trouble reading it, try positioning your camera farther away from the image.

On Tuesday, a Reddit user named "nhciao" posted a series of artistic QR codes created using the Stable Diffusion AI image-synthesis model that can still be read as functional QR codes by smartphone camera apps. The functional pieces reflect artistic styles in anime and Asian art.

QR codes, short for Quick Response codes, are two-dimensional barcodes initially designed for the automotive industry in Japan. These codes have since found wide-ranging applications in various fields including advertising, product tracking, and digital payments, thanks to their ability to store a substantial amount of data. When scanned using a smartphone or a dedicated QR code scanner, the encoded information (which can be text, a website URL, or other data) is quickly accessed and displayed.

In this case, despite the presence of intricate AI-generated designs and patterns in the images created by nhciao, we've found that smartphone camera apps on both iPhone and Android are still able to read these as functional QR codes. If you have trouble reading them, try backing your camera farther away from the images.

qrcode01.jpgqr_lady_2.jpgqrcode05.jpgqrcode02.jpgqrcode06.jpgqrcode07.jpganimeqr6ff40.jpg

Stable Diffusion is an AI-powered image-synthesis model released last year that can generate images based on text descriptions. It can also transform existing images using a technique called "img2img." The creator did not detail the exact technique used to create the novel codes in English, but based on this blog post and the title of the Reddit post ("ControlNet for QR Code"), they apparently trained several custom Stable Diffusion ControlNet models (plus LoRA fine tunings) that have been conditioned to create different-styled results. Next, they fed existing QR codes into the Stable Diffusion AI image generator and used ControlNet to maintain the QR code's data positioning despite synthesizing an image around it, likely using a written prompt.

Other techniques exist to make artistic-looking QR codes by manipulating the positions of dots within the codes to make meaningful patterns that can still be read. In this case, Stable Diffusion is not only controlling dot positions but also blending picture details to match the QR code.

This interesting use of Stable Diffusion is possible because of the innate error correction feature built into QR codes. This error correction capability allows a certain percentage of the QR code's data to be restored if it's damaged or obscured, permitting a level of modification without making the code unreadable.

In typical QR codes, this error correction feature serves to recover information if part of the code is damaged or dirty. But in nhciao's case, it has been leveraged to blend creativity with utility. Stable Diffusion added unique artistic touches to the QR codes without compromising their functionality.

animeqr6dd40.jpg
An AI-generated image that still functions as a working QR code.

The codes in the examples seen here all point to a URL for qrbtf.com, a QR code-generator website likely run by nhciao based on their previous Reddit posts from years past. The technique could technically work with any QR code, although someone on the Reddit thread said that it may work best for shorter URLs due to how QR codes encode data.

This discovery opens up new possibilities for both digital art and marketing. Ordinary black-and-white QR codes could be turned into unique pieces of art, enhancing their aesthetic appeal. The positive reaction to nhciao's experiment on social media may spark a new era in which QR codes are not just tools of convenience but also interesting and complex works of art.
 
I... Look, lol weebs, whatever, but this is actually kind of cool. There's no reason you couldn't apply the same basic technique to all sorts of other images, really.
It's neat, and I think it could be beneficial to first movers, but I think the problem is with it being any image. With something like a QR code, you want it to be easily identifiable and scannable, which is somewhat accomplished by the three square pattern, but the more you make it into an image, the more likely people won't scan it because it doesn't stand out enough. The handful of people to do it first will probably benefit from novelty though.

The biggest thing I can imagine it being used for is a poster with multiple images where you can scan the characters on that poster for some kind of promo campaign, but even that seems cumbersome in comparison to scanning one code and just picking them from a list on the site. Maybe some kind of collectible card game?
 
I don't think any human artist has been able to do something like this; a real functioning QR code integrated artistically into an art piece where it's not just the pixel boxes, but actual brush strokes. And they said AI art wasn't art. THAT is art. That flower one is ridiculously impressive. Only the three squares give it away as a QR code.
 
I unironically really love this, I love seeing clever new uses of this tech. This reminds me a lot of those AI-generated images that look like other images when shrunken into thumbnails that are popular on /g/ lately, like a picture of trees and such that looks like Pepe when shrunken into a thumbnail.
 
AI watchers know I'm not saying anything new here, but a larger implication is you can secretly inject any AI-readable image into a human-viewable image and vice versa. You could project an image onto a wall and fry the brain of everyone wearing Apple's nerd goggles.
"No, don't look at it! *sizzle*"
"Don't look at what? *sizzle*"

I don't think any human artist has been able to do something like this; a real functioning QR code integrated artistically into an art piece where it's not just the pixel boxes, but actual brush strokes. And they said AI art wasn't art. THAT is art. That flower one is ridiculously impressive. Only the three squares give it away as a QR code.
There are programmers writing batshit self-producing code in batshit programming languages. I don'tknow if anyone made QR code art, but the unaided human brain is certainly capable of an equivalent.
 
I always thought whores should be branded with a QR code, but anime guys took it in a more abstract direction.
Manga, anime, weeb art, games, visual novels, and etc. and etc. already been bar coding whores, sex droids, sex slaves, (semi)attractive females at least since the early 80ies. Weebs been QR coding those females and femboyz almost the second it became public knowledge. Just QR codes aren't as quite as aesthetically pleasing or simple to draw as the older bar codes.
 
With something like a QR code, you want it to be easily identifiable and scannable, which is somewhat accomplished by the three square pattern, but the more you make it into an image, the more likely people won't scan it because it doesn't stand out enough. The handful of people to do it first will probably benefit from novelty though.
That could easily be solved by just writing "I'm a QR code! Scan me with your smartphone!" under the images, or just having some way to let people figure out they can scan it.
This is really cool though. I could see movie theaters/production companies turning movie posters in QR codes with some sort of interactivity or behind the scenes promotional material.
 
I wonder how badly the data density suffers here. IIRC an unmolested QR code can store about 3KB or so, wonder how much you sacrifice to make it look pretty
 
AI watchers know I'm not saying anything new here, but a larger implication is you can secretly inject any AI-readable image into a human-viewable image and vice versa. You could project an image onto a wall and fry the brain of everyone wearing Apple's nerd goggles.
"No, don't look at it! *sizzle*"
"Don't look at what? *sizzle*"
This is tickling my brain. This reminds me of something but I'm not sure what.
It's not the TransMet dream-advertising, it was something else.
 
There are programmers writing batshit self-producing code in batshit programming languages. I don'tknow if anyone made QR code art, but the unaided human brain is certainly capable of an equivalent.
They are CAPABLE of doing it. Yet no one until now has actually done it—and it was done using AI. Through AI, a new form of art has been invented: QR code art. That is remarkable.
 
I'm gonna assume those QRs all lead to hentai porn or something, so I'm just gonna leave em be, but the idea of artistic QR codes is kind of neat.
 
That could easily be solved by just writing "I'm a QR code! Scan me with your smartphone!" under the images, or just having some way to let people figure out they can scan it.
This is really cool though. I could see movie theaters/production companies turning movie posters in QR codes with some sort of interactivity or behind the scenes promotional material.
Something you learn about marketing rather quickly is that most people are braindead stupid and an obvious big white square is a very solid form of advertising.

Bigger brands could probably create enough awareness for some of their products though.
 
Back