Skip to content

CMake error on Google colab? #1933

@darpitdavetamu

Description

@darpitdavetamu

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)

Activity

kumekanta

kumekanta commented on Apr 30, 2021

@kumekanta

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

sergeyprokudin

sergeyprokudin commented on Apr 30, 2021

@sergeyprokudin

+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

rlynn04 commented on Apr 30, 2021

@rlynn04

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

VSBDev commented on Apr 30, 2021

@VSBDev

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

MatthewGan923

MatthewGan923 commented on Apr 30, 2021

@MatthewGan923

Same problem here.

MatthewGan923

MatthewGan923 commented on Apr 30, 2021

@MatthewGan923

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

VSBDev

VSBDev commented on Apr 30, 2021

@VSBDev

how exactly did you use #1588?

MatthewGan923

MatthewGan923 commented on Apr 30, 2021

@MatthewGan923

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

darpitdavetamu commented on May 1, 2021

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

rlynn04 commented on May 1, 2021

@rlynn04

@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

sajjadh commented on May 1, 2021

@sajjadh

@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

rlynn04 commented on May 1, 2021

@rlynn04

@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

Jru8 commented on May 1, 2021

@Jru8

@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

sajjadh commented on May 1, 2021

@sajjadh

@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

sajjadh commented on May 1, 2021

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

12 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @VSBDev@sergeyprokudin@darpitdavetamu@MatthewGan923@sajjadh

      Issue actions

        CMake error on Google colab? · Issue #1933 · CMU-Perceptual-Computing-Lab/openpose