wmcnally / kapao

KAPAO is an efficient single-stage human pose estimation model that detects keypoints and poses as objects and fuses the detections to predict human poses.
GNU General Public License v3.0
753 stars 103 forks source link

failed about my own test video #54

Closed isaiah-li closed 2 years ago

isaiah-li commented 2 years ago

Hi,thank you for your good work! when i test the video which download from YouTube, it get good results, but when i upload my own video which captured by my phone camera, it's failed. I found the ret_val is always False when i test my own video. ret_val, img0 = self.cap.read() line 212, datasets.py

i have checked the authority and the format between the videos, and i did not find the solution.

ffmpeg -i DownloadfromYouTube.mp4 
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.2.0 (crosstool-NG fa8859cb)
  configuration: --prefix=/mnt/anaconda3/envs/torch_1 --cc=/opt/conda/conda-bld/ffmpeg_1531088893642/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --enable-shared --enable-static --enable-zlib --enable-pic --enable-gpl --enable-version3 --disable-nonfree --enable-hardcoded-tables --enable-avresample --enable-libfreetype --disable-openssl --disable-gnutls --enable-libvpx --enable-pthreads --enable-libopus --enable-postproc --disable-libx264
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'dancelunba.mp4':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6avc1mp41
    creation_time   : 2019-01-23T00:28:22.000000Z
  Duration: 00:01:14.30, start: 0.000000, bitrate: 968 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt709/bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 49 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      creation_time   : 2019-01-23T00:28:22.000000Z
      handler_name    : ISO Media file produced by Google Inc. Created on: 01/22/2019.
At least one output file must be specified
ffmpeg -i CapturedbyCamera.mp4 
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.2.0 (crosstool-NG fa8859cb)
  configuration: --prefix=/mnt/anaconda3/envs/torch_1 --cc=/opt/conda/conda-bld/ffmpeg_1531088893642/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --enable-shared --enable-static --enable-zlib --enable-pic --enable-gpl --enable-version3 --disable-nonfree --enable-hardcoded-tables --enable-avresample --enable-libfreetype --disable-openssl --disable-gnutls --enable-libvpx --enable-pthreads --enable-libopus --enable-postproc --disable-libx264
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'saisai4_novoice.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.12.100
    location-eng    : +31.8762+118.7682/
    location        : +31.8762+118.7682/
  Duration: 00:00:11.94, start: 0.000000, bitrate: 9303 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 9301 kb/s, SAR 1:1 DAR 16:9, 29.83 fps, 29.83 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      rotate          : 180
      handler_name    : VideoHandler
    Side data:
      displaymatrix: rotation of -180.00 degrees
At least one output file must be specified
wmcnally commented 2 years ago

Please ensure the path to the video is correct.

jason0860907 commented 2 years ago

I found the ret_val is always False when I test my own video, too. I solved the problem by setting --start default=0 and --end default=-1