How studsort works
Take a photo of your LEGO pieces and studsort will identify, color-match, and inventory them — ready to export straight into BrickLink or Rebrickable.
- 1
Upload up to 5 photos
Drag and drop or browse for photos of your LEGO pieces. You can mix close-ups and pile shots. Each image is processed independently so pieces that appear in multiple photos are automatically combined into a single row.
- 2
AI segments every piece
Each image is sent to SAM 2 (Meta’s Segment Anything Model), which draws a precise mask around every object it finds. Masks that are too large (background) or too small (noise) are filtered out automatically. The cropped piece image is isolated on a white background before identification.
- 3
Brickognize identifies the part
Each masked crop is sent to Brickognize, a specialist LEGO part-recognition API. It returns a ranked list of candidate part numbers with confidence scores. The top candidate is validated against the Rebrickable catalog to confirm it’s a real part — if it validates, its catalog image and BrickLink link are fetched too.
- 4
Color is detected and matched
The dominant color of the masked pixels is extracted and matched to the nearest official LEGO color using Euclidean distance in RGB space. The match is then cross-checked against the list of colors that Rebrickable knows the part actually comes in — if the detected color isn’t valid, the closest valid color is used instead.
- 5
Review and correct the results
Results appear in an editable table as each piece is processed. You can search for and replace any part number using the part name search (click the name), change the color from the dropdown, adjust quantities, or delete rows you don’t need. The confidence face gives you a quick sense of how certain the model was.
- 6
Export your inventory
Hit Export to download your inventory in the format you need — BrickLink XML (ready to upload to a Wanted List or inventory), Rebrickable CSV, or a spreadsheet (.xlsx). All export generation happens in the browser; nothing is stored.
A few things to know
- Each image takes roughly 20–60 seconds to process depending on how many pieces are in it.
- Accuracy is highest on individual pieces on a plain background. Dense piles with overlapping pieces may produce missed or merged detections.
- Color detection works on the masked pixels of the piece itself, not the background, so lighting conditions have less impact than you might expect — but very dark or very shiny pieces can still confuse it.
- Part identification uses Brickognize, which covers most common LEGO parts but may struggle with rare, very new, or heavily worn pieces. You can always correct a wrong identification using the part name search.