manuelruder / artistic-videos

Torch implementation for the paper "Artistic style transfer for videos"
Other
1.75k stars 252 forks source link

terminate called after throwing an instance of 'EFilterIncompatibleSize' makeOptFlow.sh: line 56: 2586 Aborted (core dumped) #7

Closed ProGamerGov closed 8 years ago

ProGamerGov commented 8 years ago

Using username "ubuntu".
Authenticating with public key "imported-openssh-key"
Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-79-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Wed May 25 00:18:26 UTC 2016

  System load:  0.04               Processes:           159
  Usage of /:   26.1% of 29.39GB   Users logged in:     0
  Memory usage: 1%                 IP address for eth0: Adress
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

Last login: Wed May 25 00:18:26 2016 from 
ubuntu@ip-Address:~$ cd artistic-videos
ubuntu@ip-Address:~/artistic-videos$ ./stylizeVideo.sh /home/ubuntu/artistic-                                                                                        videos/girl.mp4 /home/ubuntu/artistic-videos/vgsn_larger.jpg

Which backend do you want to use? For Nvidia GPU, use cudnn if avalable, otherwi                                                                                        se nn. For non-Nvidia GPU, use clnn. Note: You have to have the given backend in                                                                                        stalled in order to use it. [nn]
 > cudnn

This algorithm needs a lot of memory.   For a resolution of 450x350 you'll need                                                                                         roughly 2GB VRAM.   VRAM usage increases linear with resolution.   Please enter                                                                                         a resolution at which the video should be processed,   in the format w:h, or lea                                                                                        ve blank to use the original resolution
 > 450x350
ffmpeg version N-80026-g936751b Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man                                                                                         --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-versi                                                                                        on3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrn                                                                                        b --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls                                                                                         --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enab                                                                                        le-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass                                                                                         --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab
  libavutil      55. 24.100 / 55. 24.100
  libavcodec     57. 42.100 / 57. 42.100
  libavformat    57. 36.100 / 57. 36.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 45.100 /  6. 45.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ubuntu/artistic-videos/girl.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.36.100
  Duration: 00:00:14.02, start: 0.000000, bitrate: 833 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yu                                                                                        v420p, 640x640 [SAR 1:1 DAR 1:1], 831 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn (def                                                                                        ault)
    Metadata:
      handler_name    : VideoHandler
[image2 @ 0x268d220] Using AVStream.codec to pass codec parameters to muxers is                                                                                         deprecated, use AVStream.codecpar instead.
Output #0, image2, to 'girl/frame_%04d.ppm':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.36.100
    Stream #0:0(und): Video: ppm, rgb24, 450x350 [SAR 7:9 DAR 1:1], q=2-31, 200                                                                                         kb/s, 29.97 fps, 29.97 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc57.42.100 ppm
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> ppm (native))
Press [q] to stop, [?] for help
frame=  420 fps=318 q=-0.0 Lsize=N/A time=00:00:14.01 bitrate=N/A speed=10.6x                                                                                           
video:193805kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxin                                                                                        g overhead: unknown

How much do you want to weight the style reconstruction term? Default value: 1e2                                                                                         for a resolution of 450x350. Increase for a higher resolution. [1e2]
 > 0.5

Enter the zero-indexed ID of the GPU to use, or -1 for CPU mode (very slow!). [0]
 > 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
