<aside>
🛠
Turn Written Coordinates into a Black-and-White Mask
The bridge between finding a region and editing it. Give this tool an image and a list of regions written as plain text — one region per line — and it renders a black-and-white mask image sized to match the source. Polygons by default; flip one checkbox to read the same lines as bounding boxes instead. Because the regions arrive as text, anything that can produce text can drive it: a detection model, an LLM, a spreadsheet column, or coordinates you typed yourself.
</aside>
What it does
Image Masker by Region takes a source image and a text description of one or more regions, and outputs a black-and-white mask image with the same dimensions as the source.
- Each line of the input text describes one region
- Each region is rendered onto a blank canvas the size of the source image
- The result is a two-tone mask ready to hand to any tool that accepts one
By default the coordinates on each line are read as the vertices of a polygon — arbitrary shapes, as many points as you like. Enable the bounding-box option and the same lines are read as rectangles instead, which is the format most object-detection models already emit.
The source image is used for its dimensions; its pixels are not carried into the output. The output is the mask, not a masked image.
Problem it solves
- Detection → editing, without a middle step – Object detectors, OCR, and face detectors all return coordinates. Almost every editing tool wants a mask. This is the piece that converts one into the other.
- No hand-painting masks – Masking is normally a manual, per-image chore in an image editor. Here it's a text field, so it runs unattended.
- Bounding boxes work as-is – No need to expand a box into four corner points yourself; the checkbox does it.
- Repeatable and auditable – The same text produces the same mask every time. You can read the region list, diff it, and store it — unlike a hand-drawn mask.
- Fixed regions across a batch – Same watermark corner, same document field, same camera-mounted overlay on every frame: write the region once, apply it to everything.
- LLM- and agent-friendly – Text-in is the easiest interface for a language model to drive. A model that can describe where something is can now mask it.
- Privacy redaction – Faces, plates, badges, screen contents: mark the regions, blur or erase what's inside.
Input/Output
<aside>
- Input: Source image + region text
- Image (top input, blue port): The image whose dimensions define the mask canvas. Any standard image format.
- Text (bottom input, red port): The region list — one region per line. Feed it from a Text Input node for fixed regions, or from an upstream model / LLM node for detected ones.
- Output: Single black-and-white mask image (blue port)
- Dimensions: Same as the input image
- Content: Two-tone mask — the described regions in one tone, everything else in the other
- Multiple regions: All lines are rendered onto the same single mask, not one mask per line
- Downstream: Wire straight into Image Eraser (Latent Diffusion) or any other node that accepts a mask, or into an Image Viewer to inspect it
| Option |
Type |
What it does |
| Read the regions as bounding boxes instead of polygons |
Checkbox (off by default) |
Off: each line is a polygon — a list of vertices, connected in order and closed automatically. On: each line is a rectangle defined by its corners. |
| </aside> |
|
|
How to Use