File size: 2,493 Bytes
ac71c07 c0acb32 ac71c07 c0acb32 ac71c07 f4fbc05 9f38809 f4fbc05 c0acb32 ac71c07 c0acb32 6b0f4c6 c0acb32 0c05e55 6b0f4c6 c0acb32 9a3b4f8 c0acb32 9a3b4f8 c0acb32 1bbfe4e c0acb32 9a3b4f8 c0acb32 7b3c6c0 1bbfe4e c0acb32 1bbfe4e 7b3c6c0 c0acb32 6b0f4c6 c0acb32 29c2c7a c0acb32 ac71c07 c0acb32 29c2c7a c0acb32 ac71c07 c0acb32 ac71c07 c0acb32 29c2c7a c0acb32 ac71c07 c0acb32 29c2c7a c0acb32 6b0f4c6 c0acb32 6b0f4c6 c0acb32 ac71c07 c0acb32 ac71c07 c0acb32 ac71c07 c0acb32 2f8d0cb c0acb32 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | # Intro
This repo has three parts:
1) **prompt2gloss**: text prompt -> gloss sequence
2) **gloss2pose**: gloss -> pose video (skeleton)
3) **pose2video**: pose video -> rendered signer video (One-to-All 1.3B, with refine)
<video controls width="100%">
<source src="https://huggingface.co/datasets/SignerX/StableSigner/resolve/main/asset/teaser.mp4" type="video/mp4">
</video>
# Quickstart
## 0) Env (one-to-all)
```bash
cd /research/cbim/vast/sf895/code/SignerX-inference-webui/plugins/StableSigner
conda env create -f env/one-to-all.yml
conda activate one-to-all
```
## 1) prompt2gloss (optional)
```bash
python pipeline01_prompt2gloss.py --prompt "good morning afternoon"
```
This prints a gloss sequence you can pass to gloss2pose.
## 2) gloss2pose (unchanged)
```bash
python pipeline02_gloss2pose.py --gloss "good morning afternoon" --scale-y 1.4 --scale-x 1.3 --npz-interpolation 20 --width 512 --height 768 --fps 25 --hide-torso-lines true --ref-image-path ref_img_dict/01.jpeg
or
python gloss2pose.py --gloss "where is my cat" --scale-y 1.5 --scale-x 1.5 --npz-interpolation 20 --width 512 --height 512 --fps 25 --hide-torso-lines false --draw-style openpose
```
This creates a pose video in `generated_pose_video/`.
## 3) pose2video + refine (One-to-All, required)
`pipeline03_pose2video.sh` now runs **two stages**:
- **Stage1**: direct pose2video (inference_1.3b.py)
- **Stage2**: refine/replace (infer_refine.sh) using Stage1 output
```bash
./pipeline03_pose2video.sh
```
Defaults are inside the script. You can override by env vars:
```bash
POSE_VIDEO=generated_pose_video/HELLO_GOOD_MORNING_20251215_142658_openpose_style.mp4 \
REF_IMAGE=ref_img_dict/man.jpg \
GPU_ID=1 \
REF_CFG=2.5 \
POSE_CFG=1.5 \
./pipeline03_pose2video.sh
```
# Refine-only (manual)
If you already have a video (or frames dir), run refine directly:
```bash
cd One-to-All-Animation/video-generation
./infer_refine.sh --input /path/to/video_or_frames_dir --ref /path/to/ref.jpg --gpu 1
```
- If `--input` is a **frames directory**, it will auto-merge to a temp video (default fps=25).
- If `--input` is a **video file**, it uses the source FPS.
# Outputs
- Pose video: `generated_pose_video/*.mp4`
- Stage1 output: `generated_sign_video/YYYY-MM-DD_ref_<ref_cfg>_pose_<pose_cfg>/...mp4`
- Refine output: `generated_sign_video_refine/...mp4`
# Notes
- The One-to-All pipeline uses the `one-to-all` conda env.
- If you change `REF_CFG/POSE_CFG`, keep the same values in both stages.
|