Nodes/comfyui_cv/CV Saliency
ComfyUI Node

CV Saliency

Estimates which parts of the image draw the eye (cv2.saliency) - no model file needed. Useful for attention-weighted crops, auto-framing a subject, or steering a mask towards what matters. 'spectral-residual' is a fast global frequency-domain estimate; 'fine-grained' works on local centre-surround contrast and gives sharper object outlines. Outputs a 0-1 saliency MASK plus an auto-thresholded binary mask.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Saliency
  • image
  • saliency
  • binary
methodfine-grained
Categoryimage/CV/contrib

Inputs (2)

NameTypeDefaultDescription
imageNPARRAY,IMAGEImage to analyse (3-channel). Frame 0 of a batch. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size.
methodCOMBOfine-grained'fine-grained' follows object boundaries more closely; 'spectral-residual' is faster and coarser, highlighting whatever is unusual in the frequency spectrum.

Outputs (2)

NameTypeDescription
saliencyMASK0-1 MASK: how salient each pixel is. Feed it to 'CV Color Map' for a heatmap, or use it directly as a soft weight.
binaryMASKAuto-thresholded 0/1 MASK of the salient region (Otsu-style, computed by OpenCV). Empty is a valid result on a flat image.