https://www.extremetech.com/wp-content/uploads/2019/12/lego-sort-640x353.jpg

‘Universal Lego Sorter’ Uses AI to Recognize Any Lego Brick

by

This site may earn affiliate commissions from the links on this page. Terms of use.

Scientists around the world have used neural networks to train self-driving cars, diagnose disease, and search for exoplanets. Now, someone is finally leveraging this technology to do something useful: sorting Lego bricks. On YouTube, you can learn how one man created a Lego sorting machine using AI, motors, and of course, Lego bricks. 

When you look at a pile of Lego blocks, your brain knows how to identify the pieces from any orientation or background as long as you can see the whole block. Even kids can spot the difference between a 2×1 red block, a 4×1 green, and one of those little hinge things. A traditional computer system for identifying blocks would need programmatic information about what the block looks like from every angle. A neural network works more like your brain to learn what those parts look like. 

The mechanical element of the sorting machine is composed of over 10,000 Lego bricks with six Lego motors and nine servos. To sort Lego bricks, you just dump them in the hopper and let the machine go to work. The Universal Lego Sorter, as it’s understandably called, uses a motorized belt to pull pieces out of the sorting bin. Next, they cross a vibrating platform powered by off-set Lego motor. That ensures the blocks separate so the camera can see each one individually. A series of gates on the motorized belt can direct the parts into the appropriate bin. 

It can identify and sort one brick every two seconds, but getting there was no simple feat. Designer Daniel West says the Universal Lego Sorter can recognize about 3,000 different Lego parts — the entire catalog. It can even recognize blocks that it’s never seen in real life thanks to 3D models of Lego components available on sites like Rebrickable. That’s what West used as training data for the convolutional neural network, which runs on a nearby computer. The 3D models made training vastly easier as West only needed a few real photos of Lego bricks for fine-tuning the model. 

West spent the last several years working on this project and hopes to write an academic paper on it. He hasn’t committed to releasing instructions on how to build the mechanical parts of the machine, but he is open to releasing the AI software for free.

Now read: