Nodes/ComfyUI_Fill-Nodes/FL Scan Video Detections
ComfyUI Node

FL Scan Video Detections

Person masks and tracked boxes, per frame

By filliptm·Created 3 years ago·Updated a day ago· 641
FL Scan Video Detections
  • images
  • person_detector
  • face_detector
  • hand_detector
  • subject_masks
  • detections
threshold0.35

The scan pipeline's front end. FL Scan Video Detections runs your own Impact Pack detectors over every frame of a video and hands back two things the scan effect needs: a per-frame subject mask, and a set of tracked boxes.

It doesn't detect anything itself. person_detector takes a SEGM_DETECTOR - the segmented-detector output from Impact Pack's detector provider nodes, our most established detection stack in this ecosystem - and face_detector and hand_detector optionally take BBOX_DETECTORs. So you're using whatever YOLO-family model you already have wired up, at whatever confidence you trust. threshold (default 0.35) is passed straight to those detectors.

The description is careful about claims, and rightly so: "Produces person masks and nearest-neighbor tracked boxes; no fabricated object labels." It labels detections person, face or hand according to which socket they came from - it does not classify what it found.

What comes back

subject_masks is a MASK batch, one mask per frame, built by taking each person segment's cropped mask and max-compositing it into the frame at its crop region. Multiple people in one frame get merged into a single mask - so this is "where are the people", not "who is person three".

detections is an FL_SCAN_TRACKS object carrying width, height, and a list of per-frame detections with label, box, confidence and an id.

The tracking is deliberately simple, and knowing how it works tells you exactly when to distrust it. For each frame, each detection's box centre is matched to the previous frame's detections of the same label - nearest neighbour, and only if the distance is under 18% of the frame width. Match closer than that and it inherits the id; otherwise it becomes a new track. There's no motion model, no appearance matching, nothing sophisticated. Fast movement, a cut, or two people crossing will break a track and mint a new id.

That's fine for what the scan effect uses it for, which is loosely following subjects so HUD boxes and pose overlays land somewhere sensible. It's not fine for anything analytical. If you need stable identity across a shot, use a real tracker.

Install

Standard:

cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes

Restart, and you'll need ComfyUI-Impact-Pack installed as well - this node consumes its detector types, so without it the sockets won't accept anything. The pack's own requirements are long (OpenGL, audio, PDF, API clients), and this node is OpenCV and numpy underneath.

Where people get burned

Threshold tuning is real work. 0.35 works for clear subjects. Dark, crowded or motion-blurred footage needs a lower threshold, and lowering it invites false positives. Check the masks on a handful of frames before you commit to a full render - a wrong detection propagating through a scan render is expensive to discover at the end.

The mask is a union. One mask per frame covering all detected people. If your effect needs per-person separation, this isn't the node - you'd want the detection list and your own splitting.

Track ids are cosmetic. Use them for cursor targeting and overlays, not for counting people or measuring trajectories. The 0.18 × width gate is generous enough to allow a swap when two subjects pass each other.

RAM on long clips. Every frame's detections accumulate into one object, and a busy scene can get big. For very long videos, split into sections and run the detection per section - which is also what the pack's shot-based analysis pattern expects anyway.

Category🏵️Fill Nodes/VFX

Inputs (5)

NameTypeDefaultDescription
imagesIMAGE
person_detectorSEGM_DETECTOR
thresholdFLOAT0.350.05–1
face_detectoroptBBOX_DETECTOR
hand_detectoroptBBOX_DETECTOR

Outputs (2)

NameTypeDescription
subject_masksMASK
detectionsFL_SCAN_TRACKS