mmpose icon indicating copy to clipboard operation
mmpose copied to clipboard

Doubt about the use of mmpose

Open antonio2600 opened this issue 2 years ago • 12 comments

Hello. I'm doing a project abaout disease detection in human behaviors. For this I need to detect the poses of people in videos of daily tasks. I want to use the mmpose library, but I don't really know how to do it. The examples that I have seen you do it with an image, how could I do it with a video? Thanks.

antonio2600 avatar Dec 15 '22 21:12 antonio2600

Hi, the simplest way to extract human poses in videos with MMPose is to use the demo scripts of MMPose 1.x. The detailed steps:

  1. Install MMPose 1.x (see installation guide). Note that you need to install MMPose from source in "Step 1" and using the branch dev-1.x instead of 1.x.
  2. Run demo on your videos following this guide. Remember to add argument --save-predictions to save the model predictions on your disk.

Then you can find the detected human poses of each frame in your video under the OUTPUT_ROOT you set in step 2, which is ready for use on your own tasks.

Ben-Louis avatar Dec 16 '22 02:12 Ben-Louis

Ok. And another question. I have been working with mmaction2 action recognition on kinetics-400. Can I combine the action recognition model with mmpose?

antonio2600 avatar Dec 16 '22 10:12 antonio2600

I think it is practicable since MMAction2 supports skeleton-based action recognition models. @ly015 Could you please give some specific advice?

Ben-Louis avatar Dec 16 '22 13:12 Ben-Louis

In MMActoin2 we provided a demo to use MMDetection, MMPose, and MMAction2 to perform human detection, pose estimation, and skeleton-based action recognition. The documentation can be found here.

ly015 avatar Dec 16 '22 13:12 ly015

Ok, thanks!

antonio2600 avatar Dec 16 '22 13:12 antonio2600

Hello. I have been trying inference with Skeleton-based Action Recognition Models but the command fails and I don't know why, because it says that there isn't module named 'mmaction'. Captura desde 2022-12-19 19-15-25

antonio2600 avatar Dec 19 '22 18:12 antonio2600

Have you installed MMAction2? If not, you could install it following this doc and try again.

Ben-Louis avatar Dec 20 '22 03:12 Ben-Louis

Yes I installed it and I have used other files that also import from mmaction and they have not given me problems, but now it fails.

antonio2600 avatar Dec 20 '22 10:12 antonio2600

I have solved the error copying the mmaction folder inside demo, otherwise it doesn't detect it. Now the error that I get is this:

image

antonio2600 avatar Dec 20 '22 12:12 antonio2600

I've got the original video with the 2D skeleton. The work I'm doing is based on recognizing actions related to diseases, so I need to extract metrics from the skeleton I just got. The question I have is, how do I get information now from the video, is there any information about this? Time that the skeleton is still, time that it is sitting... @ly015 @Ben-Louis

antonio2600 avatar Dec 21 '22 11:12 antonio2600

Hi, the simplest way to extract human poses in videos with MMPose is to use the demo scripts of MMPose 1.x. The detailed steps:

  1. Install MMPose 1.x (see installation guide). Note that you need to install MMPose from source in "Step 1" and using the branch dev-1.x instead of 1.x.
  2. Run demo on your videos following this guide. Remember to add argument --save-predictions to save the model predictions on your disk.

Then you can find the detected human poses of each frame in your video under the OUTPUT_ROOT you set in step 2, which is ready for use on your own tasks.

Could you please explain the difference between dev-1.x and 1.x ? The branches of mmpose is quite confusing. Sometimes I failed to run the demo code, however, it works when I change to another branch.

Billccx avatar Jan 12 '23 13:01 Billccx

Hi @Billccx, sorry for the confusion. Branch 1.x is the stable version of MMPose 1.0 while branch dev-1.x is the develop branch where new features, such as saving model predictions locally when running demos, are added. This is why you will fail to run demos in branch 1.x with some functions only supported in dev-1.x. New features in dev-1.x will be merged into 1.x upon the release of new versions.

Ben-Louis avatar Jan 12 '23 23:01 Ben-Louis