Solo founder's notebook: teaching a phone to recognize LEGO® boxes on a shelf. Wins, bugs, doubts. News → @brickhunt_app. Not affiliated with the LEGO Group.
Hi 👋 I'm a lifelong LEGO fan and collector, and my two sons share the obsession.
I've also always been fascinated by computer vision. So I combined the two: BrickHunt, an app that recognizes a LEGO® box through your phone's camera.
Follow along to see how I build it.
@AlphaRealcat Is that running on the Neural Engine or falling back to GPU? My much smaller models got about 2.5x faster once every layer actually landed on the ANE.
Can't test a store-shelf scanner without a store shelf, so I built one in the living room.
The kids are thrilled that "dad needs more LEGO for work". My wife hasn't said a word. I'm choosing to read that as support.
My to-do list before the first testers get the app:
- one last feature
- one last bug
- one last feature
- one last bug
Many years in IT and I still fall for it.
This week it ships to testers. Hold me to it.
@FluidVoiceApp@huggingface Nice. What did you start from, Whisper or something else?
I played with on-device speech too and noise was always the hard part. Curious how you got it to hold up in a café.
@zeeshan_utd@baseten@CloudflareDev Same frozen test set for every model, never used in training. Everything gets compared on that.
Then I walked into a store and learned the test set was the problem: all clean photos, while real boxes have anti-theft tags on them. So now the ugly cases go in there too.
Funny thing: the model still guesses the right set most of the time. It's just not confident enough, so it lands below my threshold.
So now I get to retrain on photos with tags pasted on. And people hold boxes in their hands, so I need photos of fingers. Donations welcome 👍
Honestly a bit surprised how small things in a photo can wreck recognition.
On clean LEGO boxes I'm at 99%. Then I go to a store, the boxes have those anti-theft tags on them, and it drops hard. When the tag is big compared to the box, it basically stops working.
@NoeFlandre The license point is real. I started my LEGO box detector on YOLO, read the AGPL terms properly a few months in, and moved to D-FINE (Apache 2.0) before shipping. Check the license before you collect your first image, not after.
@pcuenq@_akhaliq Any on-device numbers yet? My LEGO box detector runs in about 13 ms a frame through Core ML on a 15 Pro Max, and depth would be a nice way to separate overlapping boxes on a shelf. Wondering if it fits a real-time budget.
@skalskip92 Same feeling. For years I wanted to build a real vision project and never got past tutorials. With AI tools I finally did it properly: my own model that recognizes LEGO boxes on a phone, ~99% on my test set. Beyond anything I expected. Pozdrowienia z Warszawy 🇵🇱