OpenCVForUnity
OpenCVForUnity copied to clipboard
Need help for the Openpose example using web camera.
Hi All, I was checking the free trial version of OpenCV for Unity in that I need some help :
Can anyone please share some of the references for the Openpose example using web camera.
Thank you.
Thank you for your inquiry.
For now, OpenPoseExample takes more than 2000 ms to estimate human pose. Perhaps real-time processing is difficult.
Regards, EnoxSoftware
I have the same problem, I was able to use the example of openpose provided for unity and made the webcam work but it's really slow is there any way to improve the speed of OpenPose webcam detection?
As you mentioned, the human pose estimation example in our assets uses an old OpenPose model, which is very slow in its inference speed. However, by replacing the model with "LightWeight Human Pose Estimation (ONNX)", the inference speed can be greatly improved. (The model file is available from the OpenCV Github: https://github.com/opencv/opencv_extra/blob/12988b02d943c2a2f80b5d1391d32696ac93d08d/testdata/dnn/download_models.py#L890) In fact, measurements on my laptop show an 80% reduction in inference time. I have attached a small example of the model in action for you to try. LightweightPoseEstimationExample.zip
Also, if you want to do real-time processing on webcam video, etc., you may want to consider using Barraacuda for faster inference processing. The following repository is an easy to use package for human pose estimation with UnityBarracuda. https://github.com/keijiro/BodyPixBarracuda/ The results of the estimation can be used for OpenCV processing with a little effort.
Hello, Good afternoon. Hope this email finds you well and ok. I want to take this opportunity to thank you for the help you gave me. You saved me from sleepless nights trying to fix the code. I did fix it using the LightweightPoseEstimationExample.zip https://github.com/EnoxSoftware/OpenCVForUnity/files/8008061/LightweightPoseEstimationExample.zip and added a webcam and the result was perfect thank you once more.
One more thing, I am getting the pose output format of COCO, please can you let me know if I should change the model to get the pose output format of BODY_25? Or if you have an example that can help me to get the pose output format body_25 i will appreciate you help. Thank you in advance. Yours sincerely, Duke Zacharia.
By the way below is the attached results and my expected result if i use body_25. [image: Screenshot_7.png][image: KakaoTalk_20220207_174713435.jpg]
On Sat, 5 Feb 2022 at 22:08, Enox Software @.***> wrote:
As you mentioned, the human pose estimation example in our assets uses an old OpenPose model, which is very slow in its inference speed. However, by replacing the model with "LightWeight Human Pose Estimation (ONNX)", the inference speed can be greatly improved. (The model file is available from the OpenCV Github: https://github.com/opencv/opencv_extra/blob/12988b02d943c2a2f80b5d1391d32696ac93d08d/testdata/dnn/download_models.py#L890 ) In fact, measurements on my laptop show an 80% reduction in inference time. I have attached a small example of the model in action for you to try. LightweightPoseEstimationExample.zip https://github.com/EnoxSoftware/OpenCVForUnity/files/8008061/LightweightPoseEstimationExample.zip
Also, if you want to do real-time processing on webcam video, etc., you may want to consider using Barraacuda for faster inference processing. The following repository is an easy to use package for human pose estimation with UnityBarracuda. https://github.com/keijiro/BodyPixBarracuda/ The results of the estimation can be used for OpenCV processing with a little effort.
— Reply to this email directly, view it on GitHub https://github.com/EnoxSoftware/OpenCVForUnity/issues/121#issuecomment-1030621959, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGZSZV2MCMUGGDZU5MOOSI3UZUOLRANCNFSM5DEDQFZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
I solved the problem thank you so much. I used the geometric maths formula but if you have another way let me know thank you.
On Mon, Feb 7, 2022 at 17:56 DUKE ZACHARIA @.***> wrote:
Hello, Good afternoon. Hope this email finds you well and ok. I want to take this opportunity to thank you for the help you gave me. You saved me from sleepless nights trying to fix the code. I did fix it using the LightweightPoseEstimationExample.zip https://github.com/EnoxSoftware/OpenCVForUnity/files/8008061/LightweightPoseEstimationExample.zip and added a webcam and the result was perfect thank you once more.
One more thing, I am getting the pose output format of COCO, please can you let me know if I should change the model to get the pose output format of BODY_25? Or if you have an example that can help me to get the pose output format body_25 i will appreciate you help. Thank you in advance. Yours sincerely, Duke Zacharia.
By the way below is the attached results and my expected result if i use body_25. [image: Screenshot_7.png][image: KakaoTalk_20220207_174713435.jpg]
On Sat, 5 Feb 2022 at 22:08, Enox Software @.***> wrote:
As you mentioned, the human pose estimation example in our assets uses an old OpenPose model, which is very slow in its inference speed. However, by replacing the model with "LightWeight Human Pose Estimation (ONNX)", the inference speed can be greatly improved. (The model file is available from the OpenCV Github: https://github.com/opencv/opencv_extra/blob/12988b02d943c2a2f80b5d1391d32696ac93d08d/testdata/dnn/download_models.py#L890 ) In fact, measurements on my laptop show an 80% reduction in inference time. I have attached a small example of the model in action for you to try. LightweightPoseEstimationExample.zip https://github.com/EnoxSoftware/OpenCVForUnity/files/8008061/LightweightPoseEstimationExample.zip
Also, if you want to do real-time processing on webcam video, etc., you may want to consider using Barraacuda for faster inference processing. The following repository is an easy to use package for human pose estimation with UnityBarracuda. https://github.com/keijiro/BodyPixBarracuda/ The results of the estimation can be used for OpenCV processing with a little effort.
— Reply to this email directly, view it on GitHub https://github.com/EnoxSoftware/OpenCVForUnity/issues/121#issuecomment-1030621959, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGZSZV2MCMUGGDZU5MOOSI3UZUOLRANCNFSM5DEDQFZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>