Daniil-Osokin / lightweight-human-pose-estimation-3d-demo.pytorch

Real-time 3D multi-person pose estimation demo in PyTorch. OpenVINO backend can be used for fast inference on CPU.
Apache License 2.0
660 stars 138 forks source link

Problem with pose_extractor #74

Closed YuriiVavrynchuk closed 3 years ago

YuriiVavrynchuk commented 3 years ago

Hello, @Daniil-Osokin ! I have found some problems with prerequisites installation. I hope it will be useful for you:

  1. You don`t tell that we should add OpenCV_DIR env variable in opencv\build folder.
  2. When somebody run python setup.py build_ext command, it will lead to the following error: cannot open input file 'opencv_calib3d-NOTFOUND.obj' I have fixed this issue by building C++ project manually with opencv_world450/opencv_world450d.lib and dll in Release.

I hope my notes will help you and the others who will try out your solution. I also have one question to you: which improvement does pose_extractor give to your project. As I understand, this is something like a boost but I don`t understand it.

Daniil-Osokin commented 3 years ago

Hi, Yurii! Thanks for the feedback. The improvement is in the inference time for that part. Python code works slower.

YuriiVavrynchuk commented 3 years ago

Hello, Daniil. I have another problem with pose_extractor. I have added folder which contains pose_extractor.pyd file but error I get this message : #### Cannot load fast pose extraction, switched to legacy slow implementation. ####. How can I solve this problem? I use PyCharm with python 3.9. image image

from pose_extractor import extract_poses command looks for pose_extractor folder with extract_poses file on it. As you can see, build library is added to PYTHONPATH(library root). I have the following error if i just import pose_extractor in python.exe: ImportError: DLL load failed while importing pose_extractor: The specified module could not be found.

Daniil-Osokin commented 3 years ago

You should have added <path_to>/pose_extractor/build/ (see README). You can also add this path directly (e.g. on line 4) with sys.path.append(<path_to_build_directory>).

YuriiVavrynchuk commented 3 years ago

As you can see from the PyCharm screen, IDE understands that <path_to>/pose_extractor/build/ is a library root. Problem is in pose_extractor.pyd file(I have built it manually in x64 configuration using VS 2019 (all 3 builds were successul)). Could you send me your pose_extractor.pyd please. I'm sure it will help to solve this issue. Best regards, Yurii

Daniil-Osokin commented 3 years ago

I do not have any. You can try to comment out try/except block to see the real error message. Possibly some other libs are missed.

YuriiVavrynchuk commented 3 years ago

I import built pose_extractor.pyd by python.exe without any try/except. But I get this problem

>>> import pose_extractor
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed while importing pose_extractor: The specified module could not be found.

I means that problem is in this lib. This lib is visible for python becouse if I import something random, the problem will be another:

>>> import dfsgfsdgsadg
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'dfsgfsdgsadg'

Please, can you sand me pose_extractor.pyd file? I will be very grateful.

Daniil-Osokin commented 3 years ago

Unfortunately, the error message did not add any new information. I think, that OpenCV dll possibly depends from other libraries. Did you update the PATH environment variable, as described here?

YuriiVavrynchuk commented 3 years ago

Yes, I mentioned it in the first message.

Daniil-Osokin commented 3 years ago

If so, I have no more ideas.

Daniil-Osokin commented 3 years ago

Ok, closing.