Piyush Tiwari commited on
Commit
932e31a
·
1 Parent(s): 30a7b8a

docs: detailed README with 2D/3D family map + Mermaid flow diagrams

Browse files
Files changed (1) hide show
  1. README.md +88 -37
README.md CHANGED
@@ -1,20 +1,58 @@
1
- # bytical-talk
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- **A smart-AI talking-head video system.** It pairs the fast [SyncTalk_2D](https://github.com/ZiqiaoPeng/SyncTalk_2D)
4
- lip-sync **renderer** with an LLM/embedding-driven **brain** that understands the
5
- script, adapts to any input video, and critiques its own output — so it *performs* a
6
- script instead of just reading it.
7
 
8
- > Research project. The renderer clones a real presenter from a short video; the
9
- > brain is the layer that makes the system behave like "actual AI" rather than a
10
- > fixed pipeline. Built to be extended (see the roadmap).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  ---
13
 
14
  ## Why this exists
15
 
16
- Vanilla lip-sync models take `(video, audio) → video`. That's a renderer, not
17
- intelligence. `bytical-talk` adds a reasoning layer on top:
18
 
19
  | Brain module | Input → Output | What it means |
20
  |---|---|---|
@@ -27,31 +65,43 @@ The renderer stays weight-safe and swappable; the brain is provider-agnostic
27
 
28
  ---
29
 
30
- ## Architecture
31
-
32
- ```
33
- script ──Director──▶ performance plan (emotion timeline + SSML)
34
-
35
- [your TTS: SSML ─▶ wav] (pluggable: Polly / Azure TTS / …)
36
-
37
- input video ─AutoConfig─▶ render settings
38
-
39
- render(video, wav, settings) ─▶ mp4 (SyncTalk_2D + improvements)
40
-
41
- SelfQC ─▶ pass? ──no──▶ adjust settings, re-render (bounded)
42
- yes
43
-
44
- final mp4 + QC report
 
 
 
 
 
45
  ```
46
 
47
- - **`bytical_talk/brain/`** `llm.py`, `director.py`, `autoconfig.py`, `qc.py`
48
- - **`bytical_talk/render/`** improved inference: One-Euro crop smoothing, feather
49
- paste-back, train/inference resize parity
50
- - **`bytical_talk/audio/`** — HuBERT features (better generalization to TTS voices)
51
- - **`bytical_talk/losses/`** — opt-in training upgrades (fixed VGG perceptual,
52
- mouth-weighted L1, PatchGAN, LPIPS)
53
- - **`upstream/synctalk2d/`** — the renderer, fetched by `scripts/fetch_upstream.sh`
54
- (not re-hosted)
 
 
 
 
 
 
 
55
 
56
  ---
57
 
@@ -117,16 +167,17 @@ print(plan.emotion_timeline()) # per-sentence emotion for the renderer
117
 
118
  ## Training a presenter (renderer)
119
 
120
- Any short, front-facing talking clip works (the Aarav clip and the Docker image in
121
- the sibling research folder are only test/packaging conveniences — nothing here
122
- depends on them). Standard SyncTalk_2D flow, then infer with the improvements:
123
 
124
  ```bash
125
- # preprocess + train (upstream), optionally with our opt-in losses / HuBERT audio
126
  python upstream/synctalk2d/data_utils/process.py dataset/<name>/<name>.mp4
127
  python bytical_talk/audio/hubert.py --wav_path dataset/<name>/aud.wav --num_frames <N> # for --asr hubert
128
  ```
129
 
 
 
 
130
  ---
131
 
132
  ## Roadmap
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: pytorch
4
+ tags:
5
+ - talking-head
6
+ - lip-sync
7
+ - synctalk
8
+ - 2d
9
+ - bytical
10
+ ---
11
+
12
+ # Bytical 2D Talk — Smart-AI Talking-Head System
13
 
14
+ > **Dimension: 2D** · Renderer: [SyncTalk_2D](https://github.com/ZiqiaoPeng/SyncTalk_2D) (mouth-inpaint lip-sync)
15
+ > **This repo = the 2D _application_** (renderer + LLM "brain"). Public.
 
 
16
 
17
+ A talking-head video system that pairs a **fast 2D lip-sync renderer** with an
18
+ **LLM/embedding-driven brain** that understands the script, adapts to any input
19
+ video, and critiques its own output so it *performs* a script instead of just
20
+ reading it.
21
+
22
+ ---
23
+
24
+ ## Where this sits in the Bytical family
25
+
26
+ Bytical has **two independent talking-head stacks** — a 2D one and a 3D one.
27
+ This repo is the **2D application**.
28
+
29
+ ```mermaid
30
+ graph TD
31
+ ROOT["Bytical Talking-Head Systems"]
32
+ ROOT --> TWOD["2D · SyncTalk_2D<br/>(mouth-inpaint lip-sync)"]
33
+ ROOT --> THREED["3D · Gaussian Splatting<br/>(TalkingGaussian / InsTaG)"]
34
+
35
+ TWOD --> A["bytical-2d-talk<br/>system + LLM brain · public"]
36
+ TWOD --> B["bytical-2d-synctalk-archive<br/>R&D + trained weights · private"]
37
+ THREED --> C["bytical-3d-head<br/>R&D checkpoints P1/P2 · private"]
38
+ THREED --> D["bytical-3d-instag-pretrain<br/>multi-identity pretrain · public"]
39
+
40
+ style A fill:#2563eb,color:#ffffff,stroke:#1e3a8a,stroke-width:3px
41
+ ```
42
+
43
+ | Repo | Dim | Role |
44
+ |---|:--:|---|
45
+ | **bytical-2d-talk** ← *you are here* | 2D | System + LLM brain (this repo) |
46
+ | bytical-2d-synctalk-archive | 2D | R&D lab notebook + trained weights/datasets |
47
+ | bytical-3d-head | 3D | Gaussian-Splatting R&D checkpoints (P1/P2) |
48
+ | bytical-3d-instag-pretrain | 3D | Multi-identity InsTaG pretrain weights |
49
 
50
  ---
51
 
52
  ## Why this exists
53
 
54
+ Vanilla lip-sync models take `(video, audio) → video`. That's a *renderer*, not
55
+ intelligence. `bytical-2d-talk` adds a reasoning layer on top:
56
 
57
  | Brain module | Input → Output | What it means |
58
  |---|---|---|
 
65
 
66
  ---
67
 
68
+ ## End-to-end flow
69
+
70
+ ```mermaid
71
+ flowchart LR
72
+ S["script"] --> DIR["Director<br/>(LLM)"]
73
+ DIR --> PLAN["performance plan<br/>emotion timeline + SSML"]
74
+ PLAN --> TTS["your TTS<br/>SSML → wav"]
75
+ V["input video"] --> AC["AutoConfig<br/>(LLM/CV)"]
76
+ AC --> CFG["render settings"]
77
+ TTS --> R["render(video, wav, settings)<br/>SyncTalk_2D + improvements"]
78
+ CFG --> R
79
+ R --> MP4["mp4"]
80
+ MP4 --> QC{"SelfQC<br/>pass?"}
81
+ QC -- "no (bounded retry)" --> AC
82
+ QC -- "yes" --> OUT["final mp4 + QC report"]
83
+
84
+ style DIR fill:#8b5cf6,color:#fff
85
+ style AC fill:#8b5cf6,color:#fff
86
+ style QC fill:#f59e0b,color:#111
87
+ style OUT fill:#16a34a,color:#fff
88
  ```
89
 
90
+ **Reading the diagram:** the *brain* nodes (purple) are LLM/CV steps that make
91
+ decisions; the render step is the SyncTalk_2D renderer; **SelfQC** (amber) closes
92
+ the loop by re-driving AutoConfig on failure, up to a bounded number of retries.
93
+
94
+ ---
95
+
96
+ ## Package layout
97
+
98
+ | Path | What it holds |
99
+ |---|---|
100
+ | `bytical_talk/brain/` | `llm.py`, `director.py`, `autoconfig.py`, `qc.py` |
101
+ | `bytical_talk/render/` | improved inference: One-Euro crop smoothing, feather paste-back, train/inference resize parity |
102
+ | `bytical_talk/audio/` | HuBERT features (better generalization to TTS voices) |
103
+ | `bytical_talk/losses/` | opt-in training upgrades (fixed VGG perceptual, mouth-weighted L1, PatchGAN, LPIPS) |
104
+ | `upstream/synctalk2d/` | the renderer, fetched by `scripts/fetch_upstream.sh` (not re-hosted) |
105
 
106
  ---
107
 
 
167
 
168
  ## Training a presenter (renderer)
169
 
170
+ Any short, front-facing talking clip works. Standard SyncTalk_2D flow, then infer
171
+ with the improvements:
 
172
 
173
  ```bash
 
174
  python upstream/synctalk2d/data_utils/process.py dataset/<name>/<name>.mp4
175
  python bytical_talk/audio/hubert.py --wav_path dataset/<name>/aud.wav --num_frames <N> # for --asr hubert
176
  ```
177
 
178
+ > The trained checkpoints, multi-identity base, and render-ready datasets live in
179
+ > the sibling archive **bytical-2d-synctalk-archive** (private).
180
+
181
  ---
182
 
183
  ## Roadmap