tugstugi / dl-colab-notebooks

Try out deep learning models online on Google Colab
1.72k stars 465 forks source link

no cuda on openpose notebook #12

Closed nyck33 closed 5 years ago

nyck33 commented 5 years ago

I am trying to openpose a video in my google drive mounted directory. I have not had problems doing so by changing the command cell per below until now:

#!rm -rf youtube.mp4
# download the youtube with the given ID
#!youtube-dl -f 'bestvideo[ext=mp4]' --output "youtube.%(ext)s" https://www.youtube.com/watch?v=$YOUTUBE_ID
# cut the first 5 seconds
#!ffmpeg -y -loglevel info -i youtube.mp4 -t 10 video.mp4
# detect poses on the these 5 seconds
#!rm openpose.avi
#!cd openpose && ./build/examples/openpose/openpose.bin --video ../video.mp4 --write_json ./output/ --display 0  --write_video ../openpose-skeleton.avi --disable_blending
!cd openpose && ./build/examples/openpose/openpose.bin --video /content/drive/"My Drive"/TrackNet-master/Code/TrackNet_Three_Frames_Input/fedNadal_TrackNet.mp4 --write_json output/ --display 0 --write_video ../openpose.avi
# convert the result into MP4
!ffmpeg -y -loglevel info -i openpose.avi fedNadal-tnet-opose.mp4

The error I am getting now:

Starting OpenPose demo...
Configuring OpenPose...
Starting thread(s)...

Error:
Cuda check failed (38 vs. 0): no CUDA-capable device is detected

Coming from:
- /content/openpose/src/openpose/gpu/cuda.cpp:getCudaGpuNumber():53
- /content/openpose/src/openpose/gpu/cuda.cpp:cudaCheck():42
- /content/openpose/src/openpose/gpu/cuda.cpp:getCudaGpuNumber():63
- /content/openpose/src/openpose/gpu/gpu.cpp:getGpuNumber():27
- /content/openpose/include/openpose/wrapper/wrapperAuxiliary.hpp:configureThreadManager():1188
- /content/openpose/include/openpose/wrapper/wrapper.hpp:exec():424
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
  configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --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

Isn't cuda preinstalled on colab? I checked that I am connected to a GPU runtime.

nyck33 commented 5 years ago

I re-opened a fresh copy of your notebook and used the same commands and now it is working.
I am pretty sure I restarted the runtime as well but going to close this.