-
clone this repo.
git clone https://github.com/ShiqiYu/OpenGait.git
-
Install dependenices:
- pytorch >= 1.6
- torchvision
- pyyaml
- tensorboard
- opencv-python
- tqdm
- py7zr
- kornia
Install dependenices by Anaconda:
conda install tqdm pyyaml tensorboard opencv py7zr conda install pytorch==1.6.0 torchvision -c pytorch
Or, Install dependenices by pip:
pip install tqdm pyyaml tensorboard opencv-python py7zr pip install torch==1.6.0 torchvision==0.7.0
See prepare dataset.
- Option 1:
python misc/download_pretrained_model.py
- Option 2: Go to the release page, then download the model file and uncompress it to output.
Train a model by
CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.launch --nproc_per_node=2 opengait/main.py --cfgs ./config/baseline/baseline.yaml --phase train
python -m torch.distributed.launch
DDP launch instruction.--nproc_per_node
The number of gpus to use, and it must equal the length ofCUDA_VISIBLE_DEVICES
.--cfgs
The path to config file.--phase
Specified astrain
.
--log_to_file
If specified, the terminal log will be written on disk simultaneously.
You can run commands in train.sh for training different models.
Evaluate the trained model by
CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.launch --nproc_per_node=2 opengait/main.py --cfgs ./config/baseline/baseline.yaml --phase test
--phase
Specified astest
.--iter
Specify a iteration checkpoint.
Tip: Other arguments are the same as train phase.
You can run commands in test.sh for testing different models.
- 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.
- In
DDP
mode, zombie processes may be generated when the program terminates abnormally. You can use this command sh misc/clean_process.sh to clear them.