9 ms·
How to make a QR code with Stable Diffusion
- great_psy 3y agoTHIS is what AI art should be like. Hard for humans, easy for computers, amazing visuals. And on top of that it functional as well. I feel like this is closer to how human artists create, artists have a set of constraints, and a lot of limitations, and forcing NN to output valid QR codes puts the same constraints on the process itself. Next step, include the QR reader in the training loop, and make it differentiable to increase the valid output from 1/4 to 100%
- ArthurAardvark 3y agoAgreed! The wisest peeps (I always harp) see AI Art as a functional tool on the metaphorical toolbelt. It doesn't make all the other tools obsolete, it's the tippy top of the pyramid so to speak. The cherry-on-top to refine things we cannot do, adding an artificial flare to the organic substance, yada, yada, yada.
- AdieuToLogic 3y agoWay cool article and novel hacking of QR codes!
- alphabet9000 3y agothere was a cool one posted to /g/ earlier https://i.jollo.org/ePE3JHak.png https://i.jollo.org/ePE3JHak.png
- coxj2901 3y agoThis was created using this guide:- https://learn.thinkdiffusion.com/creating-qr-codes-with-controlnet/ https://learn.thinkdiffusion.com/creating-qr-codes-with-cont... I was speaking to him when he created it!
- bredren 3y agoI’ve seen these and they are so novel! The problem is they don’t look like QR codes. A regular QR code, regardless of the fact they are an eyesore, people know what to do when they see one on a menu. Artistic ones don’t really look like QR. Def don’t want to have to add an arrow and “scan this!” I suspect this will come on more handy incorporating QR into larger murals that people might photograph anyway. iOS camera “sees” QR codes w a url preview. This surprise embedded mega might make for an interesting beat in the march to ubiquitous AR.
- yonatan8070 3y agoMaybe it's because I've read a bit about how they work and in general have seen a lot of them, but I can recognize these are QR codes even if they weren't labeled as such
- maratc 3y agoThat's great, but how about your grandma? Could she recognize that's a QR code?
- yonatan8070 3y agoI'm not sure she knows what a normal QR code is...
- maratc 3y agoMy point is: this is cool and all, but it makes the functional part of QR codes harder, not easier. While something can be functional and beautiful at the same time, and while QR codes are not beautiful by any means, this adds beauty but at the same time removes the functional part — ease of identifying QR code as such.
- aledalgrande 3y agoIt would be a cool idea for leaving easter eggs embedded in designs though
- swyx 3y agothis guide starts by promoting their gumroad book which i dont want. currently using a1111 off of https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/ https://colab.research.google.com/github/TheLastBen/fast-sta... and hoping to go from there
- villgax 3y agoYep, these guys have spammed the front page as of now all from the same url
- cafxx 3y agoThe funny thing is that no-one AFAICT has realized that the same content can be encoded in different-looking QR codes. Beside the obvious (different error-correction levels), the content itself can be changed while maintaining its semantic meaning (e.g. "https://example.com/foo https://example.com/foo", "HTTPS://EXAMPLE.COM/foo", or "HtTpS://eXaMpLe.CoM/foo" are all semantically identical) and even the QR encoding itself can be tweaked (e.g. by changing the version and mask, see the demo on https://www.nayuki.io/page/qr-code-generator-library https://www.nayuki.io/page/qr-code-generator-library). Each combination would yield a different-looking QR code that would encode the same meaning, and it could therefore allow the diffusion models even greater freedom. I'm sure somebody will get to this soon.
- Kuinox 3y agoThere is a CRC so it's not as easy at it sounds.
- cafxx 3y agoNone of what I wrote impacts the CRC calculation.
- Kuinox 3y agoDiffusion models cannot generate a qr code by itself. The article even shows you need to generate the base image yourself. What you are proposing would mean bruteforcing the QR codes until we see a better shape.
- Karliss 3y agoI wouldn't call generating a couple of semantically equivalent (but fully valid and 0 error) QR codes and giving each of them as inputs to diffusion model brute forcing. Even the normal AI image generation process often involves some trial and error. Generating a bunch of variants by changing random seed or slightly tweaking prompt keywords and choosing a result which looks the best. Doing multiple attempts with multiple different inputs doesn't seem more crazy than doing multiple attempts with same input and hoping for better results.
- femto 3y agoWhat's the noise margin like? QR codes with logo's typically contain bit errors and rely on the forward error correction code to correct those errors. The logo comes at the cost of some noise margin. I'd guess that that the same applies here? All good if decoration is your priority, but if reliability is also a priority you have to be aware of the tradeoff.
- rldjbpin 3y agothis. i wonder if all qr code scanners follow a standard way to read the code, while accounting for the redundant data and checking for errors. might explain why my phone struggles to scan some of them.
- dgreensp 3y agoAs an engineer, the lack of consideration for the matter of how much one should corrupt a signal (which might be scanned under different conditions, such as different light levels and resolutions) is grating to me. It’s like scratching a design onto the bottom of an audio CD, playing it, and if it works on your CD player, shipping it. “Works for me”
- aledalgrande 3y agoAs a crafter and tinkerer, I love to test how far I can scratch that CD.
- mozey 3y ago> which might be scanned under different conditions, such as different light levels and resolutions This makes me think of your stereotypical pirate map to buried treasure
- deleted 3y ago[deleted]
- motoxpro 3y agoI feel like you need both people. The people who scratch a unique song onto a CD that only plays on one random CD player 2% of the time, and then the people who optimize that one song to play on 100% of devices while your upside down and underwater. Make the cool QR code first, then get it to work everywhere when you actually made something cool.
- nayuki 3y agoThis is a classic read: http://datagenetics.com/blog/november12013/index.html http://datagenetics.com/blog/november12013/index.html
- thih9 3y agoInterestingly when I long pressed the codes marked as “No” (in Safari mobile), a lot of them were still decoded.
- yonatan8070 3y agoAt least with my scanner (Binary Eye on Android) these don't scan very well. Nonetheless they are very cool. I wonder if this would work better or worse with different types of 2D barcodes like Aztec, Data Matrix, or PDF-417
- lazarohcm 3y agoMy phone camera couldn't recognize any of the generated ones. Looks cool though
- chetangoti 3y agoMy phone didn't recognized as well, until I zoomed out the screen to 50% and I was able to scan all the generated QRs from the article.
- nextlevelwizard 3y agoWith iPhone 14 from MacBook Air M1 screen about 35-40 cm away every picture except one read on first try and that one read after I pulled the phone back a bit.
- shellfishgene 3y agoSame here, my Xiaomi did not recognize any of them at any distance.
- sandos 3y agoSame here, with a samsung s21 and the built-in camera app.
- henriquecm8 3y agoI could read half of them, it was detecting a face in the first Mechanical Girl, face detection probably prevents it from working, since it worked for most of the sceneries. It also didn't work on any picture that extrapolated the boundaries of the qr code. I tried with built-in camera app of my Samsung m21. If anyone wants to use this, they should do a lot of testing first. Edit: I also noticed that angle matters when scanning from certain monitors, the first qr code didn't work at first, but I noticed the top of the picture was too dark then I tried to hold the phone in the same angle as the screen and it worked.
- thulle 3y agoAsus Zenfone, tried both barcode scanner app and regular camera. Barcode scanner picked up the template, none of the generated ones. Camera app picked up two (both japanese girl ones) - fast enough for it to be useful, and the first robot one after like 10-12 seconds trying various distances, which I think should be considered a failure.
- auxermen 3y agoNot bad, but the ones from the custom trained NN are way nicer in my opinion, with most of these it's pretty clear they are QR codes (which is probably better for usability, but makes the art a bit worse).
- kunley 3y agoAd ad ad ad ad AD ad AD ad Ad.... And some content in between
- FireInsight 3y agoThere are ads on this page? I almost forgot that I've been experiencing the internet ad-free for years now. Thanks uBlock!
- pcthrowaway 3y agoMaybe the QR code examples are ads? I don't know, I didn't scan them
- FireInsight 3y agoI wouldn't even mind that, that'd be a creative sponsor spot. I think they're talking about actual ads here.
- kunley 3y agoAh, I got uBlock, but didn't have on the mobile where I was reading it first...
- cinntaile 3y agoI tried to post the original a few days ago but the submission was automatically killed. https://mp.weixin.qq.com/s/i4WR5ULH1ZZYl8Watf3EPw https://mp.weixin.qq.com/s/i4WR5ULH1ZZYl8Watf3EPw
- plastic3169 3y agoInteresting I am not able to focus on these images. Looking at them makes my eyes pop around until I have to look away.
- GaggiX 3y agoUnfortunately, they don't look as nice as the originals that were shown a few days ago, I wonder how they did that. https://mp.weixin.qq.com/s/i4WR5ULH1ZZYl8Watf3EPw https://mp.weixin.qq.com/s/i4WR5ULH1ZZYl8Watf3EPw They talk about a custom QR codes ControlNet.
- asynchronous 3y agoProbably more trial/error
- coxj2901 3y agoFollow along! https://learn.thinkdiffusion.com/creating-qr-codes-with-controlnet/ https://learn.thinkdiffusion.com/creating-qr-codes-with-cont...
- GaggiX 3y agoThis is not using a custom Controlnet for QR codes.
- bytemonitor 3y agoVery nice post, thanks for sharing.
- prepend 3y agoThis is cool and can’t wait until there’s more accepted steganography where every image has some side channel of info encoded into the image in a way that as a viewer I don’t notice it, but my phone’s camera can discern.
- diego_moita 3y agoI don't like this. I hope it dies soon. It has very bad UX because it muddles the "affordance" of a QR. A QR should explicitly and clearly look like a QR for people to understand they should use it as such. It isn't effective because it degrades the bandwidth of QR codes. It reduces the amount of information you can place on QR codes. This is just a gimmick, a funny trick that implements bad functionality. As in Jurassic Park: just because you can do it doesn't mean you should do it.
- cinntaile 3y agoI think it looks much nicer than a regular QR-code and there are definitely times when you want a QR-code to blend in rather than stand out.
- macintux 3y agoA large banner, as someone else mentioned, seems like the perfect place to use one of these. “Come see the new exhibit at the art museum” e.g.
- cainxinth 3y agoFirst, it’s just a new artistic choice that some will use and other’s won’t. And second, if it does become very popular, users will become familiar with it and will likely instinctively grok that some of the ‘art’ they are looking at can be scanned as a QR code. Phase one will be artsy QR codes with a written caption: “Hey, this is actually a QR code! Scan it!” Phase two, is removing the caption because people are so accustomed to them.
- mabbo 3y agoThere's a way to make a QR code that provides a device with all the info it needs to sign onto a WiFi network. I'm wondering if I could make one of those, turn it into an interesting piece of art, then frame it and put it up in my living room. When guests ask for WiFi, I would just say "take a photo of that picture".
- simonbw 3y agoI've been wanting to do that with a wood laser cutting. My lazier version was to set the desktop background of the tv in my living room to that QR code.