Nodes/ComfyUI-ProportionChanger/Mascot BBox Detector
ComfyUI Node

Mascot BBox Detector

Finding the head, hands, and feet inside a mascot suit

By grmchn·Created about a year ago·Updated 3 months ago· 102
Mascot BBox Detector
  • mascot_bbox_model
  • image
  • bboxes
threshold0.30
class_filterall
max_detections7

If you've ever tried to run a normal pose detector on a mascot costume - a cartoon character suit with a giant head and stubby gloves - you know it fails in the funniest way possible. DWPose was trained on humans, so a person in a mascot suit reads as a blob with three heads. Mascot BBox Detector exists to solve that exact problem: it finds the bounding boxes for the mascot's individual parts - full body, head, body, and each hand and foot - so the rest of the pack (and you) know where things actually are.

It's the detection half of the pack's mascot pipeline. You feed it an image plus the model handle from DownloadAndLoadMascotBBoxModel, and it spits out boxes as the BOUNDING_BOX type - the same box format comfy-core's detection nodes speak, so the output can feed bbox-based cropping, region-aware generation, or a part-based workflow.

How it works

Under the hood this is a RTMDet-style ONNX model pulled from grmchn/mascot-pose-detect on HuggingFace, run through ONNXRuntime. The image gets letterboxed, the model returns class logits and box distances, and the node decodes those into pixel-space boxes, runs NMS to drop duplicates, and sorts by confidence. It's the same bbox model the Mascot Pose Detector uses internally to find the body ROI before running keypoint detection - this node just exposes it standalone for bbox-only jobs.

The inputs that matter

  • mascot_bbox_model - the output of (Down)Load Mascot BBox Model. There's no way around it: you need that loader wired up first, or this node has nothing to run.
  • threshold (default 0.3) - confidence cutoff. Drop it to 0.2 if parts are being missed on busy images; raise it if you're getting junk boxes.
  • class_filter (default all) - the genuinely useful one. The model knows full, head, body, hand_left, hand_right, foot_left, foot_right, so you can ask for just the head or just the feet.
  • max_detections (default 7) - caps how many boxes come back, top-scoring first.

The one output, bboxes, is the list of BOUNDING_BOX results, one per input frame.

Install

It ships in the ComfyUI-ProportionChanger pack, so install once, get all the nodes:

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

Then restart ComfyUI (or install via ComfyUI Manager by searching "ComfyUI-ProportionChanger" and doing the same restart). The ONNX model itself downloads automatically on first run into ComfyUI/models/mascot_body_detect/, so make sure your machine can reach HuggingFace. The key requirement for this node specifically is onnxruntime - if you'd rather use CUDA, the README suggests onnxruntime-gpu instead.

Gotchas

The classic one is plugging in an image but forgetting the model loader - you'll get a red socket and no explanation. The other trap is threshold: at 0.3 a headless side view of a mascot often drops the far hand and foot, which matters if you're using the boxes to crop parts for a LoRA dataset or a per-part generate pass. When in doubt, run it with class_filter on all first and look at what comes back before you filter anything.

CategoryProportionChanger

Inputs (5)

NameTypeDefaultDescription
mascot_bbox_modelMASCOT_BBOX_MODELOutput of (Down)Load Mascot BBox Model
imageIMAGE
thresholdFLOAT0.300–1
class_filterCOMBOall8 options: all, full, head, body, hand_left, hand_right, +2
max_detectionsINT71–100

Outputs (1)

NameTypeDescription
bboxesBOUNDING_BOX