All guides

Local AI line · stop 14 of 14 · 18 min · members

A background removal pipeline that handles volume and knows its edge cases

Cutting a product out cleanly at volume, and the edge cases that need a human for ten seconds.

Free with an account

Sign in to read.

Membership is free: an account opens all 86 script pages. The Lab, Studio Canvas and the paid guides need the $99 pass, paid once. Already signed in on this browser? The page opens by itself.

01

The task

Cutting out a product is solved, at volume, almost.

The almost is where the process needs designing.

Automatic segmentation handles most product photography well. Run two hundred images through it and the large majority come back with clean, usable masks.

The remainder are the problem, and they are predictable: transparent materials, fine detail like hair or mesh, and any product whose colour is close to the background. Left in the batch, these ship with visible errors.

So the pipeline is not just the cutout. It is the cutout plus a way of finding the ones that failed, without inspecting all two hundred by hand.

02

The pipeline

Segment, save the mask, composite, flag.

Four steps, and keeping the mask separately is what makes the rest possible.

Run segmentation, but save the mask as its own file rather than only the composited result.

The mask is what you inspect, correct and reuse. A flattened output with the background already removed cannot be fixed without starting again, and a mask that needs a small edit is a two-minute job.

Then composite onto whatever ground the deliverable needs — white, transparent, a coloured field — as a separate step. Changing the background later becomes a re-composite rather than a re-cutout.

03

Finding the failures

Score each mask, review the worst.

You do not need to look at the good ones.

Cheap heuristics identify most failures without a human looking:

  • Mask area outside an expected range — a mask covering five percent or ninety-five percent of the frame is almost certainly wrong.
  • Excessive edge complexity — a mask perimeter far longer than the shape warrants indicates the model found noise.
  • Disconnected regions — several separate blobs usually means part of the background was kept.

Sort by score and review the worst twenty. That finds nearly all the genuine failures for a fraction of the effort of inspecting everything.

04

The hard cases

Three categories that need a person.

Recognise them at the start rather than fighting them per image.

Transparent and translucent. Glass, sheer fabric, anything you can see through. A binary mask cannot represent partial transparency, and the result always looks cut out.

Fine detail. Hair, fur, mesh, lace. Automatic masks either lose it or include background between the strands.

Low contrast against the ground. A pale product on a pale background. The model has little to work with and neither would a person.

For all three the cheapest fix is upstream: shoot against a contrasting ground. Ten minutes of set-up removes hours of masking.

05

Edges

A slight contraction and a soft edge sell the cutout.

Most cutouts look wrong because of one bright pixel line.

Automatic masks tend to include a thin rim of the original background, which appears as a halo against a new ground.

Contract the mask by a pixel or two and feather the edge very slightly. This is a standard step and it fixes the majority of composites that look almost right.

Match the edge softness to the source. A sharply focused product wants a hard edge; something with shallow depth of field wants more, and a uniformly crisp mask on a soft subject reads as pasted.

06

Keeping it honest

Never deliver a cutout you have not seen at full size.

Thumbnails hide exactly the errors that matter.

Mask errors are small and local, which means they are invisible in a review grid and obvious in the final layout.

Before delivery, open the flagged items at full size against the destination background. Halos in particular only appear against the ground the image will actually sit on.

The batch does the work. The check is what makes it safe to run at volume, and skipping it is how a catalogue ships with a halo on item forty.