Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake error on Google colab? #1933

Open
darpitdavetamu opened this issue Apr 30, 2021 · 22 comments · May be fixed by #2237
Open

CMake error on Google colab? #1933

darpitdavetamu opened this issue Apr 30, 2021 · 22 comments · May be fixed by #2237

Comments

@darpitdavetamu
Copy link

darpitdavetamu commented Apr 30, 2021

Issue Summary

Working fine till yesterday. It started giving errors since today (29 April 2021). Tried updating cmake, restart the kernel and other solutions available in the Issues page.

import os
from os.path import exists, join, basename, splitext

git_repo_url = 'https://github.com/CMU-Perceptual-Computing-Lab/openpose.git'
project_name = splitext(basename(git_repo_url))[0]
if not exists(project_name):

see: #949

install new CMake becaue of CUDA10

!wget -q https://cmake.org/files/v3.13/cmake-3.13.4-Linux-x86_64.tar.gz
!tar xfz cmake-3.13.4-Linux-x86_64.tar.gz --strip-components=1 -C /usr/local

clone openpose

!git clone -q --depth 1 $git_repo_url
!sed -i 's/execute_process(COMMAND git checkout master WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/3rdparty/caffe)/execute_process(COMMAND git checkout f019d0dfe86f49d1140961f8c7dec22130c83154 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/3rdparty/caffe)/g' openpose/CMakeLists.txt

install system dependencies

!apt-get -qq install -y libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler libgflags-dev libgoogle-glog-dev liblmdb-dev opencl-headers ocl-icd-opencl-dev libviennacl-dev

install python dependencies

!pip install -q youtube-dl

build openpose

!cd openpose && rm -rf build || true && mkdir build && cd build && cmake .. && make -jnproc

Errors (if any)

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)

-- Not downloading body (COCO) model
-- Not downloading body (MPI) model
-- Downloading face model...
-- NOTE: This process might take several minutes depending on your internet connection.
CMake Error at cmake/Utils.cmake:8 (file):
file DOWNLOAD HASH mismatch

for file: [/content/openpose/models/face/pose_iter_116000.caffemodel]
  expected hash: [e747180d728fa4e4418c465828384333]
    actual hash: [d41d8cd98f00b204e9800998ecf8427e]
         status: [7;"Couldn't connect to server"]

Call Stack (most recent call first):
CMakeLists.txt:991 (download_model)

-- Downloading hand model...
-- NOTE: This process might take several minutes depending on your internet connection.
CMake Error at cmake/Utils.cmake:8 (file):
file DOWNLOAD HASH mismatch

for file: [/content/openpose/models/hand/pose_iter_102000.caffemodel]
  expected hash: [a82cfc3fea7c62f159e11bd3674c1531]
    actual hash: [d41d8cd98f00b204e9800998ecf8427e]
         status: [7;"Couldn't connect to server"]

Call Stack (most recent call first):
CMakeLists.txt:993 (download_model)

@kumekanta
Copy link

kumekanta commented Apr 30, 2021

Hi,
I have same error.
Maybe I think that this problem is depend on the server having model data.

@sergeyprokudin
Copy link

+1.

Seems that the server with the models is simply down: https://downforeveryoneorjustme.com/posefs1.perception.cs.cmu.edu

A related issue in the past: #1224

@rlynn04
Copy link

rlynn04 commented Apr 30, 2021

Hi,

I also have this issue,
I seems to be something to do with a hash value mismatch.
See attached Image for output when run.
7a47bb45-00d8-452a-9ecc-c491b8beeef1

@VSBDev
Copy link

VSBDev commented Apr 30, 2021

I am having the same issue the repository university seems indeed to be down

@MatthewGan923
Copy link

Same problem here.

@MatthewGan923
Copy link

Using solution from #1588 resolve the issue, but a permanent fix would be better

@VSBDev
Copy link

VSBDev commented Apr 30, 2021

how exactly did you use #1588?

@MatthewGan923
Copy link

download the models from kaggle from the provided links. Copy the corresponding models to openpose/models/(face and hand and pose). You need to look into your error message from openpose installation to find out which model corresponding to which folder.

@darpitdavetamu
Copy link
Author

