CV-ZMH / human-action-recognition

Multi Person Skeleton Based Action Recognition and Tracking
MIT License
129 stars 26 forks source link

Question about demo.py #8

Open xzyang123 opened 2 years ago

xzyang123 commented 2 years ago

Hi,

First of all, thank you so much for sharing this wonderful work. Really appreciate it.

I have a question regarding the demo.py. Could you help me?

In the demo.py, we initialize the pose_estimator, tracker, and action_classifier before we loop over the video frame.

But, if I try to initialize those 3 above functions inside the loop.

I couldn't get a proper prediction.

I only can get the correct prediction if I initialize them before the loop.

May I ask why I can't get a proper prediction?

Thank you so much for reading this message.

Looking forward to hearing from you.

zin-moe commented 2 years ago

You shouldn't initialize these 3 predictors inside the loop. If you do this, you can face these (your tracker can't update properly, fps will slow down). The reason why you can't get proper prediction is due to the tracker being reinitialized inside the video frame loop and it can't get previous frame data to track the persons.

xzyang123 commented 2 years ago

Hi Zin,

Thank you so much for the reply. I was thinking about the same thing.

In the original model, I tried to comment out 'tracking model', and to see if I can just can the action prediction.

I know I am not able to output the rendered image without tracking model, but I can still get the correct action prediction.

Which means the absence of tracking model won't affect the action prediction.

So, I move the pose and action models inside loop to see if they are still working.

This time, I couldn't get proper action predictions.

I don't know why this happened.

AlgorithmicPlanet commented 2 years ago

ModuleNotFoundError: No module named 'trt_pose'