TC4D 项目使用教程
tc4d TC4D: Trajectory-Conditioned Text-to-4D Generation 项目地址: https://gitcode.com/gh_mirrors/tc/tc4d
1. 项目目录结构及介绍
TC4D 项目的目录结构如下:
tc4d/
├── assets/
├── configs/
│ ├── configs_comp/
│ ├── configs_prompts/
│ └── configs_prompts_static/
├── load/
├── threestudio/
├── .gitignore
├── LICENSE
├── README.md
├── launch.py
├── requirements-dev.txt
├── requirements.txt
└── train.sh
目录结构介绍
- assets/: 存放项目所需的静态资源文件。
- configs/: 存放项目的配置文件,包括不同阶段的配置文件。
- configs_comp/: 存放组合场景的配置文件。
- configs_prompts/: 存放提示词相关的配置文件。
- configs_prompts_static/: 存放静态提示词相关的配置文件。
- load/: 存放加载模块的文件。
- threestudio/: 存放与 ThreeStudio 相关的文件。
- .gitignore: Git 忽略文件配置。
- LICENSE: 项目许可证文件。
- README.md: 项目介绍和使用说明。
- launch.py: 项目的启动文件。
- requirements-dev.txt: 开发环境依赖文件。
- requirements.txt: 项目依赖文件。
- train.sh: 训练脚本文件。
2. 项目启动文件介绍
launch.py
launch.py
是 TC4D 项目的启动文件,用于启动训练和测试任务。该文件通过读取配置文件来执行不同的任务阶段。
主要功能
- 配置加载: 从指定的配置文件中加载训练或测试的参数。
- 任务执行: 根据配置文件中的参数执行相应的训练或测试任务。
- 日志记录: 记录任务执行过程中的日志信息。
使用示例
python launch.py --config configs/tc4d_stage_1.yaml --train --gpu 0 exp_root_dir=/path/to seed=0 system.prompt_processor.prompt="a deer walking" system.scene_setup_path=configs_prompts/a_deer_walking.yaml
3. 项目配置文件介绍
配置文件目录
配置文件主要存放在 configs/
目录下,包括以下几个子目录:
- configs_comp/: 组合场景的配置文件。
- configs_prompts/: 提示词相关的配置文件。
- configs_prompts_static/: 静态提示词相关的配置文件。
配置文件示例
tc4d_stage_1.yaml
# 阶段 1 配置文件
system:
prompt_processor:
prompt: "a deer walking"
scene_setup_path: "configs_prompts/a_deer_walking.yaml"
tc4d_stage_2.yaml
# 阶段 2 配置文件
system:
prompt_processor:
prompt: "a deer walking"
scene_setup_path: "configs_prompts/a_deer_walking.yaml"
weights: "/path/to/tc4d_stage_1/a_deer_walking@timestamp/ckpts/last.ckpt"
tc4d_stage_3.yaml
# 阶段 3 配置文件
system:
prompt_processor:
prompt: "a deer walking"
scene_setup_path: "configs_prompts/a_deer_walking.yaml"
weights: "/path/to/tc4d_stage_2/a_deer_walking@timestamp/ckpts/last.ckpt"
配置文件说明
- system.prompt_processor.prompt: 指定提示词内容。
- system.scene_setup_path: 指定场景设置文件路径。
- system.weights: 指定加载的权重文件路径(仅在阶段 2 和阶段 3 中使用)。
通过以上配置文件,可以灵活地配置不同阶段的训练和测试任务。
tc4d TC4D: Trajectory-Conditioned Text-to-4D Generation 项目地址: https://gitcode.com/gh_mirrors/tc/tc4d