Skip to content

Latest commit

 

History

History

depth_estimation

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Depth Estimation Code for SN-Netv2

Installation

Follow here to prepare the environment.

Pretrained Weights

TODO

Training

  1. First, analysing FLOPs for all stitches.
PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \
python tools/analysis_tools/get_flops_snnet.py [path/to/config]

For example, if you want to train configs/snnet/snnetv2_dpt_deit3_s_l_nyu.py, then run

PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \
python tools/get_flops.py configs/snnet/snnetv2_dpt_deit3_s_l_nyu.py

The above command will generate a json file at ./model_flops.

  1. Train your model
bash tools/dist_train.sh [path/to/config] 8 --no-validate

Evaluation

bash tools/dist_test.sh [path/to/config] [path/to/checkpoint] [num of GPUs] --eval mIoU --out [json_output_file]

For example,

bash tools/dist_test.sh configs/snnet/snnetv2_dpt_deit3_s_l_nyu.py \
   ./ckpt/snnetv2_dpt_deit3_s_l_nyu/latest.pth 8 --eval mIoU --out ./snnetv2_dpt_deit3_s_l_nyu.json

Acknowledgement

This code is built upon Monocular-Depth-Estimation-Toolbox.