RebrickNet – Lego Part Detector
rebrickable.com
rebrickable.com
It looks like LEGO provides 3D models for their components (e.g: via Bricklink [1]). Wouldn't it be easier to generate the training data with a rendering pipeline of some sort that randomizes the brick position in a 3D scene with different lighting?
Of course you can still collect the user submissions for the test set
Is it because these ML algos lack a way to internally interpret 3D models for learning?
On top of that you reduce effort in data labeling, as each model would come with the relevant part ID, shape and color.
Of course, finetuning can be done afterwards with real world photos to increase robustness.
But as I'm writing this, why can't we do ML directly with the 3D models...
(DL models are trained with one type of camera and used with another type of camera all the time, and that's sort of similar; plus renderers as used in blender3d are pretty good and they should work well with LEGO bricks which are relatively simple objects; if despite all this it doesn't work you could degrade both the real and the generated images e.g. by quantization, with the aim of bringing them closer together.)
Yes, you can train an ML model on rendered data, but the model tends to fixate on rendering artifacts, and performance doesn't transfer to real world images. Plus, it's very difficult to make generated scenes with the variety and complexity of the real world. Your trained model will fail to generalize to all the distractions in natural scenes.
Yes, there are techniques for all these problems, but none of them are good, reliable, or easy to get right.
If you can figure out exactly why that is, you will at the very least get a very well-cited paper out of it, if not win some sort of award. It's not a complete mystery what the problem is but the solution is unknown.
Because we don't know what the difference is, we can't fix up the 3D renders. "Just make it noisy" certainly isn't it. (We in fact have a lot of experience throwing noise at things; the whole "stable diffusion" AI image generation is based on that principle at its core.) It has to be the right sort of noise, or distortions, to represent the real world, and nobody can tell you exactly what that is.
https://github.com/jtheiner/LegoBrickClassification
It is based on this post (which others have mentioned)
You might enjoy the 2023 paper "Brickognize: Applying Photo-Realistic Image Synthesis for Lego Bricks Recognition with Limited Data" https://www.mdpi.com/1424-8220/23/4/1898
Source: I'm responsible for ML development at Brickit
do your models run on device? what's the general CV backbone?
We do not use anything fancy, detector is ssd-like, and classifier is either resnet or efficientnet depending on your device capability
But! We recognize the intent, and we have something in the works which will be released very soon, stay tuned!
Reminds me of this: https://jacquesmattheij.com/sorting-two-metric-tons-of-lego/
https://jacquesmattheij.com/sorting-lego-many-questions-and-...
And what kind of DL models would it use?
That's an AI I'd rather not see though - that's the fun part OF LEGOs. If you really want a model completed, pay a local teenage (or laid off software dev) to do it.
So you are saying it is not possible to stack LEGO pieces by a remotely controlled arm (with a human operator)?
> That's an AI I'd rather not see though - that's the fun part OF LEGOs
AI is already claiming all the fun tasks like writing poems and drawing kittens ;)
This is something you can probably program an expensive assembly robot to do if it has to repeat that same procedure thousands of times, but doing it for a whole set human operated? That only makes sense if you haven't got a set of nimble appendices and opposable thumbs, and you have the time to spare and inclination to train with the remotely controlled arm. Having an LLM do it seems fruitless at this point — and why bother?
It turned out to be much more complex than I expected.
The biggest issue was grabbing. Typical approach for this type of task is to use vacuum suction actuator, but it does not work for Lego parts, because they have stubs and prevent suction from working.
Also there are issues of part separation.
We abandoned this idea, but I still hope that we can return and achieve something working some day.
Disclosure: I'm the creator.
Is there any more information available on how it works?