{"course":{"slug":"image-editing","title":"Editing an Image","url":"https://addaly.com/learn/image-editing","level":"beginner","track":"create"},"lesson":{"slug":"segmentation-models-and-one-click-cutouts","title":"What the one-click button is actually doing","url":"https://addaly.com/learn/image-editing/segmentation-models-and-one-click-cutouts","position":26,"of":78,"minutes":9,"answer":"A one-click cut-out is an object-recognition model predicting which pixels belong to a learned shape, which is why it fills enclosed gaps, loses thin structures and guesses at transparency.","keyIdea":"A one-click cut-out is an object-recognition model predicting which pixels belong to a learned shape, which is why it fills enclosed gaps, loses thin structures and guesses at transparency, and why the mask must be inspected on its own before it is used."},"body":{"format":"markdown","text":"## Not an edge detector\n\nSelect Subject, Remove Background, the long-press-and-lift on your phone: all of them run a neural network that was trained on hundreds of thousands of images paired with human-drawn masks. The model has learned what a person, a car, a dog, a bottle look like as shapes. It is not measuring contrast at a boundary; it is recognising an object and predicting which pixels belong to it.\n\nThat difference explains both why it works where the wand fails and how it fails.\n\nThe common architectures, in the free world:\n\n- **U²-Net**: the model behind **rembg** and a great many web background removers. Small, fast, runs on a CPU in a second or two, trained for salient object detection: it finds the *one thing the picture is about*.\n- **Segment Anything (SAM)**, from Meta, released free with open weights in 2023. Different job: you give it a click or a box and it returns a mask for whatever is there. It will segment anything, including things nobody labelled, which is why it is the basis of many newer tools.\n- **MODNet** and **BiRefNet**: portrait and high-resolution matting models, better on hair than U²-Net.\n\n## Running them free, locally\n\n```bash\npip install rembg\nrembg i input.jpg output.png          # one image\nrembg p ./in ./out                     # a whole folder\nrembg i -m isnet-general-use in.jpg out.png   # a different model\n```\n\nThat runs on your own machine, on a CPU, with no upload and no per-image cost. On a five-year-old laptop it takes two to five seconds per image. There is a `rembg[gpu]` variant if you have one.\n\nThere are also GIMP plugins that wrap the same models, and a growing number of offline Android apps.\n\nThis matters for a specific reason beyond money. Using a web background remover means uploading a client's photograph to somebody else's server, under terms of service you have not read, which may permit training on it. For a product shot of a jar of honey nobody cares. For an unreleased product, a medical image, a photograph of a child, or anything under a confidentiality agreement, it is a decision you should be making deliberately rather than by habit.\n\n## Where models fail, and why each failure happens\n\n**Two objects, one picked.** Salient-object models return *the* subject. Two people standing apart and it may take one. SAM-style click-based tools do not have this problem, because you tell it what you mean.\n\n**Holes get filled.** A mask predicted from learned object shapes tends to produce closed, plausible silhouettes. The gap between an arm and a torso, the space inside a handle, the mesh of a bicycle wheel: these are frequently filled in, because most training examples had solid bodies there. Always check the enclosed gaps.\n\n**Thin structures disappear.** Guitar strings, spectacle arms, antennae, a dog's whiskers. These occupy a few pixels and contribute almost nothing to the loss function the model was trained against, so the model is not penalised much for missing them.\n\n**Reflective and transparent objects are guessed.** A wine glass gets a solid silhouette rather than a transparency map, because the model outputs coverage and the correct answer is not coverage.\n\n**Unusual subjects.** The models are excellent on people, common animals, cars and everyday products, because that is what the training sets contain. Machinery, textiles, food in a bowl, agricultural equipment and anything culturally specific are markedly weaker. If your work is in a domain the training data under-represents, expect to finish by hand more often.\n\n**The output resolution ceiling.** Many models run internally at 320×320 or 1024×1024 and upscale the mask. On a 45-megapixel file the returned edge is therefore soft and approximate regardless of how sharp the original is. Tools that handle this well run a second high-resolution refinement pass; tools that do not give you a slightly mushy outline that no amount of sharpening fixes.\n\n## The workflow that uses them properly\n\nDo not treat the output as the answer. Treat it as ninety seconds saved.\n\n1. Run the model. Get the mask.\n2. **Look at the mask alone**, Alt/Option-clicking the thumbnail. Every failure above is obvious in black and white and invisible against the picture.\n3. Fix the enclosed gaps with a hard black brush.\n4. Fix the thin structures by hand, or accept losing them if they do not matter.\n5. Check the edge at 100 per cent for the resolution ceiling; if it is soft, refine it against the original with a channel-based mask or a path along the hard sections.\n6. Decontaminate the colour, which is the next lesson.\n\nThe five minutes of checking is what separates a listing photograph that looks professional from one that looks automatic, and it is the part that is skipped.\n\n## The part that is unsettled\n\nThese models were trained on large image collections scraped from the web. Whether that training was lawful, and whether the models' outputs carry any obligation to the people whose images were used, is being argued in several jurisdictions at once and the answers differ by country. Some datasets were assembled with consent and licensing; many were not, and some have been withdrawn after audits found material that should never have been in them.\n\nThere is no settled position to give you here, and anyone who tells you there is has picked a side in an argument that courts have not finished. What is within your control is narrower and worth doing: prefer models with a stated licence and a documented training set, keep client images off third-party servers where confidentiality applies, and do not represent a model-generated result as a measurement of anything."},"check":{"question":"A one-click background removal on a photograph of a bicycle returns a clean outline, but the spaces between the spokes and inside the frame triangle are solid. What does this indicate about how the tool works?","options":[{"text":"The mask resolution was too low to resolve the spokes, and running the same model at full resolution would recover the gaps.","correct":false,"tempting":"Names a real limitation with the wrong consequence: low mask resolution softens edges, while solidly filled enclosed regions come from the model's learned shape prior rather than from sampling density."},{"text":"The tool applied a fill-holes post-processing step, which can be disabled in most implementations to keep the gaps open.","correct":false,"tempting":"Attributes the behaviour to an optional cleanup stage, when the closed silhouette is typically produced by the model itself and persists with post-processing off."},{"text":"The model predicts a plausible object silhouette learned from training examples, and most of those examples had solid bodies, so enclosed background is filled rather than detected.","correct":true},{"text":"Background removal works on colour similarity to the frame edge, so enclosed regions are never reached by the flood from the outside.","correct":false,"tempting":"Describes a flood-fill wand, not a segmentation model, and would also fail on the open background around the wheel, which the tool handled correctly."}]},"prev":{"slug":"luminosity-masks","title":"Masks with no edge anywhere","url":"https://addaly.com/learn/image-editing/luminosity-masks"},"next":{"slug":"matting-fringes-and-colour-spill","title":"Three equations, seven unknowns: why hair is hard","url":"https://addaly.com/learn/image-editing/matting-fringes-and-colour-spill"},"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) 'What the one-click button is actually doing', in Editing an Image. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/image-editing/segmentation-models-and-one-click-cutouts (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":"What the one-click button is actually doing","courseTitle":"Editing an Image","module":{"index":3,"slug":"selections-cutouts-and-edges","title":"Selections, cut-outs and edges"},"answer":null,"keyIdea":"A one-click cut-out is an object-recognition model predicting which pixels belong to a learned shape, which is why it fills enclosed gaps, loses thin structures and guesses at transparency, and why the mask must be inspected on its own before it is used.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"not-an-edge-detector","runs":[{"text":"Not an edge detector"}]},{"t":"p","runs":[{"text":"Select Subject, Remove Background, the long-press-and-lift on your phone: all of them run a neural network that was trained on hundreds of thousands of images paired with human-drawn masks. The model has learned what a person, a car, a dog, a bottle look like as shapes. It is not measuring contrast at a boundary; it is recognising an object and predicting which pixels belong to it."}]},{"t":"p","runs":[{"text":"That difference explains both why it works where the wand fails and how it fails."}]},{"t":"p","runs":[{"text":"The common architectures, in the free world:"}]},{"t":"ul","items":[[{"text":"U²-Net","b":true},{"text":": the model behind "},{"text":"rembg","b":true},{"text":" and a great many web background removers. Small, fast, runs on a CPU in a second or two, trained for salient object detection: it finds the "},{"text":"one thing the picture is about","i":true},{"text":"."}],[{"text":"Segment Anything (SAM)","b":true},{"text":", from Meta, released free with open weights in 2023. Different job: you give it a click or a box and it returns a mask for whatever is there. It will segment anything, including things nobody labelled, which is why it is the basis of many newer tools."}],[{"text":"MODNet","b":true},{"text":" and "},{"text":"BiRefNet","b":true},{"text":": portrait and high-resolution matting models, better on hair than U²-Net."}]]},{"t":"h2","id":"running-them-free-locally","runs":[{"text":"Running them free, locally"}]},{"t":"code","lang":"bash","label":"Bash","text":"pip install rembg\nrembg i input.jpg output.png          # one image\nrembg p ./in ./out                     # a whole folder\nrembg i -m isnet-general-use in.jpg out.png   # a different model"},{"t":"p","runs":[{"text":"That runs on your own machine, on a CPU, with no upload and no per-image cost. On a five-year-old laptop it takes two to five seconds per image. There is a "},{"text":"rembg[gpu]","code":true},{"text":" variant if you have one."}]},{"t":"p","runs":[{"text":"There are also GIMP plugins that wrap the same models, and a growing number of offline Android apps."}]},{"t":"p","runs":[{"text":"This matters for a specific reason beyond money. Using a web background remover means uploading a client’s photograph to somebody else’s server, under terms of service you have not read, which may permit training on it. For a product shot of a jar of honey nobody cares. For an unreleased product, a medical image, a photograph of a child, or anything under a confidentiality agreement, it is a decision you should be making deliberately rather than by habit."}]},{"t":"h2","id":"where-models-fail-and-why-each-failure-happens","runs":[{"text":"Where models fail, and why each failure happens"}]},{"t":"p","runs":[{"text":"Two objects, one picked.","b":true},{"text":" Salient-object models return "},{"text":"the","i":true},{"text":" subject. Two people standing apart and it may take one. SAM-style click-based tools do not have this problem, because you tell it what you mean."}]},{"t":"p","runs":[{"text":"Holes get filled.","b":true},{"text":" A mask predicted from learned object shapes tends to produce closed, plausible silhouettes. The gap between an arm and a torso, the space inside a handle, the mesh of a bicycle wheel: these are frequently filled in, because most training examples had solid bodies there. Always check the enclosed gaps."}]},{"t":"p","runs":[{"text":"Thin structures disappear.","b":true},{"text":" Guitar strings, spectacle arms, antennae, a dog’s whiskers. These occupy a few pixels and contribute almost nothing to the loss function the model was trained against, so the model is not penalised much for missing them."}]},{"t":"p","runs":[{"text":"Reflective and transparent objects are guessed.","b":true},{"text":" A wine glass gets a solid silhouette rather than a transparency map, because the model outputs coverage and the correct answer is not coverage."}]},{"t":"p","runs":[{"text":"Unusual subjects.","b":true},{"text":" The models are excellent on people, common animals, cars and everyday products, because that is what the training sets contain. Machinery, textiles, food in a bowl, agricultural equipment and anything culturally specific are markedly weaker. If your work is in a domain the training data under-represents, expect to finish by hand more often."}]},{"t":"p","runs":[{"text":"The output resolution ceiling.","b":true},{"text":" Many models run internally at 320×320 or 1024×1024 and upscale the mask. On a 45-megapixel file the returned edge is therefore soft and approximate regardless of how sharp the original is. Tools that handle this well run a second high-resolution refinement pass; tools that do not give you a slightly mushy outline that no amount of sharpening fixes."}]},{"t":"h2","id":"the-workflow-that-uses-them-properly","runs":[{"text":"The workflow that uses them properly"}]},{"t":"p","runs":[{"text":"Do not treat the output as the answer. Treat it as ninety seconds saved."}]},{"t":"ol","start":1,"items":[[{"text":"Run the model. Get the mask."}],[{"text":"Look at the mask alone","b":true},{"text":", Alt/Option-clicking the thumbnail. Every failure above is obvious in black and white and invisible against the picture."}],[{"text":"Fix the enclosed gaps with a hard black brush."}],[{"text":"Fix the thin structures by hand, or accept losing them if they do not matter."}],[{"text":"Check the edge at 100 per cent for the resolution ceiling; if it is soft, refine it against the original with a channel-based mask or a path along the hard sections."}],[{"text":"Decontaminate the colour, which is the next lesson."}]]},{"t":"p","runs":[{"text":"The five minutes of checking is what separates a listing photograph that looks professional from one that looks automatic, and it is the part that is skipped."}]},{"t":"h2","id":"the-part-that-is-unsettled","runs":[{"text":"The part that is unsettled"}]},{"t":"p","runs":[{"text":"These models were trained on large image collections scraped from the web. Whether that training was lawful, and whether the models’ outputs carry any obligation to the people whose images were used, is being argued in several jurisdictions at once and the answers differ by country. Some datasets were assembled with consent and licensing; many were not, and some have been withdrawn after audits found material that should never have been in them."}]},{"t":"p","runs":[{"text":"There is no settled position to give you here, and anyone who tells you there is has picked a side in an argument that courts have not finished. What is within your control is narrower and worth doing: prefer models with a stated licence and a documented training set, keep client images off third-party servers where confidentiality applies, and do not represent a model-generated result as a measurement of anything."}]}],"check":{"question":[{"text":"A one-click background removal on a photograph of a bicycle returns a clean outline, but the spaces between the spokes and inside the frame triangle are solid. What does this indicate about how the tool works?"}],"options":[{"text":[{"text":"The mask resolution was too low to resolve the spokes, and running the same model at full resolution would recover the gaps."}],"correct":false,"tempting":[{"text":"Names a real limitation with the wrong consequence: low mask resolution softens edges, while solidly filled enclosed regions come from the model’s learned shape prior rather than from sampling density."}]},{"text":[{"text":"The tool applied a fill-holes post-processing step, which can be disabled in most implementations to keep the gaps open."}],"correct":false,"tempting":[{"text":"Attributes the behaviour to an optional cleanup stage, when the closed silhouette is typically produced by the model itself and persists with post-processing off."}]},{"text":[{"text":"The model predicts a plausible object silhouette learned from training examples, and most of those examples had solid bodies, so enclosed background is filled rather than detected."}],"correct":true,"tempting":null},{"text":[{"text":"Background removal works on colour similarity to the frame edge, so enclosed regions are never reached by the flood from the outside."}],"correct":false,"tempting":[{"text":"Describes a flood-fill wand, not a segmentation model, and would also fail on the open background around the wheel, which the tool handled correctly."}]}],"order":[3,2,0,1],"why":null},"prev":{"slug":"luminosity-masks","title":"Masks with no edge anywhere","minutes":9},"next":{"slug":"matting-fringes-and-colour-spill","title":"Three equations, seven unknowns: why hair is hard","minutes":9}}}