Created by Junfeng Cao, Fei Sheng and Feng Xue.
Monocular depth prediction is an important task in scene understanding. It aims to predict the dense depth of a single RGB image. Furthermore, it can be used for scene understanding and perception, such as object detection, segmentation, and 3D reconstruction. Obtaining accurate depth information is a prerequisite for many computer vision tasks.
The Data Preparation and Evaluation are following Junjie Hu with his work. Thanks for his valuable work.
If you find BS-Net useful in your research, please consider citing:
@article{BSNet,
title = {Boundary-induced and scene-aggregated network for monocular depth prediction},
author = {Feng Xue and Junfeng Cao and Yu Zhou and Fei Sheng and Yankai Wang and Anlong Ming},
journal = {Pattern Recognition},
pages = {107901},
year = {2021}
}
python 3.6
Pytorch 1.0
scipy 1.2.1
h5py 3.0.0
Pillow 6.0.0
scikit-image 0.17.2
scikit-learn 0.22.1
You may download the dataset from NYUD v2 and unzip it to the ./data folder. You will have the following directory structure:
BS-Net
|_ data
| |_ nyu2_train
| |_ nyu2_test
| |_ nyu2_train.csv
| |_ nyu2_test.csv
For iBims-1 dataset only have 100 RGB-D pictures especially designed for testing single-image depth estimation methods, you may download the dataset original images from iBims-1 . And you will have the following directory structure:
BS-Net
|_ data
| |_ iBims1
| |_ ibims1_core_raw
| |_ ibims1_core_mat
| |_ imagelist.txt
For training BS-Net on NYUD v2 training dataset, you can run:
python train.py
You can download our trained model from Google Drive or Baidu Netdisk (Code: 1jmz).
Note that: the performance of the given model is slightly different from the manuscript, which is represented as follows. means smaller is better, and means larger is better.
For testing BS-Net on NYUD v2 testing dataset, you can run:
python test.py
or testing on iBims-1 dataset you can run:
python test_iBims1.py