0

I'm very new to NN and have started playing around with Deeplearning4j. I have tried as an exercise the idea of reducing ISO noise from a photo. To do this I took 2 photos identically framed, but one shot at ISO 100 and one shot at ISO25600.

I made a simple NN with 2 hidden layers. The input is the noisy, high ISO image (3 channels * 100px * 100px = 30000) and the output should be the clean image (same size as the input)

Here's how my NN looks like:

final int numHiddenNodes = 50;
    return new NeuralNetConfiguration.Builder()
            .seed(seed)
            .iterations(iterations)
            .optimizationAlgo(
                    OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT)
            .learningRate(learningRate)
            .weightInit(WeightInit.XAVIER)
            .updater(Updater.NESTEROVS)
            .optimizationAlgo(
                        OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT)
            .list()
            .layer(0,
                    new DenseLayer.Builder().nIn(numInputs)
                            .nOut(numHiddenNodes)
                            .activation(Activation.TANH).build())
            .layer(1,
                    new DenseLayer.Builder().nIn(numHiddenNodes)
                            .nOut(numHiddenNodes)
                            .activation(Activation.TANH).build())
            .layer(2,
                    new OutputLayer.Builder(LossFunctions.LossFunction.MSE)
                            .activation(Activation.RELU)
                            .nIn(numHiddenNodes).nOut(numOutputs).build())
            .pretrain(false).backprop(true).build();

I've trained my network for several thousands epochs, and the score I get is around 130 (that's probably the Mean Squared Error), but the result I'm getting is not what I expected.

Input: enter image description here

Ouptut: enter image description here

Am I going about this the wrong way?

coding-dude.com
  • 758
  • 1
  • 8
  • 27
  • I don't think what you're doing is enough – ACV Sep 04 '17 at 16:28
  • can you elaborate? what else should I be looking into? – coding-dude.com Sep 07 '17 at 07:59
  • "I took 2 photos" have you trained your model with only 2 samples? – ACV Sep 07 '17 at 09:58
  • sorry for the in-exactity. let me try to clarify: I took 2 photos of 4000x4000px and cut it up in smaller pics of 100x100; the resulting pieces became the training set – coding-dude.com Sep 15 '17 at 14:16
  • I think your approach is wrong (without being an expert myself). You should try to train the network with the "least common denominator", ie, how can it distinguish a "good pattern" from a "bad pattern" in regards to the noise. You're using too large blocks and you shouldn't involve larger patterns in the images. Maybe using 5x5 segments would be better? – reden Nov 22 '17 at 14:40

0 Answers0