human-action-classification icon indicating copy to clipboard operation
human-action-classification copied to clipboard

error in !python3 run_image.py --image=test.png

Open moahaimen opened this issue 1 year ago • 13 comments

Traceback (most recent call last): File "run_image.py", line 8, in from tf_pose.estimator import TfPoseEstimator File "/content/human-action-classification/tf_pose/init.py", line 5, in from tf_pose.runner import infer, Estimator, get_estimator File "/content/human-action-classification/tf_pose/runner.py", line 8, in from tf_pose.estimator import TfPoseEstimator File "/content/human-action-classification/tf_pose/estimator.py", line 4, in import slidingwindow as sw ModuleNotFoundError: No module named 'slidingwindow'

moahaimen avatar Aug 04 '22 07:08 moahaimen

pip3 install slidingwindow

xander-m2k avatar Aug 04 '22 07:08 xander-m2k

i did it now then another error appeared by the way i am using Google Colab

!python3 run_image.py --image=test.png No module named '_pafprocess' you need to build c++ library for pafprocess. See : https://github.com/ildoonet/tf-pose-estimation/tree/master/tf_pose/pafprocess

moahaimen avatar Aug 04 '22 07:08 moahaimen

Come on man, this error is litteraly in the README of this repository... It shows you exactly what to do

xander-m2k avatar Aug 04 '22 07:08 xander-m2k

@moahaimen

ok thank you, I am sorry for the stupid questions, believe I am trying to find a solution for my Ph.D. project so forgive me I am trying to detect object human are holding , using Yolov5 I succeed in that, but my professor wants me now to recognize the human action, is he going to throw it, or other actions and I am new in this field so I will appreciate any help from you, is that possible?

moahaimen avatar Aug 04 '22 08:08 moahaimen

Hi @moahaimen I could perhaps try to help on weekends, but weekdays would not be possible.

dronefreak avatar Aug 04 '22 10:08 dronefreak

I did my bachelor thesis about human action classification, I used many papers, but this one (https://arxiv.org/pdf/1904.09140.pdf) I used the most. I am not sure I can share my own paper/thesis because I worked with a camera surveillance company.

xander-m2k avatar Aug 04 '22 11:08 xander-m2k

using Yolov5 I succeed in that

BTW, I found that Yolov4 was working way better then v5 overall.

xander-m2k avatar Aug 04 '22 11:08 xander-m2k

I did my bachelor thesis about human action classification, I used many papers, but this one (https://arxiv.org/pdf/1904.09140.pdf) I used the most. I am not sure I can share my own paper/thesis because I worked with a camera surveillance company.

thank you for responding, my work also on CCTV but i don't need papers I just need to do it by code in python, PyTorch do you have any examples in code you can help me with so I can merge Yolo+LSTM so I can detect the object and the human recognition thank you

moahaimen avatar Aug 04 '22 14:08 moahaimen

I did my bachelor thesis about human action classification, I used many papers, but this one (https://arxiv.org/pdf/1904.09140.pdf) I used the most. I am not sure I can share my own paper/thesis because I worked with a camera surveillance company.

thank you for responding, my work also on CCTV

but i don't need papers I just need to do it by code in python, PyTorch

do you have any examples in code you can help me with

so I can merge Yolo+LSTM so I can detect the object and the human recognition

thank you

I'm sorry, I cannot share those.

xander-m2k avatar Aug 04 '22 15:08 xander-m2k

I did my bachelor thesis about human action classification, I used many papers, but this one (https://arxiv.org/pdf/1904.09140.pdf) I used the most. I am not sure I can share my own paper/thesis because I worked with a camera surveillance company.

thank you for responding, my work also on CCTV but i don't need papers I just need to do it by code in python, PyTorch do you have any examples in code you can help me with so I can merge Yolo+LSTM so I can detect the object and the human recognition thank you

I'm sorry, I cannot share those.

ok thank you dont share it but could you explain in in words so i understand whether there is a hope to do it or not thank you again

moahaimen avatar Aug 04 '22 15:08 moahaimen

Not to be rude or anything, but if you have made it as far as a PhD you should be able to research that for yourself right? Regarding if this works or not, I would not know, I took a different approach from you (I was using pose estimation), so there is no way I could advise you on that. But if I might say, start small, by just detecting one person with Yolov4 (or 5), optimize that output, use the bounding box image as input of your LSTM model. Then maybe if you finish that you can start working on multiple people tracking.

So my basic approach would be:

  1. Find or create some training data
  2. The YOLO model has already been trained but you can retrain it if you want
  3. Create a large dataset using the YOLO model
  4. Train a LSTM model with that dataset
  5. Try some alternating training values, see if you can get better results

Other than that, research is research, even if I did not succeed, you should still try it, because you might find a better approach. Therefore no one can tell you what might an what might not work, things might just coincedentally work. (Of course using models that make somewhat sense.)

xander-m2k avatar Aug 04 '22 15:08 xander-m2k

Not to be rude or anything, but if you have made it as far as a PhD you should be able to research that for yourself right? Regarding if this works or not, I would not know, I took a different approach from you (I was using pose estimation), so there is no way I could advise you on that. But if I might say, start small, by just detecting one person with Yolov4 (or 5), optimize that output, use the bounding box image as input of your LSTM model. Then maybe if you finish that you can start working on multiple people tracking.

So my basic approach would be:

  1. Find or create some training data
  2. The YOLO model has already been trained but you can retrain it if you want
  3. Create a large dataset using the YOLO model
  4. Train a LSTM model with that dataset
  5. Try some alternating training values, see if you can get better results

Other than that, research is research, even if I did not succeed, you should still try it, because you might find a better approach. Therefore no one can tell you what might an what might not work, things might just coincedentally work. (Of course using models that make somewhat sense.)

thank you, I did all these steps but Poor Results i got, so The only way I see it is by putting more Datasets of videos for LSTM and for the PH.D I can't explain all the project, but what I can say to you I tried till now more than 7 methods to reach better accuracy, and all that takes time, the only approach I can think would work is taking the angles of the body to see if the athlete is in a position to through the ball thank you again

moahaimen avatar Aug 04 '22 15:08 moahaimen

while running the pafprocess issues mentioned in the readme.md I am encountering the following error: No file python.swg found. So how to resolve this error

yash2002vardhan avatar Feb 28 '24 06:02 yash2002vardhan