Usage: bash run_steps_scene_pipeline.sh [options] [step ...] Options: --video PATH Input video path (overrides auto path from --name) --video-root DIR Video root for auto path from --name (default: /mnt/einsia/aws01-nvme/einsia-shared/homes/gaomingju/jiayin/OVOW/examples/videos) --name NAME Scene name, e.g. v9 -> scene9/v9.mp4 under --video-root --out DIR Output root (default: outputs) --workspace-root DIR Force workspace root (overrides auto workspace under --out) --new-workspace 0|1 Force create new workspace for this name/video (auto: step-1=>new, otherwise reuse latest) --run-dir DIR Override run dir for steps >= 7 --backend NAME Motion324 backend (default: hunyuan) --deform-backend NAME Deform backend: motion324 (default: motion324) --recon-backbone NAME Static/rigid 3D backend for step 6: config|legacy|trellis2 (default: uplegacy) --batch-config PATH Batch config JSON for step 6/tracker settings (default: /mnt/einsia/aws01-nvme/einsia-shared/homes/gaomingju/jiayin/OVOW/engine/config/batch_config_example_legacy.json) --qwen-backend NAME Qwen labels backend: api|local (default: local) --qwen-api-model M Qwen API model for step 1 (default: qwen3.5-plus) --qwen-api-model-list L Qwen API fallback model list for step 1 (default: qwen3.5-flash-2026-02-23,qwen3.5-plus-2026-02-15,qwen3.5-flash,qwen3.5-122b-a10b,qwen3.5-35b-a3b) --qwen-api-base-url U Qwen API base URL (default: https://dashscope.aliyuncs.com/compatible-mode/v1) --qwen-api-key-env V Env var name for Qwen API key (default: DASHSCOPE_API_KEY) --qwen-label-category-enable 0|1 Master switch for Qwen label category mode (default: 1) --qwen-label-category-mode MODE Category mode: legacy|single|dual (default: single) --qwen-label-category-strict 0|1 Strict category validation for selected mode (default: 1) --qwen-label-category-model M API model for selected category mode (default: --qwen-api-model) --qwen-max-new-tokens N Max tokens for Qwen step-1 label/category call (default: 2048) --qwen-category-pass 0|1 [Deprecated] old dual-pass switch (default: 0) --qwen-category-pass-strict 0|1 [Deprecated] strict for old dual-pass switch (default: 1) --qwen-category-api-model M [Deprecated] old dual-pass model override (default: --qwen-api-model) --qwen-category-max-new-tokens N [Deprecated] max tokens for old dual-pass call (default: 2048) --sam-min-obj-area N Minimum SAM3 mask area to keep instance (default: 200) --add-labels L Step 1.4 labels to append to *_labels.json before SAM3 masks (comma-separated) --add-label-category C Category for --add-labels: static|rigid|deform (default: static) --add-label-overwrite-category 0|1 Overwrite category for existing labels in step 1.4 (default: 0) --prune-labels L Step 1.5 labels to remove from *_labels.json (comma-separated) --merge-mask-labels A,B Step 2.5 merge all masks from exactly two labels into one object --merge-mask-category C Step 2.5 merged object category: static|rigid|deform --merge-mask-output-label L Step 2.5 merged label name (default: " with ") --plane-num N Number of candidate planes for alignment fitting (default: 5) --plane-bottom X Bottom-percent used to score plane candidates against object meshes (default: 0.03) --gravity-sign-mode MODE Plane-normal sign mode: camera_up|object_region|auto|none (default: object_region) --gravity-sign-samples N Frames sampled for object-region gravity sign voting (default: 5) --physics-enable 0|1 Master switch for rigid/deform physics and physics-aware step 18 render (default: 0) --physics-bottom X Bottom vertex fraction used by physics contact projection (default: 0.10) --physics-iters N Contact projection iterations per frame (default: 2) --physics-max-drop X Max downward settle distance in physics projection (default: 1.0) --physics-allow-down 0|1 Allow objects to move downward during physics settle (default: 1) --physics-contact 0|1 Enable object-object contact during physics settle (default: 1) --continue-on-error 0|1 Continue running remaining steps after a step fails (default: 1) --rerun-objects OBJ1,OBJ2 Object names to rerun in step 16 (default: empty=auto) --rerun-only-failed 0|1 In step 16 rerun failed objects from report when --rerun-objects is empty (default: 1) --rerun-anchor-frame N In step 16 override anchor frame for re-generation/scale (default: -1; -1=use batch config) --rerun-ref-map PATH In step 16 provide external ref images for object mesh generation --ref-image PATH Step 16 shortcut for single object external image (requires --rerun-objects OBJ) --flux Step 16: use latest image from RUN_DIR/objects/fluxoutput//... as ref image (supports one or more --rerun-objects) --qwen-model PATH Local Qwen model path/HF ID (auto-switches step 1 to local unless --qwen-backend is set) --lock-static 0|1 [Compat] static lock switch: 1->full, 0->off (default: 1) --lock-static-mode MODE Static lock mode: full|rot_only|off (default: full) --deform-force-poses 0|1 Recompute deform poses in step 8 (default: 1) --deform-force-scale 0|1 Recompute deform scale in step 8 (default: 1) --deform-render-video 0|1 Render deform pose video in step 8 (default: 1) --deform-export-video-frames 0|1 Export deform pose preview frames to pose_result/normal_video_frames in step 8 (default: 0) --deform-lock 0|1 Lock deform object world/camera poses after step 8 pose solve (default: 0) --deform-lock-frame N Lock deform to frame N in step 8 (default: -1; -1=auto max-mask frame) --deform-lock-mesh 0|1 Freeze deform world mesh sequence to lock frame in step 8 (default: 0) --motion-normalize-zoom true|false|1|0 Enable zoom-normalized masked videos in step 3 (default: 1) --motion-normalize-target-ratio R Target object ratio in step 3 normalize mode (default: 0.65) --motion-normalize-smooth N Temporal smoothing window in step 3 normalize mode (default: 7) --motion-normalize-out-size N Output side size in step 3 normalize mode (default: 512) --step18-unlit-texture 0|1 Render step 18 with unlit emission material (disable PBR shading, default: 1) --step18-deform-frames-dir DIR Step 18 deform frame source dir (world_mesh_frames|world_mesh_frames_physics, default: world_mesh_frames_physics) --hdr PATH|auto Step 18 HDR EXR/HDR world lighting (use auto for RUN_DIR/lighting/scene_intrinsic_hdr.exr) --flux-obj-name OBJS Object name(s) under RUN_DIR/objects for step 19 (single or comma-separated) --flux-mode MODE Step 19 mode: amodal|view (default: amodal) --flux-seed N Step 19 seed for FLUX generation (default: 1234) --flux-width N Step 19 output width (default: 518) --flux-height N Step 19 output height (default: 518) --flux-match-image-size V Step 19 match image size index (e.g. 0) or none (default: none) --flux-use-rgb-crop-ref 0|1 Step 19 pass both masked crop and original RGB crop as references (default: 0) --flux-gpu ID Optional CUDA_VISIBLE_DEVICES override for step 19 --flux-prompt-amodal T Optional custom prompt for step 19 amodal mode --flux-prompt-view T Optional custom prompt for step 19 view mode --help Show this help Steps: 1 Qwen labels 1.4 Add labels JSON before SAM3 masks 1.5 Prune labels JSON before SAM3 masks 2 SAM3 masks 2.5 Merge two label masks into one object label 3 Build Motion324 deform inputs 4 Run Motion324 for deform objects 5 Scan Motion324 outputs 6 Run pipeline for static+rigid (exclude deform) 7 Fit plane + rigid/static physics 8 Deform scale+pose + build deform world mesh sequence 9 Deform physics sync (frame mesh) 10 Export unified scene mesh frames (static+rigid+deform) 11 Export static+rigid GLB (respects static lock mode) 12 Export static+rigid physics GLB 13 Export full-scene GLB pre-physics (rigid/static + deform animation, no-plane, UV-seam-safe) 14 Export full-scene GLB physics (rigid/static + deform animation, UV-seam-safe) 15 Generate intrinsic HDR EXR from the input video first frame 16 Rerun failed step-6 objects and refresh scene point clouds 17 Render full-scene + deform white-model video (left white model / right RGB) 18 Render full-scene + deform textured video (left textured / right RGB) 19 FLUX.2 single-reference edit for one object (amodal or view) 20 Render mixed video (left white model / right textured) 21 Split a video into frame images (PNG) Example: bash run_steps_scene_pipeline.sh --video /mnt/einsia/aws01-nvme/einsia-shared/homes/gaomingju/jiayin/OVOW/examples/videos/scene3/v3.mp4 1 2 3 bash run_steps_scene_pipeline.sh --name demo1 --add-labels book --add-label-category rigid 1.4 2 bash run_steps_scene_pipeline.sh --name demo1 --prune-labels sandbox 1.5 2 bash run_steps_scene_pipeline.sh --name demo1 --merge-mask-labels robot,watering_can --merge-mask-category deform --merge-mask-output-label "robot with watering_can" 2.5 3 4 bash run_steps_scene_pipeline.sh --name v9 1 2 3 CUDA_VISIBLE_DEVICES=1 bash /mnt/einsia/aws01-nvme/einsia-shared/homes/gaomingju/jiayin/OVOW/engine/run_steps_scene_pipeline.sh --name v15 --run-dir /mnt/einsia/aws01-nvme/einsia-shared/homes/gaomingju/jiayin/OVOW/outputs/video_pipeline_20260222_185124/v15 16 bash run_steps_scene_pipeline.sh --video /mnt/einsia/aws01-nvme/einsia-shared/homes/gaomingju/jiayin/OVOW/outputs/video_pipeline_20260227_211917/indoor2/indoor2.mp4 --run-dir /mnt/einsia/aws01-nvme/einsia-shared/homes/gaomingju/jiayin/OVOW/outputs/video_pipeline_20260227_211917/indoor2 --rerun-objects nightstand_01 --flux 16 CUDA_VISIBLE_DEVICES=2 bash /mnt/einsia/aws01-nvme/einsia-shared/homes/gaomingju/jiayin/OVOW/engine/run_steps_scene_pipeline.sh --video /mnt/einsia/aws01-nvme/einsia-shared/homes/gaomingju/jiayin/OVOW/examples/videos/scene25/indoor2.mp4 --run-dir /mnt/einsia/aws01-nvme/einsia-shared/homes/gaomingju/jiayin/OVOW/outputs/video_pipeline_20260227_211917/indoor2 --flux-obj-name pillow_01 --flux-mode amodal 19 bash run_steps_scene_pipeline.sh --video /path/to/any_video.mp4 21