openpose icon indicating copy to clipboard operation
openpose copied to clipboard

CMake error on Google colab?

Open darpitdavetamu opened this issue 4 years ago • 22 comments

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: https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/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)

darpitdavetamu avatar Apr 30 '21 00:04 darpitdavetamu

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

kumekanta avatar Apr 30 '21 04:04 kumekanta

+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: https://github.com/CMU-Perceptual-Computing-Lab/openpose/issues/1224

sergeyprokudin avatar Apr 30 '21 10:04 sergeyprokudin

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

rlynn04 avatar Apr 30 '21 11:04 rlynn04

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

VSBDev avatar Apr 30 '21 14:04 VSBDev

Same problem here.

MatthewGan923 avatar Apr 30 '21 15:04 MatthewGan923

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

MatthewGan923 avatar Apr 30 '21 16:04 MatthewGan923

how exactly did you use #1588?

VSBDev avatar Apr 30 '21 22:04 VSBDev

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.

MatthewGan923 avatar Apr 30 '21 23:04 MatthewGan923

@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 :-(

darpitdavetamu avatar May 01 '21 01:05 darpitdavetamu

@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.

rlynn04 avatar May 01 '21 10:05 rlynn04

@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?

sajjadh avatar May 01 '21 12:05 sajjadh

@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.

rlynn04 avatar May 01 '21 12:05 rlynn04

@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?

Jru8 avatar May 01 '21 14:05 Jru8

@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 avatar May 01 '21 14:05 sajjadh

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.

sajjadh avatar May 01 '21 14:05 sajjadh

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.

MatthewGan923 avatar May 01 '21 15:05 MatthewGan923

@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

darpitdavetamu avatar May 01 '21 18:05 darpitdavetamu

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?

israelameg avatar May 19 '21 16:05 israelameg

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

sajjadh avatar May 19 '21 17:05 sajjadh

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

when it will be fixed?

OhadCohen97 avatar May 22 '21 23:05 OhadCohen97

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[bot] avatar Jan 09 '22 07:01 stale[bot]

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

alvaro-budria avatar Aug 22 '23 15:08 alvaro-budria