Closed ProGamerGov closed 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
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.
@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.
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.
@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.
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$
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.
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.
Depends on the machine (# of cpu cores), and the number of frames. It may take up to one minute per frame.
It worked for me. Made this successfully: https://i.imgur.com/3VEmnhQ.webm
@ProGamerGov Nice! What was the original video if I may ask?
@manuelruder The style gif can be found here: https://imgur.com/a/UOaQo