color-pick-by-class — Conditional AI Model
Name a class and keep only the pixels a segmentation model assigned to it, discarding the rest of the frame. It reads the segmenter's own text output, so the colors never have to be guessed. CPU, instant.
Details
- CategoryConditional
- Year-1
- License
Inputs & Outputs
- ImageInputimage
The input image
- TextInputstring
Line separated input string. A line contains a class and color RGB values
- ImageOutputimage
Image with selected colors highlighted by class
Parameters
- target_classesstringdefault
Target class names (comma-separated)
Class names to keep, comma-separated. Must match labels emitted by the upstream Segmentation node — e.g. 'person', 'car', 'subject', 'object_0'. Multiple classes are unioned. Leave empty to keep nothing (typically a mistake — supply at least one class).
- keep_colorbooleandefault false
Keep original colors
When true, kept regions retain the input image's original colors (cutout look). When false (default), kept regions are returned as a white-on-black binary mask, suitable for feeding into Image-Multiply or Inpainting.
Tags
Alternatives in Selection & Extraction
- Color Pick by RGB Value
Extract segmentation regions by exact RGB color.
- Image Collect
Gather separately made images into one image list, in port order.
- Image Crop by Class
Crop detected objects by class name.
- Image Crop by Coord
Crop a region from explicit bounding-box coordinates.
- Image Crop Each by Class
Crop every detected object into its own image.
- Image Gate by Text
Pass or block an image based on text match.
- Image Selector
Pick first non-empty image from inputs (fallback).
- List Extract
Extract one image from an image list by index.