• Stars
    star
    151
  • Rank 244,632 (Top 5 %)
  • Language
    Python
  • Created about 4 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[ECCV'20] Patch-match and Plane-regularization for Unsupervised Indoor Depth Estimation

Indoor SfMLearner

PyTorch implementation of our ECCV2020 paper:

P2Net: Patch-match and Plane-regularization for Unsupervised Indoor Depth Estimation

Zehao Yu*, Lei Jin*, Shenghua Gao

(* Equal Contribution)

Getting Started

Installation

pip install -r requirements.txt

Then install pytorch with

conda install pytorch torchvision cudatoolkit=10.2 -c pytorch

Pytorch version >= 0.4.1 would work well.

Download pretrained model

Please download pretrained model from Onedrive and extract:

tar -xzvf ckpts.tar.gz 
rm ckpts.tar.gz

Prediction on single image

Run the following command to predict on a single image:

python inference_single_image.py --image_path=/path/to/image

By default, the script saves the predicted depth to the same folder

Evaluation

Download testing data from Onedrive and put to ./data.

cd data
tar -xzvf nyu_test.tar.gz 
tar -xzvf scannet_test.tar.gz
tar -xzvf scannet_pose.tar.gz
cd ../

NYUv2 Dpeth

CUDA_VISIBLE_DEVICES=1 python evaluation/nyuv2_eval_depth.py \
    --data_path ./data \
    --load_weights_folder ckpts/weights_5f \
    --post_process  

NYUv2 normal

CUDA_VISIBLE_DEVICES=1 python evaluation/nyuv2_eval_norm.py \
    --data_path ./data \
    --load_weights_folder ckpts/weights_5f \
    # --post_process

ScanNet Depth

CUDA_VISIBLE_DEVICES=1 python evaluation/scannet_eval_depth.py \                                               
    --data_path ./data/scannet_test \
    --load_weights_folder ckpts/weights_5f \
    --post_process

ScanNet Pose

CUDA_VISIBLE_DEVICES=1 python evaluation/scannet_eval_pose.py \
    --data_path ./data/scannet_pose \
    --load_weights_folder ckpts/weights_5f \
    --frame_ids 0 1

Training

First download NYU Depth V2 on the official website and unzip the raw data to DATA_PATH.

Extract Superpixel

Run the following command to extract superpixel:

python extract_superpixel.py --data_path DATA_PATH --output_dir ./data/segments

3-frames

Run the following command to train our network:

CUDA_VISIBLE_DEVICES=1 python train_geo.py \                                                                   
    --model_name 3frames \
    --data_path DATA_PATH \
    --val_path ./data \
    --segment_path ./data/segments \
    --log_dir ./logs \
    --lambda_planar_reg 0.05 \
    --batch_size 12 \
    --scales 0 \
    --frame_ids_to_train 0 -1 1

5-frames

Using the pretrained model from 3-frames setting gives better results.

CUDA_VISIBLE_DEVICES=1 python train_geo.py \                                                                   
    --model_name 5frames \
    --data_path DATA_PATH \
    --val_path ./data \
    --segment_path ./data/segments \
    --log_dir ./logs \
    --lambda_planar_reg 0.05 \
    --batch_size 12 \
    --scales 0 \
    --load_weights_folder FOLDER_OF_3FRAMES_MODEL \
    --frame_ids_to_train 0 -2 -1 1 2

Acknowledgements

This project is built upon Monodepth2. We thank authors of Monodepth2 for their great work and repo.

License

TBD

Citation

Please cite our paper for any purpose of usage.

@inproceedings{IndoorSfMLearner,
  author    = {Zehao Yu and Lei Jin and Shenghua Gao},
  title     = {P$^{2}$Net: Patch-match and Plane-regularization for Unsupervised Indoor Depth Estimation},
  booktitle = {ECCV},
  year      = {2020}
}

More Repositories

1

impersonator

PyTorch implementation of our ICCV 2019 paper: Liquid Warping GAN: A Unified Framework for Human Motion Imitation, Appearance Transfer and Novel View Synthesis
Python
1,723
star
2

PlanarReconstruction

[CVPR'19] Single-Image Piece-wise Planar 3D Reconstruction via Associative Embedding
Python
359
star
3

FastMVSNet

[CVPR'20] Fast-MVSNet: Sparse-to-Dense Multi-View Stereo With Learned Propagation and Gauss-Newton Refinement
Python
248
star
4

PPGNet

Source code for our CVPR 2019 paper - PPGNet: Learning Point-Pair Graph for Line Segment Detection
Python
173
star
5

AS-MLP

[ICLR'22] This is an official implementation for "AS-MLP: An Axial Shifted MLP Architecture for Vision".
Python
124
star
6

HRNet-for-Fashion-Landmark-Estimation.PyTorch

[DeepFashion2 Challenge] Fashion Landmark Estimation with HRNet
Cuda
124
star
7

GazeFollowing

Code for ACCV2018 paper 'Believe It or Not, We Know What You Are Looking at!'
Python
102
star
8

PlaneDepth

[CVPR2023] This is an official implementation for "PlaneDepth: Self-supervised Depth Estimation via Orthogonal Planes".
Python
100
star
9

CIDNN

CIDNN: Encoding Crowd Interaction with Deep Neural Network
Python
74
star
10

IVOS-W

[CVPR'21] Learning to Recommend Frame for Interactive Video Object Segmentation in the Wild
Python
49
star
11

MLEP

Python
47
star
12

LBYLNet

[CVPR2021] Look before you leap: learning landmark features for one-stage visual grounding.
Python
46
star
13

Weekly_Group_Meeting_Paper_List

42
star
14

RGBD-Counting

RGBD crowd counting
Python
38
star
15

WeakSVR

(CVPR 2023) Official implemention of the paper "Weakly Supervised Video Representation Learning with Unaligned Text for Sequential Videos"
Python
27
star
16

Locating_Counting_with_a_Depth_Prior

[TPAMI] Locating and Counting Heads in Crowds With a Depth Prior
Python
24
star
17

RGBD-Gaze

RGBD Based Gaze Estimation via Multi-task CNN
Python
22
star
18

SVIP-Sequence-VerIfication-for-Procedures-in-Videos

[CVPR2022] SVIP: Sequence VerIfication for Procedures in Videos
Python
19
star
19

ShanghaiTechRGBDSyn

[TPAMI] Locating and Counting Heads in Crowds With a Depth Prior
C++
11
star
20

Medical-Image-CodeBase-SVIP-Lab

Useful and frequently used code for computer vision
Python
9
star
21

Saliency-Detection-in-360-Videos

Saliency-Detection-in-360-Videos
Python
8
star
22

svip-lab.github.io

HTML
8
star
23

SvipLab-ChatGPT-Web-Share

7
star
24

CrowdCountingPAL

Python
7
star
25

SphericalDNNs

Python
6
star