基于几何感知的多视图深度估计 介绍
任务:输入一堆已知相机位姿的图片,预测每张图的深度图以及深度图融合,输出融合后的点云
本项目来自GeoMVSNet: Learning Multi-View Stereo With Geometry Perception (CVPR 2023)
项目原地址GeoMVSNet
模型描述
We propose the geometric prior guided feature fusion and the probability volume geometry embedding approaches for robust cost matching.
We enhance geometry awareness via the frequency domain filtering strategy and adopt the idea of curriculum learning for progressively introducing geometric clues from easy to difficult.
We model the depth distribution of MVS scenarios using the Gaussian-Mixture Model assumption and build the full-scene geometry perception loss function.
该模型在DTU数据集上进行训练,可以用于multi-view stereo任务中。
期望模型使用方式以及适用范围
本模型主要用于多视图深度估计。用户可以自行尝试各种输入的模型效果。具体调用方式请参考代码示例
如何使用
在ModelScope里可以比较方便的使用
注意点: 目前只支持在GPU模式下使用
代码范例
import os
from modelscope.outputs import OutputKeys
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
from modelscope.hub.snapshot_download import snapshot_download
estimator = pipeline(task=Tasks.image_multi_view_depth_estimation, model='Damo_XR_Lab/cv_geomvsnet_multi-view-depth-estimation_general')
model_dir = snapshot_download('Damo_XR_Lab/cv_geomvsnet_multi-view-depth-estimation_general')
input_location = os.path.join(model_dir, "test_data") # download `test_data` from current repo
# input_location = "./casmvs_test_data"
result = estimator(input_location)
pcd = result[OutputKeys.OUTPUT]
pcd.write('./pcd_fusion.ply')
print("end")
注意点:
1、输入必须是文件夹,包含 images 和 sparse 两个子文件夹, images文件夹里面存放图片, sparse文件夹里面存放稀疏重建的结果(COLMAP格式)。可参考上述代码示例中的test data (存放在本仓库中test_data文件夹)
2、images 和 sparse文件夹,可以通过开源软件COLMAP生成,示例代码如下:
DATASET_PATH=$1
colmap feature_extractor \
--database_path $DATASET_PATH/database.db \
--image_path $DATASET_PATH/images
colmap exhaustive_matcher \
--database_path $DATASET_PATH/database.db
mkdir $DATASET_PATH/sparse
colmap mapper \
--database_path $DATASET_PATH/database.db \
--image_path $DATASET_PATH/images \
--output_path $DATASET_PATH/sparse
mkdir $DATASET_PATH/dense
colmap image_undistorter \
--image_path $DATASET_PATH/images \
--input_path $DATASET_PATH/sparse/0 \
--output_path $DATASET_PATH/dense \
--output_type COLMAP \
--max_image_size 2000
把DATASET_PATH/dense下面的 images 和 sparse 文件夹拿出来,再调用本接口,这里的images 和 sparse 两文件夹是存放undistort后的图片和稀疏重建结果,效果更好
模型局限性以及可能的偏差
该模型在DTU数据集上训练,有可能产生一些偏差,请用户自行评测后决定如何使用。
训练数据介绍
DTU是一个MVS数据集,由124个不同的场景组成,在7种不同的光照条件下在49或64个位置扫描,提供了图片、相应的相机位姿以及深度图。
模型训练流程
暂时不支持通过ModelScope接口进行训练,敬请期待。
数据评估及结果
Results on DTU
DTU Dataset | Acc. ↓ | Comp. ↓ | Overall ↓ |
---|---|---|---|
GeoMVSNet | 0.3309 | 0.2593 | 0.2951 |
Results on Tanks and Temples benchmark
T&T (Intermediate) | Mean ↑ | Family | Francis | Horse | Lighthouse | M60 | Panther | Playground | Train |
---|---|---|---|---|---|---|---|---|---|
GeoMVSNet | 65.89 | 81.64 | 67.53 | 55.78 | 68.02 | 65.49 | 67.19 | 63.27 | 58.22 |
T&T (Advanced) | Mean ↑ | Auditorium | Ballroom | Courtroom | Museum | Palace | Temple |
---|---|---|---|---|---|---|---|
GeoMVSNet | 41.52 | 30.23 | 46.53 | 39.98 | 53.05 | 35.98 | 43.34 |
引用信息
@InProceedings{zhe2023geomvsnet,
title={GeoMVSNet: Learning Multi-View Stereo With Geometry Perception},
author={Zhang, Zhe and Peng, Rui and Hu, Yuxi and Wang, Ronggang},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={21508--21518},
year={2023}
}
该项目中一些代码来自于:GeoMVSNet, MVSNet, MVSNet-pytorch, CVP-MVSNet, cascade-stereo, MVSTER。
评论