Follow here to prepare the environment.
TODO
- 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
.
- Train your model
bash tools/dist_train.sh [path/to/config] 8 --no-validate
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
This code is built upon Monocular-Depth-Estimation-Toolbox.