From e0f18787ca0c165e1db18bc70993e903daff9abe Mon Sep 17 00:00:00 2001 From: Jeffreytsai1004 Date: Sat, 22 Feb 2025 01:33:57 +0800 Subject: [PATCH] Update --- README.md | 1 + README_EN.md | 1 + fetch_model.bat | 72 +++++++++++++++++++++++++++++++++++++++++++++++++ fetch_model.sh | 22 +++++++++++++++ install.bat | 1 - 5 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 fetch_model.bat create mode 100644 fetch_model.sh diff --git a/README.md b/README.md index be6645e..73889f8 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ resource/ ├── PIXIE/ # PIXIE utilities and models │ └── data/ │ ├── pixie_model.tar +│ ├── pixie_data.tar.gz │ └── utilities.zip ``` ## 环境变量 diff --git a/README_EN.md b/README_EN.md index 8b12a78..42cab32 100644 --- a/README_EN.md +++ b/README_EN.md @@ -74,6 +74,7 @@ resource/ ├── PIXIE/ # PIXIE utilities and models │ └── data/ │ ├── pixie_model.tar +│ ├── pixie_data.tar.gz │ └── utilities.zip ``` diff --git a/fetch_model.bat b/fetch_model.bat new file mode 100644 index 0000000..3517dd6 --- /dev/null +++ b/fetch_model.bat @@ -0,0 +1,72 @@ +#!/bin/bash +@echo off +setlocal EnableDelayedExpansion + +python -m pip install 7zip + +:: URL encode function +:urlencode +set "_str=%~1" +set "_len=0" +set "_res=" +:_loop +set "_chr=!_str:~%_len%,1!" +if not defined _chr goto :_done +if "!_chr!"==" " (set "_res=!_res!%%20") else ( + echo !_chr!|findstr /i "[a-z0-9.~-]" >nul + if errorlevel 1 ( + cmd /c exit /b '!_chr!' + set /a "_hex=!errorlevel!" + call :_hex !_hex! + set "_res=!_res!%%!_hex!" + ) else set "_res=!_res!!_chr!" +) +set /a "_len+=1" +goto :_loop +:_done +echo !_res! +exit /b + +:_hex +set "_hex=0123456789ABCDEF" +set /a "_d1=%1/16" +set /a "_d2=%1%%16" +for %%I in (!_d1!) do set "_h1=!_hex:~%%I,1!" +for %%I in (!_d2!) do set "_h2=!_hex:~%%I,1!" +set "_hex=!_h1!!_h2!" +exit /b + +:: SMPL-X 2020 (neutral SMPL-X model with the FLAME 2020 expression blendshapes) +echo. +echo You need to register at https://smpl-x.is.tue.mpg.de +set /p "username=Username (SMPL-X):" +set /p "password=Password (SMPL-X):" +call :urlencode !username! > smplx_username.txt +set /p encoded_username= smplx_password.txt +set /p encoded_password= pixie_username.txt +set /p encoded_username= pixie_password.txt +set /p encoded_password=