2023 **Author**: Bryan Walter | [email protected]. Last modified: 2023-05-21 22:24

Inventor Daniel West has put together a versatile LEGO sorter: using a connected computer vision algorithm, he can recognize and sort any part ever created for a constructor. The sorter itself consists of more than ten thousand LEGO-parts, and its speed is about half a part per second. Details about the device's operation are reported by Engadget.

Due to the abundance of various parts and the ease of assembly, the LEGO bricks are used to create many useful devices. For example, a printer has already been made from LEGO, which scans an image and assembles it, again from LEGO, and also used construction blocks to create a modular microfluidic installation.

Of course, machines for sorting LEGO parts (a very useful device for those who have a lot of different disassembled constructors) are made of them, and the first such device was presented back in 2012: it uses an open algorithm for image recognition to determine the part comparing a snapshot of one part with the sorter's existing database.

Engineer and inventor Daniel West decided to make his sorter a little smarter and technologically more modern. The entire structure consists of approximately ten thousand parts, equipped with six LEGO motors and nine servos. The parts are loaded onto a sorting belt, which then throws them out onto a shaking chute: because of the shaking, the parts do not fall on top of each other and end up in the next sorting step one at a time.

At the next step of sorting, a video of the details is shot - it is processed by the Raspberry Pi and sent further for analysis to another computer via a wireless connection. On a computer, the parts captured on video are analyzed using an algorithm based on a convolutional neural network trained on three-dimensional models of all existing LEGO parts. Each part is assigned a probability of belonging to a category, after which the result is sent to the marshalling yard of the device. Finally, a system consisting of several sliding gates guides the part into the required box. There are 18 boxes in total: this is more than the number of possible parts, but for each box you can choose a set of parts that fall into it. The device can sort one part in about two seconds.

In total, it took West about two years to develop: the engineer assembled not only the sorter himself, but also trained the neural network on an independently assembled dataset of all possible LEGO parts - in total, about 100 thousand images were included in the database. More details about training the algorithm can be found on his blog.

Another very useful sorter - for multi-colored candies like Skittles or M & M's: its job is a little easier due to the fact that you only need to sort objects by color. But you can do it, for example, by printing it on a 3D printer: this was demonstrated in 2015 by the American inventor Nathan Peterson.