A 1p background remover beat SAM at turning photos into CAD
Last week I built a photos-to-3D scanner for a Meta hackathon. You put an object on a printed sheet, take 16 photos round it, and get back a STEP file you can open in any CAD package.
It ran on Meta's models. Muse Spark planned the scan, and SAM 3.1 cut the object out of every photo.
Then I wondered how much of that AI it actually needed. So last night I set up the experiment and went to sleep. (My laptop did not get much sleep.)
How it works
Every photo shows the sheet's markers, so Bevell knows exactly where the camera was for each one.
Then it cuts the object out of each photo, and carves. Start with a block, and shave off everything that falls outside the object in any photo. What's left is the object's shape.
That cut-out is the only step that needs AI. Everything after it is geometry. So the question was simple: which cut-out?
The test
18 objects: a tape roll, a bottle, a white mouse, a figurine, a mug, six mechanical parts (brackets, a gear, two servos, a stand) and seven more (pliers, scissors, a camera, a clock...).
The photos are rendered from 3D scans of real objects, so I know the true shape of every one. Every score below is measured against it: the average gap between the model's surface and the real one, in millimetres. Lower is better.
Two contenders:
- › SAM 3.1 with Muse Spark, the hackathon pipeline. Muse Spark looks at the photos, works out what the object is and what to ask for, and SAM 3.1 cuts it out.
- › BiRefNet, an off-the-shelf background remover, run on Runware for $0.0006 a photo. No prompt, no plan. It just removes the background.
The result
| Error (mm) | SAM 3.1 + Muse Spark | BiRefNet | BiRefNet + guard |
|---|---|---|---|
| Tape | 0.98 | 2.38 | 1.40 |
| Bottle | 1.32 | 0.84 | 0.96 |
| White mouse | 12.86 | 1.69 | 1.68 |
| Figurine | 0.88 | 1.02 | 0.82 |
| Mug | 4.16 | 4.19 | 4.17 |
| Mean | 4.04 | 2.02 | 1.80 |
Across all 18 objects: 2.29 mm for SAM, 1.65 for BiRefNet with the guard (more on that in a second), which came out ahead on 11 of them.
Now the honest bit. Most of that gap is one object. The white mouse sits on a white sheet, and SAM lost a big chunk of it (22.4 mm of the real mouse missing, on average). Take the mouse out and they're level: 1.67 against 1.65 over the other 17.
SAM still wins some. The tape (0.98 against 1.40) and the L-bracket (0.93 against 1.56), for a start.
So the cheap model isn't smarter. It just never lost a chunk of anything. And for about a penny a scan, with nothing planning it, that's a good trade.
The guard
BiRefNet on its own has one bad habit. Photograph something on a white sheet from above, and sometimes it decides the sheet is the object. It did that in 101 of the 288 photos (all 16 of the scissors'). One photo like that and your scissors come out welded to a slab of A4: 35 mm of extra material, on average.
The fix isn't another model. It's geometry:
- Spot the bad photos. A cut-out that reaches into the sheet's corners has taken the sheet.
- Carve a rough shape from the photos that are fine. That says where the object must be in the bad ones.
- Crop each bad photo to that spot and ask BiRefNet again.
- Trust the new answer only if it covers at least 70% of what the good photos predicted.
The scissors went from 19 mm out to 0.5. The tape, the pliers, the gear and the figurine all got better too. And a crop from above can see through a hole, so the gear's holes come out.
Each re-ask is one more call, so a scan costs 16 to 32 calls: 0.8p to 1.5p. Print a patterned sheet instead of a plain one and it does a little better again (1.63 mm on the everyday five).
From shape to CAD, with no AI at all
Once the shape is carved, Bevell looks at it and picks how to rebuild it:
- › Turned, like the tape or the bottle: a revolve. One profile, spun round an axis.
- › Machined, like the brackets and the gear: stacked extrusions, holes included. Each one is a step in a feature tree you can edit.
- › Anything else, like the mouse: smooth NURBS surfaces.
10 of the 18 came out with an editable feature tree. And for every machined part, the CAD is closer to the real thing than the shape it was built from (the gear: 0.53 mm against 0.97), because extrusions keep the sharp corners that carving rounds off.
16 photos to a STEP file took under a minute on my laptop (that's the median).

Top: the true object in grey, and Bevell's CAD from BiRefNet with the guard in blue. Bottom: the shapes carved from each set of cut-outs, from the same angle and scale.
Fewer photos, worse photos
With 11 photos instead of 16, the mean on the everyday five goes from 1.80 to 1.92 mm. With 8, 2.47.
Phone-like photos, each with its own blur, noise, exposure and white balance: 2.30. Still usable, and the guard helps on every set.
What it couldn't do (and what's fixed since)
- › Hollows. Carving only removes what some photo shows isn't there, and no outline shows the inside of a mug. So the mug came out full (3.7 mm of the real mug missing, on average). Funnily enough, the hackathon's agent knew mugs are hollow and modelled the inside when it wrote the CAD itself, which got that down to 1.8. One point to the big model. (Since then Bevell spots an open top by itself: the photos disagree about what's inside the rim, so it hollows the container one wall in, down to the floor they agree on. The mug is now 2.8 mm, and a turtle-shaped pot went from 4.6 to 2.1. A letter rack, open at both ends and dark inside and out, still comes out full.)
- › Holes, but only where a photo saw through them. (Now Bevell also looks at every flat face of the model from the photos that see it head on: a hole is a round patch they disagree about. A test block got all three of its hidden holes, and a bracket got back the hole through its boss. How deep a blind hole goes is still a guess.)
- › An L-bracket came out as three stacked slabs with ridged sides, and a servo lengthways, with stubs for ears and no hub. The cut-outs take in the shadow in the L's inside corner, so the carved shape fills that corner part way along, and the CAD step read the fill as steps. The servo's ears were too thin to count. (Now it also tries the whole length as one piece, keeping it when the carved shape only bulges into that corner, and reads thin bands like the ears from how the slices' area changes. One clean L, 0.76 mm from 1.04, and the servo upright with its ears and hub, 0.49 from 0.78.)
- › NURBS was the slow step, and it blurred thin parts. (Now 11 seconds on the clock, from 62, and the scissors come out at 0.52 mm as NURBS, against 0.51 carved.)
- › These are rendered photos, not real ones. That's what lets me score against the true shape. Real photos are next.
Is this in Bevell?
Not yet. Bevell turns photos and drawings into 2D CAD today (DXF and SVG). Photo to STEP is on the roadmap, and this is how it's going to work.
The lesson is the same as last time. The model is the smallest part. Everything around it (the markers, the carving, the checks, the CAD) is what makes the result good. Which is how a model that costs a penny a scan ended up ahead of a pipeline with two big ones in it.
More soon.
Natalie
The everyday objects are 3D scans from Google Scanned Objects (Google Research, CC BY 4.0). SAM 3.1 and Muse Spark are Meta's; BiRefNet is an open model, run here on Runware.
Turn a photo into 2D CAD today
Previews are free, and every account gets 2 free downloads.
Open the converter