Vision Transformers for Dense Prediction——代码实践
发布时间
阅读量:
阅读量
相关申明
> 1. @article{Ranftl2021,
>
> 2. author = {Ren\'{e} Ranftl and Alexey Bochkovskiy and Vladlen Koltun},
>
> 3. title = {Vision Transformers for Dense Prediction},
>
> 4. journal = {ArXiv preprint},
>
> 5. year = {2021},
>
> 6. }
>
> 7.
>
>
> ```
>
>
1. @article{Ranftl2020,
2. author = \{Ren\'{e} Ranftl, Katrin Lasinger, David Hafner, Konrad Schindler, Vladlen Koltun\}, 3. title = Focusing on Accurate Monocular Depth Estimation: A Comprehensive Approach to Combining Datasets for Zero-shot Cross-dataset Transfer, 4. journal = IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 5. year = Year, 6.
小赵在ubuntu18.04系统下进行论文的代码实践,简单流程如下:
1.下载github项目到本地
git clone https://github.com/isl-org/DPT.git
python
按照提示获取Monodepth与Segmentation模型参数文件,并将其放入DPT项目的weights文件夹内
3. 通过anaconda3创建相关环境
conda create -n DPT python=3.7
python
source activate DPT
cd DPT
conda install --yes --file requirements.txt
或
pip3 install -r requirements.txt
Python 3.7, PyTorch 1.8.0, OpenCV 4.5.1, and timm 0.4.5 均通过requirements.txt完成安装
4.
- 将image(单张或多张)放置
- 执行单目深度估计模型
python run_monodepth.py
- 执行语义分割模型
python run_segmentation.py
5.结果
结果分别放置在对应的output_monodepth 和 output_semseg



6.拓展
将Monodepth微调后作用在KITTI,下载对应.pt文件,放置到weights
将Monodepth微调后作用在NYUv2,下载对应.pt文件,放置到weights
执行
python run_monodepth -t [dpt_hybrid_kitti|dpt_hybrid_nyu]
python run_monodepth.pt -t dpt_hybrid_kitti
python run_monodepth.pt -t dpt_hybrid_nyu
kitti

nyu

全部评论 (0)
还没有任何评论哟~
