Part 3659 update?


Part 3659 update?
#1
I'm training a vision model to identify LEGO bricks, and I am now exploring the use of synthetic images of bricks from all angles rendered by Blender.
Overall it seems improve the models accuracy, but recognizing the Arch 1x4 did not improve significantly with the synthetic images.
I suspect it has to do with my bricks not looking like the synthetic rendered ones from beneath.


.png   arch1x4.png (Size: 188.79 KB / Downloads: 80)  
.png   arch1x4_ldraw.png (Size: 27.94 KB / Downloads: 81)

Is this something that should be updated in the LDraw parts library?

... and does anyone have a gut feeling of how common this difference would be?


If anyone is interested. I have published my notes and code here:
https://codeberg.org/jacobemcken/lego
Reply
RE: Part 3659 update?
#2
If you're referring to the missing holes, LDraw intentionally avoids modeling that type of non-functional geometry, since it would require a large amount of extra geometry for very little benefit.
Reply
RE: Part 3659 update?
#3
(2026-10-12, 15:25)Travis Cobbs Wrote: If you're referring to the missing holes...

I was.
and I see now that (what I assume is) reinforcement of the bricks are also missing.
/sob

But thanks  Heart
Reply
RE: Part 3659 update?
#4
Do you mean the internal structure of standard bricks like 3001 (Brick 2x4)?

Yes, that's usually omitted, though the LDraw 3001 matches the older mould from the 1970s.

Not sure if that helps your project, but a Quick-and-Dirty workaround would be that you could try replacing your local copy of p/stud.dat (the file containing the standard stud geometry) with one that "sort of" does. Since you can't have it extruded correctly inwards due to collision (maybe it even works in your case, not sure) you would need to create a very thin cylinder extruded outwards to trick your algorithm/AI into seeing the shadows of those cavities.
Reply
RE: Part 3659 update?
#5
(Yesterday, 23:20)Chris Böhnke Wrote: Do you mean the internal structure of standard bricks like 3001 (Brick 2x4)?

Yes.

Quote:Chris Böhnke

... to trick your algorithm/AI into seeing the shadows of those cavities.

I think you are on to something, I will take a few more rounds on this before giving up.
Reply
RE: Part 3659 update?
#6
(Yesterday, 23:20)Chris Böhnke Wrote: Since you can't have it extruded correctly inwards due to collision (maybe it even works in your case, not sure) you would need to create a very thin cylinder extruded outwards to trick your algorithm/AI into seeing the shadows of those cavities.

If you are feeding the AI LDraw images with edges on, just the circular edge might be enough, but I'm guessing you just had those on in your example and don't have it on in the images you feed the AI.
Reply
RE: Part 3659 update?
#7
(8 hours ago)Travis Cobbs Wrote: If you are feeding the AI LDraw images with edges on, just the circular edge might be enough, but I'm guessing you just had those on in your example and don't have it on in the images you feed the AI.

I don't understand what you are saying, sorry.
What does "with edges on" mean, I'm not aware of being able to turn any edges on/off.

Currently I'm not doing anything special for the synthetic images other than LDraw -> GLB -> Blender render.
The two images above was a real image showing the hollow studs and a representative LDraw render of the same brick taken directly from LDraw parts online library here:
https://library.ldraw.org/parts/6680 (using the 3D View)

The following are a samples of renders using Blender:

.png   Screenshot From 2026-10-14 22-08-26.png (Size: 68.16 KB / Downloads: 21)  
.png   Screenshot From 2026-10-14 22-10-09.png (Size: 31.44 KB / Downloads: 19)
Reply
RE: Part 3659 update?
#8
Some programs like LDView allow you to turn off the edge lines (LDraw Line Type 2). If you were using those, you could probably more easily create the fake stud undersides.

   

EDlT:
You can try using this:

.dat   stud.dat (Size: 673 bytes / Downloads: 2)

(Replace the original stud.dat in your LDraw folder at ...\LDraw\p)
Reply
RE: Part 3659 update?
#9
Thanks, the stud.dat looks promising.

I created a GLB file, and I can see the hint of circles under the studs.
I think I would be able to make them even more prominent myself if need be, now that you shown the way.

I will regenerate the synthetic images tomorrow and re-train the model to see if I get any noticeable improvement - then report back.
The process still needs hand-holding  Big Grin
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)