makeOptFlow.sh: line 56:  2584 Aborted                 (core dumped) ./consistencyChecker/consistencyChecker "${folderName}/backward_${j}_${i}.flo" "${folderName}/forward_${i}_${j}.flo" "${folderName}/reliable_${j}_${i}.pgm"
Could not open ./girl/flow_640x640/forward_128_129.flo
Could not open ./girl/flow_640x640/backward_129_128.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
makeOptFlow.sh: line 56:  2586 Aborted                 (core dumped) ./consistencyChecker/consistencyChecker "${folderName}/forward_${i}_${j}.flo" "${folderName}/backward_${j}_${i}.flo" "${folderName}/reliable_${i}_${j}.pgm"
Place deepflow2-static and deepmatching-static in this directory.
Place deepflow2-static and deepmatching-static in this directory.
Could not open ./girl/flow_640x640/backward_130_129.flo
Could not open ./girl/flow_640x640/forward_129_130.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
makeOptFlow.sh: line 56:  2592 Aborted                 (core dumped) ./consistencyChecker/consistencyChecker "${folderName}/backward_${j}_${i}.flo" "${folderName}/forward_${i}_${j}.flo" "${folderName}/reliable_${j}_${i}.pgm"
Could not open ./girl/flow_640x640/forward_129_130.flo
Could not open ./girl/flow_640x640/backward_130_129.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
makeOptFlow.sh: line 56:  2594 Aborted                 (core dumped) ./consistencyChecker/consistencyChecker "${folderName}/forward_${i}_${j}.flo" "${folderName}/backward_${j}_${i}.flo" "${folderName}/reliable_${i}_${j}.pgm"
Place deepflow2-static and deepmatching-static in this directory.
Place deepflow2-static and deepmatching-static in this directory.
Could not open ./girl/flow_640x640/backward_131_130.flo
Could not open ./girl/flow_640x640/forward_130_131.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
makeOptFlow.sh: line 56:  2600 Aborted                 (core dumped) ./consistencyChecker/consistencyChecker "${folderName}/backward_${j}_${i}.flo" "${folderName}/forward_${i}_${j}.flo" "${folderName}/reliable_${j}_${i}.pgm"
Could not open ./girl/flow_640x640/forward_130_131.flo
Could not open ./girl/flow_640x640/backward_131_130.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
makeOptFlow.sh: line 56:  2602 Aborted                 (core dumped) ./consistencyChecker/consistencyChecker "${folderName}/forward_${i}_${j}.flo" "${folderName}/backward_${j}_${i}.flo" "${folderName}/reliable_${i}_${j}.pgm"
Place deepflow2-static and deepmatching-static in this directory.
Place deepflow2-static and deepmatching-static in this directory.
Could not open ./girl/flow_640x640/backward_132_131.flo
Could not open ./girl/flow_640x640/forward_131_132.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
makeOptFlow.sh: line 56:  2608 Aborted                 (core dumped) ./consistencyChecker/consistencyChecker "${folderName}/backward_${j}_${i}.flo" "${folderName}/forward_${i}_${j}.flo" "${folderName}/reliable_${j}_${i}.pgm"
Could not open ./girl/flow_640x640/forward_131_132.flo
Could not open ./girl/flow_640x640/backward_132_131.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
makeOptFlow.sh: line 56:  2610 Aborted                 (core dumped) ./consistencyChecker/consistencyChecker "${folderName}/forward_${i}_${j}.flo" "${folderName}/backward_${j}_${i}.flo" "${folderName}/reliable_${i}_${j}.pgm"
Place deepflow2-static and deepmatching-static in this directory.
Place deepflow2-static and deepmatching-static in this directory.
Could not open ./girl/flow_640x640/backward_133_132.flo
Could not open ./girl/flow_640x640/forward_132_133.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
ProGamerGov commented 8 years ago

I did this on an amazon g2.2xlarge instance that was already running neural-style successfully. I did this to install ffmpeg:

sudo add-apt-repository ppa:mc3man/trusty-media

sudo apt-get update

sudo apt-get install ffmpeg


git clone https://github.com/manuelruder/artistic-videos.git

manuelruder commented 8 years ago

You need to place deepflow2-static and deepmatching-static in this directory. These are static binaries that come with deepflow and deepmatching. You just need to download the zip archives from their website, extract the static binaries from there and place it into the same directory as the script files.

By the way, you use a pretty low style weight. Yours is 200 times less then the default value. I think that with such a low style weight the result will just look as the original video without any style effect.

ProGamerGov commented 8 years ago

@manuelruder The style weight I had set it to was just a placeholder while I tried to get it to work.

I put deepflow2-static and deepmatching-static in the repository but I still get the same error.

manuelruder commented 8 years ago

hmm, interesting. Maybe the working directory is pointing to somewhere else, because in your error messages it says that it can't find those binaries. Try to open run-deepflow.sh, remove everything except the last line, and add the absolute path for deepflow and deepmatching.

ProGamerGov commented 8 years ago

@manuelruder So I download deepmatching_1.2.2.zip and DeepFlow_release2.0.tar.gz. Then I only take out the one file from each after unzipping them, and then i place both files under the artistic video directory. After that I tried to run the command.

ProGamerGov commented 8 years ago
Last login: Wed May  4 22:56:50 2016 from Address
ubuntu@ip-Address:~$ cd ~
ubuntu@ip-Address:~$ git clone https://github.com/manuelruder/artistic-videos.git
Cloning into 'artistic-videos'...
remote: Counting objects: 131, done.
remote: Total 131 (delta 0), reused 0 (delta 0), pack-reused 131
Receiving objects: 100% (131/131), 10.44 MiB | 2.67 MiB/s, done.
Resolving deltas: 100% (61/61), done.
Checking connectivity... done.
ubuntu@ip-Address:~$ cd artistic-videos
ubuntu@ip-Address:~/artistic-videos$ ./run-deepflow.sh
-bash: ./run-deepflow.sh: Permission denied
ubuntu@ip-Address:~/artistic-videos$
ProGamerGov commented 8 years ago
if [ "$#" -ne 3 ]; then
  echo "This is an auxiliary script for makeOptFlow.sh. No need to call this script directly."
  exit 1
