Nodes/SAM3D Cam Shot Toolkit/Cam Shot Toolkit: Process Image
ComfyUI Node

Cam Shot Toolkit: Process Image

Turning one photo into a rigged 3D human, the honest version

By EnviralDesign·Created 5 months ago·Updated 12 days ago· 1
Cam Shot Toolkit: Process Image
  • model
  • image
  • mask
  • person_detector
  • mesh_data
  • skeleton
  • debug_image
bbox_threshold0.80
inference_typefull
person_index-1

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:

  1. If a person_detector is connected (from Load SAM3 Person Detector), it uses that to find people.
  2. Otherwise, if a mask is connected, it derives crop boxes from the mask's components.
  3. 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..N picks one person by index. The index order is left-to-right, and the debug_image output 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), or hand (hands only). If you only care about the torso for camera alignment, body saves 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.

CategoryCamShotToolkit/processing

Inputs (7)

NameTypeDefaultDescription
modelSAM3D_MODELLoaded SAM 3D Body model from Load node
imageIMAGEInput image containing human subject
bbox_thresholdFLOAT0.800–1Confidence threshold for human detection bounding boxes
inference_typeCOMBOfullfull: body+hand decoders, body: body decoder only, hand: hand decoder only
person_indexINT-1-1–100-1 selects all detected people. 0..N selects one detected person by index.
maskoptMASKOptional segmentation mask to guide reconstruction
person_detectoroptSAM3D_PERSON_DETECTOROptional SAM3 person detector for multi-person images

Outputs (3)

NameTypeDescription
mesh_dataSAM3D_OUTPUT
skeletonSKELETON
debug_imageIMAGE