Giter Site home page Giter Site logo

uni0902 / opengait Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shiqiyu/opengait

0.0 0.0 0.0 701 KB

A flexible and extensible framework for gait recognition. You can focus on designing your own models and comparing with state-of-the-arts easily with the help of OpenGait.

Python 96.84% Shell 3.16%

opengait's Introduction

logo

nmbgcl

OpenGait is a flexible and extensible gait recognition project provided by the Shiqi Yu Group and supported in part by WATRIX.AI.

Highlighted features:

  • Multiple Models Support: We reproduced several SOTA methods, and reached the same or even the better performance.
  • DDP Support: The officially recommended Distributed Data Parallel (DDP) mode is used during both the training and testing phases.
  • AMP Support: The Auto Mixed Precision (AMP) option is available.
  • Nice log: We use tensorboard and logging to log everything, which looks pretty.

Model Zoo

CASIA-B

Model NM BG CL Configuration Input Size Inference Time Model Size
Baseline 96.3 92.2 77.6 baseline.yaml 64x44 12s 3.78M
GaitSet(AAAI2019) 95.8(95.0) 90.0(87.2) 75.4(70.4) gaitset.yaml 64x44 13s 2.59M
GaitPart(CVPR2020) 96.1(96.2) 90.7(91.5) 78.7(78.7) gaitpart.yaml 64x44 56s 1.20M
GLN*(ECCV2020) 96.4(95.6) 93.1(92.0) 81.0(77.2) gln_phase1.yaml, gln_phase2.yaml 128x88 47s/46s 8.54M / 14.70M
GaitGL(ICCV2021) 97.4(97.4) 94.5(94.5) 83.8(83.6) gaitgl.yaml 64x44 38s 3.10M

OUMVLP

Model Rank@1 Configuration Input Size Inference Time Model Size
Baseline 86.7 baseline.yaml 64x44 1m13s 44.11M
GaitSet(AAAI2019) 87.2(87.1) gaitset.yaml 64x44 1m26s 6.31M
GaitPart(CVPR2020) 88.6(88.7) gaitpart.yaml 64x44 8m04s 3.78M
GaitGL(ICCV2021) 89.9(89.7) gaitgl.yaml 64x44 5m23s 95.62M

The results in the parentheses are mentioned in the papers

Note:

  • All results are Rank@1, excluding identical-view cases.
  • The shown result of GLN is implemented without compact block.
  • Only two RTX3090 are used for infering CASIA-B, and eight are used for infering OUMVLP.

Get Started

Installation

  1. clone this repo.

    git clone https://github.com/ShiqiYu/OpenGait.git
    
  2. Install dependenices:

    • pytorch >= 1.6
    • torchvision
    • pyyaml
    • tensorboard
    • opencv-python
    • tqdm

    Install dependenices by Anaconda:

    conda install tqdm pyyaml tensorboard opencv
    conda install pytorch==1.6.0 torchvision -c pytorch
    

    Or, Install dependenices by pip:

    pip install tqdm pyyaml tensorboard opencv-python
    pip install torch==1.6.0 torchvision==0.7.0
    

Prepare dataset

See prepare dataset.

Get trained model

  • 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

Train a model by

CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.launch --nproc_per_node=2 lib/main.py --cfgs ./config/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 of CUDA_VISIBLE_DEVICES.
  • --cfgs The path to config file.
  • --phase Specified as train.
  • --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.

Test

Evaluate the trained model by

CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.launch --nproc_per_node=2 lib/main.py --cfgs ./config/baseline.yaml --phase test
  • --phase Specified as test.
  • --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.

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.

Warning

  • Some models may not be compatible with AMP, you can disable it by setting enable_float16 False.
  • 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.
  • We implemented the functionality about testing while training, but it slightly affected the results. None of our published models use this functionality. You can disable it by setting with_test False.
  • Recommended Pytorch version: 1.6-1.8

Authors:

Open Gait Team (OGT)

Acknowledgement

Note: This code is only used for academic purposes, people cannot use this code for anything that might be considered commercial use.

opengait's People

Contributors

cclauss avatar chuanfushen avatar darkliang avatar shenchuanfu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.