《Towards Robust Monocular Depth Estimation:Mixing Datasets for Zero-shot Cross-dataset Transfer》论文笔记

本文介绍了《Towards Robust Monocular Depth Estimation:Mixing Datasets for Zero-shot Cross-dataset Transfer》论文,讨论了一种通过混合多个深度数据集进行训练的监督策略,提出了scale-shift invariable损失函数来增强模型的泛化能力。实验表明,这种方法在数据多样性和网络优化方面取得了显著效果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

参考代码:MiDaS

1. 概述

导读:这篇文章提出了一种监督的深度估计方法,其中使用一些很有价值的策略使得最后深度估计的结果具有较大提升。具体来讲文章的策略可以归纳为:
1)使用多个深度数据集(各自拥有不同的scale和shift属性)加入进行训练,增大数据量与实现场景的互补;
2)提出了一种scale-shift invariable的loss用于去监督深度的回归过程,从而使得可以更加有效使用现有数据;
3)采用从3D电影中进行采样的方式扩充数据集,从而进一步增加数据量;
4)使用带有原则属性的多目标训练方法,从而得到一种更加行之有效的优化方法;
结合上述的优化策略与方法,文章的最后得到的模型具有较强的泛化能力,从而摆脱了之前一些公开数据集场景依赖严重的问题。

现有制约深度估计算法的性能的很大因素是多场景下的丰富的稠密深度数据(也就是深度图),往往这些数据获取起来很难。因而如何更加高效使用现有公开的深度数据就变得很重要。对此文章在众多数据基础上提出了一种scale-shift invariable的监督机制,并且采用更加有效的优化策略去优化模型。文章的方法在一些case下的测试结果见下图所示:
在这里插入图片描述

2. 数据收集

文章对现有的公开数据集进行了分析,选择下列的数据集加入训练。
在这里插入图片描述
在上面的数据集中包含了作者制作的数据集3D movies,其通过3D电影中的左右视图进行双目立体匹配,从而得到一个相对的深度信息,从而极大丰富训练集中的场景涵盖范围。对于3D数据的处理文章分为下面的工作。

3D电影的筛选与预处理:
文章首先按照如下的规则进行3D电影的筛选:

  • 1)文章选择原生的物理双目摄像机拍摄的3D电影,而不是使用后期人工合成3D;
  • 2)对于电影中出现的内容,会出于实际的使用场景和场景的多样性去考量;
  • 3)选择那些具有更好分辨率的电影,比如蓝光的;

按照上述的规则进行筛选,下面的24部电影文章将其采样并进行数据处理:
在这里插入图片描述
对于其中数据的提取,文章使用FFmpeg工具按照阈值0.1去提取clips,并按照下面的规则进行数据的处理:

  • 1)删除那些小于一秒的,一般来讲其中包含嘈杂的场景与快速的镜头切换;
  • 2)为了平衡场景的多样性,首先会对每个clip的第一秒采样24个frame,之后每间隔4秒进行24 frame的采样;

在一些电影中会在左右或者上下添加黑色的边条,对此文章通过中心裁切的方式得到分辨率为1880*800的图像,从而去掉黑边等无效信息。

通过立体匹配得到深度:
通过左右视图进行视察估计的方法已经有很多了,文章也是采用现有的方法进行的。在此基础上文章通过引入光流估计实现视差数据的迁移,从而去补全部分深度,这里只使用了水平方向的光流。并将左右视图按照上面的变换关系进行交叉检验,并按照下面的规则滤除无效的数据:

  • 1)超过10%的像素在垂直方向上的视差超过2个像素,水平方向上的视差小于10个像素;
  • 2)在左右视图的变换校验中其一致性少于70%;

最后通过一个分割模型进行分割得到天空区域,将这个区域的视差设置为当前图片的最小视差。下面的数据就是文章通过3D电影中进行抽取得到的。
在这里插入图片描述
PS:这里文章使用到的3D电影数据抽取的工程为:

  1. issue 13: How to generate the training data?
  2. 3DVideos2Stereo

2. 监督策略

2.1 scale-shift invariable损失

