Try Image Classification Running In Your Browser, Thanks To WebGPU

When something does zero-shot image classification, that means it’s able to make judgments about the contents of an image without the user needing to train the system beforehand on what to look for. Watch it in action with this online demo, which uses WebGPU to implement CLIP (Contrastive Language–Image Pre-training) running in one’s browser, using the input from an attached camera.

By giving the program some natural language visual concept labels (such as ‘person’ or ‘cat’) that fit a hypothetical template for the image content, the system will output — in real-time — its judgement on the appropriateness of such labels to what the camera sees. Again, all of this runs locally.

It’s maybe a little bit unintuitive, but what’s happening in the demo is that the system is deciding which of the user-provided labels (“a photo of a cat” vs “a photo of a bald man”, for example) is most appropriate to what the camera sees. The more a particular label is judged a good fit for the image, the higher the number beside it.

This kind of process benefits greatly from shoveling the hard parts of the computation onto compatible graphics cards, which is exactly what WebGPU provides by allowing the browser access to a local GPU. WebGPU is relatively recent, but we’ve already seen it used to run LLMs (Large Language Models) directly in the browser.

Wondering what makes GPUs so very useful for AI-type applications? It’s all about their ability to work with enormous amounts of data very quickly.

The Aimbot V3 Aims To Track & Terminate You

Some projects we cover are simple, while some descend into the sort of obsessive, rabbit-hole-digging-into-wonderland madness that hackers everywhere will recognize. That’s precisely where [Excessive Overload] has gone with the AimBot V3, a target-tracking BB-gun that uses three cameras, two industrial servos, and an indeterminate amount of computing power to track objects and fire up to 40 BB gun pellets a second at them.

The whole project is overkill, made of CNC-machined metal, epoxy-cast gears, and a chain-driven pan-tilt system that looks like it would take off a finger or two before you even get to the shooty bit. That’s driven by input from the three cameras: a wide-angle one that finds the target and a stereo pair that zooms in on the target and determines the distance from the gun, using several hundred frames per second of video. This is then used to aim the BB gun stock, a Polarstar mechanism that fires up to 40 pellets a second. That’s fed by a customized feeder that uses spring wire.

The whole thing comes together to form a huge gun that will automatically track the target. It even uses motion tracking to discern between a static object like a person and a dart fired by a toy gun, picking the dart out of the air at least some of the time.

The downside is that it only works on targets with a retroreflective patch: it includes a 15 watt IR LED on the front of the gun. The camera detects the bright reflection and uses it to track the target, so all you have to do to avoid this particular Terminator is make sure you aren’t wearing anything too shiny.

Continue reading “The Aimbot V3 Aims To Track & Terminate You”

Keeping Badgers At Bay With Tensorflow

Human-animal conflict is always a contentious issue, and finding ways to prevent damage without causing harm to the animals often requires creative solutions. [James Milward] needed a humane method to stop badgers and foxes from uprooting his garden, leading him to create the Furbinator 3000, a system that combines computer vision with audio deterrents..

[James] initially tried using scent repellents (which were ignored) and blocking access to his garden (resulting in more digging), but found some success with commercial ultrasonic audio repellent devices. However, these had to be manually turned off during the day to avoid annoying activation of the PIR motion sensors by [James] and his family, and the integrated solar panels couldn’t keep up with the load.

This presented a good opportunity to try his hand at practical machine vision. He already had a substantial number of sample images from the Ring cameras in his garden, which he turned into a functional TensorFlow Lite model with about 2.5 hours of training. He linked it with event-activated RTSP streams from his Ring cameras using the ring-mqtt library. To minimize false positives on stationary objects, he incorporated a motion filter into the processing pipeline. When it identifies a fox or badger with reasonable accuracy, it generates an MQTT event.

[James] modified the ultrasonic devices so they would react to these events using an ESP8266-based WeMos D1 Mini Pro development board and added an external 5 V power supply for sustained operation. All development was performed in a Docker container which simplified deployment on a Raspberry Pi 4.

After implementing the system, [James] woke up to the satisfying sight of his garden remaining untouched overnight, a victory that even earned him some coverage by the BBC.

Thanks for the tip [Laurent]!

Autonomous Wheelchair Lets Jetson Do The Driving

Compared to their manual counterparts, electric wheelchairs are far less demanding to operate, as the user doesn’t need to have upper body strength normally required to turn the wheels. But even a motorized wheelchair needs some kind of input from the user to control it, which still may pose a considerable challenge depending on the individual’s specific abilities.

