Open kdemon1011 opened 5 years ago
Do not use num_gpu 0, that only disables OpenPose. If you want CPU version, compile OP for CPU-only.
@soulslicer Still, this should not be returning 2.0, but rather empty arrays, something is buggy here.
I will be back to my lab to look into this in a week or two, I will get back to you then. But do check our default tutorial and code those definitely work
One more thing, I saw here
import sys
import cv2
import os
from sys import platform
import argparse
import time
sys.path.append('/usr/local/python')
from openpose import pyopenpose as op
params = dict()
params["model_folder"] = "/openpose/models/"
params["write_json"] = "/openpose/results/"
params["model_pose"] = "COCO" // when we use COCO
opWrapper = op.WrapperPython()
opWrapper.configure(params)
opWrapper.start()
image_path = "/openpose/examples/media/COCO_val2014_000000000241.jpg"
datum = op.Datum()
imageToProcess = cv2.imread(image_path)
datum.cvInputData = imageToProcess
opWrapper.emplaceAndPop([datum])
print("keypoints: \n" + str(datum.poseKeypoints)) // 1e-45
So, with COCO it returns 1e-45 where as with BODY_25 or by default it works fine.
I have the same problem. When there is no person, the result is 2.0.
Any updates on this issue?
When there is no skeleton detected in a frame, both poseKeypoints
and poseScores
default to 2.0.
When there is skeleton detected in the previous frame (where its poseScore
is x), and no skeleton detected in the current frame, both poseKeypoints
and poseScores
default to x.
Any explanation?
Wow that is quite serious. I will look into that issue this weekend. I wasn't able to solve the 2.0 issue, but it seemed minor initially as this is something one can check easily. The issue you mention though seems a little problematic.
Thanks @soulslicer Please keep us posted
When there is no skeleton detected in a frame, both
poseKeypoints
andposeScores
default to 2.0. When there is skeleton detected in the previous frame (where itsposeScore
is x), and no skeleton detected in the current frame, bothposeKeypoints
andposeScores
default to x.Any explanation?
I was not able to recreate this. Take a look on the 04_keypoints_from_images.py to see how we operate over multiple images. You have to recreate an empty datum each time
As for the empty image returning 2.0:
return array(buffer_info(
m.getPseudoConstPtr(),/* Pointer to buffer */
sizeof(float), /* Size of one scalar */
format, /* Python struct-style format descriptor */
m.getSize().size(), /* Number of dimensions */
m.getSize(), /* Buffer dimensions */
m.getStride() /* Strides (in bytes) for each index */
)).release();
We are calling the above functions when casting to a numpy array. We are returning a size of 0 which should make sense, but it get's casted to 2.0 and not an empty numpy array. Will have to check this further, but for now the easiest fix is to check the shape of the returning object, and if it is empty, we can say that the image doesn't contain people
I ran following code
And in return i am getting following output.
What is 2.0. Is there something wrong in the output?