输入一张单目全景RGB图像,全景深度估计算法将分析场景三维结构,输出图像对应的稠密深度图。
本模型基于S2Net: Accurate Panorama Depth Estimation on Spherical Surface,是该算法的官方模型。
技术细节请见:
import cv2
from modelscope.outputs import OutputKeys
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
from modelscope.utils.cv.image_utils import depth_to_color
task = 'panorama-depth-estimation'
model_id = 'damo/cv_s2net_panorama-depth-estimation'
input_location = 'data/test/images/panorama_depth_estimation.jpg'
estimator = pipeline(Tasks.panorama_depth_estimation, model=model_id)
result = estimator(input_location)
depth_vis = result[OutputKeys.DEPTHS_COLOR]
cv2.imwrite('result.jpg', depth_vis)
输入一张单目全景RGB图像,图像投影模型为等距投影,即长宽比为2:1,建议分辨率为1024x512。
上图展示了S2Net与UniFuse点云重建结果比较。相比于UniFuse,S2Net能够更好的保证ERP图像左右端的空间一致性。
Matterprot3d和Stanford2D3D数据集上的结果。
Pano3d数据集上的结果。
If you find this code useful in your research, please cite:
@article{li2023mathcal,
title={S2Net: Accurate Panorama Depth Estimation on Spherical Surface},
author={Li, Meng and Wang, Senbo and Yuan, Weihao and Shen, Weichao and Sheng, Zhe and Dong, Zilong},
journal={IEEE Robotics and Automation Letters},
volume={8},
number={2},
pages={1053--1060},
year={2023},
publisher={IEEE}
}