Closed ProGamerGov closed 7 years ago
@luanfujun Is using Octave: https://www.gnu.org/software/octave/ instead of Matlab possible without modifying the code? Octave appears to support all the required Matlab stuff, and it's free and open source software.
Edit: Testing Octave:
ubuntu@ip-Address:~/deep-photo-styletransfer$ octave
octave:1> run('gen_laplacian/gen_laplacian.m')
warning: addpath: matting\: No such file or directory
warning: addpath: gaimc\: No such file or directory
Working on image index = 1
warning: your version of GraphicsMagick limits images to 16 bits per pixel
'im2double' undefined near line 10 column 13
error: called from 'gen_laplacian.m' in file /home/ubuntu/deep-photo-styletransfer/gen_laplacian/gen_laplacian.m near line 10, column 11
octave:1>
first run
$ sudo apt-get install liboctave-dev
then from octave after you downloaded image-2.6.1.tar.gz from https://octave.sourceforge.io/image/ run pkg install image-2.6.1.tar.gz
, finally run pkg load image
and then execute the script. Note that then I had an issue with some directories not being correctly imported (and there was an undefined getLaplacian1()), to fix it simply change the first two lines of the matlab file to:
addpath matting/
addpath gaimc/
(basically reversing the slash)
@luke14free I got Octave to work by doing the same things that you described, but the .Mat files it creates don't work in the deepmatting script for me. Do they work for you?
For Clarity on @luke14free comment: On the command line:
cd [parent directory of deep-photo-styletransfer]
sudo apt-get install liboctave-dev
wget https://downloads.sourceforge.net/project/octave/Octave%20Forge%20Packages/Individual%20Package%20Releases/image-2.6.1.tar.gz?r=&ts=1491430627&use_mirror=superb-sea2
mv image-2.6.1.tar.gz?r= image-2.6.1.tar.gz
Then run inside of octave, by launching octave on the command line:
octave
pkg install image-2.6.1.tar.gz
pkg load image
run('deep-photo-styletransfer/gen_laplacian/gen_laplacian.m')
Is there a solution for this running on Mac instead of Ubuntu? I'm running into the same 'im2double' undefined
problem trying to run run('gen_laplacian/gen_laplacian.m')
in Octave :(
I removed the MATLAB/Octave dependency in my fork: https://github.com/martinbenson/deep-photo-styletransfer
@martinbenson Thanks! This is perfect
I'd love to experiment with this project, but I'd rather not have to buy Matlab first as it is not free like Torch, Tensorflow, Theano, Caffe, etc...
So is removing the Matlab dependency possible? And if so, how difficult would it be?