Giter VIP home page Giter VIP logo

Comments (4)

Anotherun avatar Anotherun commented on July 22, 2024

Hi Mathew,

Unfortunately I'm not very knowledgeable about most of the installation process, however, I did successfully install the project following the guide on my windows 10 machine. I saw the PIL dependency listed for scipy, but as it was not mentioned in the guide at all I chose to not install it, believing it must not be needed for the project.

I did have a hiccup in my install with Anaconda, so I forced a downgrade to 3.4.4 and then updated all packages as outlined in the guide. This is all I needed to do after following the guide through once, and while I don't think it directly addresses your problem, it does show that the instructions will work with windows 10.

Looking at my pip list, the only difference I see in my packages is in the statsmodels: I have statsmodels (0.8.0rc1). I'll list my full pip list at the end, I've only used pip and Anaconda for this project and I have a lot more packages installed, perhaps a step was missed.

Here is another project for style transfer: https://github.com/jcjohnson/neural-style/blob/master/README.md

It is older, but I believe relatively simple to install and use. I used to dual boot into linux for style transfer, but I was happy to find that the project works perfectly on windows 10 through bash on windows. The one down side is that the gpu acceleration is not supported by bash on windows, but it should give you an alternative if you become too frustrated with trying to install this project. The up side is that the cpu mode allows for higher resolution style transfers for when you want a high quality output and don't mind the compute time.

I regret that I don't know enough to help further, but I hope seeing at least one response quickly will hearten you and that my pip list might help you get the project up and running.

Here is my pip list:

alabaster (0.7.8)
anaconda-client (1.5.1)
argcomplete (1.0.0)
astropy (1.2.1)
Babel (2.3.3)
backports-abc (0.4)
bcolz (1.0.0)
beautifulsoup4 (4.3.2)
bitarray (0.8.1)
blaze (0.9.0)
bokeh (0.12.2)
boto (2.42.0)
certifi (2016.2.28)
cffi (1.7.0)
click (6.6)
clyent (1.2.2)
colorama (0.3.7)
comtypes (1.1.2)
conda (4.1.12)
conda-build (2.0.1)
conda-env (2.5.0a0)
configobj (5.0.6)
cryptography (1.5)
cycler (0.10.0)
Cython (0.24.1)
cytoolz (0.8.0)
datashape (0.5.2)
decorator (4.0.10)
docutils (0.12)
et-xmlfile (1.0.1)
fastcache (1.0.2)
filelock (2.0.6)
Flask (0.11.1)
greenlet (0.4.10)
h5py (2.6.0)
idna (2.1)
imagesize (0.7.1)
ipykernel (4.5.0)
ipython (5.1.0)
ipython-genutils (0.1.0)
itsdangerous (0.24)
jdcal (1.2)
jedi (0.9.0)
Jinja2 (2.8)
jsonschema (2.5.1)
jupyter-client (4.4.0)
jupyter-core (4.1.1)
Keras (1.0.8)
llvmlite (0.13.0)
lxml (3.6.4)
MarkupSafe (0.23)
matplotlib (1.5.1)
menuinst (1.4.1)
mistune (0.7.2)
mock (2.0.0)
mpmath (0.19)
multipledispatch (0.4.8)
nbconvert (4.2.0)
nbformat (4.1.0)
networkx (1.11)
nltk (3.2.1)
nose (1.3.7)
notebook (4.2.2)
numba (0.28.1)
numexpr (2.6.1)
numpy (1.11.1+mkl)
odo (0.5.0)
openpyxl (2.3.2)
pandas (0.18.1)
path.py (0.0.0)
patsy (0.4.1)
pbr (1.10.0)
pep8 (1.7.0)
pickleshare (0.7.3)
Pillow (3.3.1)
pip (8.1.2)
ply (3.9)
prompt-toolkit (1.0.3)
psutil (4.3.1)
py (1.4.31)
pyasn1 (0.1.9)
pycosat (0.6.1)
pycparser (2.14)
pycrypto (2.6.1)
pyflakes (1.3.0)
Pygments (2.1.3)
pyOpenSSL (16.0.0)
pyparsing (2.1.4)
pyreadline (2.1)
pytest (2.9.2)
python-dateutil (2.5.3)
pytz (2016.6.1)
pywin32 (220)
PyYAML (3.11)
pyzmq (15.4.0)
qtconsole (4.2.1)
requests (2.11.1)
rope-py3k (0.9.4.post1)
ruamel-yaml (-VERSION)
runipy (0.1.3)
scikit-image (0.12.3)
scikit-learn (0.17.1)
scipy (0.18.0)
setuptools (26.1.1)
simplegeneric (0.8.1)
six (1.10.0)
snowballstemmer (1.2.1)
sockjs-tornado (1.0.3)
sphinx (1.4.1)
sphinx-rtd-theme (0.1.9)
spyder (2.3.8)
SQLAlchemy (1.0.13)
statsmodels (0.8.0rc1)
sympy (1.0)
tables (3.2.2)
Theano (0.8.2)
toolz (0.8.0)
tornado (4.4.1)
traitlets (4.2.2)
ujson (1.35)
wcwidth (0.1.7)
Werkzeug (0.11.11)
wheel (0.29.0)
win-unicode-console (0.5)
xlrd (1.0.0)
XlsxWriter (0.9.2)
xlwings (0.9.2)


