Protobuf-Dreamer
Protobuf-Dreamer copied to clipboard
indentation issues with python3
$ unzip -d model inception5h.zip
Archive: inception5h.zip
inflating: model/imagenet_comp_graph_label_strings.txt
inflating: model/tensorflow_inception_graph.pb
inflating: model/LICENSE
$ python pb_dreamer.py --input_image input.png
File "pb_dreamer.py", line 120
g = calc_grad_tiled(img, t_grad, tile_size)
^
$ python -V
Python 3.7.3
You got any solution for this?
I have no idea what is causing the error for the both of you, but you can submit a PR if you figure a fix!
Maybe there are a combination of tabs and spaces or something like that? But tabs + spaces would throw a different error I think.
I have no idea what is causing the error for the both of you, but you can submit a PR if you figure a fix!
Maybe there are a combination of tabs and spaces or something like that? But tabs + spaces would throw a different error I think.
I made a colab notebook for this. Can you tell which python version you used for this code?
Is the neural-dream repo extended version of this? I saw a tiling feature in that too. Is there any difference between these two?
I probably used Python2.7 as this project is really old. The neural-dream project is a completely different project completely designed by me and written in PyTorch. Protobuf-Dreamer is really old and likely very much out of date these days.
Dude this is hella slow. 💀 But it is working now. You can add some lines in readme file like:
Environment Used Was:
Python==3.xTensorflow==1.xscipy==1.2.0(beacauseimreadis deprecated in the latest scipy versions)
Edit
Now its showing this error:
Iteration Number: 0 Iteration Number: 1 Iteration Number: 2 Octave Number: 0 Iteration Number: 0 Iteration Number: 1 Iteration Number: 2 Octave Number: 1 Iteration Number: 0 Iteration Number: 1 Iteration Number: 2 Octave Number: 2 Traceback (most recent call last): File "pb_dreamer.py", line 152, in <module> imsave(output_name, output_img) File "/usr/local/lib/python3.6/dist-packages/skimage/io/_io.py", line 129, in imsave if arr.dtype == bool: AttributeError: 'Image' object has no attribute 'dtype'
You can click the same colab notebook to reproduce the error. Maybe this is because of the scipy version? Can you tell which scipy version you tested this with? 👀
I think this is a scikit-image issue
Try replacing scipy with skimage like I used here: https://github.com/ProGamerGov/Neural-Tools/blob/master/linear-color-transfer.py