Since last post I learned the sorter to sort around 20 different colors. But sorting LEGO parts just by color is boring. So I went ahead.

A few years ago I used to buy a LEGO kiloware on Ebay. I still had a bucket of slopes which I had a poor morale to sort. Ideal food for the automatic sorter.

Směs stříšek

So I’ve grabbed the images, trained the neural net and started the sorter. It worked quite well, but had a problem to distinguish between regular and inverted slopes.

So I tried another approach. I’ve grouped the images to regular and inverted. The result were two boxes – inverted and other (regular, double slopes, round slopes etc.)

The inverted slopes were simple to sort – I had it done and put to the final boxes before I realized I should take a photo.

Problem with the bigger box was it had still been a lot of different types. So I reworked the basic sorting to regular, double, round and inverted. (But I had not many inverted, as those had been already sorted out).

The sorter still has a problem to distinguish between regular and double – I don’t have enought double slope images taken.

You can see lot of “1x2x3 inverted” in the box – during the previous round the neural net didn’t know them, so it misclassified those. In the second round it was much better.

Základní rozdělení stříšek

Finally I got the big box with regular slopes and used an older neural net. It didn’t know many types, so there is a lot to improve:

The top row is not good. It should contain the 4×2, 4×3 and 2×4 slopes. For some reason it cannot recognise those 4×2 – those are in all those boxes.

The bottom row is much better – from left to right these are 2x2x3, 2×3, 2×2, 1×2 and 1×3. Let’s look to the results more closely.

I’ve manually sorted the 1×2 box. The parts to the left are wrong as the neural net doesn’t know these. Mostly double slopes. To the right are pure misclassifications.

On the next image you can see the same for 2×2 slopes. Parts unknown to the neural net are to the left, misclassifications to the right.

Finally 1×3 slopes. Most of the unknows are 3×2 slopes.

I have no image of 2x2x3 box – there was just one misclassification. The box also contained “unknown” double slope 2x2x3.

Originally I wanted to stop here and say “It’s good enough” and call the post finished. But I didn’t publish it in evening and in the following morning tried to do a bit better. So I took some images of 3×2 slopes and trained a new neural net. Better one – I still learn that, too. Then I’ve put all the parts back to one box and put it to the sorter again. This is the result:

Closer look. Let’s start with the more errorneous.

3×2 slopes. Unknown to the left, misclassifications to the right.

2×4 and 4×3 slopes. Looks better.

And the following images have again unknown to the left and misclassifications to the right. Well, misclassifications – every category has just one.

(This was funny – I didn’t put the 2x2x3 slopes back, so it contained mostly the unknown parts).

That’s all for today. The overall impression is it sorts with less mistakes than I do. And thats all the slopes sorting for some time – finally I have no slopes to sort.