The up-and-coming Wonder of the World in software and information circles , and particularly in those circles who talk about them, is AI. Give a magic machine a lot of stuff, ask it a question, and it will give you a meaningful and useful answer. It will create art, write books, compose music, and generally Change The World As We Know It. All this is genuinely impressive stuff, as anyone who has played with DALL-E will tell you. But it’s important to think about what the technology can and can’t do that’s new so as to not become caught up in the hype, and in doing that I’m immediately drawn to a previous career of mine. Continue reading “Love AI, But Don’t Love It Too Much”
ai311 Articles
Here’s A Plain C/C++ Implementation Of AI Speech Recognition, So Get Hackin’
[Georgi Gerganov] recently shared a great resource for running high-quality AI-driven speech recognition in a plain C/C++ implementation on a variety of platforms. The automatic speech recognition (ASR) model is fully implemented using only two source files and requires no dependencies. As a result, the high-quality speech recognition doesn’t involve calling remote APIs, and can run locally on different devices in a fairly straightforward manner. The image above shows it running locally on an iPhone 13, but it can do more than that.
The usual way that OpenAI’s Whisper works is to feed it an audio file, and it spits out a transcription. But [Georgi] shows off something else that might start giving hackers ideas: a simple real-time audio input example.
By using a tool to stream audio and feed it to the system every half-second, one can obtain pretty good (sort of) real-time results! This of course isn’t an ideal method, but the robustness and accuracy of Whisper is such that the results look pretty great nevertheless.
You can watch a quick demo of that in the video just under the page break. If it gives you some ideas, head over to the project’s GitHub repository and get hackin’!
Continue reading “Here’s A Plain C/C++ Implementation Of AI Speech Recognition, So Get Hackin’”
How The Image-Generating AI Of Stable Diffusion Works
[Jay Alammar] has put up an illustrated guide to how Stable Diffusion works, and the principles in it are perfectly applicable to understanding how similar systems like OpenAI’s Dall-E or Google’s Imagen work under the hood as well. These systems are probably best known for their amazing ability to turn text prompts (e.g. “paradise cosmic beach”) into a matching image. Sometimes. Well, usually, anyway.
‘System’ is an apt term, because Stable Diffusion (and similar systems) are actually made up of many separate components working together to make the magic happen. [Jay]’s illustrated guide really shines here, because it starts at a very high level with only three components (each with their own neural network) and drills down as needed to explain what’s going on at a deeper level, and how it fits into the whole.

It may surprise some to discover that the image creation part doesn’t work the way a human does. That is to say, it doesn’t begin with a blank canvas and build an image bit by bit from the ground up. It begins with a seed: a bunch of random noise. Noise gets subtracted in a series of steps that leave the result looking less like noise and more like an aesthetically pleasing and (ideally) coherent image. Combine that with the ability to guide noise removal in a way that favors conforming to a text prompt, and one has the bones of a text-to-image generator. There’s a lot more to it of course, and [Jay] goes into considerable detail for those who are interested.
If you’re unfamiliar with Stable Diffusion or art-creating AI in general, it’s one of those fields that is changing so fast that it sometimes feels impossible to keep up. Luckily, our own Matthew Carlson explains all about what it is, and why it matters.
Stable Diffusion can be run locally. There is a fantastic open-source web UI, so there’s no better time to get up to speed and start experimenting!
Laser Zaps Cockroaches Over One Meter
You may have missed this month’s issue of Oriental Insects, in which a project by [Ildar Rakhmatulin] Heriot-Watt University in Edinburgh caught our attention. [Ildar] led a team of researchers in the development of an AI-controlled laser that neutralizes moving cockroaches at distances of up to 1.2 meters. Noting the various problems using chemical pesticides for pest control, his team sought out a non-conventional approach.
The heart of the pest controller is a Jetson Nano, which uses OpenCV and Yolo object detection to find the cockroaches and galvanometers to steer the laser beam. Three different lasers were used for testing, allowing the team to evaluate a range of wavelengths, power levels, and spot sizes. Unsurprisingly, the higher power 1.6 W laser was most efficient and quicker.
The project is on GitHub (here) and the cockroach machine learning image set is available here. But [Ildar] points out in the conclusion of the report, this is dangerous. It’s suitable for academic research, but it’s not quite ready for general use, lacking any safety features. This report is full of cockroach trivia, such as the average speed of a cockroach is 4.8 km/h, and they run much faster when being zapped. If you want to experiment with cockroaches yourself, a link is provided to a pet store that sells the German Blattela germanica that was the target of this report.
If this project sounds familiar, it is because it is an improvement of a previous project we wrote about last year which used similar techniques to zap mosquitoes.
Self-Driving Laboratories Do Research On Autopilot
Scientific research is a messy business. The road to learning new things and making discoveries is paved with hard labor, tough thinking, and plenty of dead ends. It’s a time-consuming, expensive endeavor, and for every success, there are thousands upon thousands of failures.
It’s a process so inefficient, you would think someone would have automated it already. The concept of the self-driving laboratory aims to do exactly that, and could revolutionize materials research in particular.
Continue reading “Self-Driving Laboratories Do Research On Autopilot”
Hackaday Links: September 18, 2022
We always love when people take the trouble to show information in new, creative ways — after all, there’s a reason that r/dataisbeautiful exists. But we were particularly taken by this version of the periodic table of the elements, distorted to represent the relative abundance on Earth of the 90 elements that make up almost everything. The table is also color-coded to indicate basically how fast we’re using each element relative to its abundance. The chart also indicates which elements are “conflict resources,” basically stuff people fight over, and which elements go into making smartphones. That last bit we thought was incomplete; we’d have sworn at least some boron would be somewhere in a phone. Still, it’s an interesting way to look at the elements, and reminds us of another way to enumerate the elements.
It’s wildfire season in the western part of North America again, and while this year hasn’t been anywhere near as bad as last year — so far — there’s still a lot of activity in our neck of the woods. And wouldn’t you know it, some people seem to feel like a wildfire is a perfect time to put up a drone. It hardly seems necessary to say that this is A Really Bad Idea™, but for some reason, people still keep doing it. Don’t misunderstand — we absolutely get how cool it is to see firefighting aircraft do their thing. The skill these pilots show as they maneuver their planes, which are sometimes as large as passenger jets, within a hundred meters of the treetops is breathtaking. But operating a drone in the same airspace is just stupid. Not only is it likely to get you in trouble with the law, but there’s a fair chance that the people whose property and lives are being saved by these heroic pilots won’t look kindly on your antics.
What’s Old Is New Again: GPT-3 Prompt Injection Attack Affects AI
What do SQL injection attacks have in common with the nuances of GPT-3 prompting? More than one might think, it turns out.
Many security exploits hinge on getting user-supplied data incorrectly treated as instruction. With that in mind, read on to see [Simon Willison] explain how GPT-3 — a natural-language AI — can be made to act incorrectly via what he’s calling prompt injection attacks.
This all started with a fascinating tweet from [Riley Goodside] demonstrating the ability to exploit GPT-3 prompts with malicious instructions that order the model to behave differently than one would expect.
Continue reading “What’s Old Is New Again: GPT-3 Prompt Injection Attack Affects AI”