from neural-style-transfer.

titu1994 avatar titu1994 commented on July 22, 2024

@matthewbahr Did you perform this step? : conda install mingw libpython
I have seen this error once in awhile when this step is missed (especially the thousands of lines of raw code).

Just installing TDM-GCC is not usually sufficient for getting the compiler to work correctly.

@Anotherun I agree that setting up this project on Windows is akin to shooting oneself in the foot, repeatedly. On another note, this project can also be setup using bash on windows (and I argue that it's simpler than the jcjohnson project, since GPU support isn't needed therefore everything comes with anaconda itself and a single pip install of Keras)

This however is simply not recommended. It takes huge amounts of time to run either these scripts or jcjohnson's scripts on CPU. The main culprit is the forward and backward passes through the huge VGG network to get the best quality results.

The best way to get high resolution examples if by first creating small scale results, and then upscaling them using a super resolution algorithm. See below (2732 x 2048).
bryona gwidion uprgb noise_scale level3 x4 000000

The upscaled result is exactly the same as the smaller version computed by the script. (683 x 512)
bryona gwidion_at_iteration_100

Upscaling was done through the caffe super resolution program which I linked to at the end of the readme.me (https://github.com/lltcggie/waifu2x-caffe/releases). With CUDA already set up for Theano, this can process a 2732 x 2048 image in less than 1 second from a given image of size 683 x 512.

Edit:
Thanks for the tip about pil not being a direct dependency of scipy. Iv'e added pip install pillow after the conda install mingw libpython to address this.

from neural-style-transfer.

matthewbahr avatar matthewbahr commented on July 22, 2024

I was specifically looking for high quality large images to be done via CUDA accelerated GPU, which is why I went through the process of slowly gnawing off my own fingers also known as installing theano.

After getting this fixed (great call on the mingw @titu1994) I had to get h5py as well which then automatically installed numpy. Pip didn't work on the h5py but conda install h5py worked great. Now I've got a great system all set up. The ultimate goal for this is to work at it until I can make high scale prints for myself of photos I've taken in the styles of the great painters. Really cool program here man. I'm looking at the upscaling repo and it's all in Japanese?

from neural-style-transfer.

titu1994 avatar titu1994 commented on July 22, 2024

@matthewbahr With a GPU, you are limited to the amount of RAM your GPU has. With my 980M (4 GB), I can go 764 x 764 if I provide --img_size as 764. But this takes exorbitant amounts of time even on GPU. It is better to just choose a smaller size (say 400, or 512) and then upscale this result.

As to the upscaling repo, it was and is still mainly used to upscale low resolution anime art (hence the name "waifu2x-caffe"). Therefore the repo is in Japanese. However, there is no need to read that. You can simply scroll down a little to come across a 109~ MB download. It's a zip file with a program (which is in English) which gives you a nice GUI to work with this upscaling algorithm. I use this daily so I can assure you it's safe.

The above image I posted is also upscaled using this program. There are a few options that are important. Depending on the kind of art that you produce, you may want to use one of two different modes of the upscaling algorithm. However I just use the "2-D illust (UpRGB Model)" model.

Also, since you have setup this script on Windows, you might as well use the Windows Helper program. It provides a nice GUI to quickly select images and alter the parameters of the script. The first time you execute the script, it will as for the location of python.exe from your Anaconda / miniconda installation. I use it directly since I kinda dislike going in the windows command prompt repeatedly for executing this script :P

Also, I've added the note about h5py as well (ideally it is auto installed when installing Keras). These instructions are from my own experience of installing Theano on 14 windows laptops. So I think these instructions are "battle tested" against the beast known as Theano. Still, the first time is a true test of patience.

from neural-style-transfer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.