Update
This commit is contained in:
parent
61f25fa15e
commit
e0f18787ca
@ -72,6 +72,7 @@ resource/
|
|||||||
├── PIXIE/ # PIXIE utilities and models
|
├── PIXIE/ # PIXIE utilities and models
|
||||||
│ └── data/
|
│ └── data/
|
||||||
│ ├── pixie_model.tar
|
│ ├── pixie_model.tar
|
||||||
|
│ ├── pixie_data.tar.gz
|
||||||
│ └── utilities.zip
|
│ └── utilities.zip
|
||||||
```
|
```
|
||||||
## 环境变量
|
## 环境变量
|
||||||
|
@ -74,6 +74,7 @@ resource/
|
|||||||
├── PIXIE/ # PIXIE utilities and models
|
├── PIXIE/ # PIXIE utilities and models
|
||||||
│ └── data/
|
│ └── data/
|
||||||
│ ├── pixie_model.tar
|
│ ├── pixie_model.tar
|
||||||
|
│ ├── pixie_data.tar.gz
|
||||||
│ └── utilities.zip
|
│ └── utilities.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
|
72
fetch_model.bat
Normal file
72
fetch_model.bat
Normal file
@ -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_username.txt
|
||||||
|
del smplx_username.txt
|
||||||
|
call :urlencode !password! > smplx_password.txt
|
||||||
|
set /p encoded_password=<smplx_password.txt
|
||||||
|
del smplx_password.txt
|
||||||
|
curl --data "username=!encoded_username!&password=!encoded_password!" "https://download.is.tue.mpg.de/download.php?domain=smplx&sfile=SMPLX_NEUTRAL_2020.npz&resume=1" --output "./resource/PIXIE/data/SMPLX_NEUTRAL_2020.npz" --insecure --continue-at -
|
||||||
|
|
||||||
|
:: PIXIE pretrained model and utilities
|
||||||
|
echo.
|
||||||
|
echo You need to register at https://pixie.is.tue.mpg.de/
|
||||||
|
set /p "username=Username (PIXIE):"
|
||||||
|
set /p "password=Password (PIXIE):"
|
||||||
|
call :urlencode !username! > pixie_username.txt
|
||||||
|
set /p encoded_username=<pixie_username.txt
|
||||||
|
del pixie_username.txt
|
||||||
|
call :urlencode !password! > pixie_password.txt
|
||||||
|
set /p encoded_password=<pixie_password.txt
|
||||||
|
del pixie_password.txt
|
||||||
|
curl --data "username=!encoded_username!&password=!encoded_password!" "https://download.is.tue.mpg.de/download.php?domain=pixie&sfile=pixie_model.tar&resume=1" --output "./resource/PIXIE/data/pixie_model.tar" --insecure --continue-at -
|
||||||
|
curl --data "username=!encoded_username!&password=!encoded_password!" "https://download.is.tue.mpg.de/download.php?domain=pixie&sfile=utilities.zip&resume=1" --output "./resource/PIXIE/data/utilities.zip" --insecure --continue-at -
|
||||||
|
|
||||||
|
cd .\resource\PIXIE\data
|
||||||
|
7z x utilities.zip
|
||||||
|
|
||||||
|
cd ../../..
|
||||||
|
|
||||||
|
|
||||||
|
|
22
fetch_model.sh
Normal file
22
fetch_model.sh
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
urle () { [[ "${1}" ]] || return 1; local LANG=C i x; for (( i = 0; i < ${#1}; i++ )); do x="${1:i:1}"; [[ "${x}" == [a-zA-Z0-9.~-] ]] && echo -n "${x}" || printf '%%%02X' "'${x}"; done; echo; }
|
||||||
|
|
||||||
|
# SMPL-X 2020 (neutral SMPL-X model with the FLAME 2020 expression blendshapes)
|
||||||
|
echo -e "\nYou need to register at https://smpl-x.is.tue.mpg.de"
|
||||||
|
read -p "Username (SMPL-X):" username
|
||||||
|
read -p "Password (SMPL-X):" password
|
||||||
|
username=$(urle $username)
|
||||||
|
password=$(urle $password)
|
||||||
|
wget --post-data "username=$username&password=$password" 'https://download.is.tue.mpg.de/download.php?domain=smplx&sfile=SMPLX_NEUTRAL_2020.npz&resume=1' -O './resource/PIXIE/data/SMPLX_NEUTRAL_2020.npz' --no-check-certificate --continue
|
||||||
|
|
||||||
|
# PIXIE pretrained model and utilities
|
||||||
|
echo -e "\nYou need to register at https://pixie.is.tue.mpg.de/"
|
||||||
|
read -p "Username (PIXIE):" username
|
||||||
|
read -p "Password (PIXIE):" password
|
||||||
|
username=$(urle $username)
|
||||||
|
password=$(urle $password)
|
||||||
|
wget --post-data "username=$username&password=$password" 'https://download.is.tue.mpg.de/download.php?domain=pixie&sfile=pixie_model.tar&resume=1' -O './resource/PIXIE/data/pixie_model.tar' --no-check-certificate --continue
|
||||||
|
wget --post-data "username=$username&password=$password" 'https://download.is.tue.mpg.de/download.php?domain=pixie&sfile=utilities.zip&resume=1' -O './resource/PIXIE/data/utilities.zip' --no-check-certificate --continue
|
||||||
|
|
||||||
|
cd ./data
|
||||||
|
unzip utilities.zip
|
@ -120,7 +120,6 @@ REM Create pixie-env environment
|
|||||||
@CALL "%~dp0micromamba.exe" create -n pixie-env python=3.8 ^
|
@CALL "%~dp0micromamba.exe" create -n pixie-env python=3.8 ^
|
||||||
pytorch=2.0.0 torchvision torchaudio pytorch-cuda=11.8 fvcore kornia matplotlib ^
|
pytorch=2.0.0 torchvision torchaudio pytorch-cuda=11.8 fvcore kornia matplotlib ^
|
||||||
-c pytorch -c nvidia -c fvcore -c conda-forge -c pytorch3d -r "%~dp0\" -y
|
-c pytorch -c nvidia -c fvcore -c conda-forge -c pytorch3d -r "%~dp0\" -y
|
||||||
|
|
||||||
@CALL "%~dp0condabin\micromamba.bat" activate pixie-env
|
@CALL "%~dp0condabin\micromamba.bat" activate pixie-env
|
||||||
@CALL copy %PROJECT_DIR%\resource\PIXIE\data\* %PROJECT_DIR%\ext\PIXIE\
|
@CALL copy %PROJECT_DIR%\resource\PIXIE\data\* %PROJECT_DIR%\ext\PIXIE\
|
||||||
@CALL cd %PROJECT_DIR%\ext\PIXIE
|
@CALL cd %PROJECT_DIR%\ext\PIXIE
|
||||||
|
Loading…
Reference in New Issue
Block a user