Giter Club home page Giter Club logo

postureguard's Introduction

PostureGuard

Realtime detection of incorrect sitting posture

How to run project

  • Build CenterNet project included in 3rd_party directory. Instructions can be found here (https://github.com/lukaszkepka/CenterNet)
  • Download keypoint detection model for CenterNet (prefered model: multi_pose_dla_3x)
  • Download posture detection model and copy its contents to src/posture_detection/models/default_model
  • Run demo.py. Example usage
demo.py --keypoint_detector_model_path ../../3rd_party/CenterNet/models/multi_pose_dla_3x.pth --video_file_path C:/videos/video.mp4 --posture_detector_model_path ./models/default_model

How to train custom model

  • Gather images representing sitting people from side view. Images should be divided into two classes 'correct', 'not_correct'. Images can be also extracted from video files by using data_preparation/extract_images_from_video.py Recommended structure for dataset organisation: dataset/images/<class_name> (class_name โˆˆ {'correct', 'not_correct'})
  • Extract keypoints from images and save them to csv file by using data_preparation/extract_and_save_keypoints.py. Example usage:
extract_and_save_keypoints.py --images_directory D:\Datasets\images\ --model_path ..\..\3rd_party\CenterNet\models\multi_pose_dla_3x.pth
  • [Optional] Inspect generated keypoints with data_preparation/display_annotations.py
  • Run training with posture_detection/train_model.py. Example usage:
train_model.py --annotations_file_path D:\Datasets\images\annotations.csv --model_name default_model
  • [Optional] Inspect trained model with posture_detection/inspect_model.py

Example results

Video

postureguard's People

Contributors

lukaszkepka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

postureguard's Issues

posture detection model

Dear sir, when I run the demo, README.md prompts me to Download posture detection model and copy its contents to src/posture_detection/models/default_model, but I can't find this model. Could you tell me where I can get it?

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.