ortegatron / hand_standalone

Standalone hand detector python wrapper for OpenPose
53 stars 15 forks source link

Cannot detect alone hand detection. #1

Closed JasOlean closed 5 years ago

JasOlean commented 6 years ago

I downloaded your repo and then I replace your py file in Openpose. And then sudo make install. But, I got a message No rule to make target install'. Stop. . Moreover, there is still body keypoints.

What do I need to do?

ortegatron commented 6 years ago

Hi, sorry for the delay, I've been busy with uni. Will review this incident and send an update soon.

yavana commented 6 years ago

[100%] Building CXX object python/openpose/CMakeFiles/_openpose.dir/_openpose.cpp.o /home/openpose/python/openpose/_openpose.cpp: In member function ‘void OpenPose::poseFromHeatmap(const cv::Mat&, std::vector<boost::shared_ptr<caffe::Blob > >&, op::Array&, cv::Mat&, std::vector<op::Point >&)’: /home/openpose/python/openpose/_openpose.cpp:232:35: error: ‘caffeHmPtr’ was not declared in this scope caffeNetOutputBlob.emplace_back(caffeHmPtr); ^ /home/openpose/python/openpose/_openpose.cpp:289:3: error: expected ‘)’ before ‘bodyPartConnectorCaffe’ bodyPartConnectorCaffe->setInterThreshold((float)poseExtractorCaffe->get(op::PoseProperty::ConnectInterThreshold)); ^ make[2]: [python/openpose/CMakeFiles/_openpose.dir/_openpose.cpp.o] Error 1 make[1]: [python/openpose/CMakeFiles/_openpose.dir/all] Error 2 make: *** [all] Error 2

Can you help me?

StrongRay commented 6 years ago

I have no problems merging in the codes but since Openpose moved up to 1.4.0 from 1.3.0, I hand copied the codes whenever I see anything "hands" related and merged into _openpose.cpp and openpose.py

If you get any caffe problems, it likely means your base openpose 1.4.0 building will likely encounter similar issues and has nothing to do with the addition of this standalone hand detector.

JasOlean commented 6 years ago

after you merge in the codes, could you detect the hand keypoints without the part of body?

StrongRay commented 6 years ago

Yes.

nhquanst commented 6 years ago

Many thanks ortegaton.
hand_skeleton

ortegatron commented 6 years ago

You are welcome ,sorry for not keeping the repo update anyway. I'm mostly busy with uni. By the way, a website called Learn Open CV realised a few weeks ago an article about hand key point detection. They don't use the OpenPose wrapper but they use the same Neural Network: https://www.learnopencv.com/hand-keypoint-detection-using-deep-learning-and-opencv/?ck_subscriber_id=272186823

StrongRay commented 6 years ago

Pretty cool. Kikas used the same model/weights from CMU opennpose but uses opencv cv2.dnn.readNetFromCaffe(protoFile, weightsFile) This demands OpenCV to be version 3.3 and above. You can also feed the images from your webcam with some modifications to the code.

MLsmaller commented 5 years ago

Hi,I am also planning to write the code of a hand detector myself, and include the hand-keypoint-detector of openpose. However, I am a little confused. I would like to ask if your code can detect the situation of two hands in the image? Could you please give me some contact information?Thank you very much.

MLsmaller commented 5 years ago

Pretty cool. Kikas used the same model/weights from CMU opennpose but uses opencv cv2.dnn.readNetFromCaffe(protoFile, weightsFile) This demands OpenCV to be version 3.3 and above. You can also feed the images from your webcam with some modifications to the code.

Hi,I am also planning to write the code of a hand detector myself, and include the hand-keypoint-detector of openpose. However, I am a little confused. I would like to ask if your code can detect the situation of two hands in the image? Could you please give me some contact information?Thank you very much.

JasOlean commented 5 years ago

When I merge the code, I face this error. How can I fix this?

Traceback (most recent call last): File "test2.py", line 50, in left_hands, right_hands,frame = openpose.forward_hands(frame, hands_rectangles, True) AttributeError: 'OpenPose' object has no attribute 'forward_hands'

StrongRay commented 5 years ago

When I merge the code, I face this error. How can I fix this?

Traceback (most recent call last): File "test2.py", line 50, in left_hands, right_hands,frame = openpose.forward_hands(frame, hands_rectangles, True) AttributeError: 'OpenPose' object has no attribute 'forward_hands'

i think I encountered this problem before. what worked for me is as follows

sys.path.append('/usr/local/python') from openpose import openpose as op . . openpose = op.OpenPose(params) . . left_hands, right_hands,frame = openpose.forward_hands(frame, hands_rectangles, True)

no more errors

JasOlean commented 5 years ago

I did as you told. But I got still this error..

Traceback (most recent call last): File "test.py", line 8, in from openpose import openpose as op File "/usr/local/python/openpose/openpose.py", line 17, in class OpenPose(object): File "/usr/local/python/openpose/openpose.py", line 46, in OpenPose np.ctypeslib.ndpointer(dtype=np.int32), np.ctypeslib.ndpointer(dtype=np.uint8), ct.c_bool] File "/usr/lib/python3.5/ctypes/init.py", line 360, in getattr func = self.getitem(name) File "/usr/lib/python3.5/ctypes/init.py", line 365, in getitem func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /usr/local/python/openpose/_openpose.so: undefined symbol: forward_hands

How can I fix this?

ortegatron commented 5 years ago

Repository updated!

ortegatron commented 5 years ago

Closing issue