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.
Copy file name to clipboardExpand all lines: README.rst
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,14 +37,14 @@ The default is to use ``--device=cpu``, if you have NVIDIA card setup with CUDA
37
37
38
38
.. code:: bash
39
39
40
-
# Run the super-resolution script for one image.
41
-
python3 enhance.py example.png
40
+
# Run the super-resolution script for one image, factor 1:1.
41
+
python3 enhance.py --zoom=1 example.png
42
42
43
-
# Also process multiple files with a single run.
44
-
python3 enhance.py file1.jpg file2.jpg
43
+
# Also process multiple files with a single run, factor 2:1.
44
+
python3 enhance.py --zoom=2 file1.jpg file2.jpg
45
45
46
-
# Display output images that were given `_ne4x.png` suffix.
47
-
open *_ne4x.png
46
+
# Display output images that were given `_ne?x.png` suffix.
47
+
open *_ne?x.png
48
48
49
49
50
50
1.b) Training Super-Resolution
@@ -89,19 +89,19 @@ The easiest way to get up-and-running is to `install Docker <https://www.docker.
89
89
.. code:: bash
90
90
91
91
# Setup the alias. Put this in your .bashrc or .zshrc file so it's available at startup.
92
-
alias enhance='function ne() { docker run -v $(PWD)/`dirname $1`:/ne/input -it alexjc/neural-enhance input/`basename $1`; }; ne'
92
+
alias enhance='function ne() { docker run --rm -v "$(pwd)/`dirname ${@:$#}`":/ne/input -it alexjc/neural-enhance ${@:1:-1} "input/`basename ${@:$#}`"; }; ne'
93
93
94
94
# Now run any of the examples above using this alias, without the `.py` extension.
95
-
enhance images/example.jpg
95
+
enhance --zoom=1 --model=small images/example.jpg
96
96
97
97
**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
98
99
99
.. code:: bash
100
100
101
101
# Process multiple images, make sure to quote the argument!
102
-
enhance "images/*.jpg"
102
+
enhance --zoom=2 --model=small "images/*.jpg"
103
103
104
-
If you want to run on your NVIDIA GPU, you can instead use the image ``alexjc/neural-enhance:gpu`` which comes with CUDA and CUDNN pre-installed in the image. Then run it within `nvidia-docker <https://github.com/NVIDIA/nvidia-docker>`_ and it should use your physical hardware!
104
+
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