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.

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.

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.

Editors' Recommendations

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…
Tom Hanks warns of AI-generated ad using his likeness
Tom Hanks' message on Instagram warning about an AI-generated ad that uses his likeness.

Tom Hanks has warned his fans not to be fooled by a video ad circulating online that appears to show him endorsing a dental plan.

The ad has apparently been created using an artificial intelligence-powered tool that's able to mimic his voice and closely match his lip movements to his spoken words.

Read more
Are we about to see ‘the iPhone of artificial intelligence’?
The ChatGPT name next to an OpenAI logo on a black and white background.

Apple’s former design guru Jony Ive is reported to be in talks with prominent AI startup OpenAI to create what’s being dubbed “the iPhone of artificial intelligence.” And if you think that sounds like pie in the sky, then take note: The project could be bankrolled to the tune of $1 billion by Japanese tech giant SoftBank.

OpenAI, the startup behind the trailblazing ChatGPT chatbot, is in advanced talks with Ive and SoftBank chief Masayoshi Son about the potential project, according to a Financial Times report on Thursday.

Read more
Spotify using AI to clone and translate podcasters’ voices
spotify app available in windows 10 store

Spotify has unveiled a remarkable new feature powered by artificial intelligence (AI) that translates a podcast into multiple languages using the same voices of those in the show.

It’s been made possible partly by OpenAI’s just-released voice generation technology that needs only a few seconds of listening to replicate a voice.

Read more