For some people, rummaging through a bunch of Lego bricks is part of the fun. But if you’ve got an enormous collection or take on complicated builds, you probably have a system for sorting your pieces. Your solution probably doesn’t involve AI, though. YouTube user Daniel West combined his love for Lego with his engineering skills to build a universal Lego sorter that uses a neural network to identify, classify and organize the plastic pieces more efficiently than a human could.
The universal Lego sorter — which is made up of 10,000 Lego bricks — took two years to design, build and perfect. Six Lego motors and nine servo motors power the conveyor belts and agitators that transport the pieces, brick-by-brick, to a video camera. A Raspberry Pi then processes the video feed and streams the data to a laptop which runs an application called a convolutional neural network. The AI-driven software compares each piece to a database containing 3D models of every Lego piece ever created. Once the neural network matches the piece to a part number, it sends the data back to the sorter, which at that point, know which of the 18 sorting buckets to place it in. The machine processes about one brick every two seconds.
Creations like this highlight the flexibility of Lego as a building platform. Little kids can snap bricks together to create simple objects, while older kids and adults can engineer startlingly effective pieces of hardware when bringing technology into the equation. Amazon and Lego are currently running a contest that integrates Lego with technology, in fact. The two companies have tasked builders with integrating Alexa voice commands with Lego Mindstorm sets and will reward the best creations with a trip to Denmark and Amazon gift cards.