
Sorting LEGO with a neural network

Sorting your own LEGO collection is a monotonous and time-consuming task. Australian Daniel West has therefore built a sorting machine. The exciting thing about it is that the sorting process is carried out by artificial intelligence.
Some inventors have already built LEGO sorting machines. However, these always required a certain amount of pre-sorting. Daniel West went one step further and implemented an artificial intelligence in his model that can recognise all LEGO bricks. West needed over 10,000 LEGO bricks, six motors, a few servos, a Raspberry Pi, a camera and his laptop to build the model.
Buckets full of LEGO bricks can be poured into the top opening of the machine. Thanks to various vibrating plates, only one LEGO piece at a time runs through the scanning process. The construction of the sorting machine alone took around six months. West needed a full two and a half years for the software behind it. In order for the software to recognise the LEGO bricks, a camera takes several pictures of the object and compares them with existing 3D models of LEGO bricks. As LEGO itself does not disclose this data, West used the online databases of LDraw.org and rebrickable.com. .
Writing image processing software that matches photos with 3D renderings was extremely time-consuming, according to West. Keeping the subtle differences between the parts apart is the biggest task for the software. West built a neural network to learn this task. The software is now able to match around two bricks per second.
West is now planning to make his software available free of charge to anyone who is interested. However, he does not want to publish building instructions for the sorting machine. In his opinion, LEGO fans should use their own creativity and ingenuity and build such a machine themselves.
Want to stay up to date with more LEGO news? Then click on "Follow author" in my profile and you will receive an email as soon as something new from me is published. <p


Riding my motorbike makes me feel free, fishing brings out my inner hunter, using my camera gets me creative. I make my money messing around with toys all day.