ravijo / ros_openpose

ROS wrapper for OpenPose
MIT License
142 stars 63 forks source link

Out of Memory #55

Closed waiyc closed 3 years ago

waiyc commented 3 years ago

Hi,

I faced this issue when running run.launch with realsense camera

Check failed: error == cudaSuccess (2 vs. 0)  out of memory

I installed openpose and verified that the demo in openpose's example folder works(with smaller net_resolution size).

I tried to modify the net resolution in rosOpenposeAsync.cpp from 368 to something smaller but still crash ... Any idea how to overcome this issue with realsense input?

ravijo commented 3 years ago

@waiyc

I am sorry to hear that you face out of memory issue. Believe me it is a very common problem and we can make it work by some workarounds.

Below are some advises I have for you:

Let me know if the problem persists.

Cheers!

waiyc commented 3 years ago

Hi @ravijo ,

Yes, I tried adding the --net_resolution -1x128 into the parameter and it works now. However, I found out that the CPU usage is running at 100%.Increase the sleep time would decrease the CPU usage but is it partly because I did not compile with CuDNN? ( the openpose failed to work with CuDNN enable in my case )

ravijo commented 3 years ago

@waiyc

Yes, I tried adding the --net_resolution -1x128 into the parameter and it works now.

Glad to hear from you. :+1:

However, I found out that the CPU usage is running at 100%.Increase the sleep time would decrease the CPU usage but is it partly because I did not compile with CuDNN?

Yes, CuDNN (+ CUDA) gives speed to OpenPose inference procedure. You are seeing 100% CPU usages because OpenPose is using CPU. Sleep time will not affect your speed so much in this case.

As per my experience with OpenPose, it is tricky to install the Caffe framework. Caffe is very specific to versions of CUDA and CuDNN as well. Can you please check OpenPose or Caffe forum in this regard?

Once you have a successful installation of Caffe, OpenPose should be quick to install.

waiyc commented 3 years ago

Noted. Thank you for the suggestions . I will close this for now.