Giter VIP home page Giter VIP logo

cpr-clip's Introduction

img

CPR-CLIP: Multimodal Pre-training for Composite Error Recognition in CPR Training

This repository contains PyTorch implementation for CPR-CLIP (Manualscript submited to IEEE SPL).

Abstract

The expensive cost of the medical skill training paradigm hinders the development of medical education, which has attracted rising attention in the intelligent signal processing community. To address the issue of composite error action recognition in CPR training, this letter proposes a multimodal pre-training framework named CPR-CLIP based on prompt engineering. Specifically, we design three prompts to fuse multiple errors naturally on the semantic level and then align linguistic and visual features via the contrastive pre-training loss. Extensive experiments have verified the effectiveness of the CPR-CLIP. Ultimately, the CPR-CLIP is encapsulated to an electronic assistant, and four doctors are recruited for evaluation. Nearly four times efficiency improvement is observed in comparative experiments, which demonstrates the practicality of the system. We hope this work brings new insights to the intelligent medical training system and signal processing community simultaneously.

Conda Enviroment

# 1.Clone this repository
git clone https://github.com/Shunli-Wang/CPR-CLIP ./CPR-CLIP
cd ./CPR-CLIP

# 2.Create conda env (Pytorch2.0 will be installed.)
conda create -n CPR-CLIP python=3.10
conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
pip install -r requirements.txt

# 3.Download video features and unzip them into ./pkl/
tar -xzvf TSN-Feature.tar.gz && rm TSN-Feature.tar.gz
mv TSN_Single_Feat.pkl TSN_Composite_Feat.pkl ./pkl/

Datasets

The CPR-Coach dataset provides 14 single-class actions and 74 composite error actions in four different perspectives, containing 4,544 videos. The performance of composite error action recognition is measured through mAP and mmit mAP.

This repository provides the extracted video TSN features TSN-Feature.tar.gz (~33MB). You can download it from BaiduNetDisk[star] or Google Drive.

Training & Testing

  • To train the CPR-CLIP with TSN as video backbone:
CUDA_VISIBLE_DEVICES=0 \
python ./CPR-CLIP.py --exp_name 'CPR-CLIP_w_TSN' --enable_CLIP_loss --eval_CLIP_result
  • To train the CPR-CLIP+ with TSN as video backbone:
CUDA_VISIBLE_DEVICES=0 \
python ./CPR-CLIP.py --exp_name 'CPR-CLIP+_w_TSN' --enable_CLIP_loss --enable_BCE_loss

Acknowledgements

This project is based on CLIP and CPR-Coach.

If this repository is helpful to you, please give this repository a small STAR!

Concate

If you have any questions about our work, feel free to contact [email protected].

Please continue to pay attention to the subsequent code and data releasing.

cpr-clip's People

Contributors

shunli-wang avatar

Stargazers

Hu avatar Jonathan Aechtner avatar  avatar heartStrive_ avatar  avatar Dingkang Yang 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.