Sub topic 3
Getting a base selection with Select Subject
Select Subject is the first step in the hair-cutout workflow. It gives you a fast, rough selection that the Select and Mask workspace then refines. This chapter covers how Select Subject works, how to run it, which options matter, and what to expect from the result.
Prerequisites
This chapter assumes you already know the following:
- How to move around Photoshop: the Layers panel, the Tools panel, and the Options bar.
- What a selection is and how marching ants outline it.
- That a layer mask hides content where it is black and shows it where it is white.
- You have a photo open with a subject that has visible hair or fur.
What Select Subject does
Select Subject is a command that uses a machine-learning model to find the main subject in an image. It then builds a selection around that subject. You do not draw anything. Photoshop decides which object or person is the "subject" and outlines it.
The result is a base selection. It is a starting point, not a finished cutout. The model is good at finding the overall shape of a person or animal. It is weaker at the fine, semi-transparent edge of hair. Later chapters fix that edge in Select and Mask. Your goal here is a clean, complete body of the subject that the refinement tools can build on.
Running Select Subject
You can start Select Subject in several places. All of them produce the same kind of selection.
- Open the image and click the layer that holds the photo in the Layers panel.
- Choose Select > Subject from the menu bar.
- Wait a moment. Marching ants appear around the subject.
You can also reach it from other places:
- With the Object Selection tool, Quick Selection tool, or Magic Wand tool active, click Select Subject in the Options bar.
- With no selection active, the Contextual Task Bar often shows a Select subject button.
- Inside the Select and Mask workspace, the Options bar for the Quick Selection and Object Selection tools also has a Select Subject button.
Photoshop works on the active layer's pixels. If the wrong layer is active, or the layer is empty, the result will be wrong or the command will fail. Check the layer first.
Cloud processing and device processing
The Select Subject command has an option that controls where the model runs. In the Options bar of the Object Selection tool, look for Select Subject and the setting for cloud or device processing. Names and placement vary a little between Photoshop versions, so check your version's Options bar.
| Mode | Where it runs | Trade-off |
|---|---|---|
| Device | On your computer | Faster to start, works offline, usually a little less precise |
| Cloud | On Adobe's servers | Needs an internet connection, often more accurate on complex edges |
For hair work, try both on the same image if your version offers the choice. Compare the two results before you decide. The difference is usually small, but cloud processing can follow loose hair a little better.
Reading the result
Marching ants are hard to judge on fine hair. They show a single line, and hair does not have a single line. Do not trust the outline alone. Convert the selection to a quick mask so you can see the shape.
- With the selection active, press Q to enter Quick Mask mode.
- A red overlay covers the area outside the selection.
- Press Q again to leave Quick Mask mode.
Quick Mask shows holes, bites taken out of the subject, and background areas that were included by mistake. These are the errors to fix now, before refinement.
Common errors in a base selection
Select Subject fails in predictable ways. Knowing them tells you what to look for.
| Problem | What you see | Likely cause |
|---|---|---|
| Missing part of the subject | An arm, a tail, or an ear is outside the ants | The model treated it as background or as a second object |
| Extra background included | A chair, a shadow, or a fence is inside the ants | The model grouped it with the subject |
| Holes inside the subject | Small unselected patches in clothing or fur | Low contrast between the subject and a similar-colored area |
| Hair cut off flat | The outline slices across the hair like a haircut | Normal behavior. The model returns a hard edge |
| Wrong subject picked | A foreground object was chosen instead of the person | Several candidates, and the model chose the most prominent one |
The fifth problem and the fourth one are different in kind. A flat edge across the hair is expected and gets fixed in Select and Mask. A wrong subject or a missing limb has to be fixed now, because the refinement tools can only adjust an edge. They cannot add a whole missing region.
Correcting the base selection
Use the standard selection modifiers to add or remove areas. You can do this with the Quick Selection tool, the Object Selection tool, or the Lasso tool.
- Add: hold Shift and drag over the missing area, or choose the Add to selection mode in the Options bar.
- Subtract: hold Alt (Windows) or Option (macOS) and drag over the area to remove.
- Lasso for big fixes: with the Lasso tool, draw a loose shape around a region and hold Shift or Alt/Option as you start the drag.
Work on the body and clothing, not on the hair edge. Stay a little inside the hair when you draw. In the next chapter, the Select and Mask workspace will reach outward from the edge and capture the strands. A selection that starts slightly inside the hair gives the Edge Detection tools room to work. A selection that already extends far into the background makes the later work harder, because the background gets mixed into the edge.
Object Selection as a second pass
If Select Subject chose the wrong thing, the Object Selection tool often fixes it faster than manual painting.
- Choose the Object Selection tool (shortcut W, then cycle with Shift+W if needed).
- Set the mode to Rectangle or Lasso.
- Drag a loose box around the object you want.
- Photoshop snaps the selection to the object inside the box.
This works well for a missing arm or a pet that was skipped. Combine it with Shift to add to the existing selection.
A quick scripted check
If you work on many images, you can run Select Subject from a script. This UXP-style script, run from File > Scripts or the UXP Scripting panel, uses the Action Manager descriptor that Photoshop records for the command. The batchPlay call is the standard way to call a Photoshop command that has no direct API method.
const { app, action } = require("photoshop");
async function selectSubject() {
if (!app.activeDocument) {
throw new Error("Open a document first.");
}
await action.batchPlay(
[
{
_obj: "autoCutout",
sampleAllLayers: false,
_options: { dialogOptions: "dontDisplay" },
},
],
{}
);
}
require("photoshop").core.executeAsModal(selectSubject, {
commandName: "Select Subject",
});The descriptor name autoCutout is what Photoshop records for Select Subject. If a version of Photoshop records something different, record the command yourself with the Actions panel or the UXP Developer Tool and copy the descriptor it produces. The sampleAllLayers: false setting limits the analysis to the active layer.
Sample All Layers
Select Subject normally reads only the active layer. If the subject is built from several layers, or sits on a layer above a background you want considered, turn on Sample All Layers where the option is offered. With it on, Photoshop analyzes the visible composite instead of one layer.
For a single photo on one layer, leave it off. For a hair cutout, you rarely need it unless you have already stacked adjustment layers that change contrast, and then you should think about whether you want those adjustments to influence the selection.
A helpful pre-step: boost the contrast
Select Subject depends on visible differences between the subject and the background. If the hair is dark and the background is dark, the model has little to work with. You can improve this without changing your photo.
- Add a Curves or Levels adjustment layer above the photo.
- Pull the sliders to exaggerate the difference between hair and background.
- Turn on Sample All Layers and run Select Subject.
- Hide or delete the adjustment layer when the selection is done.
The selection stays. The adjustment layer only served as a temporary aid, and your original pixels are untouched.
What to carry forward
At the end of this step, you should have:
- A selection that covers the whole subject, with no missing limbs or large holes.
- No large background objects inside the selection.
- An edge that sits at or just inside the hair, not far out in the background.
You do not need smooth hair edges yet. A flat, hard edge across the hair is fine.
Exercise
You run Select Subject on a photo of a dog. The ants outline the dog well, but the right ear is missing and the fur edge looks flat and cut off. Which of these two problems must you fix before opening Select and Mask, and how?
Show answer
Fix the missing ear first. Select and Mask can only adjust an existing edge, so it cannot add a whole missing region. Hold Shift and drag over the ear with the Quick Selection tool, or draw a loose Object Selection box around it with Shift held. The flat fur edge is expected and does not need fixing now, because Edge Detection and the Refine Edge Brush handle it in Select and Mask.
Exercise
Why is Quick Mask mode more useful than the marching ants for judging a base selection of a person with long hair?
Show answer
Marching ants show only a single outline, which hides small holes, bites, and stray background areas. Quick Mask (press Q) shows the selection as a red overlay over everything outside it, so gaps and extra regions are easy to see.