Giter Club home page Giter Club logo

jiagewang / openpose-based-gui-for-realtime-pose-estimate-and-action-recognition Goto Github PK

View Code? Open in Web Editor NEW
82.0 7.0 22.0 96.39 MB

GUI based on the python api of openpose in windows using cuda10 and cudnn7. Support body , hand, face keypoints estimation and data saving. Realtime gesture recognition is realized through two-layer neural network based on the skeleton collected from the gui.

Batchfile 3.90% Shell 3.29% Python 92.81%
openpose action-recognition pose-estimation gesture-recognition emotion-recognition

openpose-based-gui-for-realtime-pose-estimate-and-action-recognition's Introduction

GUI-for-Pose-Estimate-and-Action-Recognition

avatar

Introduction

  • This is a GUI program for pose estimation and action recognition based on Openpose.
  • You can visualize key-points on image or camera and save the key-points data(as npy format) at the same time.
  • You can train a deep learning model for action ( or gesture or emotion) recognition through the data collected from this program.
  • My platform is windows10. I have complied the openpose with the python api and the complied binary files will be given below. So you don't have to compile the openpose from scratch

Python Dependence

  • numpy==1.14.2
  • PyQt5==5.11.3
  • opencv-python==4.1.0.25
  • torch==1.0.1(only for gesture recognition)

Installation

  • Install cuda10 and [cudnn7]. Or here is my BaiduDisk password:4685.

  • Run models/getModels.bat to get model. Or here is my BaiduDisk password:rmkn and put models in the corresponding position

    avatar

  • Download 3rd-party dlls from my BaiduDisk password:64sg and unzip in your 3rdparty folder.

Usage

  1. avatar : save current result
  2. avatar : save result every interval while camera or video is opening
  3. avatar : open camera
  4. avatar : show setting view
  5. avatar : show file-tree view

Setting

  1. First, you should select which kind of key-points do you want to visualize or collect by checking the checkbox(Body, Hand, Face).
  2. The threshold of three model can be controled by draging corresponding slider.
  3. Change save interval.
  4. Change net resolution for smaller GPU memery, but it will reduce the accuracy.
  5. The function of gesture recognition can only be used when the hand checkbox is on. My model is only a 2 layers MLP, and the data was collected with front camera and left hand. So it may have many limitations. Your can train your own model and replace it.

TODO

  • action recognition

  • emotion recognition

Data format

You will get a output folder like the following figure. The count is set to 0 when the program begins and will automatically increase with the number of images saved. avatar

data_body = np.load('body/0001_body.npy')
data_hand = np.load('hand/0001_hand.npy')
data_face = np.load('face/0001_face.npy')
print(data_body.shape)  
# (1, 25, 3)  : person_num x kep_points_num x x_y_scroe
print(data_hand.shape)  
# (2, 1, 21, 3)  : left_right x person_num x kep_points_num x x_y_scroe
print(data_face.shape) 
# (1, 70, 3)  : person_num x kep_points_num x x_y_scroe

Train your own model

  1. Collect data and make folder for every class.

    train_data_format

  2. run python train.py -p C:\Users\Administrator\Desktop\自建数据集\hand to train your model(replace path with your dataset path)

References

Openpose

openpose-based-gui-for-realtime-pose-estimate-and-action-recognition's People

Contributors

jiagewang avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

openpose-based-gui-for-realtime-pose-estimate-and-action-recognition's Issues

Run in Ubuntu system

Thanks for your wonderful job! And I want to know how to run the project in Ubuntu system ?

System error!

when I download this repository and try to use it, I have met a problem like this:
H:\SRT\Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition-master\custom
AttributeError: getattribute

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "", line 1, in
runfile('H:/SRT/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition-master/main.py', wdir='H:/SRT/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition-master')

File "C:\Users\PC.conda\envs\Open\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)

File "C:\Users\PC.conda\envs\Open\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "H:/SRT/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition-master/main.py", line 268, in
window = OpenposeGUI()

File "H:/SRT/Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition-master/main.py", line 27, in init
loadUi("ui/main_window.ui", self)

File "C:\Users\PC.conda\envs\Open\lib\site-packages\PyQt5\uic_init_.py", line 226, in loadUi
return DynamicUILoader(package).loadUi(uifile, baseinstance, resource_suffix)

File "C:\Users\PC.conda\envs\Open\lib\site-packages\PyQt5\uic\Loader\loader.py", line 72, in loadUi
return self.parse(filename, resource_suffix, basedir)

File "C:\Users\PC.conda\envs\Open\lib\site-packages\PyQt5\uic\uiparser.py", line 1021, in parse
actor(elem)

File "C:\Users\PC.conda\envs\Open\lib\site-packages\PyQt5\uic\uiparser.py", line 942, in createConnections
QtCore.QMetaObject.connectSlotsByName(self.toplevelWidget)

SystemError: returned a result with an error set

Can anyone help me? Thanks a lot

手势识别训练

拿到手指关节点数据之后,做了那些处理再拿去训练的呢?

Gdk-Message: 08:53:55.334: python3: Fatal IO error 11

python3 main.py
/home/wally/Videos/GUI-for-Realtime-Pose-Estimate-and-Action-Recognition/custom
Starting OpenPose Python Wrapper...
Auto-detecting all available GPUs... Detected 1 GPU(s), using 1 of them starting at GPU 0.
Gdk-Message: 08:53:55.334: python3: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.

新手求助

作者你好:
我正在做一个行为识别的项目,刚刚接触这方面。我看你是用了openpose官方给的python demo改的,请问这是怎么做到的呢?我目前是将自己的整个工程都放在官方的examples文件夹里面,那样才能import pyopenpose,换一个目录就不行了。可以分享一下你大概是怎么做的吗?谢谢!

CUDNN_STATUS_EXECUTION_FAILED

Starting OpenPose Python Wrapper...
Auto-detecting all available GPUs... Detected 1 GPU(s), using 1 of them starting at GPU 0.
F1106 09:44:36.376341 11380 cudnn_conv_layer.cu:28] Check failed: status == CUDNN_STATUS_SUCCESS (8 vs. 0) CUDNN_STATUS_EXECUTION_FAILED
*** Check failure stack trace: ***

这是什么原因呢?

Build a pyd file

您好,请问你可以方便给我一个build pyd 文件的教程吗?,我这边环境是python3.5的,你项目里的3.6的pyd用不起来。

求助一下遇到no module named pyopenpose要怎么办

我按照您所说的步骤将模型下载好放到对应的位置,并且也把下载的dll文件也放到了3rdparty文件夹中,但是执行main.py的时候报错说Traceback (most recent call last):
File "G:\Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition-master\main.py", line 17, in
from custom.openpose_model import OpenposeModel
File "G:\Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition-master\custom\openpose_model.py", line 13, in
raise e
File "G:\Openpose-based-GUI-for-Realtime-Pose-Estimate-and-Action-Recognition-master\custom\openpose_model.py", line 8, in
import pyopenpose as op
ModuleNotFoundError: No module named 'pyopenpose'
请问怎么解决

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.