Skip to content

smartadpole/CREStereo-Pytorch

Repository files navigation

CREStereo-Pytorch

Non-official Pytorch implementation of the CREStereo (CVPR 2022 Oral) model converted from the original MegEngine implementation.

!CREStereo-Pytorch stereo detph estimation

Important

  • This is just an effort to try to implement the CREStereo model into Pytorch from MegEngine due to the issues of the framework to convert to other formats (megvii-research/CREStereo#3).
  • I am not the author of the paper, and I am don't fully understand what the model is doing. Therefore, there might be small differences with the original model that might impact the performance.
  • I have not added any license, since the repository uses code from different repositories. Check the License section below for more detail.

Pretrained model

  • Download the model from here and save it into the models folder.
  • The model was covnerted from the original MegEngine weights using the convert_weights.py script. Place the MegEngine weights (crestereo_eth3d.mge) file into the models folder before the conversion.

Installation

sudo apt-get install python3-tk
pip install -r requirements.txt

Licences:

References:

Run

test

批量测试数据集,并导出可视化结果;

test_image.py --data_path $dataset_dir --output $output_dir --model_file $model_dir/crestereo_eth3d.pth --bf $value

参数 data_path: $dataset_dir 目录下的子目录(不限深度)需满足如下一种情况,分别对应存放左右目图片数据的文件夹:

  • image_02, image_03
  • left, right
  • cam0, cam1
  • L, R

参数 bf: $value 为基线长度(单位 cm)*焦距(单位 像素);

输出结果:

color           # 方便可视化,对深度图做的上色;
gray            # 视差图
concat          # 左上: 原图,右上:视差图,左下:color,右下:深度图
concat_color
concat_depth
concat_gray

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published