Implementing Openpose images output model on Google Colab: Can anyone share a working colab notebook · Issue #1736 · CMU-Perceptual-Computing-Lab/openpose · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implementing Openpose images output model on Google Colab: Can anyone share a working colab notebook #1736
I have been taking the help of the google colab helper script, and tried all the installation methods , reinstalling different versions of CUDA, Cmake, etc., but in the notebook there are still configuration errors. I tried the solutions mentioned in the script, but they don't seem to work.
If anyone could share a colab notebook, it would be great!
changed the title [-]Implementing Openpose Images model on Google Colab: Can anyone share a working colab notebook[/-][+]Implementing Openpose images output model on Google Colab: Can anyone share a working colab notebook[/+]on Oct 30, 2020
hello sir, thanks for your colab. i try your colab and it works well. but it only give output video with motion capture mark, no json or cvs files. so can you tell me the additional code for that colab to add json output too
Hi there, your colab is really helpful! Could you help me find a way to output the results/coordinate values of the OpenPose being applied videos to JSON files please? Thanks
@adityab05@MazieQueen@rigvedrs
For single images, I believe you can just put your image in an empty directory, and run this line instead (change the parameters between brakets with your own paths)
I do have an issue though, I keep running into Check failed: error == cudaSuccess (2 vs. 0) out of memory *** Check failure stack trace: ***. And yet,
I executed my colab with GPU, with free 15360MB
I use CuDNN: cuDNN : Yes (ver. 8.7.0)
I tried with minimal computation requirements: plain body_25, --display 0 --render_pose 0 --net_resolution -1x16. Still same error.
Would you be able to help me?
EDIT: Well I just realized that this error occurs upon building.
/content/openpose/3rdparty/caffe/include/caffe/util/cudnn.hpp: In function ‘const char* cudnnGetErrorString(cudnnStatus_t)’:
/content/openpose/3rdparty/caffe/include/caffe/util/cudnn.hpp:21:8: warning: enumeration value ‘CUDNN_STATUS_VERSION_MISMATCH’ not handled in switch [-Wswitch]
So CuDNN faces at least some sort of issue. Any idea how to solve this though?
I finally made it work by running !apt install --allow-change-held-packages libcudnn8=8.1.0.77-1+cuda11.2 to use compatible CUDA and cuDNN versions (see my Sports2D colab: )
I finally made it work by running !apt install --allow-change-held-packages libcudnn8=8.1.0.77-1+cuda11.2 to use compatible CUDA and cuDNN versions (see my Sports2D colab: )
Can you please help me out. I'm Having the same error.
/content/openpose/3rdparty/caffe/include/caffe/util/cudnn.hpp: In function ‘const char* cudnnGetErrorString(cudnnStatus_t)’:
/content/openpose/3rdparty/caffe/include/caffe/util/cudnn.hpp:21:8: warning: enumeration value ‘CUDNN_STATUS_VERSION_MISMATCH’ not handled in switch [-Wswitch]
Hi, I'm sorry I'm just about to start a new job and I'm in a rush to finish my current one 😅
Did you try copying the steps that are in my colab? Double click on the first cell to show the code.
Wow man..!
You really replied...
I have copied and run the pieces of code where you install openpose...
Currently it's running..
But the same warning about cudnn status version mismatch is appearing....
I guess currently it is building the openpose.
I hope this your additional line works...
I'll let you know once the the it run completely
On Fri, 14 Jul 2023, 00:27 David PAGNON, ***@***.***> wrote:
Hi, I'm sorry I'm just about to start a new job and I'm in a rush to
finish my current one 😅
Did you try copying the steps that are in my colab? Double click on the
first cell to access the code.
—
Reply to this email directly, view it on GitHub
<#1736 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZRFM65YYTTK67M4SLYYKPDXQBD3BANCNFSM4TE6DF4Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
No it didn't work....
What version of Ubuntu you were using?
I'm using Ubuntu 22
On Fri, 14 Jul 2023, 00:55 Syed Hamza Ali Shah Maqsood Shah, <
***@***.***> wrote:
Wow man..!
You really replied...
I have copied and run the pieces of code where you install openpose...
Currently it's running..
But the same warning about cudnn status version mismatch is appearing....
I guess currently it is building the openpose.
I hope this your additional line works...
I'll let you know once the the it run completely
On Fri, 14 Jul 2023, 00:27 David PAGNON, ***@***.***> wrote:
> Hi, I'm sorry I'm just about to start a new job and I'm in a rush to
> finish my current one 😅
> Did you try copying the steps that are in my colab? Double click on the
> first cell to access the code.
>
> —
> Reply to this email directly, view it on GitHub
> <#1736 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AZRFM65YYTTK67M4SLYYKPDXQBD3BANCNFSM4TE6DF4Q>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
Hi there, sorry for the delay, I'm quite busy these days... I just saw that Colab recently upgraded to Ubuntu 22.04, which may have broken the install... I'll have to have a deeper look, but to be fairly honest, I'm not sure I can find this time so I'm happy if someone takes over.
Hi there, sorry for the delay, I'm quite busy these days... I just saw that Colab recently upgraded to Ubuntu 22.04, which may have broken the install... I'll have to have a deeper look, but to be fairly honest, I'm not sure I can find this time so I'm happy if someone takes over.
No worries, Thank you for guidance.
And if you are going to update I just want to let you know that it throws an error that your specified Cuda version is not found.
Your sports 2d project gives the same error.
Okay so here are my guesses to help you find a solution.
!nvidia-smi gives: Cuda version 12.0
!nvcc --version gives: Cuda version 11.8
--> Hence the CuDNN version mismatch
I previously solved it by force-installing a compatible CUDA / CuDNN combination: !apt install --allow-change-held-packages libcudnn8=8.1.0.77-1+cuda11.2.
The problem is now that Colab has upgraded from Ubuntu 20.04 to Ubuntu 22.04, where this version no longer exists.
Here are the supported CUDA versions available for Ubuntu 22.04.
And here are the available CUDA/CuDNN combinations.
If I choose to take the second compatible one (just to be on the safe side, let's not risk upgrading to CUDA 12 as I don't know how OpenPose would go with it), this leads me to edit the initial line with: !apt install --allow-change-held-packages libcudnn8=8.9.3.28-1+cuda11.8.
Could you reset your environment, try changing just that line (watch out, there are two occurrences), and tell me if this works?
For example do:
It probably means that there is no output json file.
Did you do the Google drive install (install once) or the other one? You need to delete the folder on your drive and to disconnect and restart Colab for the changes to take action.
Did you also try that simpler command after instead of running the whole Sports2D flow?
It probably means that there is no output json file.
Did you do the Google drive install (install once) or the other one? You need to delete the folder on your drive and to disconnect and restart Colab for the changes to take action.
Did you also try that simpler command after instead of running the whole Sports2D flow?
Yeah I add that line in other code but it it did the CUDNN error .
while running the Sports2D I ran install everytime. After installation I ran this command
!cd $openpose_path
!build/examples/openpose/openpose.bin --video examples/media/video.avi --display 0 --render_pose 0 --write_json examples/media/json```
But there was no openpose.bin file it was openpose.cpp file
which threw the arror of no such file directory exist
I did the same changes as you and the installation part seems ok. However I obtain the same error about openpose.bin file not existing. Did you find any solution to install Openpose with collab? Thanks in advance!
I did the same changes as you and the installation part seems ok. However I obtain the same error about openpose.bin file not existing. Did you find any solution to install Openpose with collab? Thanks in advance!
Nope I didn't find any solution... I was told by a fellow that due to collab updation all the projects made on collab using Openpose has been crashed.
.
So I decided to use Mediapipe instead. It's a lot similar to openpose
Still the same issue of hash mismatch on my Sports2D colab (error referenced there).
CMake Error at cmake/Utils.cmake:8 (file):
file DOWNLOAD HASH mismatch
for file: [/content/openpose/models/pose/body_25/pose_iter_584000.caffemodel]
expected hash: [78287b57cf85fa89c03f1393d368e5b7]
actual hash: [d41d8cd98f00b204e9800998ecf8427e]
status: [7;"Couldn't connect to server"]
Call Stack (most recent call first):
CMakeLists.txt:985 (download_model)
Running twice the following line seems like it solves the error:
!cd openpose && rm -rf build || true && mkdir build && cd build && cmake .. && make -j\`nproc\`
And it does run smoothly, but the resulting json files are empty. This is due to the fact that the pose_iter_584000.caffemodel file is created in the first run so running it a second time skips the download, but it is empty.
Uploading the model files if you have them locally should work, as referenced in this issue: #1588 (comment)
Activity
[-]Implementing Openpose Images model on Google Colab: Can anyone share a working colab notebook[/-][+]Implementing Openpose images output model on Google Colab: Can anyone share a working colab notebook[/+]dinatih commentedon Dec 1, 2020
Hello, here is my colab : https://colab.research.google.com/drive/1VDjRLKAu9KLQky0gv4RLJjeH6NRPiWXy?usp=sharing if it can help.
gineshidalgo99 commentedon Jan 8, 2021
Thanks @dinatih ! Added to the doc/installation/README.md!
manlio99 commentedon Mar 1, 2021
Hi!
There is any colab with STAF included?
kariskerto commentedon Dec 12, 2021
hello sir, thanks for your colab. i try your colab and it works well. but it only give output video with motion capture mark, no json or cvs files. so can you tell me the additional code for that colab to add json output too
adityab05 commentedon Jul 27, 2022
Is there a google Colab version which can help me get poses for single images instead of video input ?
abrar-aw commentedon Oct 10, 2022
Hi there, your colab is really helpful! Could you help me find a way to output the results/coordinate values of the OpenPose being applied videos to JSON files please? Thanks
MazieQueen commentedon Oct 18, 2022
hey @adityab05 did you find a colab for single images ?
rigvedrs commentedon Mar 12, 2023
A notebook for using open pose on single image still does not seem to be available.
davidpagnon commentedon May 4, 2023
@adityab05 @MazieQueen @rigvedrs
For single images, I believe you can just put your image in an empty directory, and run this line instead (change the parameters between brakets with your own paths)
davidpagnon commentedon May 4, 2023
I do have an issue though, I keep running into
Check failed: error == cudaSuccess (2 vs. 0) out of memory *** Check failure stack trace: ***. And yet,cuDNN : Yes (ver. 8.7.0)body_25, --display 0 --render_pose 0 --net_resolution -1x16. Still same error.Would you be able to help me?
EDIT: Well I just realized that this error occurs upon building.
So CuDNN faces at least some sort of issue. Any idea how to solve this though?
davidpagnon commentedon May 8, 2023
I finally made it work by running
)
!apt install --allow-change-held-packages libcudnn8=8.1.0.77-1+cuda11.2to use compatible CUDA and cuDNN versions (see my Sports2D colab:Syed-Hamza-Ali commentedon Jul 13, 2023
Can you please help me out. I'm Having the same error.
/content/openpose/3rdparty/caffe/include/caffe/util/cudnn.hpp: In function ‘const char* cudnnGetErrorString(cudnnStatus_t)’:
/content/openpose/3rdparty/caffe/include/caffe/util/cudnn.hpp:21:8: warning: enumeration value ‘CUDNN_STATUS_VERSION_MISMATCH’ not handled in switch [-Wswitch]
davidpagnon commentedon Jul 13, 2023
Hi, I'm sorry I'm just about to start a new job and I'm in a rush to finish my current one 😅
Did you try copying the steps that are in my colab? Double click on the first cell to show the code.
Syed-Hamza-Ali commentedon Jul 13, 2023
Syed-Hamza-Ali commentedon Jul 14, 2023
Syed-Hamza-Ali commentedon Jul 26, 2023
it still gives the error:
CUDNN_VERSION_MIMATCH
davidpagnon commentedon Jul 26, 2023
Hi there, sorry for the delay, I'm quite busy these days... I just saw that Colab recently upgraded to Ubuntu 22.04, which may have broken the install... I'll have to have a deeper look, but to be fairly honest, I'm not sure I can find this time so I'm happy if someone takes over.
Syed-Hamza-Ali commentedon Jul 26, 2023
No worries, Thank you for guidance.
And if you are going to update I just want to let you know that it throws an error that your specified Cuda version is not found.
Your sports 2d project gives the same error.
davidpagnon commentedon Jul 26, 2023
Okay so here are my guesses to help you find a solution.
!nvidia-smigives: Cuda version 12.0!nvcc --versiongives: Cuda version 11.8--> Hence the CuDNN version mismatch
I previously solved it by force-installing a compatible CUDA / CuDNN combination:
!apt install --allow-change-held-packages libcudnn8=8.1.0.77-1+cuda11.2.The problem is now that Colab has upgraded from Ubuntu 20.04 to Ubuntu 22.04, where this version no longer exists.
Here are the supported CUDA versions available for Ubuntu 22.04.
And here are the available CUDA/CuDNN combinations.
If I choose to take the second compatible one (just to be on the safe side, let's not risk upgrading to CUDA 12 as I don't know how OpenPose would go with it), this leads me to edit the initial line with:
!apt install --allow-change-held-packages libcudnn8=8.9.3.28-1+cuda11.8.Could you reset your environment, try changing just that line (watch out, there are two occurrences), and tell me if this works?
For example do:
Syed-Hamza-Ali commentedon Jul 27, 2023
um now the installation part runs but it gives the following error while using it:
Auto-detecting all available GPUs... Detected 1 GPU(s), using 1 of them starting at GPU 0.
F0727 12:35:53.047664 14590 cudnn_conv_layer.cpp:53] Check failed: status == CUDNN_STATUS_SUCCESS (1 vs. 0) CUDNN_STATUS_NOT_INITIALIZED
*** Check failure stack trace: ***
@ 0x7a5e79ae9b03 google::LogMessage::Fail()
@ 0x7a5e79af19d1 google::LogMessage::SendToLog()
@ 0x7a5e79ae97c2 google::LogMessage::Flush()
@ 0x7a5e79aeb78f google::LogMessageFatal::~LogMessageFatal()
@ 0x7a5e7971423b caffe::CuDNNConvolutionLayer<>::LayerSetUp()
@ 0x7a5e797fd699 caffe::Net<>::Init()
@ 0x7a5e797ff610 caffe::Net<>::Net()
@ 0x7a5e7a1e140c op::NetCaffe::initializationOnThread()
@ 0x7a5e7a18c02b op::FaceExtractorCaffe::netInitializationOnThread()
@ 0x7a5e7a18d9a6 op::FaceExtractorNet::initializationOnThread()
@ 0x7a5e7a228b95 op::Worker<>::initializationOnThreadNoException()
@ 0x7a5e7a228d08 op::SubThread<>::initializationOnThread()
@ 0x7a5e7a22a708 op::Thread<>::initializationOnThread()
@ 0x7a5e7a22cc3c op::Thread<>::threadFunction()
@ 0x7a5e79e352b3 (unknown)
@ 0x7a5e79ba5b43 (unknown)
@ 0x7a5e79c37a00 (unknown)
@ (nil) (unknown)
Syed-Hamza-Ali commentedon Jul 27, 2023
I have changed the version in your colabs but itgives this while running the RUN analysis part:
ValueError: max() arg is an empty sequence
davidpagnon commentedon Jul 27, 2023
It probably means that there is no output json file.
Did you do the Google drive install (install once) or the other one? You need to delete the folder on your drive and to disconnect and restart Colab for the changes to take action.
Did you also try that simpler command after instead of running the whole Sports2D flow?
Syed-Hamza-Ali commentedon Jul 27, 2023
Yeah I add that line in other code but it it did the CUDNN error .
while running the Sports2D I ran install everytime. After installation I ran this command
which threw the arror of no such file directory exist
AlmaDev40 commentedon Sep 24, 2023
Hello @Syed-Hamza-Ali
I did the same changes as you and the installation part seems ok. However I obtain the same error about openpose.bin file not existing. Did you find any solution to install Openpose with collab? Thanks in advance!
Syed-Hamza-Ali commentedon Sep 27, 2023
Nope I didn't find any solution... I was told by a fellow that due to collab updation all the projects made on collab using Openpose has been crashed.
.
So I decided to use Mediapipe instead. It's a lot similar to openpose
davidpagnon commentedon Jan 27, 2024
Still the same issue of hash mismatch on my Sports2D colab (error referenced there).
Running twice the following line seems like it solves the error:
And it does run smoothly, but the resulting json files are empty. This is due to the fact that the pose_iter_584000.caffemodel file is created in the first run so running it a second time skips the download, but it is empty.
Uploading the model files if you have them locally should work, as referenced in this issue: #1588 (comment)
davidpagnon commentedon Jan 28, 2024
I fixed it on my end by downloading the body_25 model from a google drive source. (see there for the whole install in Colab)