Dense Prediction Transformers
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 5 年前 | ||
| 7 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 5 年前 |
以下内容由 AI 翻译,如有问题请 点此提交 issue 反馈
视觉变压器用于密集预测
本仓库包含我们的论文相关代码和模型:
视觉变压器用于密集预测
René Ranftl, Alexey Bochkovskiy, Vladlen Koltun
更新日志
- [2021年3月] 首次发布推理代码和模型。
环境搭建
-
下载模型权重并存放在
weights文件夹中: -
安装依赖项:
pip install -r requirements.txt该代码已在Python 3.7、PyTorch 1.8.0、OpenCV 4.5.1和timm 0.4.5环境下测试。
使用方法
-
将一个或多个输入图像放入
input文件夹中。 -
运行单目深度估计模型:
python run_monodepth.py或运行语义分割模型:
python run_segmentation.py -
结果分别保存在
output_monodepth和output_semseg文件夹中。
使用-t标志可以在不同的模型之间切换。可能的选项包括dpt_hybrid(默认)和dpt_large。
额外模型:
- 在KITTI上微调的单目深度估计:dpt_hybrid_kitti-cb926ef4.pt 镜像链接
- 在NYUv2上微调的单目深度估计:dpt_hybrid_nyu-2ce69ec7.pt 镜像链接
通过以下命令运行:
python run_monodepth.py -t [dpt_hybrid_kitti|dpt_hybrid_nyu]
评估
有关如何评估单目深度估计模型的提示,请参考:EVALUATION.md
引用
如果您使用此代码或其中的任何模型,请引用我们的论文。
@article{Ranftl2021,
author = {René Ranftl and Alexey Bochkovskiy and Vladlen Koltun},
title = {Vision Transformers for Dense Prediction},
journal = {ArXiv preprint},
year = {2021},
}
@article{Ranftl2020,
author = {René Ranftl and Katrin Lasinger and David Hafner and Konrad Schindler and Vladlen Koltun},
title = {Towards Robust Monocular Depth Estimation: Mixing Datasets for Zero-shot Cross-dataset Transfer},
journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI)},
year = {2020},
}
致谢
我们的工作建立在timm和PyTorch-Encoding的基础之上,并使用了这些库的代码。我们感谢作者共享这些库。
许可证
此项目遵循MIT许可证。