Closed civilpat closed 5 years ago
I am also using matplotlib 3.0.2 so this shouldnt be the problem. Have you tried reinstalling your environment?
My env list:
channels:
- pytorch
- defaults
dependencies:
- blas=1.0=mkl
- ca-certificates=2018.03.07=0
- certifi=2018.11.29=py36_0
- cffi=1.11.5=py36he75722e_1
- intel-openmp=2019.1=144
- libedit=3.1.20170329=h6b74fdf_2
- libffi=3.2.1=hd88cf55_4
- libgcc-ng=8.2.0=hdf63c60_1
- libgfortran-ng=7.3.0=hdf63c60_0
- libprotobuf=3.6.1=hd408876_0
- libstdcxx-ng=8.2.0=hdf63c60_1
- mkl=2019.1=144
- mkl_fft=1.0.10=py36ha843d7b_0
- mkl_random=1.0.2=py36hd81dba3_0
- ncurses=6.1=he6710b0_1
- ninja=1.8.2=py36h6bb024c_1
- numpy=1.15.4=py36h7e9f1db_0
- numpy-base=1.15.4=py36hde5b4d6_0
- openssl=1.1.1a=h7b6447c_0
- pip=18.1=py36_0
- protobuf=3.6.1=py36he6710b0_0
- pycparser=2.19=py36_0
- python=3.6.8=h0371630_0
- readline=7.0=h7b6447c_5
- setuptools=40.6.3=py36_0
- six=1.12.0=py36_0
- sqlite=3.26.0=h7b6447c_0
- tk=8.6.8=hbc83047_0
- wheel=0.32.3=py36_0
- xz=5.2.4=h14c3975_4
- zlib=1.2.11=h7b6447c_3
- pytorch-nightly=1.0.0.dev20190118=py3.6_cuda9.0.176_cudnn7.4.1_0
- pip:
- cycler==0.10.0
- cython==0.29.2
- detectron==0.0.0
- future==0.17.1
- kiwisolver==1.0.1
- matplotlib==3.0.2
- mock==2.0.0
- opencv-python==4.0.0.21
- pbr==5.1.1
- pycocotools==2.0.0
- pyparsing==2.3.1
- python-dateutil==2.7.5
- pyyaml==3.13
- scipy==1.2.0
- torch==1.0.0.dev20190118
prefix: /home/narvis/miniconda3/envs/torch```
pat_environment.txt @tobiascz Thanks very much for providing the environment list! After reinstalling the environment, however, the same error is still there showing ValueError: Invalid file object: <_io.BufferedReader name=28>. My environment list is attached below, and I tried to make them as close to yours. Do you have any thoughts?
@tobiascz the terminal is showing like below after I run the test code
(videopose3d_wildnew) pat@pat-office:~/Deep-Learning/VideoPose3D_wild$ python3 run_wild.py -k detections -arc 3,3,3,3,3 -c checkpoint --evaluate d-pt-243.bin --render --viz-subject S1 --viz-action Directions --viz-video InTheWildData/out_cutted.mp4 --viz-camera 0 --viz-output output_scater.mp4 --viz-size 5 --viz-downsample 1 --viz-skip 9 Namespace(actions='*', architecture='3,3,3,3,3', batch_size=1024, bone_length_term=True, by_subject=False, causal=False, channels=1024, checkpoint='checkpoint', checkpoint_frequency=10, data_augmentation=True, dataset='h36m', dense=False, disable_optimizations=False, downsample=1, dropout=0.25, epochs=60, evaluate='d-pt-243.bin', export_training_curves=False, keypoints='detections', learning_rate=0.001, linear_projection=False, lr_decay=0.95, no_eval=False, no_proj=False, render=True, resume='', stride=1, subjects_test='S9,S11', subjects_train='S1,S5,S6,S7,S8', subjects_unlabeled='', subset=1, test_time_augmentation=True, viz_action='Directions', viz_bitrate=3000, viz_camera=0, viz_downsample=1, viz_limit=-1, viz_no_ground_truth=False, viz_output='output_scater.mp4', viz_size=5, viz_skip=9, viz_subject='S1', viz_video='InTheWildData/out_cutted.mp4', warmup=1) Loading dataset... Preparing data... Loading 2D detections... INFO: Receptive field: 243 frames INFO: Trainable parameter count: 17004595 Loading checkpoint checkpoint/d-pt-243.bin This model was trained for 80 epochs INFO: Testing on 591 frames Rendering... ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7.2.0 (crosstool-NG fa8859cb) configuration: --prefix=/home/pat/anaconda3/envs/videopose3d_wildnew --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 'InTheWildData/out_cutted.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : Yulia Lipnitskaya's Phenomenal Free Program - Team Figure Skating | Sochi 2014 Winter Olympics artist : Olympic date : 2014 encoder : Lavf56.40.101 comment : https://www.youtube.com/watch?v=ke0iusvydl8 Duration: 00:00:24.13, start: 0.000000, bitrate: 2829 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1080x1080 [SAR 1:1 DAR 1:1], 2694 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default) Metadata: handler_name : SoundHandler Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native)) Press [q] to stop, [?] for help Output #0, image2pipe, to 'pipe:': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : Yulia Lipnitskaya's Phenomenal Free Program - Team Figure Skating | Sochi 2014 Winter Olympics artist : Olympic date : 2014 comment : https://www.youtube.com/watch?v=ke0iusvydl8 encoder : Lavf58.12.100 Stream #0:0(und): Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1080x1080 [SAR 1:1 DAR 1:1], q=2-31, 699840 kb/s, 25 fps, 25 tbn, 25 tbc (default) Metadata: handler_name : VideoHandler encoder : Lavc58.18.100 rawvideo frame= 592 fps=299 q=-0.0 Lsize= 2022975kB time=00:00:23.68 bitrate=699840.0kbits/s speed=11.9x video:2022975kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000% Traceback (most recent call last): File "run_wild.py", line 310, in <module> input_video_skip=args.viz_skip) File "/home/pat/Deep-Learning/VideoPose3D_wild/common/visualization.py", line 184, in render_animation anim.save(output, writer=writer) File "/home/pat/anaconda3/envs/videopose3d_wildnew/lib/python3.6/site-packages/matplotlib/animation.py", line 1174, in save writer.grab_frame(**savefig_kwargs) File "/home/pat/anaconda3/envs/videopose3d_wildnew/lib/python3.6/contextlib.py", line 99, in __exit__ self.gen.throw(type, value, traceback) File "/home/pat/anaconda3/envs/videopose3d_wildnew/lib/python3.6/site-packages/matplotlib/animation.py", line 232, in saving self.finish() File "/home/pat/anaconda3/envs/videopose3d_wildnew/lib/python3.6/site-packages/matplotlib/animation.py", line 358, in finish self.cleanup() File "/home/pat/anaconda3/envs/videopose3d_wildnew/lib/python3.6/site-packages/matplotlib/animation.py", line 395, in cleanup out, err = self._proc.communicate() File "/home/pat/anaconda3/envs/videopose3d_wildnew/lib/python3.6/subprocess.py", line 863, in communicate stdout, stderr = self._communicate(input, endtime, timeout) File "/home/pat/anaconda3/envs/videopose3d_wildnew/lib/python3.6/subprocess.py", line 1525, in _communicate selector.register(self.stdout, selectors.EVENT_READ) File "/home/pat/anaconda3/envs/videopose3d_wildnew/lib/python3.6/selectors.py", line 351, in register key = super().register(fileobj, events, data) File "/home/pat/anaconda3/envs/videopose3d_wildnew/lib/python3.6/selectors.py", line 237, in register key = SelectorKey(fileobj, self._fileobj_lookup(fileobj), events, data) File "/home/pat/anaconda3/envs/videopose3d_wildnew/lib/python3.6/selectors.py", line 224, in _fileobj_lookup return _fileobj_to_fd(fileobj) File "/home/pat/anaconda3/envs/videopose3d_wildnew/lib/python3.6/selectors.py", line 39, in _fileobj_to_fd "{!r}".format(fileobj)) from None ValueError: Invalid file object: <_io.BufferedReader name=28>
Can you try it on a different computer? I think it is a problem with ffmpeg. Matplotlib is using it for the animation: https://github.com/matplotlib/matplotlib/issues/12357#issuecomment-426609141
@tobiascz Thank you! I have updated both matplotlib and ffmpeg by using pip and conda, but none of them solved the issue. Thank you again for your help.
Hello, thanks a lot for the wonderful fork! However, when I test the code by using "python run_wild.py -k detections -arc 3,3,3,3,3 -c checkpoint --evaluate d-pt-243.bin --render --viz-subject S1 --viz-action Directions --viz-video InTheWildData/out_cutted.mp4 --viz-camera 0 --viz-output output_scater.mp4 --viz-size 5 --viz-downsample 1 --viz-skip 9" there are multiple errors regarding matplotlib? I've tried matplotlib from 3.0.4 to 3.0.1, but problems still show up. Could you please post the Dependencies list under your VideoPose3D_wild fork?
My error is shown below and my conda list
Namespace(actions='*', architecture='3,3,3,3,3', batch_size=1024, bone_length_term=True, by_subject=False, causal=False, channels=1024, checkpoint='checkpoint', checkpoint_frequency=10, data_augmentation=True, dataset='h36m', dense=False, disable_optimizations=False, downsample=1, dropout=0.25, epochs=60, evaluate='d-pt-243.bin', export_training_curves=False, keypoints='detections', learning_rate=0.001, linear_projection=False, lr_decay=0.95, no_eval=False, no_proj=False, render=True, resume='', stride=1, subjects_test='S9,S11', subjects_train='S1,S5,S6,S7,S8', subjects_unlabeled='', subset=1, test_time_augmentation=True, viz_action='Directions', viz_bitrate=3000, viz_camera=0, viz_downsample=1, viz_limit=-1, viz_no_ground_truth=False, viz_output='output_scater.mp4', viz_size=5, viz_skip=9, viz_subject='S1', viz_video='InTheWildData/out_cutted.mp4', warmup=1) Loading dataset... Preparing data... Loading 2D detections... INFO: Receptive field: 243 frames INFO: Trainable parameter count: 17004595 Loading checkpoint checkpoint/d-pt-243.bin This model was trained for 80 epochs INFO: Testing on 591 frames Rendering... ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 7.2.0 (crosstool-NG fa8859cb) configuration: --prefix=/home/pat/anaconda3/envs/videopose3d_wild --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 'InTheWildData/out_cutted.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : Yulia Lipnitskaya's Phenomenal Free Program - Team Figure Skating | Sochi 2014 Winter Olympics artist : Olympic date : 2014 encoder : Lavf56.40.101 comment : https://www.youtube.com/watch?v=ke0iusvydl8 Duration: 00:00:24.13, start: 0.000000, bitrate: 2829 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1080x1080 [SAR 1:1 DAR 1:1], 2694 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default) Metadata: handler_name : SoundHandler Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native)) Press [q] to stop, [?] for help Output #0, image2pipe, to 'pipe:': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 title : Yulia Lipnitskaya's Phenomenal Free Program - Team Figure Skating | Sochi 2014 Winter Olympics artist : Olympic date : 2014 comment : https://www.youtube.com/watch?v=ke0iusvydl8 encoder : Lavf58.12.100 Stream #0:0(und): Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1080x1080 [SAR 1:1 DAR 1:1], q=2-31, 699840 kb/s, 25 fps, 25 tbn, 25 tbc (default) Metadata: handler_name : VideoHandler encoder : Lavc58.18.100 rawvideo frame= 592 fps=290 q=-0.0 Lsize= 2022975kB time=00:00:23.68 bitrate=699840.0kbits/s speed=11.6x
input_video_skip=args.viz_skip)
File "/home/pat/Deep-Learning/VideoPose3D_wild/common/visualization.py", line 184, in render_animation
anim.save(output, writer=writer)
File "/home/pat/anaconda3/envs/videopose3d_wild/lib/python3.6/site-packages/matplotlib/animation.py", line 1174, in save
writer.grab_frame(**savefig_kwargs)
File "/home/pat/anaconda3/envs/videopose3d_wild/lib/python3.6/contextlib.py", line 99, in exit
self.gen.throw(type, value, traceback)
File "/home/pat/anaconda3/envs/videopose3d_wild/lib/python3.6/site-packages/matplotlib/animation.py", line 232, in saving
self.finish()
File "/home/pat/anaconda3/envs/videopose3d_wild/lib/python3.6/site-packages/matplotlib/animation.py", line 358, in finish
self.cleanup()
File "/home/pat/anaconda3/envs/videopose3d_wild/lib/python3.6/site-packages/matplotlib/animation.py", line 395, in cleanup
out, err = self._proc.communicate()
File "/home/pat/anaconda3/envs/videopose3d_wild/lib/python3.6/subprocess.py", line 863, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "/home/pat/anaconda3/envs/videopose3d_wild/lib/python3.6/subprocess.py", line 1525, in _communicate
selector.register(self.stdout, selectors.EVENT_READ)
File "/home/pat/anaconda3/envs/videopose3d_wild/lib/python3.6/selectors.py", line 351, in register
key = super().register(fileobj, events, data)
File "/home/pat/anaconda3/envs/videopose3d_wild/lib/python3.6/selectors.py", line 237, in register
key = SelectorKey(fileobj, self._fileobj_lookup(fileobj), events, data)
File "/home/pat/anaconda3/envs/videopose3d_wild/lib/python3.6/selectors.py", line 224, in _fileobj_lookup
return _fileobj_to_fd(fileobj)
File "/home/pat/anaconda3/envs/videopose3d_wild/lib/python3.6/selectors.py", line 39, in _fileobj_to_fd
"{!r}".format(fileobj)) from None
ValueError: Invalid file object: <_io.BufferedReader name=28>
video:2022975kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000% Traceback (most recent call last): File "run_wild.py", line 310, in
packages in environment at /home/pat/anaconda3/envs/videopose3d_wild:
#
Name Version Build Channel
blas 1.0 mkl
bzip2 1.0.6 h14c3975_5
ca-certificates 2019.5.15 0
cairo 1.14.12 h8948797_3
certifi 2019.3.9 py36_0
cffi 1.12.3 py36h2e261b9_0
cuda90 1.0 h6433d27_0 pytorch cudatoolkit 10.0.130 0
cycler 0.10.0 py36_0
dbus 1.13.6 h746ee38_0
expat 2.2.6 he6710b0_0
ffmpeg 4.0 hcdf2ecd_0
fontconfig 2.13.0 h9420a91_0
freeglut 3.0.0 hf484d3e_5
freetype 2.9.1 h8a8886c_1
glib 2.56.2 hd408876_0
graphite2 1.3.13 h23475e2_0
gst-plugins-base 1.14.0 hbbd80ab_1
gstreamer 1.14.0 hb453b48_1
h5py 2.8.0 py36h989c5e5_3
harfbuzz 1.8.8 hffaf4a1_0
hdf5 1.10.2 hba1933b_1
icu 58.2 h9c2bf20_1
intel-openmp 2019.4 243
jasper 2.0.14 h07fcdf6_1
jpeg 9b h024ee3a_2
kiwisolver 1.1.0 py36he6710b0_0
libedit 3.1.20181209 hc058e9b_0
libffi 3.2.1 hd88cf55_4
libgcc-ng 9.1.0 hdf63c60_0
libgfortran-ng 7.3.0 hdf63c60_0
libglu 9.0.0 hf484d3e_1
libopencv 3.4.2 hb342d67_1
libopus 1.3 h7b6447c_0
libpng 1.6.37 hbc83047_0
libstdcxx-ng 9.1.0 hdf63c60_0
libtiff 4.0.10 h2733197_2
libuuid 1.0.3 h1bed415_2
libvpx 1.7.0 h439df22_0
libxcb 1.13 h1bed415_1
libxml2 2.9.9 he19cac6_0
matplotlib 3.0.1 pypi_0 pypi mkl 2019.4 243
mkl_fft 1.0.12 py36ha843d7b_0
mkl_random 1.0.2 py36hd81dba3_0
ncurses 6.1 he6710b0_1
ninja 1.9.0 py36hfd86e86_0
numpy 1.16.2 pypi_0 pypi olefile 0.46 py36_0
opencv 3.4.2 py36h6fd60c2_1
openssl 1.1.1c h7b6447c_1
pcre 8.43 he6710b0_0
pillow 6.0.0 py36h34e0f95_0
pip 19.1.1 py36_0
pixman 0.38.0 h7b6447c_0
py-opencv 3.4.2 py36hb342d67_1
pycparser 2.19 py36_0
pyparsing 2.4.0 py_0
pyqt 5.9.2 py36h05f1152_2
python 3.6.8 h0371630_0
python-dateutil 2.8.0 py36_0
pytorch 1.1.0 py3.6_cuda10.0.130_cudnn7.5.1_0 pytorch pytz 2019.1 py_0
qt 5.9.7 h5867ecd_1
readline 7.0 h7b6447c_5
setuptools 41.0.1 py36_0
sip 4.19.8 py36hf484d3e_0
six 1.12.0 py36_0
sqlite 3.28.0 h7b6447c_0
tk 8.6.8 hbc83047_0
torchvision 0.3.0 py36_cu10.0.130_1 pytorch tornado 6.0.2 py36h7b6447c_0
wheel 0.33.4 py36_0
xz 5.2.4 h14c3975_4
zlib 1.2.11 h7b6447c_3
zstd 1.3.7 h0b5b093_0