ComfyUI Node

VNCCS BBox Extractor

Grab every detected face (or hand, or person) as crops — without running a detailer

By AHEKOT·Created 10 months ago·Updated a day ago· 1,010
VNCCS BBox Extractor
  • image
  • bbox_detector
  • images
threshold0.50
dilation300
drop_size10

Every so often you don't want the full detect-crop-refine-paste detailer loop. You just want the crops. Maybe you're building a dataset, eyeballing what your detector actually finds, or feeding detected faces into some other node that wants tight images. That's exactly what VNCCS BBox Extractor is: a helper that runs a bounding-box detector over an image and hands you back an image batch of the cropped regions.

It's a thin node, and it knows it. There's no sampling, no refinement, no pasting - just detection and cropping. If you've used the QWEN Detailer from the same pack, this is that first stage, exposed on its own.

How it works

Under the hood it calls your detector's detect() the same way an Impact Pack detailer would, but it ignores everything except the crop regions. It applies your dilation to expand each box, drops anything under 10 pixels, crops each region from the source image, pads them all to a common size, and returns them as a single batched IMAGE. Outputs are aligned and compositing-ready, which is what you want if you're feeding them into a batch processor.

The one surprise in the schema is the default dilation of 300. That's a lot of padding - it roughly triples a small face crop. Tune it down to ~0–50 if you want tight boxes. The default makes sense for the "show me what the detector sees" use case but it will look wrong if you expected the raw detections.

The inputs that matter

Only five, and they're all the standard detector knobs:

  • image - your source. Batches are rejected, so feed one image at a time.
  • bbox_detector - an Impact Pack–style BBOX_DETECTOR (a face, hand, or person YOLO from the Impact Pack detector dropdown, or the same ones the VNCCS QWEN Detailer uses).
  • threshold (default 0.5) - detector confidence. Raise it if you're getting junk boxes.
  • dilation (default 300) - expands or shrinks each crop region, in pixels.
  • drop_size (default 10) - minimum object size for the detector.

The output is a single images IMAGE batch (list of crops, one per detection, padded to a common size).

Installing it

It ships with the VNCCS Utils pack, so:

cd ComfyUI/custom_nodes
git clone https://github.com/AHEKOT/ComfyUI_VNCCS_Utils.git
cd ComfyUI_VNCCS_Utils
pip install -r requirements.txt

or search VNCCS Utils in ComfyUI Manager and restart. The real prerequisite is Impact Pack - the BBOX_DETECTOR socket type lives there, so install it first or this node won't have anything to plug in.

The gotcha to know

If nothing is detected, the node returns a 1×1 black image rather than an error. That's deliberate, but it's a trap if you're not expecting it: a downstream node happily consumes a black pixel instead of telling you your threshold is too high. Check the output dimensions before trusting it. And remember the dilation default - it changes what you see more than any other input.

CategoryVNCCS/detailing

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
bbox_detectorBBOX_DETECTOR
thresholdFLOAT0.500–1
dilationINT300-512–512
drop_sizeINT101–16384

Outputs (1)

NameTypeDescription
imagesIMAGE