Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
LinZhuoChen committed Aug 12, 2024
1 parent d7fbf35 commit 590b938
Show file tree
Hide file tree
Showing 69 changed files with 1,288 additions and 859 deletions.
Binary file modified .doctrees/API.doctree
Binary file not shown.
Binary file modified .doctrees/advanced_usage/camera_optimization.doctree
Binary file not shown.
Binary file modified .doctrees/advanced_usage/dust3r_init.doctree
Binary file not shown.
Binary file modified .doctrees/advanced_usage/extract_mesh.doctree
Binary file not shown.
Binary file modified .doctrees/advanced_usage_cn/camera_optimization.doctree
Binary file not shown.
Binary file modified .doctrees/advanced_usage_cn/dust3r_init.doctree
Binary file not shown.
Binary file modified .doctrees/advanced_usage_cn/extract_mesh.doctree
Binary file not shown.
Binary file modified .doctrees/code/dataset.doctree
Binary file not shown.
Binary file modified .doctrees/code/hook.doctree
Binary file not shown.
Binary file modified .doctrees/code/logger.doctree
Binary file not shown.
Binary file modified .doctrees/code/model.doctree
Binary file not shown.
Binary file modified .doctrees/code/optimizer.doctree
Binary file not shown.
Binary file modified .doctrees/code/point_cloud.doctree
Binary file not shown.
Binary file modified .doctrees/code/trainer.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/get_started/learning_configuration.doctree
Binary file not shown.
Binary file modified .doctrees/get_started_cn/learning_config.doctree
Binary file not shown.
Binary file modified .doctrees/tutorial/tutorial_2.doctree
Binary file not shown.
Binary file modified .doctrees/tutorial_cn/tutorial_2.doctree
Binary file not shown.
45 changes: 22 additions & 23 deletions API.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="dataset" href="code/dataset.html" />
<link rel="prev" title="mesh 提取" href="advanced_usage_cn/extract_mesh.html" />
<link rel="prev" title="Post-Processing Results Extraction (Metric, Mesh, Video)" href="advanced_usage/extract_mesh.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
</head>
Expand Down Expand Up @@ -128,7 +128,7 @@



<a class="navbar-brand logo" href="index_cn.html">
<a class="navbar-brand logo" href="index.html">



Expand Down Expand Up @@ -157,32 +157,32 @@
</script></div>
<div class="sidebar-primary-item"><nav class="bd-links bd-docs-nav" aria-label="Main">
<div class="bd-toc-item navbar-nav active">
<p aria-level="2" class="caption" role="heading"><span class="caption-text">开始(10分钟内学习Pointrix)</span></p>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Get started (In 10 minutes)</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="get_started_cn/installation.html">安装</a></li>
<li class="toctree-l1"><a class="reference internal" href="get_started_cn/run_first_model.html">运行你的第一个模型</a></li>
<li class="toctree-l1"><a class="reference internal" href="get_started_cn/learning_config.html">Pointrix 中的配置文件</a></li>
<li class="toctree-l1"><a class="reference internal" href="get_started_cn/render_novel_view_gui.html">使用 Pointflicks (GUI) 可视化</a></li>
<li class="toctree-l1"><a class="reference internal" href="get_started/installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="get_started/run_first_model.html">Run Your First Model</a></li>
<li class="toctree-l1"><a class="reference internal" href="get_started/render_novel_view_gui.html">Using Pointflicks (GUI)</a></li>
<li class="toctree-l1"><a class="reference internal" href="get_started/learning_configuration.html">Configuration Files in Pointrix</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">教程</span></p>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Tutorial</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="tutorial_cn/tutorial_2.html">为点云渲染添加监督</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial/tutorial_2.html">Adding Supervision for 3DGS</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">架构</span></p>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Framework</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="framework_cn/overall.html">总览</a></li>
<li class="toctree-l1"><a class="reference internal" href="framework_cn/data.html">数据流水线</a></li>
<li class="toctree-l1"><a class="reference internal" href="framework_cn/model.html">模型</a></li>
<li class="toctree-l1"><a class="reference internal" href="framework_cn/trainer.html">训练器 (Trainer)</a></li>
<li class="toctree-l1"><a class="reference internal" href="framework_cn/hook.html">钩子</a></li>
<li class="toctree-l1"><a class="reference internal" href="framework/overall.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="framework/data.html">Data Pipeline</a></li>
<li class="toctree-l1"><a class="reference internal" href="framework/model.html">Model</a></li>
<li class="toctree-l1"><a class="reference internal" href="framework/trainer.html">Trainer</a></li>
<li class="toctree-l1"><a class="reference internal" href="framework/hook.html">Hook</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Advanced</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="advanced_usage_cn/camera_optimization.html">相机优化</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced_usage_cn/dust3r_init.html">使用Dust3r 初始化相机模型与点云</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced_usage_cn/extract_mesh.html">mesh 提取</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced_usage/camera_optimization.html">Camera Optimization</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced_usage/dust3r_init.html">Dust3r Initialization for Camera Model and Point Cloud (Beta)</a></li>
<li class="toctree-l1"><a class="reference internal" href="advanced_usage/extract_mesh.html">Post-Processing Results Extraction (Metric, Mesh, Video)</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">参考</span></p>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Reference</span></p>
<ul class="current nav bd-sidenav">
<li class="toctree-l1 current active has-children"><a class="current reference internal" href="#">API</a><details open="open"><summary><span class="toctree-toggle" role="presentation"><i class="fa-solid fa-chevron-down"></i></span></summary><ul>
<li class="toctree-l2"><a class="reference internal" href="code/dataset.html">dataset</a></li>
Expand All @@ -196,8 +196,7 @@
</details></li>
</ul>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="switch_cn.html"><a href="https://pointrix-project.github.io/pointrix/index.html">English</a></a></li>

