Openpose Keypoint Extractor
Crop the exact body part you want, from the pose you already computed
- pose_keypoint
- x
- y
- width
- height
OpenPose Keypoint Extractor does one small thing, and it does it well: it takes the POSE_KEYPOINT output from the OpenPose/DWPose estimator in comfyui_controlnet_aux and hands you back an x, y, width, height bounding box around whatever part of the skeleton you ask for. Feed it keypoints 2, 3, 4 and it boxes the right arm. Give it 0, 14, 15, 16, 17 and you get a head/face box. No extra models, no image input - it's pure math over the pose data you're already generating.
It was born from a real pain point. Someone on r/comfyui asked for a detector that "understands anatomy" - every model they tried could find faces and hands but had no concept of a right arm or a torso. The author (hughescr) pointed out that OpenPose keypoints already encode that anatomy, then made the node because no handy tool existed to turn them into a usable box. That's the niche: whenever you want a specific body part's region rather than a whole person.
How it works
Under the hood it's tiny. The POSE_KEYPOINT object is a list of detected people, each with a flat pose_keypoints_2d array of x, y, confidence triplets - 18 body keypoints in the standard OpenPose/COCO ordering, with coordinates normalized to 0–1 relative to the image. The node filters that list down to the indices you typed, keeps only points whose confidence meets min_confidence, takes the min/max, and scales the result back to pixels using the width and height you supplied. Four INT outputs, that's the whole thing. The source is a single ~90-line Python file with no dependencies.
The inputs that actually matter
Four of the five required inputs are worth touching:
pose_keypoint- wire in thePOSE_KEYPOINToutput from the OpenPose Pose or DWPose node in comfyui_controlnet_aux. It's a custom type, so that pack needs to be installed or the socket won't exist.points_list- the comma-separated keypoint indices you want boxed, e.g.2,3,4. This one has a trap: the default is empty, and an empty list crashes the node with aValueError. Always enter at least one number. The numbering follows OpenPose's docs: 0 nose, 1 neck, 2–4 right shoulder/elbow/wrist, 5–7 left arm, 8–13 hips/legs, 14–17 eyes and ears.min_confidence- defaults to 0.5; keypoints below it are ignored. If a limb is occluded and its points get filtered out entirely, the node falls back to returning the full image(0, 0, width, height)instead of a garbage box - so dropping this to ~0.3 can salvage a box where nothing passes the bar.person_number- which detected person to box, starting at 0. Bump it for multi-person images.
Wiring the output
The four INTs feed any node that takes a bounding box - core ComfyUI's Image Crop is the obvious first stop, and from there you can do targeted inpainting, a focused img2img pass to fix a hand, or face restoration on a head crop. The one gotcha the README flags: keypoints sit inside the limb (center of wrist, middle of shoulder), so a tight box shears the edges off arms and hands. Plan on padding the box out by some margin downstream.
Install
No models, no requirements.txt, no build step - it's pure Python and installs in seconds. Via ComfyUI Manager, search "OpenPose Keypoint Extractor" and hit install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/hughescr/ComfyUI-OpenPose-Keypoint-Extractor
Restart ComfyUI after either. The real dependency is upstream: comfyui_controlnet_aux, which drags in ONNX models and onnxruntime. That pack is standard for anyone doing pose ControlNet, but if you don't have it, this node has nothing to plug into. It's a niche utility - not something you install for its own sake, but when you need a body-part box it's the difference between a two-minute hack and an afternoon.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| pose_keypoint | POSE_KEYPOINT | — | |
| image_width | INT | 0–16384 | — |
| image_height | INT | 0–16384 | — |
| points_list | STRING | — | |
| min_confidence | FLOAT | 0.500–1 | — |
| person_numberopt | INT | 0 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| x | INT | — |
| y | INT | — |
| width | INT | — |
| height | INT | — |