{"course":{"slug":"image-editing","title":"Editing an Image","url":"https://addaly.com/learn/image-editing","level":"beginner","track":"create"},"lesson":{"slug":"batch-background-removal","title":"Four hundred cut-outs, and the twelve that are wrong","url":"https://addaly.com/learn/image-editing/batch-background-removal","position":29,"of":78,"minutes":8,"answer":"A batch of cut-outs is a pipeline plus a sampling check (a grey-background contact sheet of the masks finds the errors a white-background grid hides) and the predictable failure categories should be pulled out for.","keyIdea":"A batch of cut-outs is a pipeline plus a sampling check (a grey-background contact sheet of the masks finds the errors a white-background grid hides) and the predictable failure categories should be pulled out for manual work before the batch runs, not after."},"body":{"format":"markdown","text":"## The job that actually arrives\n\nNobody pays for one cut-out. The work is a shop with 400 products, a catalogue reshoot, a marketplace migration where every listing needs a white background at 2000 pixels square.\n\nDoing 400 by hand at four minutes each is 27 hours. Doing them automatically and checking properly is about four. The difference is entirely in how you organise the checking, because the automatic pass will get somewhere between 85 and 97 per cent of them right and you cannot tell which without looking.\n\n## The pipeline\n\n```bash\n# 1. one folder in, one folder out, consistent model\nrembg p -m isnet-general-use ./raw ./cutouts\n\n# 2. composite onto white at a fixed canvas, keeping proportion\nmagick mogrify -path ./final \\\n  -background white -alpha remove -alpha off \\\n  -resize 1800x1800 -gravity center -extent 2000x2000 \\\n  -quality 88 -strip ./cutouts/*.png\n```\n\nThat is the whole thing, and both tools are free. `rembg` does the masks; ImageMagick flattens onto white, resizes to fit inside 1800 pixels, centres on a 2000-pixel canvas with a consistent margin, and strips metadata.\n\nThe `-resize 1800x1800` before `-extent 2000x2000` is what gives every product the same 100-pixel breathing space regardless of its shape. Without it, a tall bottle and a wide box end up at different visual scales and the grid looks wrong even though every file is the same size.\n\nIf you prefer a graphical route: GIMP's *Script-Fu* console and BIMP plugin both batch, Photoshop has Actions plus *File > Automate > Batch*, and Photopea has a scripting console. The principle is identical.\n\n## Consistency is the deliverable\n\nFor a catalogue, the individual cut-out matters less than the set matching. Decide these once and encode them in the script, not in your judgement:\n\n- **Canvas size and aspect.** Most marketplaces want square; several require a minimum of 1600 pixels; some require the product to occupy 80 to 85 per cent of the frame.\n- **Margin.** Same on every file.\n- **Background.** Pure 255 white if the platform demands it; around 250 grey on your own site, so white product highlights do not dissolve into the page.\n- **Shadow.** Either every product has one or none does. A grid where half the items float is the commonest tell of a job done in two sittings.\n- **File naming.** `sku_view_index.jpg`, machine-readable, no spaces.\n\n## Checking without looking at 400 images\n\nThree passes, in increasing cost.\n\n**Contact sheet.** Build a grid of every output and look at it at once.\n\n```bash\nmagick montage ./final/*.jpg -tile 10x -geometry 200x200+4+4 sheet.jpg\n```\n\nAt thumbnail size you will catch the catastrophic failures instantly: a product that came out as a silhouette, one that lost its handle, one where the model grabbed the shadow instead of the object, one that is upside down. This finds perhaps two thirds of the errors in three minutes.\n\n**Alpha contact sheet.** The same grid built from the masks on a mid-grey background rather than white. Errors that vanish against white (a filled-in handle gap, a chewed edge) are obvious against grey. This is the pass most people skip and it is the one that pays.\n\n**Full-size sample.** Open twenty at 100 per cent, chosen to cover the variety: the shiniest, the darkest, the thinnest, the one with a transparent lid, the one shot on a different day. If all twenty pass, the batch is probably sound. If three fail, inspect the whole set.\n\nThat is sampling, and it is the correct use of it: a sample tells you whether there is a systematic problem, not whether every individual file is right.\n\n> Figure: Where the twenty-one bad cut-outs in a batch of 400 were found. Bars (bad cut-outs caught at this pass): Thumbnail grid of the finished files, on white 13; The same grid built from the masks, on mid-grey 6; Twenty opened at 100 per cent 2. The grey mask sheet is the pass most people skip and the one that pays: a filled-in handle gap and a chewed edge both vanish against white and shout against grey. Twenty opened at full size is a sample, and a sample tells you whether there is a systematic problem, not whether every file is right.\n\n## The categories that will fail, predictably\n\nPull these out for manual work *before* running the batch, and the batch gets much better:\n\n- **Glass, bottles, anything transparent.** Blend-mode work from the previous lesson.\n- **White or very pale products on white.** The model has no contrast to work with.\n- **Products with holes**: handles, rings, open boxes, mesh.\n- **Anything with fine structure**: jewellery chains, lace, wire.\n- **Reflective metal**, where the reflection of the studio is part of the product.\n\nSorting the shoot into \"automatic\" and \"by hand\" folders at the start turns a frustrating batch into two predictable ones.\n\n## Privacy, and what leaves your machine\n\nRunning `rembg` locally means nothing is uploaded. Using a web service means 400 of a client's product photographs, possibly unreleased, go to a third party under terms you probably have not read, and several such services reserve the right to use uploads for improvement.\n\nFor public catalogue images this is a small risk. For a product not yet announced, for anything under a non-disclosure agreement, or for photographs containing people, the local route is not merely cheaper: it is the only one you can honestly tell a client you used.\n\n## The limitation that determines the price\n\nAn automatic batch does not produce professional cut-outs. It produces acceptable ones, quickly, most of the time.\n\nThe gap is in the last five per cent: the sub-pixel edge, the decontaminated fringe, the contact shadow that makes the object sit on the surface. For a marketplace grid viewed at 200 pixels, nobody sees the gap. For a printed catalogue, a hero image or a brand that cares, they do.\n\nKnowing which job is which is how you price the work. Quoting a by-hand rate for a job that a batch would have satisfied loses you the job; quoting a batch rate for a job that needed the hand work loses you the weekend."},"check":{"question":"After batch-removing backgrounds from 400 product photographs, an editor builds a contact sheet of the finished images on white and sees nothing obviously wrong. Why is that insufficient evidence that the batch succeeded?","options":[{"text":"Contact sheets compress the images, and compression artefacts mask edge errors that are present in the full-size files.","correct":false,"tempting":"Blames the thumbnail's encoding rather than its background: the failure modes described are invisible on white at any quality or scale."},{"text":"Errors that leave white where the background was (filled gaps, chewed edges, lost thin parts) are indistinguishable from a correct result against a white sheet.","correct":true},{"text":"A sample of 400 is too small to be conclusive, and every file has to be opened individually before delivery.","correct":false,"tempting":"Misreads sampling: 400 is the whole population here, and the problem is what the check can reveal rather than how many items it covers."},{"text":"Contact sheets show the composite rather than the alpha channel, so they cannot reveal whether the files were saved with transparency at all.","correct":false,"tempting":"Raises a real but different question about the output format, which the flattening step in the pipeline has already settled."}]},"prev":{"slug":"hair-fur-glass-and-smoke","title":"The four subjects that are not opaque","url":"https://addaly.com/learn/image-editing/hair-fur-glass-and-smoke"},"next":{"slug":"levels-and-curves","title":"Brightness/Contrast is one knob for a problem with five","url":"https://addaly.com/learn/image-editing/levels-and-curves"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'Four hundred cut-outs, and the twelve that are wrong', in Editing an Image. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/image-editing/batch-background-removal (Accessed: 13 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"Four hundred cut-outs, and the twelve that are wrong","courseTitle":"Editing an Image","module":{"index":3,"slug":"selections-cutouts-and-edges","title":"Selections, cut-outs and edges"},"answer":null,"keyIdea":"A batch of cut-outs is a pipeline plus a sampling check (a grey-background contact sheet of the masks finds the errors a white-background grid hides) and the predictable failure categories should be pulled out for manual work before the batch runs, not after.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure","figure":{"type":"bars","unit":"bad cut-outs caught at this pass","title":"Where the twenty-one bad cut-outs in a batch of 400 were found","series":[{"label":"Thumbnail grid of the finished files, on white","value":13},{"label":"The same grid built from the masks, on mid-grey","value":6,"highlight":true},{"label":"Twenty opened at 100 per cent","value":2}],"caption":"The grey mask sheet is the pass most people skip and the one that pays: a filled-in handle gap and a chewed edge both vanish against white and shout against grey. Twenty opened at full size is a sample, and a sample tells you whether there is a systematic problem, not whether every file is right."},"alt":"Figure: Where the twenty-one bad cut-outs in a batch of 400 were found. Bars (bad cut-outs caught at this pass): Thumbnail grid of the finished files, on white 13; The same grid built from the masks, on mid-grey 6; Twenty opened at 100 per cent 2. The grey mask sheet is the pass most people skip and the one that pays: a filled-in handle gap and a chewed edge both vanish against white and shout against grey. Twenty opened at full size is a sample, and a sample tells you whether there is a systematic problem, not whether every file is right."}},"blocks":[{"t":"h2","id":"the-job-that-actually-arrives","runs":[{"text":"The job that actually arrives"}]},{"t":"p","runs":[{"text":"Nobody pays for one cut-out. The work is a shop with 400 products, a catalogue reshoot, a marketplace migration where every listing needs a white background at 2000 pixels square."}]},{"t":"p","runs":[{"text":"Doing 400 by hand at four minutes each is 27 hours. Doing them automatically and checking properly is about four. The difference is entirely in how you organise the checking, because the automatic pass will get somewhere between 85 and 97 per cent of them right and you cannot tell which without looking."}]},{"t":"h2","id":"the-pipeline","runs":[{"text":"The pipeline"}]},{"t":"code","lang":"bash","label":"Bash","text":"# 1. one folder in, one folder out, consistent model\nrembg p -m isnet-general-use ./raw ./cutouts\n\n# 2. composite onto white at a fixed canvas, keeping proportion\nmagick mogrify -path ./final \\\n  -background white -alpha remove -alpha off \\\n  -resize 1800x1800 -gravity center -extent 2000x2000 \\\n  -quality 88 -strip ./cutouts/*.png"},{"t":"p","runs":[{"text":"That is the whole thing, and both tools are free. "},{"text":"rembg","code":true},{"text":" does the masks; ImageMagick flattens onto white, resizes to fit inside 1800 pixels, centres on a 2000-pixel canvas with a consistent margin, and strips metadata."}]},{"t":"p","runs":[{"text":"The "},{"text":"-resize 1800x1800","code":true},{"text":" before "},{"text":"-extent 2000x2000","code":true},{"text":" is what gives every product the same 100-pixel breathing space regardless of its shape. Without it, a tall bottle and a wide box end up at different visual scales and the grid looks wrong even though every file is the same size."}]},{"t":"p","runs":[{"text":"If you prefer a graphical route: GIMP’s "},{"text":"Script-Fu","i":true},{"text":" console and BIMP plugin both batch, Photoshop has Actions plus "},{"text":"File > Automate > Batch","i":true},{"text":", and Photopea has a scripting console. The principle is identical."}]},{"t":"h2","id":"consistency-is-the-deliverable","runs":[{"text":"Consistency is the deliverable"}]},{"t":"p","runs":[{"text":"For a catalogue, the individual cut-out matters less than the set matching. Decide these once and encode them in the script, not in your judgement:"}]},{"t":"ul","items":[[{"text":"Canvas size and aspect.","b":true},{"text":" Most marketplaces want square; several require a minimum of 1600 pixels; some require the product to occupy 80 to 85 per cent of the frame."}],[{"text":"Margin.","b":true},{"text":" Same on every file."}],[{"text":"Background.","b":true},{"text":" Pure 255 white if the platform demands it; around 250 grey on your own site, so white product highlights do not dissolve into the page."}],[{"text":"Shadow.","b":true},{"text":" Either every product has one or none does. A grid where half the items float is the commonest tell of a job done in two sittings."}],[{"text":"File naming.","b":true},{"text":" "},{"text":"sku_view_index.jpg","code":true},{"text":", machine-readable, no spaces."}]]},{"t":"h2","id":"checking-without-looking-at-400-images","runs":[{"text":"Checking without looking at 400 images"}]},{"t":"p","runs":[{"text":"Three passes, in increasing cost."}]},{"t":"p","runs":[{"text":"Contact sheet.","b":true},{"text":" Build a grid of every output and look at it at once."}]},{"t":"code","lang":"bash","label":"Bash","text":"magick montage ./final/*.jpg -tile 10x -geometry 200x200+4+4 sheet.jpg"},{"t":"p","runs":[{"text":"At thumbnail size you will catch the catastrophic failures instantly: a product that came out as a silhouette, one that lost its handle, one where the model grabbed the shadow instead of the object, one that is upside down. This finds perhaps two thirds of the errors in three minutes."}]},{"t":"p","runs":[{"text":"Alpha contact sheet.","b":true},{"text":" The same grid built from the masks on a mid-grey background rather than white. Errors that vanish against white (a filled-in handle gap, a chewed edge) are obvious against grey. This is the pass most people skip and it is the one that pays."}]},{"t":"p","runs":[{"text":"Full-size sample.","b":true},{"text":" Open twenty at 100 per cent, chosen to cover the variety: the shiniest, the darkest, the thinnest, the one with a transparent lid, the one shot on a different day. If all twenty pass, the batch is probably sound. If three fail, inspect the whole set."}]},{"t":"p","runs":[{"text":"That is sampling, and it is the correct use of it: a sample tells you whether there is a systematic problem, not whether every individual file is right."}]},{"t":"h2","id":"the-categories-that-will-fail-predictably","runs":[{"text":"The categories that will fail, predictably"}]},{"t":"p","runs":[{"text":"Pull these out for manual work "},{"text":"before","i":true},{"text":" running the batch, and the batch gets much better:"}]},{"t":"ul","items":[[{"text":"Glass, bottles, anything transparent.","b":true},{"text":" Blend-mode work from the previous lesson."}],[{"text":"White or very pale products on white.","b":true},{"text":" The model has no contrast to work with."}],[{"text":"Products with holes","b":true},{"text":": handles, rings, open boxes, mesh."}],[{"text":"Anything with fine structure","b":true},{"text":": jewellery chains, lace, wire."}],[{"text":"Reflective metal","b":true},{"text":", where the reflection of the studio is part of the product."}]]},{"t":"p","runs":[{"text":"Sorting the shoot into “automatic” and “by hand” folders at the start turns a frustrating batch into two predictable ones."}]},{"t":"h2","id":"privacy-and-what-leaves-your-machine","runs":[{"text":"Privacy, and what leaves your machine"}]},{"t":"p","runs":[{"text":"Running "},{"text":"rembg","code":true},{"text":" locally means nothing is uploaded. Using a web service means 400 of a client’s product photographs, possibly unreleased, go to a third party under terms you probably have not read, and several such services reserve the right to use uploads for improvement."}]},{"t":"p","runs":[{"text":"For public catalogue images this is a small risk. For a product not yet announced, for anything under a non-disclosure agreement, or for photographs containing people, the local route is not merely cheaper: it is the only one you can honestly tell a client you used."}]},{"t":"h2","id":"the-limitation-that-determines-the-price","runs":[{"text":"The limitation that determines the price"}],"role":"limit"},{"t":"p","runs":[{"text":"An automatic batch does not produce professional cut-outs. It produces acceptable ones, quickly, most of the time."}]},{"t":"p","runs":[{"text":"The gap is in the last five per cent: the sub-pixel edge, the decontaminated fringe, the contact shadow that makes the object sit on the surface. For a marketplace grid viewed at 200 pixels, nobody sees the gap. For a printed catalogue, a hero image or a brand that cares, they do."}]},{"t":"p","runs":[{"text":"Knowing which job is which is how you price the work. Quoting a by-hand rate for a job that a batch would have satisfied loses you the job; quoting a batch rate for a job that needed the hand work loses you the weekend."}]}],"check":{"question":[{"text":"After batch-removing backgrounds from 400 product photographs, an editor builds a contact sheet of the finished images on white and sees nothing obviously wrong. Why is that insufficient evidence that the batch succeeded?"}],"options":[{"text":[{"text":"Contact sheets compress the images, and compression artefacts mask edge errors that are present in the full-size files."}],"correct":false,"tempting":[{"text":"Blames the thumbnail’s encoding rather than its background: the failure modes described are invisible on white at any quality or scale."}]},{"text":[{"text":"Errors that leave white where the background was (filled gaps, chewed edges, lost thin parts) are indistinguishable from a correct result against a white sheet."}],"correct":true,"tempting":null},{"text":[{"text":"A sample of 400 is too small to be conclusive, and every file has to be opened individually before delivery."}],"correct":false,"tempting":[{"text":"Misreads sampling: 400 is the whole population here, and the problem is what the check can reveal rather than how many items it covers."}]},{"text":[{"text":"Contact sheets show the composite rather than the alpha channel, so they cannot reveal whether the files were saved with transparency at all."}],"correct":false,"tempting":[{"text":"Raises a real but different question about the output format, which the flattening step in the pipeline has already settled."}]}],"order":[3,1,0,2],"why":null},"prev":{"slug":"hair-fur-glass-and-smoke","title":"The four subjects that are not opaque","minutes":9},"next":{"slug":"levels-and-curves","title":"Brightness/Contrast is one knob for a problem with five","minutes":10}}}