Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Anime

Redditor Creates Working Anime QR Codes Using Stable Diffusion (arstechnica.com) 61

An anonymous reader quotes a report from Ars Technica: 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. [...] 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.

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. [...] 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.

This discussion has been archived. No new comments can be posted.

Redditor Creates Working Anime QR Codes Using Stable Diffusion

Comments Filter:
  • by SuperKendall ( 25149 ) on Tuesday June 06, 2023 @06:04PM (#63581759)

    I tried one of these, and it's indeed amazing how what looks like art is still a working QR code...

    However that error correction is there for a reason, is there enough room for error left that bad printing or partial obstruction would render the artistic QR code usable?

    • by Luckyo ( 1726890 ) on Tuesday June 06, 2023 @06:15PM (#63581799)

      Some of these already don't scan very well. I.e. some devices will not scan the code properly unless positioned at a very specific distance which obfuscates enough of the art.

      • by Dusanyu ( 675778 )
        I noticed this as well I tried to use the first image in the article and my phones face recognition was triggering not allowing it to scan as a qr but the downsized thumbnails scanned just fine.
      • I only got three of them to work on my Pixel 7.
        • by Luckyo ( 1726890 )

          Try different distances from the monitor. Too much fidelity seems to be the thing that breaks it. It scans better at enough distance where camera can't see details well.

          I've also heard of people who had better luck scanning printed images of these rather than scanning from the monitor.

    • As it says in the article. Works best with not very long urls. So not alot of data. I fÃrser a boost in short url business.
    • by xwin ( 848234 )
      I tried all of them and they barely scan. I used a standard Samsung camera app, which normally scans QR codes instantly. These QR codes the app could barely scan, I had to hunt the distance and finally was able to scan them. While a neat concept, it is not user friendly at all. You want a QR code that is easy recognizable and instantly readable. Not some pretty picture that one can't scan.
      QR code is a very practical thing, given modern cell phones. It has high data capacity close to 4K of characters and hi
      • Apparently these codes just do not work well with android devices unless you use third-party QR code apps, which kinda defeats the purpose.

      • Interesting you mention the Samsung camera app. I don't know how "standard" mine is but it came preloaded on their ca. 2020 phone. (v 9.0.05.3) It doesn't scan QR codes at all. It's lacking in any settings for resolution or picture quality. It does come with a few hipster "Vintage" filters though!

        The Samsung is also missing a basic calculator application, and FM radio. Luckily my flip phone has those.

        It does have a bunch of useless crapware. "Samsung Free" streaming garbage that you can't remove off the lef

        • I never did understand why the basic Android camera didn't scan QR codes for so long. I mean, years? Decades? I had the "Barcode Scanner" app installed for that. But now it does, and Samsung is lame.

          I am also on a Moto phone. Frankly though Android and Moto alike are beginning to suck more. I really love the moto actions or whatever it's called where I can shake the phone around to get the light or camera, but that stuff has become decreasingly reliable. Sometimes chop for flashlight doesn't work at all, or

      • by AmiMoJo ( 196126 )

        I found them extremely reliable from various distances and angles using Google's visual search.

        I'd have a backup standard code for other devices though.

    • by tlhIngan ( 30335 )

      However that error correction is there for a reason, is there enough room for error left that bad printing or partial obstruction would render the artistic QR code usable?

      Half of the QR code data blocks is dedicated to error correction. And it's using reed-solomon error correction, meaning it is completely redundant - as long as you have just more than half the bits read correctly, you can recover the whole thing.

      We already do artistic things with QR codes - the logo in the center for example, is basically

    • I got 2 of the 8 working, and the same success rate with different apps. So while it may well be valid QR codes, they have well and truly overstretched the error correction relationship.

  • AI Steganography FTW!

  • by byronivs ( 1626319 ) on Tuesday June 06, 2023 @06:17PM (#63581807) Journal
    This is a fun and trivial use. Cool enough. I'd like to see a shirt or sunglasses using computer dazzle patterns to get them to read "new" inputs, and video to read bizarrely by using a pattern that has been determined in a similar fashion as illustrated in this story, maybe an "admin" QR code, maybe just a visual pattern that glurks it. Messing with and getting under the gloss we put on electronics getting in the in-between spaces. Exciting stuff.
    • by sjames ( 1099 ) on Tuesday June 06, 2023 @07:20PM (#63581949) Homepage Journal

      Imagine thousands of people wearing shirts with 'abstract art' on them but for reasons not fully understood, facial recognition sees Richard Nixon every time.

      • Actually I was thinking more Aeon Flux less V for Vendetta. But i like it. Cloaking through messing with the scan frequencies of the cameras, making artifacts in the video, and if you can 'make' them, one might figure out how to create them to a spec, making the camera "see things." Finding exploits in the edge cases of the sensors. Chaining with other known and unknown exploits across every supporting system and stack and box, finally creating those dystopian cyperpunkish flashmob (remember those?) hacks a

    • by AmiMoJo ( 196126 )

      This brings us one step closer to the plausibly deniable goatse t-shirt.

  • by SmaryJerry ( 2759091 ) on Tuesday June 06, 2023 @06:29PM (#63581835)
    Umm, I suppose posting on reddit makes you a "Redditor" technically but not sure if I created something nice and posted it on Reddit if that's how I would want to be described instead of AI Programmer, Designer, Architect.. whatever.. It's like if I posted my findings or writings of anything on Facebook or Twitter and something made an article saying "Facebooker figures out a way to... " or "Tweeter creates..." It's attributing a little too much credit to the platform and not the person, but whatever.
    • I don't think it attributes anything more than "Canadian creates..." attributes a creation to the Canadian government.

      If anything, "Redditor" is an even better descriptor, since the user has chosen to be part of that website, whereas most Canadians are just there because that's where they were born.

      That said, if Bookface or especially Twitter is the primary outlet for your "findings or writings" they can't be too important or detailed. Reddit has at least the capacity for something higher.

    • by CAIMLAS ( 41445 )

      When I think of redditors, I think of someone who looks at furry porn, likes being cucked, and generally is not a very driven person in life.

      I sure wouldn't want to be called one, at any rate.

    • if I created something nice and posted it on Reddit if that's how I would want to be described instead of AI Programmer, Designer, Architect.. whatever..

      But are you any of those things Mr Random Internet Person? The only thing I know about you is that you're on Slashdot and there's a small chance your name may be Jerry. Beyond that to anyone who asks you will be described as a Slashdotter.

      You have the power to define how you wish to be addressed. So please let us know your name, profession, age, and pronouns.

  • SD's already got image/image graphics on it, but can SD do it fast enough to keep up with the Doom action? And I don't think that anyone will care if the demons have the wrong number of fingers.
  • Aside from it being nifty idea, I surmise from looking at them that QR codes depend heavily on the 3 squares which I assume are something like registration marks that I used for lining up multiple negatives on film for pre-press back in the day. Once the registration marks are aligned, I guess all the QR code detector looks for is a bimodal "light or dark" signal in regions relative to the marks, so it can be anything you want, even colors as long as the average of the region is sufficiently dark or light

    • Pretty much on the mark.

      Also, QR codes have a hefty dose of Reed-Solomon error correction so they can deal with a lot of corruption.

      • I'm going to start referring to my method of coping with our political climate as "Reed-Solomon error correction".

  • QR codes are _dangerous_. You want to avoid ever pointing you phone at one you do not trust. It is basically the same as sending your browser to an URL you just got in a random SPAM email or the like.

    Now they have made it possible showing you phone a QR code without ever intending to and in fact without realizing you do. A great accomplishment that nicely shows the benefits to be expected from AI!

    • QR codes are _dangerous_. You want to avoid ever pointing you phone at one you do not trust.

      I have NO problem pointing my phone at any QR code. But then, I don't have QR reader software installed, and mobile data and WiFi are seldom turned on. I also don't do banking on my phone, and there's no Play Store, Gmail, or other Google crap on it beyond whatever is in the AOSP stuff that LineageOS uses. It's a phone, a texting device, a basic camera, a WiFi hotspot when needed, and very occasionally a web browser and email checker - that's it.

      Being a contrarian old fart has its drawbacks, but I gotta say

      • by gweihir ( 88907 )

        QR codes are _dangerous_. You want to avoid ever pointing you phone at one you do not trust.

        I have NO problem pointing my phone at any QR code. But then, I don't have QR reader software installed, and mobile data and WiFi are seldom turned on. I also don't do banking on my phone, and there's no Play Store, Gmail, or other Google crap on it beyond whatever is in the AOSP stuff that LineageOS uses. It's a phone, a texting device, a basic camera, a WiFi hotspot when needed, and very occasionally a web browser and email checker - that's it.

        Being a contrarian old fart has its drawbacks, but I gotta say I'm also liking the advantages...

        That is obviously a 0.1% situation and not generally relevant. Anybody smart and capable can obviously still be secure, but if everybody was at reasonably careful with computing devices, malware would not be a thing. Most people are not.

        • I'm not sure why you're trying with that guy... Apparently he didn't even find his phone's flashlight capabilities.
    • QR codes are _dangerous_. You want to avoid ever pointing you phone at one you do not trust. It is basically the same as sending your browser to an URL you just got in a random SPAM email or the like.

      Now they have made it possible showing you phone a QR code without ever intending to and in fact without realizing you do. A great accomplishment that nicely shows the benefits to be expected from AI!

      The problem is dangerous QR software that fails to ask first.

    • QR codes are _dangerous_. You want to avoid ever pointing you phone at one you do not trust. It is basically the same as sending your browser to an URL you just got in a random SPAM email or the like.

      No, no it is not.

      If I scan a QR code, then I am presented with the URL embedded in it, and I have the choice whether or not to open it.

      Pointing my phone at a QR code is dangerous, but only because there could be a buffer overflow in the QR reading code. It does not open any URLs. I have to touch again for that.

      What you are doing here is letting the user off the hook. Yes, it's difficult to evaluate a URL for trustworthiness, but you have to do it no matter where the URL comes from. It doesn't matter if it'

  • by 93 Escort Wagon ( 326346 ) on Tuesday June 06, 2023 @10:04PM (#63582238)

    ... and possibly dangerous. Good thing OSes nowadays make you actively choose to follow a QR code link.

    But setting security aside - this was pretty cool and imaginative.

  • Using QR scanner on f-droid the floral patterns, waves and calligraphy won't scan but still quite cool.

  • None of the 3 worked on a Samsung. I zoomed in and out. I tested on a "real" one to make sure normal ones still work.

    Anyone else?

    • by Gyles ( 87774 )

      They all worked on my Samsung (S10e). Fiddly though - they need to be at just the right distance from the phone (further than normal - not too large in the screen), and are slow to respond.

  • They to really look nice, but won't work well due to eliminating error correction. My phone was able to easily identify about half of them, the article and comments say you need a good reader app, a good camera and maybe print before scanning. Well, that defeats the puropose of using QR codes, QR coded are supposed to be easily read by any camera with any software in any conditions.

  • The word "working" is doing a lot of heavy lifting. I got 2 of these to work. With a different app I got a 3rd to scan but only once, can't replicate it. A QR code needs to be incredibly resilient to be useful, and this isn't it.

    Can't deny however that this is frigging awesome.

Today is a good day for information-gathering. Read someone else's mail file.

Working...