Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.

Commit 7c8cc56

Browse files
committed
Add training scripts, they take a while to run!
1 parent 9d8ab0e commit 7c8cc56

File tree

6 files changed

+38
-56
lines changed

6 files changed

+38
-56
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Pre-trained models are provided in the GitHub releases. Training your own is a
9494

9595
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.
9696

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:
97+
Here's the simplest way you can call the script using ``docker``, assuming you're familiar with using ``-v`` argument to mount folders you can use this directly to specify files to enhance:
9898

9999
.. code:: bash
100100
@@ -111,7 +111,7 @@ Here's the simplest way you can call the script using ``docker``, assuming you'r
111111
# Now run any of the examples above using this alias, without the `.py` extension.
112112
enhance --zoom=1 --model=repair images/broken.jpg
113113
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:
114+
**Multiple Images** — To enhance multiple images in a row (faster) from a folder or wildcard specification, make sure to quote the argument to the alias command:
115115

116116
.. code:: bash
117117

scripts/ne1x-photo-repair.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
3+
python3.4 enhance.py \
4+
--train "$OPEN_IMAGES_PATH/*/*.jpg" --type photo --model repair \
5+
--epochs=50 --batch-shape=256 --device=gpu1 \
6+
--generator-downscale=2 --generator-upscale=2 \
7+
--generator-blocks=8 --generator-filters=128 --generator-residual=0 \
8+
--perceptual-layer=conv2_2 --smoothness-weight=1e7 --adversary-weight=0.0 \
9+
--train-noise=2.0 --train-jpeg=30
10+
11+
python3.4 enhance.py \
12+
--train "$OPEN_IMAGES_PATH/*/*.jpg" --type photo --model repair \
13+
--epochs=500 --batch-shape=240 --device=gpu1 \
14+
--generator-downscale=2 --generator-upscale=2 \
15+
--perceptual-layer=conv5_2 --smoothness-weight=5e3 --adversary-weight=5e1 \
16+
--generator-start=10 --discriminator-start=0 --adversarial-start=10 \
17+
--discriminator-size=48 \
18+
--train-noise=2.0 --train-jpeg=30

scripts/ne2x-photo-default.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
3+
python3.4 enhance.py \
4+
--train "$OPEN_IMAGES_PATH/*/*.jpg" --type photo --model default \
5+
--epochs=50 --batch-shape=256 --device=gpu0 \
6+
--generator-downscale=0 --generator-upscale=1 \
7+
--generator-blocks=8 --generator-filters=128 --generator-residual=0 \
8+
--perceptual-layer=conv2_2 --smoothness-weight=1e7 --adversary-weight=0.0 \
9+
--train-noise=1.0
10+
11+
python3.4 enhance.py \
12+
--train "$OPEN_IMAGES_PATH/*/*.jpg" --type photo --model default \
13+
--epochs=500 --batch-shape=240 --device=gpu0 \
14+
--generator-downscale=0 --generator-upscale=1 \
15+
--perceptual-layer=conv5_2 --smoothness-weight=5e3 --adversary-weight=5e1 \
16+
--generator-start=10 --discriminator-start=0 --adversarial-start=10 \
17+
--discriminator-size=64 \
18+
--train-noise=1.0

scripts/small-1x.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

scripts/small-2x.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

scripts/small-4x.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)