Cam Shot Toolkit: Process Image
Turning one photo into a rigged 3D human, the honest version
- model
- image
- mask
- person_detector
- mesh_data
- skeleton
- debug_image
This is the node that does the actual work. Load SAM3D Model just prepares the weights; Process Image runs them. Give it a photo of a human and it returns a 3D mesh of that person - body, hands, face - plus the joint skeleton, pose parameters, and a camera estimate. Everything downstream in this pack (Render Offset View, Save Meshes) eats this node's output. If you've seen the community's reaction to SAM 3D Body, you already know the one caveat: the mesh is a fitted parametric human model, not a perfect photographic likeness. It's "mannequin standing in for your subject," not "clone." For calibrated camera work - which is exactly what this pack is for - that's completely fine.
How it works
The reconstruction needs to know where in the frame the person is before it fits the model. The node resolves that in order:
- If a
person_detectoris connected (from Load SAM3 Person Detector), it uses that to find people. - Otherwise, if a
maskis connected, it derives crop boxes from the mask's components. - Otherwise it runs its own built-in torchvision person detector as a fallback.
Each detected box becomes a crop, the SAM 3D Body model runs on it, and the output carries vertices, faces, 3D joint positions and rotations, shape/pose parameters, and the predicted camera. One image, one mesh_data blob, but potentially many people inside it.
The two settings that change the experience most:
- person_index -
-1(default) reconstructs all detected people and bundles them into the output;0..Npicks one person by index. The index order is left-to-right, and thedebug_imageoutput labels each box with its number, so that's how you figure out which index is who. - inference_type -
full(default, body + hand decoders),body(body only, faster), orhand(hands only). If you only care about the torso for camera alignment,bodysaves you time.
bbox_threshold (default 0.8) is the detection confidence cutoff - lower it to 0.6–0.7 if a person in a weird pose isn't being found. And the optional mask input is the escape hatch when detection is fighting you: paint a rough mask in any masking tool, wire it in, and reconstruction is guided to exactly what you selected.
Outputs and what they wire into
- mesh_data (SAM3D_OUTPUT) - the star. Feeds Render Offset View for camera work and Save Meshes (GLB) for export.
- skeleton (SKELETON) - joint hierarchy; optional input to Save Meshes for better rigging, and useful if you're scripting pose extraction.
- debug_image - the source photo with detection boxes and index numbers drawn on. Keep it in a Preview node while you tune
person_index; it's the difference between guessing and knowing.
Installation and the honest warnings
Standard pack install - Manager search "Cam Shot Toolkit", or:
cd ComfyUI/custom_nodes
git clone https://github.com/EnviralDesign/sam3d-body-comfyUI-camshottoolkit
python -m pip install -r sam3d-body-comfyUI-camshottoolkit/requirements.txt
Restart. Two things bite people here. First, the first run downloads the ~2.8 GB body model if the Load node hasn't already, and the node will error with "No people detected" if the fallback detector comes up empty - lower bbox_threshold, wire in a mask, or accept that a heavily cropped weird pose genuinely needs a detector. Second, don't expect real-time: it's a DINOv3-ViT-H backbone doing single-image 3D reconstruction, so each person takes real seconds to minutes depending on your GPU. That's not a bug; it's the price of the geometry.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model | SAM3D_MODEL | Loaded SAM 3D Body model from Load node | |
| image | IMAGE | Input image containing human subject | |
| bbox_threshold | FLOAT | 0.800–1 | Confidence threshold for human detection bounding boxes |
| inference_type | COMBO | full | full: body+hand decoders, body: body decoder only, hand: hand decoder only |
| person_index | INT | -1-1–100 | -1 selects all detected people. 0..N selects one detected person by index. |
| maskopt | MASK | Optional segmentation mask to guide reconstruction | |
| person_detectoropt | SAM3D_PERSON_DETECTOR | Optional SAM3 person detector for multi-person images |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| mesh_data | SAM3D_OUTPUT | — |
| skeleton | SKELETON | — |
| debug_image | IMAGE | — |