google / stereo-magnification

Code accompanying the SIGGRAPH 2018 paper "Stereo Magnification: Learning View Synthesis using Multiplane Images"
https://people.eecs.berkeley.edu/~tinghuiz/projects/mpi/
Apache License 2.0
390 stars 87 forks source link

how to run the model on a single image pair? #4

Closed suljaxm closed 6 years ago

suljaxm commented 6 years ago

I type the command on the terminal, as follows “python mpi_from_images.py image1=./XXX image2=./XXXX” , but it is error. Could you please help me. Also I can't use any other code....

olivertai commented 6 years ago

Try python mpi_from_images.py \ --image1 /path_to_image1 \ --image2 /path_to_image2 \ --output_dir ./tmp/result

suljaxm commented 6 years ago

Thank you for your prompt reply, but when I tried your way, it was still error.
The error :

Traceback (most recent call last): File "mpi_from_images.py", line 64, in flags.DEFINE_list( AttributeError: module 'tensorflow.python.platform.flags' has no attribute 'DEFINE_list'

olivertai commented 6 years ago

I have encountered this problem too. It seems that we don't have attribute "DEFINE_list". Try changing "DEFINE_list" to "DEFINE_string", and use another list to read the values render_list = [float(x) for x in flags.FLAGS.render_multiples.split(',')] Then replace the original usage in the code. around line 220: max_multiple = max(abs(float(m)) for m in render_list) around line 280: for multiple in render_list: And try running again.

suljaxm commented 6 years ago

It's ok, thanks so much to you.

snaves commented 6 years ago

Thanks for the feedback -- note that this should now be fixed in https://github.com/google/stereo-magnification/commit/3eb2f9e7b3447e1fd03233dcb69578235e2c5376.

Please let us know if you still see a problem related to this issue.

suljaxm commented 6 years ago

ok