fi
if [ ! -f deepmatching-static ] && [ ! -f deepflow2-static ]; then
  echo "Place deepflow2-static and deepmatching-static in this directory."
  exit 1
fi

./deepmatching-static $1 $2 -nt 0 | ./deepflow2-static $1 $2 $3 -match

File Locations:

/home/ubuntu/artistic-videos/deepflow2-static

/home/ubuntu/artistic-videos/deepmatching-static

I deleted the lines and added the paths, now it just has this:

/home/ubuntu/artistic-videos/deepmatching-static $1 $2 -nt 0 | /home/ubuntu/artistic-videos/deepflow2-static $1 $2 $3 -match

And then it gives the errors again:

run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepflow2-static: Permission denied
run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepmatching-static: Permission denied
run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepflow2-static: Permission denied
Could not open ./girl/flow_default/backward_99_98.flo
Could not open ./girl/flow_default/forward_98_99.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
makeOptFlow.sh: line 56:  6371 Aborted                 (core dumped) ./consistencyChecker/consistencyChecker "${folderName}/backward_${j}_${i}.flo" "${folderName}/forward_${i}_${j}.flo" "${folderName}/reliable_${j}_${i}.pgm"
Could not open ./girl/flow_default/forward_98_99.flo
Could not open ./girl/flow_default/backward_99_98.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
makeOptFlow.sh: line 56:  6373 Aborted                 (core dumped) ./consistencyChecker/consistencyChecker "${folderName}/forward_${i}_${j}.flo" "${folderName}/backward_${j}_${i}.flo" "${folderName}/reliable_${i}_${j}.pgm"
run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepmatching-static: Permission denied
run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepflow2-static: Permission denied
run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepmatching-static: Permission denied
run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepflow2-static: Permission denied
Could not open ./girl/flow_default/backward_100_99.flo
Could not open ./girl/flow_default/forward_99_100.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
makeOptFlow.sh: line 56:  6383 Aborted                 (core dumped) ./consistencyChecker/consistencyChecker "${folderName}/backward_${j}_${i}.flo" "${folderName}/forward_${i}_${j}.flo" "${folderName}/reliable_${j}_${i}.pgm"
Could not open ./girl/flow_default/forward_99_100.flo
Could not open ./girl/flow_default/backward_100_99.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
makeOptFlow.sh: line 56:  6385 Aborted                 (core dumped) ./consistencyChecker/consistencyChecker "${folderName}/forward_${i}_${j}.flo" "${folderName}/backward_${j}_${i}.flo" "${folderName}/reliable_${i}_${j}.pgm"
run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepmatching-static: Permission denied
run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepflow2-static: Permission denied
run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepmatching-static: Permission denied
run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepflow2-static: Permission denied
Could not open ./girl/flow_default/backward_101_100.flo
Could not open ./girl/flow_default/forward_100_101.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
makeOptFlow.sh: line 56:  6395 Aborted                 (core dumped) ./consistencyChecker/consistencyChecker "${folderName}/backward_${j}_${i}.flo" "${folderName}/forward_${i}_${j}.flo" "${folderName}/reliable_${j}_${i}.pgm"
Could not open ./girl/flow_default/forward_100_101.flo
Could not open ./girl/flow_default/backward_101_100.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'
makeOptFlow.sh: line 56:  6397 Aborted                 (core dumped) ./consistencyChecker/consistencyChecker "${folderName}/forward_${i}_${j}.flo" "${folderName}/backward_${j}_${i}.flo" "${folderName}/reliable_${i}_${j}.pgm"
run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepmatching-static: Permission denied
run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepflow2-static: Permission denied
run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepmatching-static: Permission denied
run-deepflow.sh: line 1: /home/ubuntu/artistic-videos/deepflow2-static: Permission denied
Could not open ./girl/flow_default/backward_102_101.flo
Could not open ./girl/flow_default/forward_101_102.flo
Exception EFilterIncompatibleSize: Initial container size: 0  Resulting container size: 0
terminate called after throwing an instance of 'EFilterIncompatibleSize'

Progress was made as now it is a different error.

ProGamerGov commented 8 years ago

Just did chmod u+x deepflow2-static and chmod u+x deepmatching-static

Then I entered the original command again. Now it's saying:

Computing optical flow. This may take a while...

How long should this take?

Edit: Did not appear to be doing anything.

manuelruder commented 8 years ago

Depends on the machine (# of cpu cores), and the number of frames. It may take up to one minute per frame.

ProGamerGov commented 8 years ago

It worked for me. Made this successfully: https://i.imgur.com/3VEmnhQ.webm

manuelruder commented 8 years ago

@ProGamerGov Nice! What was the original video if I may ask?

ProGamerGov commented 8 years ago

@manuelruder The style gif can be found here: https://imgur.com/a/UOaQo