Skip to content

Latest commit

 

History

History
executable file
·
56 lines (51 loc) · 2.03 KB

0.get_started.md

File metadata and controls

executable file
·
56 lines (51 loc) · 2.03 KB

Get Started

Installation

  1. clone this repo.

    git clone https://gitlab.phigent.io/xianda.guo/openstereo
    
  2. 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
    

Prepare dataset

See prepare dataset.

Get trained model

Go to the model zoom, then download the model file and uncompress it to output.

Train

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 as train, val or test_kitti.
  • --restore_hint You can specify a number of iterations or use restore_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 when no_distribute is specified.

Val

Evaluate the trained model by

CUDA_VISIBLE_DEVICES=0,1 python openstereo/main.py --config ./configs/psmnet/PSMNet_sceneflow.yaml --scope val
  • --phase Specified as test.
  • --restore_hint Specify a checkpoint.

Tip: Other arguments are the same as train phase.

Customize

  1. Read the detailed config to figure out the usage of needed setting items;
  2. See how to create your model;
  3. There are some advanced usages, refer to advanced usages, please.