Stable Diffusion And Why It Matters

You might not have heard about Stable Diffusion. As of writing this article, it’s less than a few weeks old. Perhaps you’ve heard about it and some of the hubbub around it. It is an AI model that can generate images based on a text prompt or an input image. Why is it important, how do you use it, and why should you care?

This year we have seen several image generation AIs such as Dall-e 2, Imagen, and even Craiyon. Nvidia’s Canvas AI allows someone to create a crude image with various colors representing different elements, such as mountains or water. Canvas can transform it into a beautiful landscape. What makes Stable Diffusion special? For starters, it is open source under the Creative ML OpenRAIL-M license, which is relatively permissive. Additionally, you can run Stable Diffusion (SD) on your computer rather than via the cloud, accessed by a website or API. They recommend a 3xxx series NVIDIA GPU with at least 6GB of RAM to get decent results. But due to its open-source nature, patches and tweaks enable it to be CPU only, AMD powered, or even Mac friendly.

This touches on the more important thing about SD. The community and energy around it. There are dozens of repos with different features, web UIs, and optimizations. People are training new models or fine-tuning models to generate different styles of content better. There are plugins to Photoshop and Krita. Other models are incorporated into the flow, such as image upscaling or face correction. The speed at which this has come into existence is dizzying. Right now, it’s a bit of the wild west. Continue reading “Stable Diffusion And Why It Matters”

Monitoring A Cat’s Litter Box Usage With AI

[Estefannie] is a proud cat owner, but one of her cats has a bad habit of eating plastic. That means she needs to keep an eye on that cat’s bowel movements, but with two cats in the house, it’s difficult to know who did what. Thus, she whipped up an AI system to log her cats bathroom visits and give her peace of mind.

It’s not the most glamorous project — [Estefannie] notes she took over 50,000 pictures of her cats using the litterbox to train Microsoft Azure’s Custom Vision model. But after some work, it could readily identify which cat was using the litter box when fed images from a NoIR camera. The system then differentiates between number 1 and number 2 via the time the cat spends in the litter box. It’s not perfect, but it works.

The Raspberry Pi runs a Node.JS server to collate the results, paired with a website front-end for easy data display. That way, anyone on [Estefannie’s] WiFi network can see who did what from a browser. We’ve seen cat litter boxes put on the Internet of Things before, and we’ve even seen people hack litterbox DRM, too.

Continue reading “Monitoring A Cat’s Litter Box Usage With AI”

Blog Title Optimizer Uses AI, But How Well Does It Work?

[Max Woolf] sometimes struggles to create ideal headlines for his blog posts, and decided to apply his experience with machine learning to the problem. He asked: could an AI be trained to optimize his blog titles? It is a fascinating application of natural language processing, and [Max] explains all about what it does and how it works.

The machine learning framework [Max] uses is GPT-3, a language model that works with natural-seeming human language that is capable of being tweaked in different ways. [Max] uses OpenAI’s GPT-3 API (which, by the way, is much easier to experiment with than one might think) and here is the basic workflow for his title optimizer:

  1. The optimizer takes as input a blog post title to optimize.
  2. OpenAI’s pre-trained GPT-3 engine is used to generate six alternate titles.
  3. For each of those alternate titles, a fine-tuned version of GPT-3 is consulted to judge how “good” they are based on custom training data. (“Good” in this context means “similar to titles of successful submissions on Hacker News“, but more on that in a moment.)
  4. Print the results.

Continue reading “Blog Title Optimizer Uses AI, But How Well Does It Work?”

AI Creates Your Spreadsheets, Sometimes

We’ve been interested in looking at how AI can process things other than silly images. That’s why the “Free AI Bot that Generates the Excel Formula for Any Problem” caught our eye. Based on GPT-3, it supposedly transforms your problem description into a formula suitable for Excel or Google Sheets.

Our first prompt didn’t work out very well. But that was sort of our fault. When they say “Excel formula” they mean that quite literally. So trying to describe the actual result you want in terms of columns or rows seems to be beyond it. Not realizing that, we asked:

