1. 源码下载
paper:https://arxiv.org/abs/2104.14540
github:https://github.com/nianticlabs/manydepth
git clone https://github.com/nianticlabs/manydepth.git
2. 环境配置
参看environment.yml,需要安装以下库
name: manydepth
channels:
- default
- pytorch
- conda-forge
dependencies:
- opencv=3.4.2
- matplotlib=3.1.2
- numpy=1.19.5
- pip
- pip:
- Pillow==6.2.1
- tensorboardX==1.5
- scikit-image==0.16.2
- torch==1.7.1
- torchvision==0.8.2
- tqdm==4.57.0
安装操作:
conda create -n manydepth python=3.8
conda activate manydepth
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple matplotlib numpy Pillow tensorboardX scikit-image tqdm opencv-python
3. 测试
下载模型
You can download weights for some pretrained models here:
放置在weight 目录下
测试
python -m manydepth.test_simple \
--target_image_path assets/test_sequence_target.jpg \
--source_image_path assets/test_sequence_source.jpg \
--intrinsics_json_path assets/test_sequence_intrinsics.json \
--model_path weight/KITTI_MR/