TensorFlow is a popular machine learning package, that among other things, is particularly adept at image recognition. If you want to use a webcam to monitor cats on your lawn or alert you to visitors, TensorFlow can help you achieve this with a bunch of pre-baked libraries. [Eric] took a different tack with PrintRite – using TensorFlow to monitor his 3D printer and warn him of prints gone bad – or worse.
The project relies on training TensorFlow to recognize images of 3D prints gone bad. If layers are separated, or the nozzle is covered in melted goo, it’s probably a good idea to stop the print. Worst case, your printer could begin smoking or catch fire – in that case, [Eric] has the system configured to shut the printer off using a TP-Link Wi-Fi enabled power socket.
Currently, the project exists as a plugin for OctoPrint and relies on two Raspberry Pis – a Zero to handle the camera, and a 3B+to handle OctoPrint and the TensorFlow software. It’s in an early stage of development and is likely not quite ready to replace human supervision. Still, this is a project that holds a lot of promise, and we’re eager to see further development in this area.
There’s a lot of development happening to improve the reliability of 3D printers – we’ve even seen a trick device for resuming failed prints.
Most people are familiar with the idea that machine learning can be used to detect things like objects or people, but for anyone who’s not clear on how that process actually works should check out [Kurokesu]’s example project for detecting pedestrians. It goes into detail on exactly what software is used, how it is configured, and how to train with a dataset.
The application uses a USB camera and the back end work is done with Darknet, which is an open source framework for neural networks. Running on that framework is the YOLO (You Only Look Once) real-time object detection system. To get useful results, the system must be trained on large amounts of sample data. [Kurokesu] explains that while pre-trained networks can be used, it is still necessary to fine-tune the system by adding a dataset which more closely models the intended application. Training is itself a bit of a balancing act. A system that has been overly trained on a model dataset (or trained on too small of a dataset) will suffer from overfitting, a condition in which the system ends up being too picky and unable to usefully generalize. In terms of pedestrian detection, this results in false negatives — pedestrians that don’t get flagged because the system has too strict of an idea about what a pedestrian should look like.
[Kurokesu]’s walkthrough on pedestrian detection is great, but for those interested in taking a step further back and rolling their own projects, this fork of Darknet contains YOLO for Linux and Windows and includes practical notes and guides on installing, using, and training from a more general perspective. Interested in learning more about machine learning basics? Don’t forget Google has a free online crash course to get you up to speed.
Neural networks are computer systems that are vaguely inspired by the construction of animal brains, and much like human brains, can be trained to obey the whims of the almighty domestic cat. [EdjeElectronics] has built just such a system, and his cat is better off for it.
The build uses a Raspberry Pi, fitted with the Pi Camera board, to image the area around the back door of the house. A Python script regularly captures images and passes them to a TensorFlow neural network for object recognition. The TensorFlow network returns object type and positions to the Python script. This information can be used to determine if there is a cat in the frame, and if it is inside or outside. If the cat remains in position for ten consecutive frames, a text message is sent via Twilio, indicating to the owner to let the cat in or out, as the case may be.
Thirty years ago, object classification was a pie-in-the-sky technology, but now you can run it on a $30 computer to figure out where your pets are. What a time we live in! A similar solution to this problem may be a cat door that unlocks via facial recognition. Video after the break.
[Thanks to Baldpower for the tip!]
Continue reading “Neural Network Knows When Cat Wants To Go Outside”
One of the most common uses of neural networks is the generation of new content, given certain constraints. A neural network is created, then trained on source content – ideally with as much reference material as possible. Then, the model is asked to generate original content in the same vein. This generally has mixed, but occasionally amusing, results. The team at [Made by AI] had a go at generating Christmas songs using this very technique.
The team decided that the easiest way to train their model would be to use note data from MIDI files. MIDI versions of Christmas songs are readily available and provide a broad base with which to train the model. For a neural network, the team chose to use a Long-short Term Memory (LSTM) architecture. This is a model which is contextually sensitive, which is important when dealing with structured formats like music or language.
The neural network generated five tunes which you can listen to on the Made by AI Soundcloud page. The team notes their time was limited, and we think that with some further work and more adherence to musical concepts such as structure and repetition, it might be possible to generate something a little more catchy.
There are other applications for AI in music, too – like these intelligent musical prostheses.
Neural networks are a key technology in the field of machine learning. A common technique is training them with sample data, and then asking them to create something new in the same vein. AI researcher [Janelle Shane] decided to task a neural network with a fun task – inventing new kinds of pie.
Using the char-rnn library, the network was initially trained on a sample of 2237 pie recipe titles, sourced from around the internet. Early iterations struggled to even spell “pie”, but as the network improved, so did the results. Where we can’t imagine how one would even make a “Sweesh Pie Ipple Pie”, later results, such as the “Impossible Maple Spinach Apple Pie” seem far more cromulent by comparison.
At this point, [Janelle] decided to mix things up, stirring in a further sample consisting of the names of various cookies and apples. The data were carefully sorted such that the network still prioritized pies, but this additional data gave the model a richer library to draw from. This led to such home-baked classics as Flangerson’s Blusty Tart and Chicken Pineapple Cream Pie.
On the surface, it’s a fun project with whimsical output, but fundamentally it highlights how much can be accomplished these days by standing on the shoulders of giants, so to speak. We’ve seen [Janelle]’s output before, too – naming tomatoes, no less.
Artificial intelligence (AI) is undergoing somewhat of a renaissance in the last few years. There’s been plenty of research into neural networks and other technologies, often based around teaching an AI system to achieve certain goals or targets. However, this method of training is fraught with danger, because just like in the movies – the computer doesn’t always play fair.
It’s often very much a case of the AI doing exactly what it’s told, rather than exactly what you intended. Like a devious child who will gladly go to bed in the literal sense, but will not actually sleep, this can cause unexpected, and often quite hilarious results. [Victoria] has created a master list of scholarly references regarding exactly this.
The list spans a wide range of cases. There’s the amusing evolutionary algorithm designed to create creatures capable of high-speed movement, which merely spawned very tall creatures that generated these speeds by falling over. More worryingly, there’s the AI trained to identify toxic and edible mushrooms, which simply picked up on the fact that it was presented with the two types in alternating order. This ended up being an unreliable model in the real world. Similarly, the model designed to assess malignancy of skin cancers determined that lesions photographed with rulers for scale were more likely to be cancerous.
[Victoria] refers to this as “specification gaming”. One can draw parallels to classic sci-fi stories around the “Laws of Robotics”, where robots take such laws to their literal extremes, often causing great harm in the process. It’s an interesting discussion of the difficulty in training artificially intelligent systems to achieve their set goals without undesirable side effects.
We’ve seen plenty of work in this area before – like this use of evolutionary algorithms in circuit design.
The engineers and product designers at [moovel lab] have created the Open Data Cam – an AI camera platform that can identify and count objects as they move through its field of view – along with an open source guide for making your own.
Step one: get out your ruler and utility knife. In this world of ubiquitous 3D-printers they’ve taken a decidedly low-tech approach to the project’s enclosure: a cut, folded, and zip-tied plastic box, with a cardboard frame inside to hold the electronic bits. It’s “splash proof” and certainly cheap to make, but we’re a little worried about cooling and physical protection for the electronics inside, as they’re not exactly cheap and rugged components.
So what’s inside? An Nvidia Jetson TX2 board, a LiPo battery with some charging circuitry, and a standard webcam. The special sauce, however, is the software, which is available on GitHub. [Moovel lab]’s engineers have put together a nice-looking wifi-accessible mobile UI for marking the areas where you’d like the software to identify and tally objects. The actual object detection and identification tasks are performed by the speedy YOLO neural network, a task the Nvidia board’s GPU is of course well suited for.
As the Open Data Cam’s unblinking glass eye gazes upon our urban environments, it will log its observations in an ancient and mysterious language: CSV. It’s up to you, human, to interpret this information and use it for good.
A summary video and build time lapse are embedded after the break.
Continue reading “Open Data Cam Combines Camera, GPU, and Neural Network in an Artisanal DIY Cereal Box”