EricGuo5513 / text-to-motion

Official implementation for "Generating Diverse and Natural 3D Human Motions from Texts (CVPR2022)."
MIT License
462 stars 40 forks source link

Error when training : [libopenh264 @ 0x55fb7278f140] Incorrect library version loaded #45

Closed anjugopinath closed 3 months ago

anjugopinath commented 3 months ago

Hello,

When trying to train on the KIT-ML dataset, I get the following error message after 2 epochs: epoch: 002 inner_iter: 2891 1m 30s (- 135m 45s) niter: 0008800 completed: 1%) val_loss: 0.2733 loss: 0.2719 loss_rec: 0.2719 loss_sparsity: 0.9671 loss_smooth: 0.7583 epoch: 002 inner_iter: 2941 1m 31s (- 135m 40s) niter: 0008850 completed: 1%) val_loss: 0.2733 loss: 0.2779 loss_rec: 0.2779 loss_sparsity: 0.9586 loss_smooth: 0.7512 Validation time: Validation Loss: 0.25845 Reconstruction Loss: 0.25684 Sparsity Loss: 0.89871 Smooth Loss: 0.96879 MovieWriter stderr: [libopenh264 @ 0x55fb7278f140] Incorrect library version loaded Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

Traceback (most recent call last): File "/s/red/a/nobackup/vision/anju/text2motion/new_cvenv/lib/python3.8/site-packages/matplotlib/animation.py", line 233, in saving yield self File "/s/red/a/nobackup/vision/anju/text2motion/new_cvenv/lib/python3.8/site-packages/matplotlib/animation.py", line 1090, in save anim._init_draw() # Clear the initial frame File "/s/red/a/nobackup/vision/anju/text2motion/new_cvenv/lib/python3.8/site-packages/matplotlib/animation.py", line 1748, in _init_draw self._draw_frame(frame_data) File "/s/red/a/nobackup/vision/anju/text2motion/new_cvenv/lib/python3.8/site-packages/matplotlib/animation.py", line 1767, in _draw_frame self._drawn_artists = self._func(framedata, *self._args) File "/s/red/a/nobackup/vision/anju/text2motion/text-to-motion/utils/plot_script.py", line 81, in update ax.lines = [] AttributeError: can't set attribute

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "train_decomp_v3.py", line 100, in trainer.train(train_loader, val_loader, plot_t2m) File "/s/red/a/nobackup/vision/anju/text2motion/text-to-motion/networks/trainers.py", line 209, in train plot_eval(data, save_dir) File "train_decomp_v3.py", line 23, in plot_t2m plot_3d_motion(save_path, kinematic_chain, joint, title="None", fps=fps, radius=radius) File "/s/red/a/nobackup/vision/anju/text2motion/text-to-motion/utils/plot_script.py", line 114, in plot_3d_motion ani.save(save_path, fps=fps) File "/s/red/a/nobackup/vision/anju/text2motion/new_cvenv/lib/python3.8/site-packages/matplotlib/animation.py", line 1107, in save writer.grab_frame(**savefig_kwargs) File "/s/red/a/nobackup/vision/anju/text2motion/new_cvenv/lib/python3.8/contextlib.py", line 131, in exit self.gen.throw(type, value, traceback) File "/s/red/a/nobackup/vision/anju/text2motion/new_cvenv/lib/python3.8/site-packages/matplotlib/animation.py", line 235, in saving self.finish() File "/s/red/a/nobackup/vision/anju/text2motion/new_cvenv/lib/python3.8/site-packages/matplotlib/animation.py", line 349, in finish raise subprocess.CalledProcessError( subprocess.CalledProcessError: Command '['ffmpeg', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '1000x1000', '-pix_fmt', 'rgba', '-r', '12.5', '-loglevel', 'error', '-i', 'pipe:', '-vcodec', 'h264', '-pix_fmt', 'yuv420p', '-y', './checkpoints/kit/Decomp_SP001_SM001_H512/animation/E0003/00.mp4']' returned non-zero exit status 1. (/s/red/a/nobackup/vision/anju/text2motion/new_cvenv) carnap:/s/red/a/nobackup/vision/anju/text2motion/text-to-motion$ python train_decomp_v3.py --name Decomp_SP001_SM001_H512 --gpu_id 0 --window_size 24 --dataset_name kit

anjugopinath commented 3 months ago

The libopenh error was due to the incorrect version of ffmpeg. Solution:

  1. pip uninstall ffmpeg
  2. conda env config vars set PATH="/usr/local/ffmpeg/4.3.1/bin:$PATH"
  3. conda env config vars set LD_LIBRARY_PATH="/usr/local/ffmpeg/4.3.1/lib:$LD_LIBRARY_PATH"

The conda env config ..... command lets you set the PATH for only the particular conda environment that is activated and so is more convenient.

AttributeError: can't set attribute error is due to the incorrect version of matplotlib Solution: pip uninstall matplotlib pip install matplotlib==3.3.1