-
clone this repo.
git clone https://gitlab.phigent.io/xianda.guo/openstereo
-
Install dependenices:
- pytorch >= 1.13.1
- torchvision
- pyyaml
- tensorboard
- opencv-python
- tqdm
Install dependenices by Anaconda:
conda install tqdm pyyaml tensorboard opencv -c conda-forge conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
Or, Install dependenices by pip:
pip install tqdm pyyaml tensorboard opencv-python pip install torch torchvision
See prepare dataset.
Go to the model zoom, then download the model file and uncompress it to output.
Train a model by
CUDA_VISIBLE_DEVICES=0,1 python openstereo/main.py --config ./configs/psmnet/PSMNet_sceneflow.yaml --scope train
--config
The path to config file.--scope
Specified astrain
,val
ortest_kitti
.--restore_hint
You can specify a number of iterations or userestore_hint
in the config file and resume training from there.--master_addr
The master address of DDP.--master_port
The master port of DDP.--no_distribute
If specified, the program will not use DDP to train.--device
The device to use, e.g.cuda:0
. only used whenno_distribute
is specified.
Evaluate the trained model by
CUDA_VISIBLE_DEVICES=0,1 python openstereo/main.py --config ./configs/psmnet/PSMNet_sceneflow.yaml --scope val
--phase
Specified astest
.--restore_hint
Specify a checkpoint.
Tip: Other arguments are the same as train phase.
- Read the detailed config to figure out the usage of needed setting items;
- See how to create your model;
- There are some advanced usages, refer to advanced usages, please.