π¬
# 6/19/2023 Using Picture QR codes for better AI-generated QRs
When the AI-generated QR codes first surfaced, we asked ourselves: can our Image-to-QR technology help improve the quality of AI QR codes?
Today, after a week of hacking and experimenting, we're back with the answer! First, a little showcase:
figure 1. Picture QRs reduce the visual noise of QR codes, allowing for clearer images.
figure 2. Picture QRs can imprint its own design into the result (the Nike logo).
Overall, here's what we've learned: you can use picture QRs as a way to gain extra control into the creative process of generative AI. Let's dive in!
A. How do AI QRs work?
Since their appearance in this Reddit post, AI QR codes have become a major internet sensation. We wrote about it the other day, and found that it works like this (grossly simplified):
- Stable diffusion is given a prompt that describes the style and contents of the image.
- Controlnet modules are configured with a QR code, which tells Stable Diffusion to infuse the QR code into the final image.
figure 3. How AI QRs are generated
B. How do UNIQR codes work?
Simply put, UNIQR codes work by first generating an "outline" QR code that roughly matches the outline of the image. Then, the QR code is blended into the original image.
figure 4. How UNIQR codes are generated
C. How do you do UNIQR x AI QR?
So far, we've discovered 2 techniques; we call them Imprinting, and Reinforcement.
C-1. Technique 1: "Imprinting"
Imprinting is simple. You use the same process used for AI QR codes, except for the QR code itself, which is generated with Image-to-QR. The design of the UNIQR code gets imprinted into the resulting image, giving you extra control over the design of your AI QR codes.
figure 5. "Imprinting" technique
Here's a few more examples of this technique:
figure 6. Another 'Mediterranean Village"
figure 7. "Alpine village" - this one doesn't scan reliably, unfortunately.
(Shoutout to @skirano for the inspiration)
In summary, with Imprinting, outline QRs can be used to introduce visual themes and shapes into your AI QR, without harming the reliability of the QR code.
C-2. Technique 2: "Reinforcement"
Reinforcement works a bit differently from the standard AI QR workflow:
- First, you freely design any image you want, using Stable Diffusion.
- Then, with image-to-QR, create an outline QR.
- Finally, follow the normal AI QR workflow by providing the outline QR and the same prompt as step 1.
figure 8. "Reinforcement" technique
This technique has some interesting properties:
- It allows the image to be designed separately from the QR code, giving you more creative control over both the image and integration of the QR code.
- Astute readers may have noticed that step 1 can be skipped altogether. Indeed, you can directly provide an outline QR based on arbitrary images (photos, drawings), which enables a full-on "Image-to-AI QR" workflow (more on this later).
Let's look at some more examples.
figure 9-1. Original image designed with Stable Diffusion
figure 9-2. Outline QR made with Image-to-QR
figure 9-3. Final result.
figure 9-4. Another final result, closer to the original. This was done by
using another ControlNet module to "reference" the original image (preprocessor: reference_adain+attn
).
figure 10-1.
figure 10-2.
figure 10-3.
figure 11-1.
figure 11-2.
figure 11-3.
Finally, we're still experimenting with the "Image-to-AI QR" workflow, but here's some results so far:
figure 10-1. Original image (not AI!)
figure 10-2. Outline QR made with Image-to-QR
figure 10-3. Final result. It's amazing that the AI recognizes the outline of the QR and fills in the details!
figure 10-4. Another final result, again with an extra "reference" ControlNet module bringing details of the original image.
D. Final Thoughts
In today's post, we've discussed the underlying principles of AI QR and UNIQR, a couple of ways in which they might be used together for a better final result, and some examples of these techniques.
Anyone with a working knowledge of Stable Diffusion and ControlNet should be able to try this themselves, by following this post. Feel free to stop by our Discord server with any questions. With so many artists experimenting with AI QR, we hope this helps further their search.
π All the UNIQR codes used in this post were made with a UNIQR Lite subscription, which is available at $3/month. You can try it for free here (no login required).
# 6/18/2023 Resolution upgrade
Today, we released an update that allows our systems to work with much higher resolution images.
Low-resolution (500x500px)
High-resolution (1960x1960px)
Close-ups of the detail:
Low-resolution (500x500px)
High-resolution (1960x1960px)
The upgrade is available to Lite & Pro customers. Check out our pricing for more info!
# 6/17/2023 AI QR ControlNets
AI has finally learned how to generate QR codes! Well, not really - it's learned how to paint a QR code "into" a picture. You still need to generate your own QR from a website (wink wink π). But if you have a QR code, there's now a way for you to tell the AI to draw your QR code "into" its images. And the results are amazing!
We are obviously very intrigued by this technology, and will be experimenting with it to bring you more insights. But for now, here's how it works:
- As summarized above, this technique works by mixing StableDiffusion's txt2img ability with ControlNet's ability to control StableDiffusion's behavior.
- As input, a text prompt is given to the AI to describe the image that the user wants, and a ControlNet module is loaded with the (externally-generated) QR code.
- During image generation, the ControlNet module pushes the AI towards preserving the shape of the QR code, which causes StableDiffusion to alter the details of the drawing to match the given QR code.
This calls to mind the wonderful, intricate works of The Elkoy Artist Collective, under The Art of QR Codes.
# 6/15/2023 UNIQR API is in beta!
Today, we are launching our early access program for UNIQR APIs. We're working with a select few startups to enable their use cases, including Brij, a platform for building QR code-based product experiences, and SonX, a premium community platform for musicians.
It is a simple REST API that converts images into QR codes, powered by the same technology as our Image-to-QR creator. More details can be found on our API documentation. If you're interested in participating in the beta program, please contact us!
# 6/06/2023 π€³β¨π
π€³β¨π
Scan. Everything.