Nodes/DOGMA Nodes/DOGMA v44 High-Recall Region Crops
ComfyUI Node

DOGMA v44 High-Recall Region Crops

Same node, tuned to miss nothing

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA v44 High-Recall Region Crops
  • image
  • masks
  • crops
  • crop_masks
  • stitch
  • info
category
kind

DOGMARegionCropsV44 is v43 with the thresholds loosened and the grouping widened, and the name spells out the tradeoff: high recall. Fewer objects escape the net. More crops, and more sampler calls, and a slightly higher chance of including a junk detection.

If you're watching small distant instances get dropped between your mask stage and your crops, this is the node that fixes it, and the fix is three numbers.

What actually changed

Components are found at a lower threshold. v43 flood-fills at 0.26 confidence for objects and 0.24 for structures; v44 drops that to 0.10 for cars, buses, trucks and people, 0.15 for everything else, and 0.16/0.18 for SURFACE/STRUCTURE. On a fuzzy SAM mask at the edge of what the model is confident about, that's the difference between a distant pedestrian existing and not existing.

The component search runs at 1024px, not 720. The flood fill still works on a downsampled copy for speed, just a less aggressive one, so adjacent small objects are less likely to be smeared into one blob. The minimum surviving box also drops from 4px to 3px.

Grouping is wider. Cars: up to 3 instances per crop, 28 groups, 115px gap, 128px context, 1664px long side. Buses and trucks: 2 instances, 16 groups, 130px gap, 144px context, 1792px long side. People: 4 instances, 24 groups, 100px gap, 112px context, 1536px long side. Everything else: 3/16/115/128/1664.

Compare that with v43's 20/16/12 group caps and it's clear what the author was chasing: a frame with a lot of small objects should produce a lot of small crops rather than a handful of mixed ones.

The mechanism otherwise

Unchanged from v43 and worth restating because it's the point of the family. kind selects the behaviour. OBJECT explodes each disconnected component, deduplicates at ≥0.72 IoU (so car and automobile on the same car collapse to one job), greedily groups within the category's gap, and rebuilds a local mask per group, cropped with context and resized so the model's long side stays inside the cap. STRUCTURE takes the union, keeps the four largest true connected regions at a 2048px long side with 160px context. SURFACE keeps the two largest with 128px context. Neither STRUCTURE nor SURFACE ever manufactures a grid - that's stated in the source and it's the rule that keeps a sky repair from becoming a tile mosaic.

Inputs stay four: image, masks, category, kind. Outputs stay four: crops, crop_masks, stitch, info, with stitch carrying x, y, width, height, noop and kind so the matching v44-era stitch can vary its blend by region type. A none category or an empty mask stack returns a 256px centred no-op crop.

Install

ComfyUI Manager → search DOGMA Nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
# restart ComfyUI

No dependencies beyond PyTorch. The pack ships ~40 of these versioned variants in one module with no documentation in the README, so pick your versions as a set and stay in that set.

Gotchas

24–28 crops is a long render. Each item in crops is a separate pass through your sampler. On base 9B at 20 steps you're looking at minutes per image. Trim max_crops on the inventory side, or accept v44 as the "hero shot" setting rather than the batch setting.

Lower thresholds catch noise. A 0.10 confidence component can be a compression artefact touching the mask edge. Duplicate suppression handles the obvious repeats; if you're seeing crops of nothing, the fix is a cleaner mask from the segmenter, not a knob on this node.

It's still single-image. image[:1] - one frame per execution.

CategoryDOGMA/v44

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
masksMASK
categorySTRING
kindSTRING

Outputs (4)

NameTypeDescription
cropsIMAGE
crop_masksMASK
stitchDOGMA_STITCH
infoSTRING