Inventor Daniel West has put together a universal LEGO sorter: with the help of a connected computer vision algorithm, it can recognize and sort any part ever created for a designer. The sorter itself consists of more than ten thousand LEGO parts, and its speed is approximately half a second per second. Details of the operation of the device are reported by Engadget.
Due to the abundance of a wide variety of parts and ease of assembly, the LEGO constructor is used to create many useful devices. For example, a printer was already made from LEGO, which scans the image and collects it again from LEGO, as well as designer cubes used to create a modular microfluidic setup.
Of course, LEGO parts sorting machines (a very useful tool for those who have a lot of different designers in disassembled form) are made of them, and the first such device was introduced back in 2012: it uses an open algorithm for image recognition to determine the part comparing a snapshot of one part with the existing database of the sorter.
Daniel West decided to make his sorter a little smarter and more technologically advanced. The entire structure consists of approximately ten thousand parts, equipped with six LEGO motors and nine servos. The parts are loaded onto a sorting tape, which then throws them onto a shaking trough: due to shaking, the parts do not fall on each other and enter the next sorting step one at a time.
The next sorting step takes a video of the details, which is processed by the Raspberry Pi and sent to another computer wirelessly for analysis. On the computer, the details captured on video are analyzed using an algorithm based on a high-capacity neural network, trained on three-dimensional models of all existing LEGO details. Each part is assigned the probability of belonging to any category, after which the result is sent to the sorting station of the device. Finally, a system consisting of several moving gates directs the part to the necessary 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. One part of the device can be sorted in about two seconds.
It took almost two years to develop this and he not just made this sorter, but also trained the neural network on an independently assembled dataset of all possible LEGO parts – in total, about 100 thousand images fell into the database.