Git Product home page Git Product logo

pathoopengait's Introduction

version License: MIT linting workflow

PathoOpenGait

PathoOpenGait: Pathological Gait Analysis With an Open-Source Cloud-Enabled Platform Empowered by Semi-Supervised Learning

For the details, please refer to our papar published in IEEE journal of biomedical and health informatics. image

System design (Microservice architecture)

image

Get started

  1. Please execute setup.sh to download pretrained weights for several models.
    $ ./setup.sh
    
  2. Please modify database/sql/create_user.sql first to create accounts for default admin users.
  3. Please create an .env file with the following format.
    JWT_SECRET_KEY=...
    MYSQL_ROOT_PASSWORD=...
    SQLALCHEMY_DATABASE_URI=mysql+pymysql://root:<MYSQL_ROOT_PASSWORD>@db:3306/ndd
  4. Please make sure the model weights are present in the following path
    ./backend/algorithms/gait_basic/VideoPose3D/checkpoint/pretrained_h36m_detectron_coco.bin
    ./backend/algorithms/gait_basic/gait_study_semi_turn_time/weights/semi_vanilla_v2/epoch_94.pth
    
  5. (Optional) By default, the video will be provided with a black backgound and full keypoints. If you would like to show the patients' body and the surrounding, please modify backend/routers/user.py
    # video_path = f'data/{video_uuid}/out/render-black-background.mp4'  # default one
    video_path = f'data/{video_uuid}/out/render.mp4'  # change to this one
  6. Execute
    $ docker-compose up --build -d
    

Customized

Add new algorithms (models) or new data type

  1. Please create a folder: backend/algorithms/<YOUR_ALGORITHM_NAME>.
  2. Your folder should have a __init__.py and main files.
  3. In main.py, add from .._analyzer import Analyzer.
  4. Create a class for your algorithm, which should inherit Analyzer.
    class CustomizedAnalyzer(Analyzer):
        def __init__(
            self,
            ...
        ):
            ...
    
        def run(
            self,
            data_root_dir,
            file_id,  # '2021-04-01-1-4'
        ) -> t.List[t.Dict[str, t.Any]]:
            ...
  5. Make sure the return of run is in the format of t.List[t.Dict[str, t.Any]].
  6. Modify MAPPING in backend/inference/config.py. For example,
YOUR_MODELS = {
    'your_model_name_1': CustomizedAnalyzer,
    'your_model_name_2': CustomizedAnalyzerV2,
}

MAPPING = {
    'data_type': YOUR_MODELS,
}
  1. Finish. If you need to modify the input interface or anything else, please directly modify those files.

Citation

@article{ho2024pathological,
  title={Pathological Gait Analysis With an Open-Source Cloud-Enabled Platform Empowered by Semi-Supervised Learning-PathoOpenGait},
  author={Ho, Ming-Yang and Kuo, Ming-Che and Chen, Ciao-Sin and Wu, Ruey-Meei and Chuang, Ching-Chi and Shih, Chi-Sheng and Tseng, Yufeng Jane},
  journal={IEEE journal of biomedical and health informatics},
  volume={28},
  number={2},
  pages={1066--1077},
  year={2024}
}

pathoopengait's People

Contributors

kaminyou avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.