对于深度图的表达文章中将其统一为inverse depth。这里使用掩膜 M M M代表GT中有效的深度信息(参见:How to get the mask to input the loss function, issue 10),预测出来的深度表示为 d = d ( θ ) ∈ R M d=d(\theta)\in R^M d=d(θ)RM,其中 θ \theta θ是网络的参数。对应的GT表示为 d ∗ ∈ R M d^{*}\in R^M dRM,那么其对应的损失应该描述为:
L s s i ( d ^ , d ∗ ^ ) = 1 2 M ∑ i = 1 M ρ ( d i ^ − d i ∗ ^ ) L_{ssi}(\hat{d},\hat{d^{*}})=\frac{1}{2M}\sum_{i=1}^M\rho(\hat{d_i}-\hat{d_i^{*}}) Lssi(d^,d^)=2M1i=1Mρ(di^di^)
其中, d i ^ , d i ∗ ^ \hat{d_i},\hat{d_i^{*}} di^,di^是经过scale和shift变换之后的深度像素信息。这里令涉及到的scale变换为 s ∈ R M → R + s\in R^M\rightarrow R_+ sRMR+,对应的shift变换为 t ∈ R M → R t\in R^M\rightarrow R tRMR。那么经过变换之后预测得到的结果应该满足:
s ( d ^ ) ≈ s ( d ∗ ^ ) , t ( d ^ ) ≈ t ( d ∗ ^ ) s(\hat{d})\approx s(\hat{d^{*}}),t(\hat{d})\approx t(\hat{d^{*}}) s(d^)s(d^),t(d^)t(d^)
对此,文章提出了两种scale-shift invariable的策略,也就是去估计 ( s , t ) (s,t) (s,t)

最小二乘法估计:
那么对于未知的scale和shift,可以通过预测结果和GT上做映射,之后最小化得到,则可以描述为:
( s , t ) = arg min ⁡ s , t ∑ i = 1 M ( s d i + t − d i ∗ ) 2 (s,t)=\argmin_{s,t}\sum_{i=1}^M(sd_i+t-d_i^{*})^2 (s,t)=s,targmini=1M(sdi+

### Zero-Shot Learning Chain in Machine Learning and NLP Applications Zero-shot learning (ZSL) refers to the ability of a model to make accurate predictions about previously unseen classes or data points without any explicit training on these specific instances. In the context of natural language processing (NLP), zero-shot capabilities allow models to understand and generate responses for tasks they have not been specifically trained on, leveraging pre-existing knowledge from related domains. #### Conceptual Overview In traditional supervised learning scenarios, models require labeled datasets corresponding directly to each task at hand. However, with zero-shot approaches, especially within chains or sequences of operations, models can generalize across different types of inputs by relying on abstract reasoning skills learned during initial training phases[^1]. This characteristic is particularly valuable when dealing with rapidly evolving application areas where new categories emerge frequently but obtaining sufficient annotated samples might be challenging. For instance, consider an intelligent assistant that needs to respond appropriately even if it encounters novel user queries outside its original dataset; this would involve chaining together multiple components such as intent recognition, entity extraction, dialogue management—all operating under a unified framework capable of handling unknown elements effectively. #### Practical Implementation Example To demonstrate how one could implement a zero-shot chain using modern large language models like those mentioned earlier which tend towards being closed-source[^3], here’s a simplified Python code snippet demonstrating interaction between two hypothetical modules: ```python from langchain import LangChainModel # Hypothetical API-based access point def perform_zero_shot_task(input_text): """ Demonstrates performing a zero-shot operation utilizing chained services. Args: input_text (str): Input string provided by end-user requiring analysis. Returns: dict: Dictionary containing results after passing through various stages. """ # Initialize service clients based on available APIs classifier_client = LangChainModel(api_key="your_api_key", endpoint="/classify") generator_client = LangChainModel(api_key="your_api_key", endpoint="/generate") classification_result = classifier_client.predict(text=input_text) generated_response = generator_client.generate(prompt=classification_result['label']) return { "input": input_text, "predicted_class": classification_result["label"], "response": generated_response } ``` This example shows how easily adaptable systems built around composability principles can handle diverse requests while maintaining flexibility regarding underlying technologies used—whether open source or proprietary solutions accessed via web interfaces. --related questions-- 1. How does prompt engineering influence performance in zero-shot settings? 2. What are some common challenges faced when implementing real-world applications involving zero-shot learning chains? 3. Can you provide examples of industries benefiting most significantly from adopting zero-shot methodologies? 4. Are there particular architectural designs better suited than others for supporting efficient implementation of zero-shot workflows?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值