You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Load the DINOv3 backbone from a pre-built TensorRT engine instead of running it in PyTorch. Saves ~40-50ms/frame on the backbone alone. The engine file must exist at checkpoints/sam-3d-body-dinov3/backbone_trt/backbone_dinov3_fp16.engine.
USE_COMPILE
1
Apply torch.compile to the backbone (active when USE_TRT_BACKBONE=0). Not used when TRT backbone is active, but harmless to leave on.
Decoder
Variable
Value
What it does
DECODER_COMPILE
1
Apply torch.compile to the body and hand decoders. Reduces decoder time from ~80ms to ~54ms on RTX 5090 Laptop.
COMPILE_MODE
reduce-overhead
The torch.compile mode. reduce-overhead minimises kernel launch overhead (best for small batches). Other options: default (safer), max-autotune (longer compile, marginally faster).
COMPILE_WARMUP_BATCH_SIZES
1
Comma-separated list of batch sizes to warm up during the compilation step. Setting this to 1 avoids compiling for batch sizes that never occur in practice, cutting warmup time.
BODY_INTERM_PRED_LAYERS
0,2
Which intermediate layers of the body decoder to run prediction heads on. The decoder has 3 layers (0, 1, 2). Using 0,2 skips layer 1, saving ~15ms/frame with minor accuracy loss. Using 0,1,2 is full accuracy.
PARALLEL_DECODERS
0
Whether to run body and hand decoders in parallel CUDA streams. Tested as slightly slower (4.84fps vs 5.5fps before reaching 14fps) due to CUDA graph conflicts. Keep at 0.
Person detection (YOLO)
Variable
Value
What it does
(CLI) --detector
yolo_pose
Uses YOLOv11 pose model for person detection and keypoint initialisation.
(CLI) --detector_model
yolo11m-pose.engine
The TRT-compiled YOLO engine. Using the engine instead of the .pt file saves ~20ms/frame.
Depth / FOV estimation (MoGe)
MoGe estimates the camera field-of-view when --fx is not provided. When --fx is provided, it still runs for depth conditioning but uses less compute.
Variable
Value
What it does
FOV_TRT
1
Run the MoGe depth encoder via TRT engine. Saves a few ms/frame. Requires checkpoints/moge_trt/moge_dinov2_encoder_fp16.engine.
FOV_FAST
1
Enable fast mode: skips some MoGe post-processing passes.
FOV_MODEL
s
Use the small MoGe model variant. Options: s (fast), b (balanced), l (accurate).
FOV_LEVEL
0
MoGe resolution level. 0 = coarsest/fastest, higher = finer depth map. Relevant mainly when depth conditioning is important; for body pose at 4-6 m, level 0 is sufficient.
Mesh / corrective shapes
Variable
Value
What it does
MHR_NO_CORRECTIVES
1
Skip corrective blend shapes in the MHR mesh. These are small per-joint deformations that improve mesh quality at extreme poses (e.g., elbow crease). Skipping saves ~3-5ms/frame. Skeleton joint positions are not affected.
GPU_HAND_PREP
1
Perform hand crop preprocessing on GPU instead of CPU. Saves a few ms when hands are present. With --inference_type body this has no effect since the hand decoder is skipped entirely.
Keypoint prompt
Variable
Value
What it does
SKIP_KEYPOINT_PROMPT
1
Skip feeding the 2D YOLO keypoints as a conditioning prompt into the decoder. This saves the cost of constructing the prompt token but may reduce robustness in difficult poses or partial occlusions.
Debug / safety
Variable
Value
What it does
DEBUG_NAN
0
Disable NaN checking in intermediate tensors. NaN checks add CPU synchronisation points that break async GPU execution. Always 0 in production.
CLI flags — what each one does
Flag
Value used
What it does
--inference_type
body
Skip the hand decoder entirely. No wrist-distal or finger joints are estimated. This is the single largest speed gain (~30% faster than full). Use full only if you need hand/finger motion data.
--fx
1371
Camera focal length in pixels. Providing this skips the MoGe-based FOV estimation and feeds a pinhole model directly. Accurate focal length improves the 3D position scale. For the test video shot on a specific phone, 1371 was calibrated.
--detector_model
.engine
Using the TensorRT YOLO engine instead of the .pt PyTorch model.
TensorRT engine specifications
YOLO pose engine
File: checkpoints/yolo/yolo11m-pose.engine
Size: ~42.6 MB
Input: 640×640, FP16
Batch: dynamic (built by Ultralytics export)
Architecture: sm_120 (Blackwell) — must rebuild on other GPUs