I have built the openpose in my RTX 2080 TI 4X GPU machine. The build was successful and I have got the python API's, The problem here is when I try to run the python file which uses single datum (i.e single GPU) It is working properly. However, For my case its not giving the FPS as it gives for the portable version of openpose. I saw a script from tutorial_api_python directory (05_keypoints_from_images_multi_gpu.py) that does multiple GPU inference but its throwing "Segmentation Fault (core dumped)". While I manually overwrite the number of GPUs to 1 in the script, it runs. I want to run openpose using multiple GPUs, Can Anyone help me solve this issue ?
Thanks in Advance.
Interesting, i will look into it. I guess it works fine running it from command line?
@soulslicer Yes, When I try to run using openpose.bin from the build folder, It is running with the multiple GPUs with no issues. But when I try to run with Python Binding (05_keypoints_from_images_multi_gpu.py) script its throwing error called "segmentation fault (core dumped)".
I have the same problem with 2x GTX 1070s. I noticed that adding
opWrapper.stop()
opWrapper.start()
after the opWrapper.start() makes it work. Even with this I still get the segmentation faults (Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) sometimes.
How should we debug segfaults which happen in python?
I will get back to a fix on this by Monday
Ok, it somehow looks like I need to preload the images into memory in order to assign them. Here is an example of how to modify the code:
# Create datums
datums = []
images = []
# Read and push images into OpenPose wrapper
for gpuId in range(0, numberGPUs):
imageId = imageBaseId+gpuId
if imageId < len(imagePaths):
imagePath = imagePaths[imageBaseId+gpuId]
datum = op.Datum()
images.append(cv2.imread(imagePath))
datum.cvInputData = images[-1]
datums.append(datum)
opWrapper.waitAndEmplace([datums[-1]])
I will push a fix today
Fixed in the latest version! Let us know if you still face any issue. Thanks.
Thanks @soulslicer and @gineshidalgo99 It is working fine.