<li class="toctree-l1"><a class="reference internal" href="switch.html"><a href="https://pointrix-project.github.io/pointrix/index_cn.html">简体中文</a></a></li>
</ul>

</div>
Expand Down Expand Up @@ -583,12 +582,12 @@ <h1>API<a class="headerlink" href="#api" title="Link to this heading">#</a></h1>

<div class="prev-next-area">
<a class="left-prev"
href="advanced_usage_cn/extract_mesh.html"
href="advanced_usage/extract_mesh.html"
title="previous page">
<i class="fa-solid fa-angle-left"></i>
<div class="prev-next-info">
<p class="prev-next-subtitle">previous</p>
<p class="prev-next-title">mesh 提取</p>
<p class="prev-next-title">Post-Processing Results Extraction (Metric, Mesh, Video)</p>
</div>
</a>
<a class="right-next"
Expand Down
Binary file added _images/camera.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/nocamera.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/pose.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion _sources/API.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ API
TODO: Explanation of each component

.. toctree::

code/dataset
code/point_cloud
code/hook
Expand Down
30 changes: 25 additions & 5 deletions _sources/advanced_usage/camera_optimization.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
# Camera Optimization

Pointrix supports camera optimization based on Msplat:
Users can modify configurations
## Configuration Changes
Pointrix, based on Msplat, supports camera optimization:
Users can modify the configuration with:
```bash
trainer.camera_model.enable_training=True
```

Enable camera optimization and configure the corresponding learning rate:

