CMU-Perceptual-Computing-Lab / openpose_unity_plugin

OpenPose's Unity Plugin for Unity users
https://github.com/CMU-Perceptual-Computing-Lab/openpose
Other
718 stars 168 forks source link

The binary fails (testBinary.bat) and how to set Unity to ONLY CPU mode #39

Open SSupawee opened 5 years ago

SSupawee commented 5 years ago

Posting rules

  1. Duplicated posts will not be answered. Check the FAQ section, other GitHub issues, and general documentation before posting. E.g., low-speed, out-of-memory, output format, 0-people detected, installation issues, ...).
  2. Fill the Your System Configuration section (all of it or it will not be answered!) if you are facing an error or unexpected behavior. Feature requests or some other type of posts might not require it.
  3. No questions about OpenPose or 3rd party libraries:
    • OpenPose-related issues should check the official OpenPose GitHub repository.
    • Caffe errors/issues, check Caffe documentation.
    • CUDA check failed errors: They are usually fixed by re-installing CUDA, then re-installing the proper cuDNN version, and then re-compiling (or re-installing) OpenPose. Otherwise, check for help in CUDA forums.
    • OpenCV errors: Install the default/pre-compiled OpenCV or check for online help.
  4. Set a proper issue title: add the Ubuntu/Windows keyword and be specific (e.g., do not call it: Error).
  5. Only English comments. Posts which do not follow these rules will be ignored, closed, or reported with no further clarification.

Issue Summary

I do not have NVIDIA, CUDA and cuDNN. I ran getPlugins.bat , getModels.bat and testBinary.bat (by double click on the file). But it did not show any video. I've already uncommented for CPU mode in testBinary.bat but I don't know how to set in Unity as the documentation said "Then do the same settings in Unity." https://github.com/CMU-Perceptual-Computing-Lab/openpose_unity_plugin/blob/master/doc/installation.md (Having issues topic)

Executed Command (if any)

I double clicked on testBinary.bat for running

OpenPose Output (if any)

There was no any video

Errors (if any)

-

Type of Issue

You might select multiple topics, delete the rest:

Your System Configuration

  1. Whole console output (if errors appeared), paste the error to PasteBin and then paste the link here: LINK

  2. OpenPose version: OpenPose Unity Plugin default? Or specific commit (e.g., d52878f)? Or specific version from Release section (e.g., 1.5.0)? OpenPose version 1.5.0 (OpenPose Unity Plugin default)

  3. General configuration:

    • Operating system : Windows 10, 64-bit
    • Release or Debug mode? (by default: release): release
    • Compiler : VS2015 Enterprise Update 3
  4. Non-default settings:

    • Any custom OpenPose configuration with respect to the default version? (by default: no): no
  5. 3rd-party software:

    • Caffe version: Default from OpenPose, custom version, ...? Default from OpenPose
    • OpenCV version: pre-compiled apt-get install libopencv-dev (only Ubuntu); OpenPose default (only Windows); compiled from source? If so, 2.4.9, 2.4.12, 3.1, 3.2?; ...? OpenPose default
  6. If GPU mode issue:

    • CUDA version (cat /usr/local/cuda/version.txt in most cases):
    • cuDNN version:
    • GPU model (nvidia-smi in Ubuntu):
  7. If CPU-only mode issue:

    • CPU brand & model: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz (8 CPUs), ~2.3GHz
    • Total RAM memory available: 3278MB ( I use windows on mac)
  8. If Windows system:

    • Default OpenPose DLL

I am sorry if I did somthing wrong. I am very new to this ^^

iiwolf commented 5 years ago

Yes I have been struggling with the same thing. I changed %ARGS% to %ARGS_CPU% which I see appends "--render_pose 1" to the .exe command. Like you said, the instructions say "then do the same in unity". I am not sure what that means. Though following other posts, I changed every renderMode to Cpu in the Scripts folder. Still it tells me CUDA version insufficient.

Any help would be appreciated. And if I uncover anything I will let you know.

Thanks!

ZiuTinyat commented 5 years ago

Theoretically, setting those renderMode to Cpu is enough to avoid using GPU.

Can you make sure the mode is set correctly? (i.e. you should change all settings in Unity inspector or OpenPoseUserScript, rather than OPWrapper, where stores the default settings)

KoenL-1747481 commented 4 years ago

Any working solution by now? i have same issue, crashes because i don't have enough RAM.

Zydiii commented 4 years ago

I have the same problem with that trying to use CPU. And I do not have any NVIDIA, CUDA and cuDNN. I have tried to use cpu mode by uncommenting %DEMO% %ARGS_CPU%, also tried to run the exe in the terminal using .\bin\OPenPoseDemo.exe --video .\examples\media\video.avi --render_pose 1. But I still failed to run the OPenPoseDemo.exe. Whatever the mode I choose, GPU, LOWRE GPU or CPU, it has the same error message: Cuda check failed (35 vs. 0): CUDA driver version is insufficient for CUDA runtime version. Could you please tell me where may I have done wrong? Thanks!

FromRookieToMaster commented 4 years ago

I have the same problem.I changed every RenderMode in OPWrapper script but it still failed when running project.The log says checked GPU fails,this means it still looking for GPU mode.How can I solve this problem?

Keneyr commented 4 years ago

I have the same problem with Zydiii. I do not have NVIDIA,CUDA and cuDNN. And I tried to change the command ,also failed in cpu mode

Keneyr commented 4 years ago

Anybody have the solution??? I would really appreciate it !!!!!!! I have struggled for few days...It's really confusing.... I compile OpenPose myself and repalce the dll files by copying them to \openpose_unity_plugin\OpenPosePlugin\Assets\OpenPose\Plugins and the error comes as : You need to compile OpenPose with CUDA support in order to use GPU resize. my god CPU mode still doesn't work!!

luanacsantos commented 3 years ago

Does anyone have the solution? I'm having the same problem. I do not have NVIDIA,CUDA and cuDNN either.

JulessFontys commented 3 years ago

Anyone found a solution yet? I cant find it

lookcat commented 3 years ago

You need to compile OpenPose with CUDA support in order to use GPU resize.

cpu mode

./build/examples/openpose/openpose.bin --image_dir {1} --write_json {2} --render_pose 0 --face --face_render 1 --hand --hand_render 1

gpu mode

./build/examples/openpose/openpose.bin --image_dir {1} --write_json {2} --render_pose 2 --face --face_render 2 --hand --hand_render 2 --num_gpu 0".format(op_dir, input_path, out_json_path)

ADD --num_gpu 0, it's fine .

[--render_pose 2, --face_render 2, --face_render 2 ] use the cuda when not set --num_gpu 0

 #ifndef USE_CUDA
            if (mGpuResize)
                error("You need to compile OpenPose with CUDA support in order to use GPU resize.",
                    __LINE__, __FUNCTION__, __FILE__);
        #endif
ernlavr commented 3 years ago

@lookcat Thank you for your post!

I was experiencing similar issue when compiling with CPU-only support on Ubuntu 20.04. Adding the "--num_gpu 0" flag worked for me!