image-paste-by-class — Conditional AI Model
The return trip for Image Crop by Class. Give it the original image, the processed crop — an upscaled or restored face, say — and the same detection text and settings, and it scales the crop back into the exact box it came from, with a soft edge so the seam does not show. CPU, instant.
Details
- CategoryConditional
- Year-1
- License
Inputs & Outputs
- ImageInputimage
The original image — the same one the crop node received
- TileInputimage
The processed crop to put back — any size; it is scaled to the box
- TextInputstring
The detection text the crop node read. A line contains a class and bounding box coordinate
- ImageOutputimage
The original image with the tile pasted back in place
Parameters
- target_classesstringdefault
Target class names (comma-separated) — same as the crop node
Class names, comma-separated — set to exactly the value on the Image Crop by Class node that produced the tile. Must match labels emitted by the upstream Object Detection node.
- dilationintegerdefault 0range 0–100
Box enlargement, % of box size — same as the crop node
Enlarges the box by this percentage of its own width and height (half on each side) — set to exactly the value on the crop node, or the tile is scaled into a different box. 0 (default) uses the detected box as is.
- duplication_handlingstringdefault Mergeoptions: Merge, Left Most, Top Most, Right Most, Bottom Most, +1 more
Multi-instance handling — same as the crop node
Which box to use when the class is detected more than once — set to exactly the value on the crop node. 'Merge' (default) is the box around all of them; 'Left Most' / 'Top Most' / 'Right Most' / 'Bottom Most' / 'Center Most' pick one instance by position.
- featherintegerdefault 8range 0–100
Soft edge width, in pixels of the original image.
Width in pixels (of the original image) over which the tile fades into the original along each box edge that lies inside the image — hides the seam where the processed tile meets untouched pixels. Edges on the image border stay hard, since nothing lies beyond them. 0 pastes with a hard edge. Clamped to half the box's shorter side. Default 8.
Tags
Alternatives in Image Blending
- Image Add
Add two images pixel-wise (lighten / double-exposure).
- Image Multiply
Multiply two images pixel-wise (cutout / multiply blend).
- Image Paste by Coordinates
Paste a processed crop back at (Left, Top, Right, Bottom) pixel coordinates.
- Image Paste Each by Coordinates
Paste a whole list of processed crops back into the original image.