Hoping to improve on the situation, [Kabilan KB] has developed a self-driving electric wheelchair that can navigate around obstacles by feeding the output of an Intel RealSense Depth Camera and LiDAR module into a Jetson Nano Developer Kit running OpenCV. To control the actual motors, the Jetson is connected to an Arduino which in turn is wired into a common L298N motor driver board.

As [Kabilan] explains on the NVIDIA Blog, he specifically chose off-the-shelf components and the most affordable electric wheelchair he could find to bring the total cost of the project as low as possible. An undergraduate from the Karunya Institute of Technology and Sciences in Coimbatore, India, he notes that this sort of assistive technology is usually only available to more affluent patients. With his cost-saving measures, he hopes to address that imbalance.

While automatic obstacle avoidance would already be a big help for many users, [Kabilan] imagines improved software taking things a step further. For example, a user could simply press a button to indicate which room of the house they want to move to, and the chair could drive itself there automatically. With increasingly powerful single-board computers and the state of open source self-driving technology steadily improving, it’s not hard to imagine a future where this kind of technology is commonplace.

Multi-Year Doorbell Project

Camera modules for the Raspberry Pi became available shortly after its release in the early ’10s. Since then there has been about a decade of projects eschewing traditional USB webcams in favor of this more affordable, versatile option. Despite the amount of time available there are still some hurdles to overcome, and [Esser50k] has some supporting software to drive a smart doorbell which helps to solve some of them.

One of the major obstacles to using the Pi camera module is that it can only be used by one process at a time. The PiChameleon software that [Esser50k] built is a clever workaround for this, which runs the camera as a service and allows for more flexibility in using the camera. He uses it in the latest iteration of a smart doorbell and intercom system, which uses a Pi Zero in the outdoor unit armed with motion detection to alert him to visitors, and another Raspberry Pi inside with a touch screen that serves as an interface for the whole system.

The entire build process over the past few years was rife with learning opportunities, including technical design problems as well as experiencing plenty of user errors that caused failures as well. Some extra features have been added to this that enhance the experience as well, such as automatically talking to strangers passing by. There are other unique ways of using machine learning on doorbells too, like this one that listens for a traditional doorbell sound and then alerts its user.

Continue reading “Multi-Year Doorbell Project”

An automatic laser turret playing with a cat.

Entertain Your Cats Automatically With LazerPaw

Most of us would agree that kittens are very cute, but require lots of attention in return. What would you do if you adopted three abandoned cats but didn’t have all day to play with them? [Hoani Bryson] solved his problem by building LazerPaw — an autonomous, safe way to let your cats chase lasers.

Having recently tinkered with computer vision in the form of OpenCV, [Hoani] decided he would make a laser turret for his cats to play with. An infrared camera, used so that the LazerPaw works in the dark, is mounted to the laser and the Raspberry Pi. These electronics are then mounted on a servo-based pan/tilt module, which is in turn mounted with two smartphone clamps to the ceiling. That way, when the cats chase the laser, they will be looking away from the beam source. Additionally, if the device is aiming directly at a cat, the laser is turned off. Finally, [Hoani] added some NeoPixels with an Arduino-based controller for extra hacker vibes.

The LazerPaw’s software takes in a 30 FPS stream from a webcam, scales it down for performance, and applies a threshold filter to it. When a black pixel, which is assumed to be a cat, is detected, it “pushes” the camera away from it depending on how close to the laser it is. The effect of this is that every time a cat catches up to the laser, it moves away again. The processed images are also sent to an interactive website for remote cat playtime. Finally, there is also a physical start button so you don’t need WiFi to use it.

Is your cat more of a sunbather than a deadly murder beast? Maybe it’ll like this cat chair that follows the sun.

Continue reading “Entertain Your Cats Automatically With LazerPaw”

Smart Garbage Trucks Help With Street Maintenance

If you’ve ever had trouble with a footpath, bus stop, or other piece of urban infrastructure, you probably know the hassles of dealing with a local council. It can be incredibly difficult just to track down the right avenue to report issues, let alone get them sorted in a timely fashion.

In the suburban streets of one Australian city, though, that’s changing somewhat. New smart garbage trucks are becoming instruments of infrastructure surveillance, serving a dual purpose that could reshape urban management. Naturally, though, this new technology raises issues around ethics and privacy.

Continue reading “Smart Garbage Trucks Help With Street Maintenance”