diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..734e422 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "third_party/SMPLer-X"] + path = third_party/SMPLer-X + url = https://github.com/electron-rare/SMPLer-X.git diff --git a/NOTICE.md b/NOTICE.md new file mode 100644 index 0000000..81e221b --- /dev/null +++ b/NOTICE.md @@ -0,0 +1,40 @@ +# AV-Live Third-Party Notices + +AV-Live includes or depends on the following third-party works, +which are licensed under their own terms. + +## Body Mesh Recovery Models + +### Multi-HMR (NAVER, 2025) + +- **License**: NAVER Non-Commercial License + (https://github.com/naver/multi-hmr/blob/main/LICENSE.txt) +- **Use**: Non-commercial only. Body mesh recovery from camera input. +- **Integration**: model checkpoint downloaded at runtime to + `~/.cache/av-live-multihmr/`. No source code vendored. + +### SMPLer-X (S-Lab, ECCV 2024) + +- **License**: S-Lab License 1.0 + (`third_party/SMPLer-X/LICENSE` after submodule init) +- **Use**: Non-commercial only. Whole-body mesh recovery (SMPL-X). +- **Integration**: vendored as git submodule at + `third_party/SMPLer-X` (fork `electron-rare/SMPLer-X`, kept in + sync with `caizhongang/SMPLer-X` or its current upstream). +- **Modifications in fork**: minimal patches for ARM macOS Python + 3.14 inference (replace mmdet detector with Ultralytics YOLO, + shim `mmcv.Config` via `mmcv-lite`). + +## Implication + +**AV-Live integrates non-commercial-only model code from Multi-HMR +and SMPLer-X.** Commercial deployment (paid performances, packaged +installations sold to clients) requires either : + +1. Obtaining commercial licenses from NAVER and S-Lab respectively, OR +2. Replacing both integrations with MIT/Apache-licensed alternatives + (see `docs/superpowers/plans/2026-05-13-modern-body-mesh-survey.md` + for candidates like Fast-SAM-3D-Body which is MIT-licensed). + +The AV-Live source code itself (sound_algo, oscope-of, launcher, +data_only_viz integration glue) is under GPL-3.0 (see root LICENSE). diff --git a/data_only_viz/pyproject.toml b/data_only_viz/pyproject.toml index fb3095a..66574f5 100644 --- a/data_only_viz/pyproject.toml +++ b/data_only_viz/pyproject.toml @@ -64,6 +64,25 @@ multihmr = [ "pillow>=10.0", "tqdm>=4.65", ] +# SMPLer-X (S-Lab, ECCV 2024, NON-COMMERCIAL). Code source vendu +# via git submodule third_party/SMPLer-X (fork electron-rare). +# mmcv-lite suffit pour Config (le repo vendorise sa propre mmpose). +# Le detector mmdet est remplace par YOLO Ultralytics (extras pose). +smplerx = [ + "torch>=2.4", + "torchvision>=0.19", + "smplx>=0.1.28", + "mmcv-lite>=2.1", + "ultralytics>=8.3", + "opencv-python>=4.10", + "numpy>=1.26,<2", + "scipy>=1.13", + "einops>=0.8", + "pillow>=10.0", + "tqdm>=4.65", + "yacs>=0.1.8", + "timm>=1.0", +] [tool.uv] package = false diff --git a/data_only_viz/scripts/setup_smpler_x.sh b/data_only_viz/scripts/setup_smpler_x.sh new file mode 100755 index 0000000..f6ff5b0 --- /dev/null +++ b/data_only_viz/scripts/setup_smpler_x.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +# Setup SMPLer-X-S inference pipeline pour ARM Mac (M5). +# +# Stratégie : SMPLer-X vendorise sa propre copie de mmpose dans +# transformer_utils/mmpose/, donc on n'a besoin que de : +# - mmcv-lite (pour `from mmcv import Config`) +# - smplx (pour decode SMPL-X params) +# - YOLO/Ultralytics (déjà dans extras pose) pour body detection +# +# On évite mmdet/mmcv-full/mmpose pip installs qui plantent sur ARM +# Python 3.14. +set -euo pipefail + +CACHE="$HOME/.cache/av-live-smplerx" +# Repo source = git submodule electron-rare/SMPLer-X (fork S-Lab 1.0) +# initialise au niveau du repo AV-Live racine. +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" +REPO="$REPO_ROOT/third_party/SMPLer-X" + +mkdir -p "$CACHE/checkpoints" "$CACHE/models/smplx" + +if [ ! -d "$REPO/main" ]; then + echo "==> Init git submodule SMPLer-X" + ( cd "$REPO_ROOT" && git submodule update --init third_party/SMPLer-X ) +fi + +CKPT="$CACHE/checkpoints/smpler_x_s32.pth.tar" +if [ ! -f "$CKPT" ]; then + echo "==> Telechargement SMPLer-X-S checkpoint (ViT-S, ~150 MB)" + curl -fL --progress-bar \ + "https://huggingface.co/caizhongang/SMPLer-X/resolve/main/smpler_x_s32.pth.tar" \ + -o "$CKPT" \ + || { echo "ERREUR download checkpoint"; exit 1; } +fi + +SMPLX="$CACHE/models/smplx/SMPLX_NEUTRAL.npz" +SHARED="$HOME/.cache/av-live-multihmr/models/smplx/SMPLX_NEUTRAL.npz" +if [ ! -f "$SMPLX" ]; then + if [ -f "$SHARED" ]; then + echo "==> Symlink SMPLX_NEUTRAL.npz depuis cache Multi-HMR" + ln -sf "$SHARED" "$SMPLX" + else + echo "" + echo "MANUEL REQUIS :" + echo " 1. Inscrivez-vous sur https://smpl-x.is.tue.mpg.de/" + echo " 2. Telechargez 'SMPL-X v1.1 (NPZ + PKL)'" + echo " 3. Extraire SMPLX_NEUTRAL.npz vers : $SMPLX" + echo " OU lance d'abord scripts/setup_multihmr.sh et symlink." + fi +fi + +echo "Setup OK. Cache : $CACHE" +echo "Files :" +ls -lh "$CACHE/checkpoints/" 2>/dev/null +echo "" +echo "Next: ajouter 'mmcv-lite' au pyproject.toml et 'uv sync --extra smplerx'" diff --git a/third_party/SMPLer-X b/third_party/SMPLer-X new file mode 160000 index 0000000..064baef --- /dev/null +++ b/third_party/SMPLer-X @@ -0,0 +1 @@ +Subproject commit 064baef0e4ab5277a3297691bc1d46ea5412586f