umuthopeyildirim commited on
Commit
2c2d3cf
1 Parent(s): 7098dbe

added licenses and readme

Browse files
Files changed (5) hide show
  1. .DS_Store +0 -0
  2. LICENSE +43 -0
  3. README.md +146 -1
  4. assets/teaser.jpg +0 -0
  5. assets/teaser1.jpg +0 -0
.DS_Store CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
 
LICENSE ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2023 ShuweiShao
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ MIT License
24
+
25
+ Copyright (c) 2024 Umut YILDIRIM <hope@umutyildirim.com>
26
+
27
+ Permission is hereby granted, free of charge, to any person obtaining a copy
28
+ of this software and associated documentation files (the "Software"), to deal
29
+ in the Software without restriction, including without limitation the rights
30
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
31
+ copies of the Software, and to permit persons to whom the Software is
32
+ furnished to do so, subject to the following conditions:
33
+
34
+ The above copyright notice and this permission notice shall be included in all
35
+ copies or substantial portions of the Software.
36
+
37
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
39
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
40
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
41
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
42
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
43
+ SOFTWARE.
README.md CHANGED
@@ -10,4 +10,149 @@ pinned: false
10
  license: mit
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  license: mit
11
  ---
12
 
13
+ <div align="center">
14
+
15
+ <h1>IEBins: Iterative Elastic Bins for Monocular Depth Estimation</h1>
16
+
17
+ <div>
18
+ <a href='https://scholar.google.com.hk/citations?hl=zh-CN&user=ecZHSVQAAAAJ' target='_blank'>Shuwei Shao</a><sup>1</sup>&emsp;
19
+ <a target='_blank'>Zhongcai Pei</a><sup>1</sup>&emsp;
20
+ <a target='_blank'>Xingming Wu</a><sup>1</sup>&emsp;
21
+ <a target='_blank'>Zhong Liu</a><sup>1</sup>&emsp;
22
+ <a href='https://scholar.google.com.hk/citations?hl=zh-CN&user=5PoZrcYAAAAJ' target='_blank'>Weihai Chen</a><sup>2</sup>&emsp;
23
+ <a href='https://scholar.google.com.hk/citations?hl=zh-CN&user=LiUX7WQAAAAJ' target='_blank'>Zhengguo Li</a><sup>3</sup>
24
+ </div>
25
+ <div>
26
+ <sup>1</sup>Beihang University, <sup>2</sup>Anhui University, <sup>3</sup>A*STAR
27
+ </div>
28
+
29
+ <div>
30
+ <h4 align="center">
31
+ • <a href="https://arxiv.org/abs/2309.14137" target='_blank'>NeurIPS 2023</a> •
32
+ </h4>
33
+ </div>
34
+
35
+ [![KITTI Benchmark](https://img.shields.io/badge/KITTI%20Benchmark-2nd%20among%20all%20at%20submission%20time-blue)](https://www.cvlibs.net/datasets/kitti/eval_depth.php?benchmark=depth_prediction)
36
+ [![Hugging Space Badge](https://img.shields.io/badge/🤗-Open%20In%20Spaces-blue.svg)](umuthopeyildirim/IEBins-Depth-Perception)
37
+
38
+ ## Abstract
39
+
40
+ <div style="text-align:center">
41
+ <img src="assets/teaser.jpg" width="80%" height="80%">
42
+ </div>
43
+
44
+ </div>
45
+ <strong>We propose a novel concept of iterative elastic bins for the classification-regression-based MDE. The proposed IEBins aims to search for high-quality depth by progressively optimizing the search range, which involves multiple stages and each stage performs a finer-grained depth search in the target bin on top of its previous stage. To alleviate the possible error accumulation during the iterative process, we utilize a novel elastic target bin to replace the original target bin, the width of which is adjusted elastically based on the depth uncertainty. </strong>
46
+
47
+ ---
48
+
49
+ </div>
50
+
51
+ ## Installation
52
+
53
+ ```
54
+ conda create -n iebins python=3.8
55
+ conda activate iebins
56
+ conda install pytorch=1.10.0 torchvision cudatoolkit=11.1
57
+ pip install matplotlib, tqdm, tensorboardX, timm, mmcv, open3d
58
+ ```
59
+
60
+ ## Datasets
61
+
62
+ You can prepare the datasets KITTI and NYUv2 according to [here](https://github.com/cleinc/bts/tree/master/pytorch) and download the SUN RGB-D dataset from [here](https://rgbd.cs.princeton.edu/), and then modify the data path in the config files to your dataset locations.
63
+
64
+ ## Training
65
+
66
+ First download the pretrained encoder backbone from [here](https://github.com/microsoft/Swin-Transformer), and then modify the pretrain path in the config files. If you want to train the KITTI_Official model, first download the pretrained encoder backbone from [here](https://drive.google.com/file/d/1qjDnMwmEz0k0XWh7GP2aNPGiAjvOPF_5/view?usp=drive_link), which is provided by [MIM](https://github.com/SwinTransformer/MIM-Depth-Estimation).
67
+
68
+ Training the NYUv2 model:
69
+
70
+ ```
71
+ python iebins/train.py configs/arguments_train_nyu.txt
72
+ ```
73
+
74
+ Training the KITTI_Eigen model:
75
+
76
+ ```
77
+ python iebins/train.py configs/arguments_train_kittieigen.txt
78
+ ```
79
+
80
+ Training the KITTI_Official model:
81
+
82
+ ```
83
+ python iebins_kittiofficial/train.py configs/arguments_train_kittiofficial.txt
84
+ ```
85
+
86
+ ## Evaluation
87
+
88
+ Evaluate the NYUv2 model:
89
+
90
+ ```
91
+ python iebins/eval.py configs/arguments_eval_nyu.txt
92
+ ```
93
+
94
+ Evaluate the NYUv2 model on the SUN RGB-D dataset:
95
+
96
+ ```
97
+ python iebins/eval_sun.py configs/arguments_eval_sun.txt
98
+ ```
99
+
100
+ Evaluate the KITTI_Eigen model:
101
+
102
+ ```
103
+ python iebins/eval.py configs/arguments_eval_kittieigen.txt
104
+ ```
105
+
106
+ To generate KITTI Online evaluation data for the KITTI_Official model:
107
+
108
+ ```
109
+ python iebins_kittiofficial/test.py --data_path path to dataset --filenames_file ./data_splits/kitti_official_test.txt --max_depth 80 --checkpoint_path path to pretrained checkpoint --dataset kitti --do_kb_crop
110
+ ```
111
+
112
+ ## Qualitative Depth and Point Cloud Results
113
+
114
+ You can download the qualitative depth results of [IEBins](https://arxiv.org/abs/2309.14137), [NDDepth](https://arxiv.org/abs/2309.10592), [NeWCRFs](https://openaccess.thecvf.com/content/CVPR2022/html/Yuan_Neural_Window_Fully-Connected_CRFs_for_Monocular_Depth_Estimation_CVPR_2022_paper.html), [PixelFormer](https://openaccess.thecvf.com/content/WACV2023/html/Agarwal_Attention_Attention_Everywhere_Monocular_Depth_Prediction_With_Skip_Attention_WACV_2023_paper.html), [AdaBins](https://openaccess.thecvf.com/content/CVPR2021/html/Bhat_AdaBins_Depth_Estimation_Using_Adaptive_Bins_CVPR_2021_paper.html) and [BTS](https://arxiv.org/abs/1907.10326) on the test sets of NYUv2 and KITTI_Eigen from [here](https://pan.baidu.com/s/1zaFe40mwpQ5cvdDlLZRrCQ?pwd=vfxd) and download the qualitative point cloud results of IEBins, NDDepth, NeWCRFS, PixelFormer, AdaBins and BTS on the NYUv2 test set from [here](https://pan.baidu.com/s/1WwpFuPBGBUaSGPEdThJ6Rw?pwd=n9rw).
115
+
116
+ If you want to derive these results by yourself, please refer to the test.py.
117
+
118
+ If you want to perform inference on a single image, run:
119
+
120
+ ```
121
+ python iebins/inference_single_image.py --dataset kitti or nyu --image_path path to image --checkpoint_path path to pretrained checkpoint --max_depth 80 or 10
122
+ ```
123
+
124
+ Then you can acquire the qualitative depth result.
125
+
126
+ ## Models
127
+
128
+ | Model | Abs Rel | Sq Rel | RMSE | a1 | a2 | a3 | Link |
129
+ | -------------------- | :-----: | :----: | :---: | :---: | :---: | :---: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
130
+ | NYUv2 (Swin-L) | 0.087 | 0.040 | 0.314 | 0.936 | 0.992 | 0.998 | [[Google]](https://drive.google.com/file/d/14Rn-vxvpXO2EXRaWqCPmh2JufvOurwtl/view?usp=drive_link) [[Baidu]](https://pan.baidu.com/s/1E2KAHtQ-ul99RGp_G7QK1w?pwd=7o4d) |
131
+ | NYUv2 (Swin-T) | 0.108 | 0.061 | 0.375 | 0.893 | 0.984 | 0.996 | [[Google]](https://drive.google.com/file/d/1eYkTb3grbDitQ9tJdg1DhAOaGmqgHWHK/view?usp=drive_link) [[Baidu]](https://pan.baidu.com/s/1v5_MJtP0YOSoark9Yw1RaQ?pwd=2k5d) |
132
+ | KITTI_Eigen (Swin-L) | 0.050 | 0.142 | 2.011 | 0.978 | 0.998 | 0.999 | [[Google]](https://drive.google.com/file/d/1xaVLDq7zJ-C2GtFvABolSUtK7gzvNQNd/view?usp=drive_link) [[Baidu]](https://pan.baidu.com/s/16mRrKrr9PdZhuZ3ZlkmNlA?pwd=lcjd) |
133
+ | KITTI_Eigen (Swin-T) | 0.056 | 0.169 | 2.205 | 0.970 | 0.996 | 0.999 | [[Google]](https://drive.google.com/file/d/1s0LXZmS6_Q4_H_0hmbOldPcVhlRw8Dut/view?usp=drive_link) [[Baidu]](https://pan.baidu.com/s/1xgeqIX5WP5F2MFwypMWV5A?pwd=ygfi) |
134
+
135
+ | Model | SILog | Abs Rel | Sq Rel | RMSE | a1 | a2 | a3 | Link |
136
+ | ------------------------- | :---: | :-----: | :----: | :--: | :---: | :---: | :---: | :-----------------------------------------------------------------------------------------------: |
137
+ | KITTI_Official (Swinv2-L) | 7.48 | 5.20 | 0.79 | 2.34 | 0.974 | 0.996 | 0.999 | [[Google]](https://drive.google.com/file/d/19ARBiDTIvtZSWJVvhbEWBcZMonXsiOX1/view?usp=drive_link) |
138
+
139
+ ## Citation
140
+
141
+ If you find our work useful in your research please consider citing our paper:
142
+
143
+ ```
144
+ @inproceedings{shao2023IEBins,
145
+ title={IEBins: Iterative Elastic Bins for Monocular Depth Estimation},
146
+ author={Shao, Shuwei and Pei, Zhongcai and Wu, Xingming and Liu, Zhong and Chen, Weihai and Li, Zhengguo},
147
+ booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
148
+ year={2023}
149
+ }
150
+ ```
151
+
152
+ ## Contact
153
+
154
+ If you have any questions, please feel free to contact swshao@buaa.edu.cn.
155
+
156
+ ## Acknowledgement
157
+
158
+ Our code is based on the implementation of [NeWCRFs](https://github.com/aliyun/NeWCRFs) and [BTS](https://github.com/cleinc/bts). We thank their excellent works.
assets/teaser.jpg ADDED
assets/teaser1.jpg ADDED