Skip to main content

Lego collector uses artificial intelligence to sort pounds of bricks at a time

MVI 0029
Anyone who grew up with Lego will remember buying and building individual sets, only to see their collection morph into an unruly, unsorted mass over time. Sorting through a vast array of bricks to find a particular piece has long been the bane of many a Lego enthusiast but now one canny constructor has developed a system that uses artificial intelligence to sort through large quantities automatically.

Jacques Mattheij observed that there was plenty of money to be made selling Lego on the second-hand market and plenty of eBay listings for bricks in bulk. With that in mind, he began prototyping a rather amazing machine that could classify Lego by shape and color.

Recommended Videos

Committing himself to the project, he bought enough Lego to fill his garage and set about putting together the hardware and software that would work together to sort through it.

Please enable Javascript to view this content

The problem with bulk Lego lots is that they tend to contain lots of bricks that need to be weeded out before they can be sold, as noted in Mattheij’s blog post detailing his project. Any fake parts obviously need to go, as do any discolored, damaged, or otherwise dirty bricks.

In its current incarnation, the system loads bricks from a hopper onto a conveyor belt that runs them past a camera that is hooked up to a PC. Setting up the camera to recognize particular pieces presented all kinds of challenges. According to Mattheij’s count, there are 38,000 different shapes of Lego brick, which can be one of more than 100 stringently defined colors.

Mattheij tried various different methods, but eventually settled upon training a neural network to differentiate between different pieces. The finished system is apparently able to classify a brick in just 30ms, running on an Nvidia GeForce GTX 1080 Ti GPU.

While Mattheij concedes that his project is far from the finished product and could benefit from various revisions, its current iteration is good enough to accept kilos of Lego at a time and sort it with some accuracy. It would take a serious Lego collection to warrant an investment in this kind of hardware but there are certainly devotees out there would love to have access to Mattheij’s creation.

Brad Jones
Former Digital Trends Contributor
Brad is an English-born writer currently splitting his time between Edinburgh and Pennsylvania. You can find him on Twitter…
You may want to stop using the Rabbit R1
Someone holding the Rabbit R1 outside.

After it was launched in late April 2024, the Rabbit R1 got a mixed bag of reviews, with many reviewers describing it as an unhelpful gadget or only scarcely more useful than Humane’s AI Pin. Digital Trends’ Joe Maring rated it a single star, writing, “The Rabbit R1 was supposed to be one of the hottest AI gadgets of the year. Instead, it's a buggy, flawed, and unsuccessful mess in every way imaginable.”

As if launching a product flop wasn’t bad enough, Rabbit is now facing reports of a data breach that may have revealed sensitive user data. Rabbitude, a reverse engineering project for the Rabbit R1, is reporting it was able to gain access to the Rabbit codebase and found several hardcoded API keys in its codes.

Read more
Few people are using ChatGPT and other AI tools regularly, study suggests
ChatGPT app running on an iPhone.

Not a day seems to go by without generative-AI products like ChatGPT making the news, but few people are actually making regular use of the tools, a new study suggests.

The study was carried out by the Reuters Institute and Oxford University, and it involved 6,000 respondents from the U.S., U.K., France, Denmark, Japan, and Argentina. Researchers found that OpenAI's ChatGPT is by far the most widely used generative-AI tool and is two or three times more widespread than the next most widely used products -- Google Gemini and Microsoft Copilot.

Read more
The best ChatGPT plug-ins you can use
OpenAI's website open on a MacBook, showing ChatGPT plugins.

ChatGPT is an amazing tool, and when they were introduced, plug-ins made it even better. But as of March 2024, they're no longer available as part of ChatGPT, having since been replaced by Custom GPTs, which you can make yourself. Or you can use one of the many amazing options from other developers, AI fans, and prompt engineers.

Interested in learning about how to make the best custom GPT for you? We have a guide for that. If you're more interested in the best custom GPTs available now, we have a guide for that too.

Read more