diff --git a/tables/Wiki_Table_denoising.ipynb b/tables/Wiki_Table_denoising.ipynb
new file mode 100644
index 0000000..ba90ece
--- /dev/null
+++ b/tables/Wiki_Table_denoising.ipynb
@@ -0,0 +1,876 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "Using TensorFlow backend.\n"
+ ]
+ }
+ ],
+ "source": [
+ "%load_ext autoreload\n",
+ "%autoreload 2\n",
+ "import warnings\n",
+ "warnings.filterwarnings('ignore')\n",
+ "import sys\n",
+ "sys.path.append('../../')\n",
+ "from noise2seg.models import Noise2Seg, Noise2SegConfig\n",
+ "import numpy as np\n",
+ "from csbdeep.utils import plot_history\n",
+ "from noise2seg.utils.misc_utils import combine_train_test_data, shuffle_train_data, augment_data\n",
+ "from noise2seg.utils.seg_utils import *\n",
+ "from noise2seg.utils.compute_precision_threshold import measure_precision\n",
+ "from keras.optimizers import Adam\n",
+ "from matplotlib import pyplot as plt\n",
+ "from scipy import ndimage\n",
+ "import tensorflow as tf\n",
+ "import keras.backend as K\n",
+ "import urllib\n",
+ "import os\n",
+ "import zipfile\n",
+ "import pandas as pd"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#### Read data and load model"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "def read_data(exp, noise_level):\n",
+ " \n",
+ " data_path = '/home/prakash/Desktop/fileserver_Noise2Seg/data/'\n",
+ " gt_data = np.load(data_path+exp+'_n0'+'/test/test_data.npz', allow_pickle=True)\n",
+ " test_data = np.load(data_path+exp+'_'+noise_level+'/test/test_data.npz', allow_pickle=True)\n",
+ " gt_data = gt_data['X_test']\n",
+ " test_data = test_data['X_test']\n",
+ " return gt_data, test_data"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "def load_trained_model(exp, noise_level, run, fraction):\n",
+ " \n",
+ " exp_path = '/home/prakash/Desktop/fileserver_Noise2Seg/experiments/'\n",
+ " base_dir = exp_path+exp+'_'+noise_level+'_run'+str(run)+'/fraction_'+fraction+'/'\n",
+ " model_name = exp+'_'+noise_level+'_run'+str(run)+'_model'\n",
+ " n2s_model = Noise2Seg(None, model_name, base_dir)\n",
+ " return n2s_model"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#### PSNR computation"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "def PSNR(gt, img):\n",
+ " mse = np.mean(np.square(gt - img))\n",
+ " return 20 * np.log10(np.max(gt)-np.min(gt)) - 10 * np.log10(mse)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "def compute_mean_psnr(exp, noise_level, fraction, gt_data, test_data):\n",
+ " psnr_per_run = []\n",
+ " sem_ = []\n",
+ " runs = np.arange(1,6)\n",
+ " for run_idx in runs:\n",
+ " n2s_model = load_trained_model(exp, noise_level, run_idx, fraction)\n",
+ " denoised_images = []\n",
+ " for i in range(test_data.shape[0]):\n",
+ " denoised_ = n2s_model.predict(test_data[i].astype(np.float32),'YX')[...,0]\n",
+ " denoised_images.append(denoised_)\n",
+ " denoised_images = np.array(denoised_images)\n",
+ "\n",
+ " psnrs = []\n",
+ " for gt, img in zip(gt_data, denoised_images):\n",
+ " psnrs.append(PSNR(gt, img))\n",
+ "\n",
+ " psnrs = np.array(psnrs)\n",
+ " psnr_per_run.append(np.round(np.mean(psnrs), 2))\n",
+ " return np.mean(psnr_per_run), np.std(psnr_per_run)/np.sqrt(len(runs))"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#### Compute results for DSB"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n"
+ ]
+ }
+ ],
+ "source": [
+ "gt_data_n20, test_data_n20 = read_data('DSB2018', 'n20')\n",
+ "gt_data_n10, test_data_n10 = read_data('DSB2018', 'n10')\n",
+ "\n",
+ "n2v_dsb_n10, sem_n2v_dsb_n10 = compute_mean_psnr(exp='finDenoise_dsb', noise_level='n10', fraction='100.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "n2v_dsb_n20, sem_n2v_dsb_n20 = compute_mean_psnr(exp='finDenoise_dsb', noise_level='n20', fraction='100.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "\n",
+ "\n",
+ "denoiseg_dsb_n20_fraction_025, sem_dsb_n20_fraction_025 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n20', fraction='0.25', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_dsb_n10_fraction_025, sem_dsb_n10_fraction_025 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n10', fraction='0.25', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_dsb_n20_fraction_05, sem_dsb_n20_fraction_05 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n20', fraction='0.5', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_dsb_n10_fraction_05, sem_dsb_n10_fraction_05 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n10', fraction='0.5', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_dsb_n20_fraction_1, sem_dsb_n20_fraction_1 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n20', fraction='1.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_dsb_n10_fraction_1, sem_dsb_n10_fraction_1 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n10', fraction='1.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_dsb_n20_fraction_2, sem_dsb_n20_fraction_2 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n20', fraction='2.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_dsb_n10_fraction_2, sem_dsb_n10_fraction_2 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n10', fraction='2.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_dsb_n20_fraction_4, sem_dsb_n20_fraction_4 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n20', fraction='4.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_dsb_n10_fraction_4, sem_dsb_n10_fraction_4 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n10', fraction='4.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_dsb_n20_fraction_8, sem_dsb_n20_fraction_8 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n20', fraction='8.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_dsb_n10_fraction_8, sem_dsb_n10_fraction_8 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n10', fraction='8.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_dsb_n20_fraction_16, sem_dsb_n20_fraction_16 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n20', fraction='16.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_dsb_n10_fraction_16, sem_dsb_n10_fraction_16 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n10', fraction='16.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_dsb_n20_fraction_32, sem_dsb_n20_fraction_32 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n20', fraction='32.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_dsb_n10_fraction_32, sem_dsb_n10_fraction_32 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n10', fraction='32.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_dsb_n20_fraction_64, sem_dsb_n20_fraction_64 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n20', fraction='64.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_dsb_n10_fraction_64, sem_dsb_n10_fraction_64 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n10', fraction='64.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_dsb_n20_fraction_100, sem_dsb_n20_fraction_100 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n20', fraction='100.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_dsb_n10_fraction_100, sem_dsb_n10_fraction_100 = compute_mean_psnr(exp='alpha0.5_dsb', noise_level='n10', fraction='100.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 67,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "n2v_dsb_n10_ = str(n2v_dsb_n10)[:5]+'±'+str(sem_n2v_dsb_n10)[:5]\n",
+ "n2v_dsb_n20_ = str(n2v_dsb_n20)[:5]+'±'+str(sem_n2v_dsb_n20)[:5]\n",
+ "denoiseg_dsb_n20_fraction_025_ = str(denoiseg_dsb_n20_fraction_025)[:5] +'±'+str(sem_dsb_n20_fraction_025)[:5]\n",
+ "denoiseg_dsb_n10_fraction_025_ = str(denoiseg_dsb_n10_fraction_025)[:5] +'±'+str(sem_dsb_n10_fraction_025)[:5]\n",
+ "denoiseg_dsb_n20_fraction_05_ = str(denoiseg_dsb_n20_fraction_05)[:5] +'±'+str(sem_dsb_n20_fraction_05)[:5]\n",
+ "denoiseg_dsb_n10_fraction_05_ = str(denoiseg_dsb_n10_fraction_05)[:5] +'±'+str(sem_dsb_n10_fraction_05)[:5]\n",
+ "denoiseg_dsb_n20_fraction_1_ = str(denoiseg_dsb_n20_fraction_1)[:5] +'±'+str(sem_dsb_n20_fraction_1)[:5]\n",
+ "denoiseg_dsb_n10_fraction_1_ = str(denoiseg_dsb_n10_fraction_1)[:5] +'±'+str(sem_dsb_n10_fraction_1)[:5]\n",
+ "denoiseg_dsb_n20_fraction_2_ = str(denoiseg_dsb_n20_fraction_2)[:5] +'±'+str(sem_dsb_n20_fraction_2)[:5]\n",
+ "denoiseg_dsb_n10_fraction_2_ = str(denoiseg_dsb_n10_fraction_2)[:5] +'±'+str(sem_dsb_n10_fraction_2)[:5]\n",
+ "denoiseg_dsb_n20_fraction_4_ = str(denoiseg_dsb_n20_fraction_4)[:5] +'±'+str(sem_dsb_n20_fraction_4)[:5]\n",
+ "denoiseg_dsb_n10_fraction_4_ = str(denoiseg_dsb_n10_fraction_4)[:5] +'±'+str(sem_dsb_n10_fraction_4)[:5]\n",
+ "denoiseg_dsb_n20_fraction_8_ = str(denoiseg_dsb_n20_fraction_8)[:5] +'±'+str(sem_dsb_n20_fraction_8)[:5]\n",
+ "denoiseg_dsb_n10_fraction_8_ = str(denoiseg_dsb_n10_fraction_8)[:5] +'±'+str(sem_dsb_n10_fraction_8)[:5]\n",
+ "denoiseg_dsb_n20_fraction_16_ = str(denoiseg_dsb_n20_fraction_16)[:5] +'±'+str(sem_dsb_n20_fraction_16)[:5]\n",
+ "denoiseg_dsb_n10_fraction_16_ = str(denoiseg_dsb_n10_fraction_16)[:5] +'±'+str(sem_dsb_n10_fraction_16)[:5]\n",
+ "denoiseg_dsb_n20_fraction_32_ = str(denoiseg_dsb_n20_fraction_32)[:5] +'±'+str(sem_dsb_n20_fraction_32)[:5]\n",
+ "denoiseg_dsb_n10_fraction_32_ = str(denoiseg_dsb_n10_fraction_32)[:5] +'±'+str(sem_dsb_n10_fraction_32)[:5]\n",
+ "denoiseg_dsb_n20_fraction_64_ = str(denoiseg_dsb_n20_fraction_64)[:5] +'±'+str(sem_dsb_n20_fraction_64)[:5]\n",
+ "denoiseg_dsb_n10_fraction_64_ = str(denoiseg_dsb_n10_fraction_64)[:5] +'±'+str(sem_dsb_n10_fraction_64)[:5]\n",
+ "denoiseg_dsb_n20_fraction_100_ = str(denoiseg_dsb_n20_fraction_100)[:5] +'±'+str(sem_dsb_n20_fraction_100)[:5]\n",
+ "denoiseg_dsb_n10_fraction_100_ = str(denoiseg_dsb_n10_fraction_100)[:5] +'±'+str(sem_dsb_n10_fraction_100)[:5]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 68,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "styles = [dict(selector=\"caption\", \n",
+ " props=[(\"text-align\", \"center\"),\n",
+ " (\"font-size\", \"120%\"),\n",
+ " (\"color\", 'black')])] "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 69,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mean PSNR in dB. DenoiSeg setup is with alpha = 0.5\n"
+ ]
+ },
+ {
+ "data": {
+ "text/html": [
+ "
Mean PSNR in dB. DenoiSeg setup is with alpha = 0.5 | DenoiSeg (GT=10) | DenoiSeg (GT=19) | DenoiSeg (GT=38) | DenoiSeg (GT=76) | DenoiSeg (GT=152) | DenoiSeg (GT=304) | DenoiSeg (GT=608) | DenoiSeg (GT=1216) | DenoiSeg (GT=2432) | DenoiSeg (GT=3800) | Noise2Void |
\n",
+ " \n",
+ " n10 | \n",
+ " 37.57±0.070 | \n",
+ " 37.64±0.111 | \n",
+ " 37.61±0.110 | \n",
+ " 37.51±0.109 | \n",
+ " 37.54±0.107 | \n",
+ " 37.62±0.025 | \n",
+ " 37.83±0.048 | \n",
+ " 37.86±0.040 | \n",
+ " 37.67±0.111 | \n",
+ " 37.81±0.049 | \n",
+ " 38.01±0.0590 | \n",
+ "
\n",
+ " \n",
+ " n20 | \n",
+ " 35.38±0.083 | \n",
+ " 35.22±0.184 | \n",
+ " 35.04±0.089 | \n",
+ " 34.92±0.147 | \n",
+ " 35.04±0.120 | \n",
+ " 35.27±0.088 | \n",
+ " 34.90±0.109 | \n",
+ " 35.27±0.026 | \n",
+ " 35.24±0.084 | \n",
+ " 35.19±0.079 | \n",
+ " 35.53±0.0267 | \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 69,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "heads = ['DenoiSeg (GT=10)', 'DenoiSeg (GT=19)', 'DenoiSeg (GT=38)', 'DenoiSeg (GT=76)', 'DenoiSeg (GT=152)', 'DenoiSeg (GT=304)', 'DenoiSeg (GT=608)', 'DenoiSeg (GT=1216)', 'DenoiSeg (GT=2432)', 'DenoiSeg (GT=3800)', 'Noise2Void']\n",
+ "noise_levels = ['n10', 'n20']\n",
+ "n10_scores = [denoiseg_dsb_n10_fraction_025_, denoiseg_dsb_n10_fraction_05_, denoiseg_dsb_n10_fraction_1_, denoiseg_dsb_n10_fraction_2_, denoiseg_dsb_n10_fraction_4_, denoiseg_dsb_n10_fraction_8_, denoiseg_dsb_n10_fraction_16_, denoiseg_dsb_n10_fraction_32_, denoiseg_dsb_n10_fraction_64_, denoiseg_dsb_n10_fraction_100_, n2v_dsb_n10_]\n",
+ "n20_scores = [denoiseg_dsb_n20_fraction_025_, denoiseg_dsb_n20_fraction_05_, denoiseg_dsb_n20_fraction_1_, denoiseg_dsb_n20_fraction_2_, denoiseg_dsb_n20_fraction_4_, denoiseg_dsb_n20_fraction_8_, denoiseg_dsb_n20_fraction_16_, denoiseg_dsb_n20_fraction_32_, denoiseg_dsb_n20_fraction_64_, denoiseg_dsb_n20_fraction_100_, n2v_dsb_n20_]\n",
+ "scores = np.array([n10_scores, n20_scores])\n",
+ "df = pd.DataFrame(scores,index=noise_levels,columns=heads).round(decimals=3)\n",
+ "\n",
+ "print('Mean PSNR for DSB in dB. DenoiSeg setup is with alpha = 0.5')\n",
+ "df.style.set_caption('Mean PSNR for DSB in dB. DenoiSeg setup is with alpha = 0.5').set_table_styles(styles)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#### Compute results for Fly Wing"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n"
+ ]
+ }
+ ],
+ "source": [
+ "gt_data_n20, test_data_n20 = read_data('Flywing', 'n20')\n",
+ "gt_data_n10, test_data_n10 = read_data('Flywing', 'n10')\n",
+ "n2v_flywing_n10, sem_n2v_flywing_n10 = compute_mean_psnr(exp='finDenoise_flywing', noise_level='n10', fraction='100.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "n2v_flywing_n20, sem_n2v_flywing_n20 = compute_mean_psnr(exp='finDenoise_flywing', noise_level='n20', fraction='100.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "\n",
+ "\n",
+ "denoiseg_flywing_n20_fraction_0125, sem_flywing_n20_fraction_0125 = compute_mean_psnr(exp='alpha0.5_flywing', noise_level='n20', fraction='0.125', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_flywing_n10_fraction_0125, sem_flywing_n10_fraction_0125 = compute_mean_psnr(exp='alpha0.5_flywing', noise_level='n10', fraction='0.125', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_flywing_n20_fraction_025, sem_flywing_n20_fraction_025 = compute_mean_psnr(exp='alpha0.5_flywing', noise_level='n20', fraction='0.25', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_flywing_n10_fraction_025, sem_flywing_n10_fraction_025 = compute_mean_psnr(exp='alpha0.5_flywing', noise_level='n10', fraction='0.25', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_flywing_n20_fraction_05, sem_flywing_n20_fraction_05 = compute_mean_psnr(exp='alpha0.5_flywing', noise_level='n20', fraction='0.5', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_flywing_n10_fraction_05, sem_flywing_n10_fraction_05 = compute_mean_psnr(exp='alpha0.5_flywing', noise_level='n10', fraction='0.5', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_flywing_n20_fraction_1, sem_flywing_n20_fraction_1 = compute_mean_psnr(exp='alpha0.5_flywing', noise_level='n20', fraction='1.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_flywing_n10_fraction_1, sem_flywing_n10_fraction_1 = compute_mean_psnr(exp='alpha0.5_flywing', noise_level='n10', fraction='1.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_flywing_n20_fraction_2, sem_flywing_n20_fraction_2 = compute_mean_psnr(exp='alpha0.5_flywing', noise_level='n20', fraction='2.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_flywing_n10_fraction_2, sem_flywing_n10_fraction_2 = compute_mean_psnr(exp='alpha0.5_flywing', noise_level='n10', fraction='2.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "n2v_flywing_n10_ = str(n2v_flywing_n10)[:5]+'±'+str(sem_n2v_flywing_n10)[:5]\n",
+ "n2v_flywing_n20_ = str(n2v_flywing_n20)[:5]+'±'+str(sem_n2v_flywing_n20)[:5]\n",
+ "denoiseg_flywing_n20_fraction_0125_ = str(denoiseg_flywing_n20_fraction_0125)[:5] +'±'+str(sem_flywing_n20_fraction_0125)[:5]\n",
+ "denoiseg_flywing_n10_fraction_0125_ = str(denoiseg_flywing_n10_fraction_0125)[:5] +'±'+str(sem_flywing_n10_fraction_0125)[:5]\n",
+ "denoiseg_flywing_n20_fraction_025_ = str(denoiseg_flywing_n20_fraction_025)[:5] +'±'+str(sem_flywing_n20_fraction_025)[:5]\n",
+ "denoiseg_flywing_n10_fraction_025_ = str(denoiseg_flywing_n10_fraction_025)[:5] +'±'+str(sem_flywing_n10_fraction_025)[:5]\n",
+ "denoiseg_flywing_n20_fraction_05_ = str(denoiseg_flywing_n20_fraction_05)[:5] +'±'+str(sem_flywing_n20_fraction_05)[:5]\n",
+ "denoiseg_flywing_n10_fraction_05_ = str(denoiseg_flywing_n10_fraction_05)[:5] +'±'+str(sem_flywing_n10_fraction_05)[:5]\n",
+ "denoiseg_flywing_n20_fraction_1_ = str(denoiseg_flywing_n20_fraction_1)[:5] +'±'+str(sem_flywing_n20_fraction_1)[:5]\n",
+ "denoiseg_flywing_n10_fraction_1_ = str(denoiseg_flywing_n10_fraction_1)[:5] +'±'+str(sem_flywing_n10_fraction_1)[:5]\n",
+ "denoiseg_flywing_n20_fraction_2_ = str(denoiseg_flywing_n20_fraction_2)[:5] +'±'+str(sem_flywing_n20_fraction_2)[:5]\n",
+ "denoiseg_flywing_n10_fraction_2_ = str(denoiseg_flywing_n10_fraction_2)[:5] +'±'+str(sem_flywing_n10_fraction_2)[:5]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "styles = [dict(selector=\"caption\", \n",
+ " props=[(\"text-align\", \"center\"),\n",
+ " (\"font-size\", \"120%\"),\n",
+ " (\"color\", 'black')])] "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mean PSNR for Fly Wing in dB. DenoiSeg setup is with alpha = 0.5\n"
+ ]
+ },
+ {
+ "data": {
+ "text/html": [
+ "Mean PSNR for Fly Wing in dB. DenoiSeg setup is with alpha = 0.5 | DenoiSeg (GT=2) | DenoiSeg (GT=4) | DenoiSeg (GT=7) | DenoiSeg (GT=11) | DenoiSeg (GT=29) | Noise2Void |
\n",
+ " \n",
+ " n10 | \n",
+ " 33.12±0.015 | \n",
+ " 33.09±0.029 | \n",
+ " 33.04±0.041 | \n",
+ " 33.05±0.032 | \n",
+ " 32.93±0.095 | \n",
+ " 33.16±0.0121 | \n",
+ "
\n",
+ " \n",
+ " n20 | \n",
+ " 30.45±0.205 | \n",
+ " 30.64±0.034 | \n",
+ " 30.61±0.036 | \n",
+ " 30.63±0.014 | \n",
+ " 30.60±0.032 | \n",
+ " 30.72±0.0183 | \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 13,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "heads = ['DenoiSeg (GT=2)', 'DenoiSeg (GT=4)', 'DenoiSeg (GT=7)', 'DenoiSeg (GT=11)', 'DenoiSeg (GT=29)', 'Noise2Void']\n",
+ "noise_levels = ['n10', 'n20']\n",
+ "n10_scores = [denoiseg_flywing_n10_fraction_0125_, denoiseg_flywing_n10_fraction_025_, denoiseg_flywing_n10_fraction_05_, denoiseg_flywing_n10_fraction_1_, denoiseg_flywing_n10_fraction_2_, n2v_flywing_n10_]\n",
+ "n20_scores = [denoiseg_flywing_n20_fraction_0125_, denoiseg_flywing_n20_fraction_025_, denoiseg_flywing_n20_fraction_05_, denoiseg_flywing_n20_fraction_1_, denoiseg_flywing_n20_fraction_2_, n2v_flywing_n20_]\n",
+ "scores = np.array([n10_scores, n20_scores])\n",
+ "df = pd.DataFrame(scores,index=noise_levels,columns=heads).round(decimals=3)\n",
+ "\n",
+ "print('Mean PSNR for Fly Wing in dB. DenoiSeg setup is with alpha = 0.5')\n",
+ "df.style.set_caption('Mean PSNR for Fly Wing in dB. DenoiSeg setup is with alpha = 0.5').set_table_styles(styles)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#### Compute results for Mouse Nuclei"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n",
+ "Loading network weights from 'weights_best.h5'.\n"
+ ]
+ }
+ ],
+ "source": [
+ "gt_data_n20, test_data_n20 = read_data('Mouse', 'n20')\n",
+ "gt_data_n10, test_data_n10 = read_data('Mouse', 'n10')\n",
+ "n2v_mouse_n10, sem_n2v_mouse_n10 = compute_mean_psnr(exp='finDenoise_nmouse', noise_level='n10', fraction='100.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "n2v_mouse_n20, sem_n2v_mouse_n20 = compute_mean_psnr(exp='finDenoise_nmouse', noise_level='n20', fraction='100.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_mouse_n20_fraction_0125, sem_mouse_n20_fraction_0125 = compute_mean_psnr(exp='alpha0.5_nmouse', noise_level='n20', fraction='0.125', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_mouse_n10_fraction_0125, sem_mouse_n10_fraction_0125 = compute_mean_psnr(exp='alpha0.5_nmouse', noise_level='n10', fraction='0.125', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_mouse_n20_fraction_025, sem_mouse_n20_fraction_025 = compute_mean_psnr(exp='alpha0.5_nmouse', noise_level='n20', fraction='0.25', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_mouse_n10_fraction_025, sem_mouse_n10_fraction_025 = compute_mean_psnr(exp='alpha0.5_nmouse', noise_level='n10', fraction='0.25', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_mouse_n20_fraction_05, sem_mouse_n20_fraction_05 = compute_mean_psnr(exp='alpha0.5_nmouse', noise_level='n20', fraction='0.5', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_mouse_n10_fraction_05, sem_mouse_n10_fraction_05 = compute_mean_psnr(exp='alpha0.5_nmouse', noise_level='n10', fraction='0.5', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_mouse_n20_fraction_1, sem_mouse_n20_fraction_1 = compute_mean_psnr(exp='alpha0.5_nmouse', noise_level='n20', fraction='1.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_mouse_n10_fraction_1, sem_mouse_n10_fraction_1 = compute_mean_psnr(exp='alpha0.5_nmouse', noise_level='n10', fraction='1.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)\n",
+ "\n",
+ "denoiseg_mouse_n20_fraction_2, sem_mouse_n20_fraction_2 = compute_mean_psnr(exp='alpha0.5_nmouse', noise_level='n20', fraction='2.0', \n",
+ " gt_data=gt_data_n20, test_data=test_data_n20)\n",
+ "denoiseg_mouse_n10_fraction_2, sem_mouse_n10_fraction_2 = compute_mean_psnr(exp='alpha0.5_nmouse', noise_level='n10', fraction='2.0', \n",
+ " gt_data=gt_data_n10, test_data=test_data_n10)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "n2v_mouse_n10_ = str(n2v_mouse_n10)[:5]+'±'+str(sem_n2v_mouse_n10)[:5]\n",
+ "n2v_mouse_n20_ = str(n2v_mouse_n20)[:5]+'±'+str(sem_n2v_mouse_n20)[:5]\n",
+ "denoiseg_mouse_n20_fraction_0125_ = str(denoiseg_mouse_n20_fraction_0125)[:5] +'±'+str(sem_mouse_n20_fraction_0125)[:5]\n",
+ "denoiseg_mouse_n10_fraction_0125_ = str(denoiseg_mouse_n10_fraction_0125)[:5] +'±'+str(sem_mouse_n10_fraction_0125)[:5]\n",
+ "denoiseg_mouse_n20_fraction_025_ = str(denoiseg_mouse_n20_fraction_025)[:5] +'±'+str(sem_mouse_n20_fraction_025)[:5]\n",
+ "denoiseg_mouse_n10_fraction_025_ = str(denoiseg_mouse_n10_fraction_025)[:5] +'±'+str(sem_mouse_n10_fraction_025)[:5]\n",
+ "denoiseg_mouse_n20_fraction_05_ = str(denoiseg_mouse_n20_fraction_05)[:5] +'±'+str(sem_mouse_n20_fraction_05)[:5]\n",
+ "denoiseg_mouse_n10_fraction_05_ = str(denoiseg_mouse_n10_fraction_05)[:5] +'±'+str(sem_mouse_n10_fraction_05)[:5]\n",
+ "denoiseg_mouse_n20_fraction_1_ = str(denoiseg_mouse_n20_fraction_1)[:5] +'±'+str(sem_mouse_n20_fraction_1)[:5]\n",
+ "denoiseg_mouse_n10_fraction_1_ = str(denoiseg_mouse_n10_fraction_1)[:5] +'±'+str(sem_mouse_n10_fraction_1)[:5]\n",
+ "denoiseg_mouse_n20_fraction_2_ = str(denoiseg_mouse_n20_fraction_2)[:5] +'±'+str(sem_mouse_n20_fraction_2)[:5]\n",
+ "denoiseg_mouse_n10_fraction_2_ = str(denoiseg_mouse_n10_fraction_2)[:5] +'±'+str(sem_mouse_n10_fraction_2)[:5]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "styles = [dict(selector=\"caption\", \n",
+ " props=[(\"text-align\", \"center\"),\n",
+ " (\"font-size\", \"120%\"),\n",
+ " (\"color\", 'black')])] "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Mean PSNR for Mouse Nuclei in dB. DenoiSeg setup is with alpha = 0.5\n"
+ ]
+ },
+ {
+ "data": {
+ "text/html": [
+ "Mean PSNR for Mouse Nuclei in dB. DenoiSeg setup is with alpha = 0.5 | DenoiSeg (GT=1) | DenoiSeg (GT=2) | DenoiSeg (GT=5) | DenoiSeg (GT=9) | DenoiSeg (GT=18) | Noise2Void |
\n",
+ " \n",
+ " n10 | \n",
+ " 37.42±0.104 | \n",
+ " 37.11±0.323 | \n",
+ " 37.46±0.040 | \n",
+ " 37.27±0.093 | \n",
+ " 37.02±0.157 | \n",
+ " 37.86±0.015 | \n",
+ "
\n",
+ " \n",
+ " n20 | \n",
+ " 34.21±0.199 | \n",
+ " 34.39±0.034 | \n",
+ " 34.27±0.061 | \n",
+ " 34.22±0.052 | \n",
+ " 34.23±0.057 | \n",
+ " 34.59±0.013 | \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ ""
+ ]
+ },
+ "execution_count": 12,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "heads = ['DenoiSeg (GT=1)', 'DenoiSeg (GT=2)', 'DenoiSeg (GT=5)', 'DenoiSeg (GT=9)', 'DenoiSeg (GT=18)', 'Noise2Void']\n",
+ "noise_levels = ['n10', 'n20']\n",
+ "n10_scores = [denoiseg_mouse_n10_fraction_0125_, denoiseg_mouse_n10_fraction_025_, denoiseg_mouse_n10_fraction_05_, denoiseg_mouse_n10_fraction_1_, denoiseg_mouse_n10_fraction_2_, n2v_mouse_n10_]\n",
+ "n20_scores = [denoiseg_mouse_n20_fraction_0125_, denoiseg_mouse_n20_fraction_025_, denoiseg_mouse_n20_fraction_05_, denoiseg_mouse_n20_fraction_1_, denoiseg_mouse_n20_fraction_2_, n2v_mouse_n20_]\n",
+ "scores = np.array([n10_scores, n20_scores])\n",
+ "df = pd.DataFrame(scores,index=noise_levels,columns=heads).round(decimals=3)\n",
+ "\n",
+ "print('Mean PSNR for Mouse Nuclei in dB. DenoiSeg setup is with alpha = 0.5')\n",
+ "df.style.set_caption('Mean PSNR for Mouse Nuclei in dB. DenoiSeg setup is with alpha = 0.5').set_table_styles(styles)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "DenoiSeg",
+ "language": "python",
+ "name": "denoiseg"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.6.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 4
+}