Enable camera optimization and set the learning rate:
```bash
trainer.optimizer.camera_params.lr=1e-3
```
```
Additionally, to support gradient backpropagation for the camera, we need to change the renderer to Msplat or Gsplat:
```bash
trainer.model.renderer.name=MsplatRender
```

In summary, the command to enable camera optimization is:
```bash
python launch.py --config ./configs/colmap.yaml trainer.datapipeline.dataset.data_path=your_data_path trainer.datapipeline.dataset.scale=1.0 trainer.output_path=your_log_path trainer.model.renderer.name=MsplatRender trainer.model.camera_model.enable_training=True trainer.optimizer.optimizer_1.camera_params.lr=1e-3
```

## Experimental Results

We added random perturbations to the ground truth camera poses as camera priors, then visualized the distance between the optimized camera poses and the ground truth. The visualization results are as follows:

![](../../images/pose.gif)

We also compared using Dust3R for camera and point cloud initialization, with and without camera optimization:

![Image1](../../images/camera.gif)
![Image2](../../images/nocamera.gif)
25 changes: 23 additions & 2 deletions _sources/advanced_usage/dust3r_init.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
# Initilization of Point Cloud
TBD
# Dust3r Initialization for Camera Model and Point Cloud (Beta)

## Usage Instructions:
1. Switch to the Beta branch.
2. Download [Dust3r](https://github.com/naver/dust3r) to `examples/dust3r_init` and follow the installation instructions.
3. Move `convert_dust3r.py` to the `examples/dust3r_init/dust3r` folder.
4. Navigate to `examples/dust3r_init/dust3r`, and then use Dust3r to extract point cloud priors and camera priors:
```bash
python convert_dust3r.py --model_path your_dust3r_weights --filelist your_image_path
```
5. Run the program.

```{note}
Dust3r can only extract point cloud and camera priors for dozens of images at a time.
```

## Experimental Results:

Results using twelve images in the Garden scene:
![Image1](../../images/camera.gif)

When camera optimization is disabled, rendering accuracy is reduced, as shown below:
![Image2](../../images/nocamera.gif)
23 changes: 21 additions & 2 deletions _sources/advanced_usage/extract_mesh.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
# Export mesh
TBD
# Post-Processing Results Extraction (Metric, Mesh, Video)

## Configuration Changes
Pointrix uses exporters to obtain desired post-processing results, such as mesh and video. The relevant configuration is as follows:

```yaml
trainer:
exporter:
exporter_a:
type: MetricExporter
exporter_b:
type: TSDFFusion
extra_cfg:
voxel_size: 0.02
sdf_trunc: 0.08
total_points: 8_000_000
exporter_c:
type: VideoExporter
```
Users can specify multiple exporters to obtain various post-processing results. For example, with the above configuration, users can get Metric and Mesh extraction results as well as Video post-processing results. Mesh is obtained using the TSDF fusion method by default.
24 changes: 24 additions & 0 deletions _sources/advanced_usage_cn/camera_optimization.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 相机优化

## 配置修改
Pointrix 基于 Msplat 支持相机优化功能:
用户可以修改配置
```bash
Expand All @@ -11,3 +12,26 @@ trainer.camera_model.enable_training=True
```bash
trainer.optimizer.camera_params.lr=1e-3
```
同时,为了支持相机的梯度反传,我们需要将渲染器改为Msplat 或者 Gsplat:

```bash
trainer.model.renderer.name=MsplatRender
```

综上所述,开启相机优化的命令为:

```bash
python launch.py --config ./configs/colmap.yaml trainer.datapipeline.dataset.data_path=your_data_path trainer.datapipeline.dataset.scale=1.0 trainer.output_path=your_log_path trainer.model.renderer.name=MsplatRender trainer.model.camera_model.enable_training=True trainer.optimizer.optimizer_1.camera_params.lr=1e-3
```


## 实验结果

我们随机给真值相机位姿增加扰动作为相机先验,然后可视化优化的相机位姿态与真值的距离,可视化结果如下:

![](../../images/pose.gif)

同时我们对比了使用Dust3R 作为相机和点云的初始化,开启相机优化与否的对比结果:

![图片1](../../images/camera.gif)
![图片2](../../images/nocamera.gif)
26 changes: 25 additions & 1 deletion _sources/advanced_usage_cn/dust3r_init.md
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
# 使用Dust3r 初始化相机模型与点云
# Dust3r 初始化相机模型与点云 (Beta)

## 使用方法:
1. 切换到Beta 分支
2. 下载[Dust3r](https://github.com/naver/dust3r)`examples/dust3r_init`并依照指示安装
3.`convert_dust3r.py` 移动到 `examples/dust3r_init/dust3r`文件夹下
4. cd examples/dust3r_init/dust3r, 然后用dust3r 提取点云先验与相机先验:

```bash
python convert_dust3r.py --model_path your_dust3r_weights --filelist your_image_path
```

5. 运行程序

```{note}
Dust3r 一次只能提取数十张图片的点云和相机先验。
```

## 实验结果:

使用十二张图片在Garden 场景下的实验结果:
![图片1](../../images/camera.gif)

如关闭相机优化,则渲染精度会降低,如下图所示:
![图片1](../../images/nocamera.gif)
22 changes: 21 additions & 1 deletion _sources/advanced_usage_cn/extract_mesh.md
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
# mesh 提取
# 后处理结果提取 (Metric, Mesh, Video)
## 配置修改
Pointrix 使用exporter 来得到用户需要的后处理结果,例如mesh,视频等,相关的配置如下:

```yaml
trainer:
exporter:
exporter_a:
type: MetricExporter
exporter_b:
type: TSDFFusion
extra_cfg:
voxel_size: 0.02
sdf_truc: 0.08
total_points: 8_000_000
exporter_c:
type: VideoExporter
```
其中用户可指定多个exporter 来得到多个后处理结果。例如上述配置,用户可以得到Metric, Mesh提取结果以及Video的后处理结果。
Mesh 默认使用TSDF fusion方式获得。
Loading

0 comments on commit 590b938

Please sign in to comment.