If the sum of column H is greater than 50, multiply column A by 0.33

And got:

=IF(SUM(H:H)>50,A*0.33,0)

A Better Try

Which is close, but not really how anyone even mildly proficient with Excel would interpret that request. But that’s not fair. It really needs to be a y=f(x) sort of problem, we suppose.

Continue reading “AI Creates Your Spreadsheets, Sometimes”

NVIDIA Unleashes The First Jetson AGX Orin Module

Back in March, NVIDIA introduced Jetson Orin, the next-generation of their ARM single-board computers intended for edge computing applications. The new platform promised to deliver “server-class AI performance” on a board small enough to install in a robot or IoT device, with even the lowest tier of Orin modules offering roughly double the performance of the previous Jetson Xavier modules. Unfortunately, there was a bit of a catch — at the time, Orin was only available in development kit form.

But today, NVIDIA has announced the immediate availability of the Jetson AGX Orin 32GB production module for $999 USD. This is essentially the mid-range offering of the Orin line, which makes releasing it first a logical enough choice. Users who need the top-end performance of the 64GB variant will have to wait until November, but there’s still no hard release date for the smaller NX Orin SO-DIMM modules.

That’s a bit of a letdown for folks like us, since the two SO-DIMM modules are probably the most appealing for hackers and makers. At $399 and $599, their pricing makes them far more palatable for the individual experimenter, while their smaller size and more familiar interface should make them easier to implement into DIY builds. While the Jetson Nano is still an unbeatable bargain for those looking to dip their toes into the CUDA waters, we could certainly see folks investing in the far more powerful NX Orin boards for more complex projects.

While the AGX Orin modules might be a bit steep for the average tinkerer, their availability is still something to be excited about. Thanks to the common JetPack SDK framework shared by the Jetson family of boards, applications developed for these higher-end modules will largely remain compatible across the whole product line. Sure, the cheaper and older Jetson boards will run them slower, but as far as machine learning and AI applications go, they’ll still run circles around something like the Raspberry Pi.

Chinese Anti-Porn Helmet Raises Eyebrows, Questions

Did you know that pornography is completely illegal in China? Probably not surprising news, though, right? The country has already put measures in place to scour the Internet in search of explicit content, mostly using AI. But the government also employs human porn appraisers, called jian huang shi, whose job it is to judge images and videos to decide whether they contain explicit content. Also probably not surprising is that humans are better than AI at knowing porn when they see it — or at least, they are faster at identifying it. Weirdness and morality and everything else aside, these jian huang shi are regular people, and frankly, they get exhausted looking at this stuff all day.

So what is the answer to burnout in this particular field? Researchers at Beijing Jiaotong University have come up with a way to bring the technological and human aspects of their existing efforts together. They’ve created a helmet that can detect particular spikes in brainwaves that occur from exposure to explicit imagery. Basically, it flashes a combination of naughty and ho-hum images in rapid succession until a spike is detected, then it flags the offending image.

Continue reading “Chinese Anti-Porn Helmet Raises Eyebrows, Questions”

TensorFlow Lite – On A Commodore 64

TensorFlow is a machine learning and AI library that has enabled so much and brought AI within the reach of most developers. But it’s fair to say that it’s not for the less powerful computers. For them there’s TensorFlow Lite, in which a model is created on a larger machine and exported to a microcontroller or similarly resource-constrained one. [Nick Bild] has probably taken this to its extreme though, by achieving this feat on a Commodore 64. Not just that, but he’s also done it using Commodore BASIC.

TensorFlow Lite works by the model being created as a C array which is then parsed and run by an interpreter on the microcontroller. This is a little beyond the capabilities of the mighty 64, so he has instead created a Python script that does the job of the interpreter and produces Commodore BASIC code that can run on the 64. The trusty Commodore was one of the more powerful home computers of its day, but we’re fairly certain that its designers never in their wildest dreams expected it to be capable of this!

If you’re interested to know more about TensorFlow Lite, we’ve covered it in the past.

Header: MOS6502, CC BY-SA 3.0.