-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run unity plugin on cpu ? #26
Comments
Hi, CPU mode should work normally as GPU mode, and your configuration also seems correct. One possible reason would be, when you modify the parameters in the code, did you also change them in the inspector? Unity inspector will overwrite the initialized value in the script. If things are still not working, I suggest trying openpose binary in your machine first, to check if your pre-requisites are all satisfied. (e.g. CUDA and CUDNN) |
Thank you for your answer I don't change any parameter in unity when i run the demo, but don't hesitate to ask me for screen captures if you need to check the default configurations of specific components of the unity demo. Unfortunately Unity still crashes, I don't know if you have any other idea left, thanks for your help anyway |
I feel a bit lost right now, so excuse me if my question sounds a bit dumb, but until now, I assumed that the unity_plugin-master zip file was the reunification of all the files already built. |
I just noticed that after the configuration with CMake, at the lie "CUDA_SDK_ROOT_DIR" the path has not been found. Error message : "CUDA_SDK_ROOT_DIR-NOTFOUND". I guess it's a problem so I'm searching a solution but so far I didn't find the right path in windows. Only found ubuntu solutions. If you know it please tell me ^^ |
I have successfully ran the demo scene by changing gpuNumber from -1 to 0 in "OpenPoseUserScript". So only the camera run without the pose tracking, that makes me think it's clearly the tracking calculations that cause the crash. Moreover, I checked my computer performances while running with gpuNumber at -1, and the GPU has a quick spike at 100% of capacity. So my question is : Do you know a way to reduce that component performances ? On the other hand, I tried to modify net resolution in the same file, but when I run the demo, it's by default in 368x368. Is the plugin not modifying the values ? or is it just a graphic "bug" ? Since reducing the resolution is the only way for me to launch the openpose demo, I assume that I need to do it also in unity |
In the current demo, the UI won't reflect the change of parameters in codes. That is, you can change the parameters through the UI but the change of parameters in codes won't be updated in the UI. It's kinda UI "bug" but I just ignored that in order to reduce the complexity of codes. Back to your problem, CUDA SDK is not installed in Windows by default and you need to download it according to your GPU version, as well as CUDNN required by OpenPose. (But you said your openpose quickstart works normally so I assume that you already have them?) So I still think it is most possibly your configuration. You may try hardcoding the resolution into the function first: |
Thank you for your answer, Your hardcoding solution works. If I replace "netResolution" by "new Vector2Int(-1, 64)" the plugin runs correctly and construct the unity skeleton over the image as intended. About the CUDA/CUDNN issue, I run correctly the openpose demo, but I use the CPU_ONLY mode. in GPU mode the computer can't create the images correctly. It behaves like if the calculations were too big to produce outputs (the window opens but stays black). I suppose back then that my graphic component was just not strong enough (the installation guide recommend titan X, mine is less powerful) but I'm not sure about that. (sorry If I don't use the correct IT terms, I'm an intern, not yet a professional ^^) |
I forgot to say something : Unity runs correctly with the hardcoding solution, as long as I don't try to use face/hands recognition. If I do, the plugin crashes. I tried to replace handResolution/faceResolution by new Vector2Int(64, 64) but then in unity, an error occurs : "Assets/OpenPose/Examples/Scripts/OpenPoseUserScript.cs(103,23): error CS1502: The best overloaded method match for `OpenPose.OPWrapper.OPConfigureHand(bool, OpenPose.Detector, UnityEngine.Vector2Int?, int, float, OpenPose.RenderMode, float, float, float)' has some invalid arguments" |
Ok i "solved" it : I tried to open it in the "project" window but I have the same as you if I open the file situated in the "hierarchy" window. Well thank you @ZiuTinyat for your help and your patience, it seems like all my problems are solved ! |
That's how it works. Hope you enjoy using it! |
I seem to have the same problem as @FrenchDoge, but I couldn't solve it doing what was suggested here.
Is there anything else I can try? I only need to track the hands, so if I could disable everything else and keep only the hand detection, it would work for me. Issue Summary Unity crashed running the Demo Scene Executed Command (if any) Play Demo Scene OpenPose Output (if any) Unity closes after I run the Demo. Errors (if any) Unity crashed. Type of Issue Your System Configuration
|
Hey, |
Same issue as most people here. Still crashes even with 64 x 64. I have 2GB VRAM which is not enough. If anyone has any working solution by now, i'd love to hear it :). |
I installed with success openpose last version, and tried to run unity plugin. When I open the scene and click on "play", it crashes few seconds later.
I think it's because my computer have components not strong enough. When I installed openpose, i had to make it run in CPU only mode, my graphic card was not powerful enough. I tried to find a way to tell unity to run on CPU but it seems to run on GPU no matter what I do.
This screen capture might help you understand better my problem :
https://imgur.com/a/0LyN7lE
this photo has been taken just before the crash, it's always the same messages. (I hope the link works)
I have checked the FAQ, which tells me (if I'm right) to modify the file "OpenPoseUserScript", situated in the folder :
openpose_unity_plugin-master\OpenPosePlugin\Assets\OpenPose\Examples\Scripts\
For example, it tells me to deactivate hands and face, and to reduce net resolution. I did it modifying these lines in the code : (tell me if I did something wrong)
32 :
90 :
However, unity keeps crashing. I thought changing renderMode.Gpu to RenderMode.Cpu would tell unity to run on CPU. I don't know what to do more.
I've checked every topic or issue or FAQ I could find that seemed to have a link with my problem. Please don't just answer by giving me a link and be a bit more specific, I'm afraid I need more specific help, I'm just an intern trying to do my best openpose is quite new to me ^^
thanks for your help
Issue Summary
Unity does not seem to run using the parameters I have chosen
Executed Command (if any)
Play button pressed on demo scene from unity
OpenPose Output (if any)
Unity output : console, here is a screen capture taken before the crash.
https://imgur.com/a/0LyN7lE
Errors (if any)
None: unity crashes before.
Type of Issue
You might select multiple topics, delete the rest:
unity crashes.
Your System Configuration
Whole console output Unity output : console, here is a screen capture taken before the crash.
https://imgur.com/a/0LyN7lE
OpenPose version: OpenPose Unity Plugin default
General configuration:
Non-default settings:
3rd-party software:
If GPU mode issue: I'm using the CPU_ONLY option, but just in case :
If CPU-only mode issue:
If Windows system:
The text was updated successfully, but these errors were encountered: