Add training scripts, they take a while to run!

main
Alex J. Champandard 9 years ago
parent 9d8ab0ea8e
commit 7c8cc5609f

@ -94,7 +94,7 @@ Pre-trained models are provided in the GitHub releases. Training your own is a
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.
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:
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:
.. code:: bash
@ -111,7 +111,7 @@ Here's the simplest way you can call the script using ``docker``, assuming you'r
# Now run any of the examples above using this alias, without the `.py` extension.
enhance --zoom=1 --model=repair images/broken.jpg
**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:
**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:
.. code:: bash

@ -0,0 +1,18 @@
#!/bin/sh
python3.4 enhance.py \
--train "$OPEN_IMAGES_PATH/*/*.jpg" --type photo --model repair \
--epochs=50 --batch-shape=256 --device=gpu1 \
--generator-downscale=2 --generator-upscale=2 \
--generator-blocks=8 --generator-filters=128 --generator-residual=0 \
--perceptual-layer=conv2_2 --smoothness-weight=1e7 --adversary-weight=0.0 \
--train-noise=2.0 --train-jpeg=30
python3.4 enhance.py \
--train "$OPEN_IMAGES_PATH/*/*.jpg" --type photo --model repair \
--epochs=500 --batch-shape=240 --device=gpu1 \
--generator-downscale=2 --generator-upscale=2 \
--perceptual-layer=conv5_2 --smoothness-weight=5e3 --adversary-weight=5e1 \
--generator-start=10 --discriminator-start=0 --adversarial-start=10 \
--discriminator-size=48 \
--train-noise=2.0 --train-jpeg=30

@ -0,0 +1,18 @@
#!/bin/sh
python3.4 enhance.py \
--train "$OPEN_IMAGES_PATH/*/*.jpg" --type photo --model default \
--epochs=50 --batch-shape=256 --device=gpu0 \
--generator-downscale=0 --generator-upscale=1 \
--generator-blocks=8 --generator-filters=128 --generator-residual=0 \
--perceptual-layer=conv2_2 --smoothness-weight=1e7 --adversary-weight=0.0 \
--train-noise=1.0
python3.4 enhance.py \
--train "$OPEN_IMAGES_PATH/*/*.jpg" --type photo --model default \
--epochs=500 --batch-shape=240 --device=gpu0 \
--generator-downscale=0 --generator-upscale=1 \
--perceptual-layer=conv5_2 --smoothness-weight=5e3 --adversary-weight=5e1 \
--generator-start=10 --discriminator-start=0 --adversarial-start=10 \
--discriminator-size=64 \
--train-noise=1.0

@ -1,18 +0,0 @@
#!/bin/sh
python3.4 enhance.py \
--train "$OPEN_IMAGES_PATH/*/*.jpg" --model small \
--epochs=50 --batch-shape=192 --device=gpu0 \
--generator-downscale=2 --generator-upscale=2 \
--generator-blocks=8 --generator-filters=64 \
--perceptual-layer=conv2_2 --smoothness-weight=1e7 --adversary-weight=0.0 \
--train-blur=3 --train-noise=5.0
python3.4 enhance.py \
--train "$OPEN_IMAGES_PATH/*/*.jpg" --model small \
--epochs=500 --batch-shape=192 --device=gpu0 \
--generator-downscale=2 --generator-upscale=2 \
--perceptual-layer=conv5_2 --smoothness-weight=2e4 --adversary-weight=2e2 \
--generator-start=5 --discriminator-start=0 --adversarial-start=5 \
--discriminator-size=32 \
--train-blur=3 --train-noise=5.0

@ -1,18 +0,0 @@
#!/bin/sh
python3.4 enhance.py \
--train "$OPEN_IMAGES_PATH/*/*.jpg" --model small \
--epochs=50 --batch-shape=192 --device=gpu0 \
--generator-downscale=1 --generator-upscale=2 \
--generator-blocks=8 --generator-filters=64 \
--perceptual-layer=conv2_2 --smoothness-weight=1e7 --adversary-weight=0.0 \
--train-blur=2 --train-noise=4.0
python3.4 enhance.py \
--train "$OPEN_IMAGES_PATH/*/*.jpg" --model small \
--epochs=500 --batch-shape=192 --device=gpu0 \
--generator-downscale=1 --generator-upscale=2 \
--perceptual-layer=conv5_2 --smoothness-weight=2e4 --adversary-weight=2e2 \
--generator-start=5 --discriminator-start=0 --adversarial-start=5 \
--discriminator-size=32 \
--train-blur=2 --train-noise=4.0

@ -1,18 +0,0 @@
#!/bin/sh
python3.4 enhance.py \
--train "$OPEN_IMAGES_PATH/*/*.jpg" --model small \
--epochs=50 --batch-shape=192 --device=gpu0 \
--generator-downscale=0 --generator-upscale=2 \
--generator-blocks=8 --generator-filters=64 \
--perceptual-layer=conv2_2 --smoothness-weight=1e7 --adversary-weight=0.0 \
--train-blur=1 --train-noise=3.0
python3.4 enhance.py \
--train "$OPEN_IMAGES_PATH/*/*.jpg" --model small \
--epochs=500 --batch-shape=192 --device=gpu0 \
--generator-downscale=0 --generator-upscale=2 \
--perceptual-layer=conv5_2 --smoothness-weight=2e4 --adversary-weight=2e2 \
--generator-start=5 --discriminator-start=0 --adversarial-start=5 \
--discriminator-size=32 \
--train-blur=1 --train-noise=3.0
Loading…
Cancel
Save