cy0307 commited on
Commit
dff9293
Β·
verified Β·
1 Parent(s): 7084fd7

Upload from Ropedia Academy

Browse files
Files changed (1) hide show
  1. README.md +70 -14
README.md CHANGED
@@ -4,19 +4,25 @@ library_name: pytorch
4
  tags:
5
  - ropedia-academy
6
  - educational
 
 
 
7
  - diffusion
8
  ---
9
 
10
  # Motion diffusion (DDPM)
11
 
12
- A denoising-diffusion model that generates motion trajectories β€” the MDM recipe, trained from scratch, sampled from EMA weights.
13
 
14
- Trained from scratch in **[Ropedia Academy](https://chaoyue0307.github.io/ropedia-academy/)** β€” an interactive, bilingual course on embodied & spatial AI. **Educational model:** small and quick to train; the value is the *method* and a reproducible pipeline, not a leaderboard score.
 
 
15
 
16
  | | |
17
  |---|---|
 
18
  | **Task** | human-motion generation |
19
- | **Data** | synthetic 2D motion trajectories |
20
  | **Track** | A Β· Human modeling |
21
  | **Notebook** | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ChaoYue0307/ropedia-academy/blob/main/notebooks/training/A_motion_diffusion.ipynb) |
22
 
@@ -28,22 +34,48 @@ Trained from scratch in **[Ropedia Academy](https://chaoyue0307.github.io/ropedi
28
  - **Split:** train only (generative model)
29
  - **Source:** procedural
30
 
31
- ## Results
32
 
33
- | metric | value |
34
- |---|---|
35
- | loss (final) | 0.159 |
 
 
 
 
36
 
37
 
38
  ![figure](figure.png)
39
 
40
- ## How to use
41
 
42
  ```python
43
  import torch
44
- state = torch.load("model.pt", map_location="cpu") # some labs save pose.pt / gaussians.pt / transform.pt
45
- # Rebuild the model class from the Ropedia Academy notebook (linked above), then:
46
- # model.load_state_dict(state)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  ```
48
 
49
  ## Files
@@ -53,10 +85,34 @@ state = torch.load("model.pt", map_location="cpu") # some labs save pose.pt /
53
  - `metrics.json`
54
 
55
 
56
- ## Reproduce / train your own
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
- Open the [lab notebook in Colab](https://colab.research.google.com/github/ChaoYue0307/ropedia-academy/blob/main/notebooks/training/A_motion_diffusion.ipynb) β†’ **Runtime β†’ GPU β†’ Run all**, then its *Publish to the Hugging Face Hub* cell. Browse every lab in the [Ropedia Academy Labs tab](https://chaoyue0307.github.io/ropedia-academy/labs).
 
 
 
59
 
60
 
61
  ---
62
- *Part of the [Ropedia Academy](https://chaoyue0307.github.io/ropedia-academy/) trained-model collection.*
 
4
  tags:
5
  - ropedia-academy
6
  - educational
7
+ - embodied-ai
8
+ - from-scratch
9
+ - reproducible
10
  - diffusion
11
  ---
12
 
13
  # Motion diffusion (DDPM)
14
 
15
+ > A denoising-diffusion model that generates motion trajectories β€” the MDM recipe, trained from scratch, sampled from EMA weights.
16
 
17
+ Trained from scratch in **[Ropedia Academy](https://chaoyue0307.github.io/ropedia-academy/)** β€” an interactive, bilingual course on embodied & spatial AI. **Educational model:** small and quick to train; the value is the *method* and a reproducible pipeline, not a leaderboard score. Try it live in the **[Ropedia demos Space](https://huggingface.co/spaces/cy0307/ropedia-demos)**.
18
+
19
+ ## At a glance
20
 
21
  | | |
22
  |---|---|
23
+ | **Base model** | Trained **from scratch** (random initialization) β€” no pretrained base model. |
24
  | **Task** | human-motion generation |
25
+ | **Training objective** | **DDPM** denoising objective (predict the added noise) over motion trajectories; sample from an EMA of the weights. |
26
  | **Track** | A Β· Human modeling |
27
  | **Notebook** | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ChaoYue0307/ropedia-academy/blob/main/notebooks/training/A_motion_diffusion.ipynb) |
28
 
 
34
  - **Split:** train only (generative model)
35
  - **Source:** procedural
36
 
37
+ ## Training config
38
 
39
+ DDPM; Adam (lr 2e-4), 4000 steps, sequence length 32; EMA of weights for sampling. `STEPS` env-overridable.
40
+
41
+ ## Evaluation results
42
+
43
+ | metric | value | meaning |
44
+ |---|---|---|
45
+ | `loss (final)` | 0.159 | |
46
 
47
 
48
  ![figure](figure.png)
49
 
50
+ ## Inference example
51
 
52
  ```python
53
  import torch
54
+ state = torch.load("denoiser.pt", map_location="cpu") # this repo's checkpoint
55
+ # Rebuild the exact module from the lab notebook (see "Reproduce"), then:
56
+ # model.load_state_dict(state); model.eval()
57
+ ```
58
+
59
+ ## Limitations
60
+
61
+ **Educational scale.** Trained quickly on CPU on small or synthetic data, so absolute numbers are not competitive with production systems β€” the value is the *method* and a reproducible pipeline. No large-scale data, no hyperparameter sweep, and no multi-seed variance is reported. **Not for production use.**
62
+
63
+ ## Failure cases
64
+
65
+ Too few sampling steps or no EMA β†’ jittery/averaged motions; mode collapse with too little data.
66
+
67
+ ## Reproduce / train your own
68
+
69
+ **One click:** open the notebook in Colab β†’ **Runtime β†’ GPU β†’ Run all**, then run its *Publish to the Hugging Face Hub* cell.
70
+
71
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ChaoYue0307/ropedia-academy/blob/main/notebooks/training/A_motion_diffusion.ipynb)
72
+
73
+ **From a shell:**
74
+ ```bash
75
+ git clone https://github.com/ChaoYue0307/ropedia-academy.git && cd ropedia-academy
76
+ pip install torch numpy matplotlib scikit-learn scikit-image gymnasium
77
+ jupyter nbconvert --to notebook --execute notebooks/training/A_motion_diffusion.ipynb --output run.ipynb
78
+ # optional: override training length, e.g. STEPS=2000 (or EPISODES=600) before running
79
  ```
80
 
81
  ## Files
 
85
  - `metrics.json`
86
 
87
 
88
+ ## License
89
+
90
+ Code & weights: **MIT** (this repository) β€” educational use encouraged.
91
+ Data: generated procedurally in the notebook β€” no external dataset.
92
+
93
+ ## Citation
94
+
95
+ If you use this model or the course materials, please cite:
96
+
97
+ ```bibtex
98
+ @misc{ropedia_academy,
99
+ title = {Ropedia Academy: an interactive course on embodied & spatial AI},
100
+ author = {Ropedia Academy},
101
+ year = {2026},
102
+ howpublished = {\url{https://chaoyue0307.github.io/ropedia-academy/}}
103
+ }
104
+ ```
105
+
106
+
107
+ **Method / original work:** Tevet et al., *Human Motion Diffusion Model (MDM)*, ICLR 2023 (arXiv:2209.14916); Ho et al., *DDPM*, NeurIPS 2020.
108
+
109
+ ## Related assets
110
 
111
+ - πŸš€ **Live demos:** [https://huggingface.co/spaces/cy0307/ropedia-demos](https://huggingface.co/spaces/cy0307/ropedia-demos)
112
+ - πŸ€— **All trained models + collection:** [https://huggingface.co/cy0307](https://huggingface.co/cy0307)
113
+ - πŸ“š **Course & all labs:** [https://chaoyue0307.github.io/ropedia-academy/](https://chaoyue0307.github.io/ropedia-academy/) Β· [Labs tab](https://chaoyue0307.github.io/ropedia-academy/labs)
114
+ - πŸ’» **Source / notebooks:** [github.com/ChaoYue0307/ropedia-academy](https://github.com/ChaoYue0307/ropedia-academy)
115
 
116
 
117
  ---
118
+ *Part of the [Ropedia Academy](https://chaoyue0307.github.io/ropedia-academy/) trained-model collection. Contributions & issues welcome on [GitHub](https://github.com/ChaoYue0307/ropedia-academy).*