You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 2, 2021. It is now read-only.
@@ -69,7 +79,7 @@ Pre-trained models are provided in the GitHub releases. Training your own is a
69
79
--discriminator-size=64
70
80
71
81
# The newly trained model is output into this file...
72
-
ls ne4x-custom-*.pkl.bz2
82
+
ls ne?x-custom-*.pkl.bz2
73
83
74
84
75
85
.. image:: docs/BankLobby_example.gif
@@ -84,22 +94,29 @@ Pre-trained models are provided in the GitHub releases. Training your own is a
84
94
85
95
The easiest way to get up-and-running is to `install Docker <https://www.docker.com/>`_. Then, you should be able to download and run the pre-built image using the ``docker`` command line tool. Find out more about the ``alexjc/neural-enhance`` image on its `Docker Hub <https://hub.docker.com/r/alexjc/neural-enhance/>`_ page.
86
96
87
-
**Single Image** — We suggest you setup an alias called ``enhance`` to automatically expose the folder containing your specified image, so the script can read it and store results where you can access them. This is how you can do it in your terminal console on OSX or Linux:
97
+
Here's the simplest way you can call the script using ``docker``, assuming you're familiar with using ``-v` to mount folders you can use this directly to specify files to enhance:
98
+
99
+
.. code:: bash
100
+
101
+
# Download the Docker image and show the help text to make sure it works.
102
+
docker run --rm -v `pwd`:/ne/input -it alexjc/neural-enhance --help
103
+
104
+
**Single Image** — In practice, we suggest you setup an alias called ``enhance`` to automatically expose the folder containing your specified image, so the script can read it and store results where you can access them. This is how you can do it in your terminal console on OSX or Linux:
88
105
89
106
.. code:: bash
90
107
91
108
# Setup the alias. Put this in your .bashrc or .zshrc file so it's available at startup.
92
-
alias enhance='function ne() { docker run --rm -v "$(pwd)/`dirname ${@:$#}`":/ne/input -it alexjc/neural-enhance ${@:1:-1} "input/`basename ${@:$#}`"; }; ne'
109
+
alias enhance='function ne() { docker run --rm -v "$(pwd)/`dirname ${@:$#}`":/ne/input -it alexjc/neural-enhance ${@:1:$#-1} "input/`basename ${@:$#}`"; }; ne'
93
110
94
111
# Now run any of the examples above using this alias, without the `.py` extension.
95
-
enhance --zoom=1 --model=small images/example.jpg
112
+
enhance --zoom=1 --model=repair images/broken.jpg
96
113
97
114
**Multiple Images** — To enhance multiple images in a row (faster) from a folder or widlcard specification, make sure to quote the argument to the alias command:
98
115
99
116
.. code:: bash
100
117
101
118
# Process multiple images, make sure to quote the argument!
102
-
enhance --zoom=2 --model=small "images/*.jpg"
119
+
enhance --zoom=2 "images/*.jpg"
103
120
104
121
If you want to run on your NVIDIA GPU, you can instead change the alias to use the image ``alexjc/neural-enhance:gpu`` which comes with CUDA and CUDNN pre-installed. Then run it within `nvidia-docker <https://github.com/NVIDIA/nvidia-docker>`_ and it should use your physical hardware!
0 commit comments