@MatthewGan923 i downloaded the 4 models from Kaggle. I am not sure how do i load it up onto Colab for use. can you please help wit the commands. sorry i am new to this :-(

@rlynn04
Copy link

rlynn04 commented May 1, 2021

@MatthewGan923 i downloaded the 4 models from Kaggle. I am not sure how do i load it up onto Colab for use. can you please help wit the commands. sorry i am new to this :-(

If you have already run the code block on Colab, there should be a small folder icon on the left of the screen if you navigate to ‘openpose’ folder there should be a ‘models’ folder, inside there is ‘pose, hand & face ’ I removed all of the files inside each of them leaving the folders empty and then right clicked on them to upload the files from the models you’ve downloaded. That was my way of getting it to work yesterday, hope it helps.

@sajjadh
Copy link

sajjadh commented May 1, 2021

@rlynn04 if I need only the pose model, I should be adding only the "pose_iter_584000.caffemodel" model right, or should i need all those 5 models?

@rlynn04
Copy link

rlynn04 commented May 1, 2021

@sajjadh If you only require the pose model you shouldn't need the others for it to work but I can't say that I'm 100% certain of that.

@Jru8
Copy link

Jru8 commented May 1, 2021

@rlynn04 Not working for me, because when I copy the models in the folder and run the code again, the files, which I have uploaded, don't appear. How can I run the code to build Openpose again with the models uploaded or how can I modify the commands for this?

@sajjadh
Copy link

sajjadh commented May 1, 2021

@Jru8 check if u have the openpose.bin. when i tried it was not created, so now I am finding a way to create that file.

@sajjadh
Copy link

sajjadh commented May 1, 2021

for now, I found a small hack. you should run " !cd openpose && rm -rf build || true && mkdir build && cd build && cmake .. && make -jnproc" and make sure the library is built (i had to run twice). Then do what @Jru8 mentioned.

But what I tried is, I already had a previous copy of successfully built of the OpenPose library. So I simply removed the model folder from the new library and added the model folder from the previously built.

@MatthewGan923
Copy link

MatthewGan923 commented May 1, 2021

Here are some code I used. Hopefully it can be helpful.
To run this, you need to get your kaggle.json file. Should be easy to find from your kaggle account page.

  1. After you run the openpose installation cell and hit the error, run the following code:
!pip install -q kaggle
!mkdir -p ~/.kaggle
from google.colab import files
files.upload()
!cp kaggle.json ~/.kaggle/
!ls ~/.kaggle
!chmod 600 /root/.kaggle/kaggle.json
!kaggle datasets download -d changethetuneman/openpose-model
!unzip "openpose-model.zip" -d "/content/temporary"
!cp "/content/temporary/pose_iter_102000.caffemodel" "/content/openpose/models/hand/pose_iter_102000.caffemodel"
!cp "/content/temporary/pose_iter_584000.caffemodel" "/content/openpose/models/pose/body_25/pose_iter_584000.caffemodel"
!cp "/content/temporary/pose_iter_116000.caffemodel" "/content/openpose/models/face/pose_iter_116000.caffemodel"

This should prompt you to upload your "kaggle.json"

  1. Then run

!cd openpose && rm -rf build || true && mkdir build && cd build && cmake .. && make -jnproc

Should work from this. Let me know if there is any error.

@darpitdavetamu
Copy link
Author

@MatthewGan923 everything worked fine until this:

rm: cannot remove 'openpose.avi': No such file or directory
/bin/bash: ./build/examples/openpose/openpose.bin: No such file or directory
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
openpose.avi: No such file or directory

@israelameg
Copy link

I have the same problem.
I uploaded the files to the model's folder like I read here, but now the detection isn't working.
Does anybody know what should I do to fix it?

@sajjadh
Copy link

sajjadh commented May 19, 2021

@israelameg the server is down again, try any of the above solution for now

@OhadCohen97
Copy link

@israelameg the server is down again, try any of the above solution for now

when it will be fixed?

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale/old label Jan 9, 2022
@take2rohit take2rohit linked a pull request Aug 17, 2023 that will close this issue
@alvaro-budria
Copy link

It seems the servers are down again... :(

@stale stale bot removed the stale/old label Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.