Lego Sorting Machine

A camera with machine learning enables it to not only sort Lego bricks but anything that fits


On my first year at Windesheim. We had to build a robot that would sort something. We choose to sort Lego bricks. Many people used color sensors but I came with the idea that we maybe can make this project somewhat more interesting. By using computer vision and Machine Learning to recognize the bricks. My team agreed and I started working on a Python script that would train itself with images to recognize lego bricks while the team started building the robot itself and the second robot which would release bricks per batch.

10

The grade school gave us

(on a scale from 1-10)

34.321

Lines of code

Proof of concept

We won the school contest of best robot!


The project turned out to work pretty well and the camera recognized everything. A guy from the team also built a controller in Java in which we later implemented a live HTTP stream from the camera. So that you could see, what brick was under the camera and what the camera thought it would be.

In the end, we won the school contest as the best robot and got an A+ for the project itself. I learned a lot of the basics of machine learning and computer vision.

I am very proud and thankful towards the team. Without their effort and knowledge of robotics, this project would've been a mess.