Friday, May 8, 2020

Lego Project

The very simple project I thought up a week or so ago, which was to build something that uses every single one of my Legos.  This project has now exploded / expanded a little bit.  My primary focus is to see how well I can create an automatic Lego piece sorting machine.  This is the first step:


Thinking Lego.  Writing code this weekend to number the objects (tagging) seen in this image.  I probably won't get it done.  Identifying and tagging pieces, and then classifying and sorting them according to various rules will come later.  I plan to use 'Deep Reinforcement Learning', which is a multi-level neural network that operates by maximizing a reward parameter.

Why are there no Lego automatic sorting machines that actually work and will sort in many different ways?????

There are quite a few ways to sort Legos.  I need to come up with at least a few ways so that when I'm ready to starting working on that part I will have thought about it a little beforehand.

One of the interesting tangents is looking at the color information in an interesting way.  Each channel: red, green, and blue, can have a value between 0 and 255 for each pixel.  So I can create a histogram of the distribution of red, green, and blue of any image.  The plots below use the left image above as input.  I can also look at the distribution of red+green (yellow), red+blue (violet), and green+blue (cyan).  I can plot these distributions with the y-axis being a logarithmic scale, and I get this:

Here's the same data on a linear scale:


But that's just a nice tangent, which might be helpful for training the neural net.

No comments:

Post a Comment