AI Choreographer多模式內(nèi)容創(chuàng)建模型訓(xùn)練基礎(chǔ)設(shè)施
這個包包含 AI Choreographer 的模型實現(xiàn)和訓(xùn)練基礎(chǔ)設(shè)施,包括 FACT 模型實現(xiàn)。
拉取代碼
git clone https://github.com/liruilong940607/mint --recursive
注意這里 --recursive 很重要,因為它也會自動克隆子模塊。
安裝依賴
conda create -n mint python=3.7
conda activate mint
conda install protobuf numpy
pip install tensorflow absl-py tensorflow-datasets librosa
sudo apt-get install libopenexr-dev
pip install --upgrade OpenEXR
pip install tensorflow-graphics tensorflow-graphics-gpu
git clone https://github.com/arogozhnikov/einops /tmp/einops
cd /tmp/einops/ && pip install . -U
git clone https://github.com/google/aistplusplus_api /tmp/aistplusplus_api
cd /tmp/aistplusplus_api && pip install -r requirements.txt && pip install . -U
注意如果遇到 numpy 的環(huán)境沖突,可以試試 pip install numpy==1.20
獲取數(shù)據(jù)
數(shù)據(jù)在該網(wǎng)站。
運行代碼
- 編譯協(xié)議
protoc ./mint/protos/*.proto
-
將數(shù)據(jù)集預(yù)處理為 tfrecord
python tools/preprocessing.py \
--anno_dir="/mnt/data/aist_plusplus_final/" \
--audio_dir="/mnt/data/AIST/music/" \
--split=train
python tools/preprocessing.py \
--anno_dir="/mnt/data/aist_plusplus_final/" \
--audio_dir="/mnt/data/AIST/music/" \
--split=testval
-
訓(xùn)練
python trainer.py --config_path ./configs/fact_v5_deeper_t10_cm12.config --model_dir ./checkpoints
-
運行測試和評估
# caching the generated motions (seed included) to `./outputs`
python evaluator.py --config_path ./configs/fact_v5_deeper_t10_cm12.config --model_dir ./checkpoints
# calculate FIDs
python tools/calculate_scores.py
評論
圖片
表情
