MultiPose ▸ Coordinate Sampler
The SAM2 point generator hiding in a pose pack
- model
- images
- positive_coords
- negative_coords
- bbox
A pose pack whose third node doesn't output poses at all - it outputs point coordinates. MultiPose ▸ Coordinate Sampler reuses the same YOLO + ViTPose detection stack as the rest of the pack, but instead of rendering skeletons it spits out JSON lists of "positive" points (on the person) and "negative" points (off the person), plus bounding boxes. If you've seen the bundled example workflow, you know the target: it feeds SAM2-style point prompting so you can carve every person in a video out as its own mask. For multi-person footage, doing that by hand frame-by-frame is misery; this is the automation.
How it works
Per frame, YOLO finds every person (respecting the detect_multi_persons toggle). Then it samples:
- Positive points - by default (
positive_mode = "pose") it runs ViTPose to grab confident joints, filters them bypose_conf_threshold, interpolates between them, and enforces a minimum spacing so points stay on-body and evenly spread. Setpositive_mode = "bbox"and it skips ViTPose entirely, scattering points on a jittered grid inside the box - faster, cruder. - Negative points - sampled outside every detected bbox, so SAM2 knows what's background.
Everything is seeded, so the same inputs plus the same seed produce the same coordinates every run. That's the feature you want when you're iterating on prompts and don't want your masks dancing around between runs.
Inputs and outputs
The three inputs that matter for a beginner:
positive_points(default 3) andnegative_points(default 5) - how many of each. SAM2 works fine with a few; more is rarely better.person_index--1(default) emits entries for every detected person per frame; a specific index pins you to one bbox.seed- deterministic replay, as above.
The rest (pose_conf_threshold, pose_jitter, positive_mode, detect_multi_persons) tune the sampling; the defaults are sane.
Outputs:
positive_coords/negative_coords(STRING) - JSON point lists. Withperson_index = -1they flatten to[{"x":..,"y":..,"person_index":p,"image_index":i}, ...]so downstream nodes expecting a plain point list still work; a single person gets a bare[{"x":..,"y":..}, ...].bbox(BBOX) - per-frame(x0, y0, x1, y1)tuples, ordered to match theperson_indexvalues.
Where it fits
The pack's example workflow is the tell: VHS loads a video, this node samples points, a CoordinatePlotter shows them, and the positive/negative JSON plus bbox go into SAM2Segmentation to pull per-person masks. If you're building anything that needs "which pixels are the person, every frame," this is the point generator. It's also handy if you want textual/JSON annotations of where everyone is rather than rendered canvases.
Gotchas
With person_index = -1, the negative points are the same set duplicated per person (so each person's entry aligns). That's by design, not a bug. If you pick positive_mode = "pose" but your POSEMODEL handle lacks the ViTPose runtime, it raises rather than silently downgrading - load both models in MultiPose ▸ ONNX Loader first. And like the rest of this brand-new pack, expect the YOLO detection pass to be the slow part on CPU; run the loader on CUDA if you have it.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model | POSEMODEL | — | |
| images | IMAGE | — | |
| positive_points | INT | 31–50 | — |
| negative_points | INT | 51–100 | — |
| person_index | INT | -1-1–32 | — |
| seed | INT | 00–2147483647 | — |
| detect_multi_persons | BOOLEAN | true | — |
| positive_mode | COMBO | pose | 2 options: pose, bbox |
| pose_conf_threshold | FLOAT | 0.300–1 | — |
| pose_jitter | FLOAT | 5.00–50 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| positive_coords | STRING | — |
| negative_coords | STRING | — |
| bbox | BBOX | — |