Invisible Stitch 项目使用教程

Invisible Stitch 项目使用教程

invisible-stitch Invisible Stitch: Generating Smooth 3D Scenes with Depth Inpainting invisible-stitch 项目地址: https://gitcode.com/gh_mirrors/in/invisible-stitch

1. 项目的目录结构及介绍

Invisible Stitch 项目的目录结构如下:

invisible-stitch/
├── benchmark/
│   └── scannet_process.py
├── examples/
├── train_test_inputs/
├── utils/
├── zoedepth/
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── environment.yml
├── predict_nyu_marigold.py
├── predict_places_marigold.py
├── project_places_depth_preds.py
├── requirements.txt
├── run.py
├── run_gradio.py
└── train.py

目录结构介绍

  • benchmark/: 包含用于评估场景生成质量的脚本。
  • examples/: 包含示例图像文件。
  • train_test_inputs/: 包含训练和测试输入数据。
  • utils/: 包含各种实用工具脚本。
  • zoedepth/: 包含与 ZoeDepth 模型相关的文件。
  • .gitignore: Git 忽略文件配置。
  • .gitmodules: Git 子模块配置。
  • LICENSE: 项目许可证文件。
  • README.md: 项目说明文档。
  • environment.yml: Conda 环境配置文件。
  • predict_nyu_marigold.py: 用于预测 NYU Depth v2 数据的脚本。
  • predict_places_marigold.py: 用于预测 Places365 数据的脚本。
  • project_places_depth_preds.py: 用于处理 Places365 深度预测的脚本。
  • requirements.txt: 项目依赖库列表。
  • run.py: 项目启动脚本。
  • run_gradio.py: 用于运行 Gradio 界面的脚本。
  • train.py: 用于训练模型的脚本。

2. 项目的启动文件介绍

run.py

run.py 是 Invisible Stitch 项目的主要启动文件,用于生成 3D 场景。以下是该脚本的主要功能和参数:

python3 run.py \
    --image "examples/photo-1667788000333-4e36f948de9a.jpeg" \
    --prompt "a street with traditional buildings in Kyoto, Japan" \
    --output_path "/output.ply" \
    --mode "stage"
参数说明
  • --image: 输入图像的路径。
  • --prompt: 用于生成场景的文本提示。
  • --output_path: 输出 3D 场景文件的路径。
  • --mode: 生成模式,可选值包括:
    • single: 简单的深度投影(无幻觉)。
    • stage: 单步幻觉,生成输入图像左右两侧的场景。
    • 360: 360 度幻觉,生成围绕输入图像的完整场景。

3. 项目的配置文件介绍

environment.yml

environment.yml 是 Conda 环境配置文件,用于创建项目所需的运行环境。通过以下命令创建并激活环境:

conda env create -n invisible_stitch --file environment.yml
conda activate invisible_stitch

requirements.txt

requirements.txt 列出了项目所需的所有 Python 依赖库。可以使用以下命令安装这些依赖:

pip install -r requirements.txt

zoedepth/utils/config.py

config.py 文件位于 zoedepth/utils/ 目录下,包含项目的配置信息。主要用于设置数据路径、模型路径等。

# 示例配置
DATA_DIR = "/path/to/data"
MODEL_DIR = "/path/to/model"

通过修改这些配置,可以自定义项目的运行环境。

invisible-stitch Invisible Stitch: Generating Smooth 3D Scenes with Depth Inpainting invisible-stitch 项目地址: https://gitcode.com/gh_mirrors/in/invisible-stitch

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

雷柏烁

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值