From 04f9760891431238da2ad8754ebc1ea521320fc3 Mon Sep 17 00:00:00 2001 From: Alexander Krull Date: Mon, 27 Apr 2020 07:22:06 +0200 Subject: [PATCH] Alex krull patch clipping (#75) Update BSD68_reproducibility.ipynb --- .../2D/denoising2D_BSD68/BSD68_reproducibility.ipynb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/2D/denoising2D_BSD68/BSD68_reproducibility.ipynb b/examples/2D/denoising2D_BSD68/BSD68_reproducibility.ipynb index f010785..7049f67 100644 --- a/examples/2D/denoising2D_BSD68/BSD68_reproducibility.ipynb +++ b/examples/2D/denoising2D_BSD68/BSD68_reproducibility.ipynb @@ -78,6 +78,11 @@ "source": [ "X = np.load('data/BSD68_reproducibility_data/train/DCNN400_train_gaussian25.npy')\n", "X_val = np.load('data/BSD68_reproducibility_data/val/DCNN400_validation_gaussian25.npy')\n", + "# Note that we do not round or clip the noisy data to [0,255]\n", + "# If you want to enable clipping and rounding to emulate an 8 bit image format,\n", + "# uncomment the following lines.\n", + "# X = np.round(np.clip(X, 0, 255.))\n", + "# X_val = np.round(np.clip(X_val, 0, 255.))\n", "\n", "# Adding channel dimension\n", "X = X[..., np.newaxis]\n", @@ -792,7 +797,11 @@ "metadata": {}, "outputs": [], "source": [ - "test_data = np.load('data/BSD68_reproducibility_data/test/bsd68_gaussian25.npy', allow_pickle=True)" + "test_data = np.load('data/BSD68_reproducibility_data/test/bsd68_gaussian25.npy', allow_pickle=True)\n", + "# Note that we do not round or clip the noisy data to [0,255]\n", + "# If you want to enable clipping and rounding to emulate an 8 bit image format,\n", + "# uncomment the following line.\n", + "# test_data = np.round(np.clip(test_data, 0, 255.))" ] }, {