In [1]:
%run ./msgc_experiments_CMBBEIV_init.ipynb
# other imports can be skipped


Populating the interactive namespace from numpy and matplotlib

In [2]:
fname = "exp062-multiscale3.csv"
fnamenew = "msgc_experiment3.csv"


rnd_seed=1

In [3]:
%pwd


Out[3]:
'C:\\Users\\Jirik\\projects\\imcut\\examples'

Rewrite files with tables


In [4]:
#for par in it:
#    print par
i = 0
force_rewrite = False
# force_rewrite = True

if op.exists(fname) and not force_rewrite:
    df = pd.read_csv(fname)#, index_col=0)
else:
    df = pd.DataFrame([])
    
if op.exists(fnamenew) and not force_rewrite:
    dfnew = pd.read_csv(fnamenew)#, index_col=0)
else:
    dfnew = pd.DataFrame([])

Experiment 1: Constant object size, various image size


In [5]:
point_step = 3

# i = 0
np.random.seed(rnd_seed)
experiment_label = "image size"
# sh 155,160, r10, dpoff 3, seeds 3
# dataparams_sh =  list(range(44, 210, point_step))
dataparams_sh =  list(range(44, 180, point_step))
# dataparams_sh =  list(range(44, 195, 1))
# dataparams_sh =  range(44, 195, 50)
dp_radius = [10]
dp_offset = [
#     0.03, 0.05,
    0.04,
]
dp_seedsz = [3]
voxelsize_mm = [1, 1, 1]


it = itertools.product(dataparams_sh, dp_offset, dp_radius, dp_seedsz)
for i, data_params in enumerate(it):
    
    df, dfnew = run_gc_3_times(data_params, segparamsTri, experiment_label, i, df, dfnew)
#     i += 1


C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\lisa\volumetry_evaluation.py:341: RuntimeWarning: divide by zero encountered in double_scalars
  vd = 100 * (volume2 - volume1).astype(float) / volume1.astype(float)
C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\lisa\volumetry_evaluation.py:341: RuntimeWarning: divide by zero encountered in double_scalars
  vd = 100 * (volume2 - volume1).astype(float) / volume1.astype(float)
C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\lisa\volumetry_evaluation.py:341: RuntimeWarning: divide by zero encountered in double_scalars
  vd = 100 * (volume2 - volume1).astype(float) / volume1.astype(float)
C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\scipy\ndimage\interpolation.py:583: UserWarning: From scipy 0.13.0, the output shape of zoom() is calculated with round() instead of int() - for these inputs the size of the returned array has changed.
  "the returned array has changed.", UserWarning)
C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\lisa\volumetry_evaluation.py:341: RuntimeWarning: divide by zero encountered in double_scalars
  vd = 100 * (volume2 - volume1).astype(float) / volume1.astype(float)
C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\lisa\volumetry_evaluation.py:341: RuntimeWarning: divide by zero encountered in double_scalars
  vd = 100 * (volume2 - volume1).astype(float) / volume1.astype(float)
C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\lisa\volumetry_evaluation.py:341: RuntimeWarning: divide by zero encountered in double_scalars
  vd = 100 * (volume2 - volume1).astype(float) / volume1.astype(float)
C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\lisa\volumetry_evaluation.py:341: RuntimeWarning: divide by zero encountered in double_scalars
  vd = 100 * (volume2 - volume1).astype(float) / volume1.astype(float)
C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\lisa\volumetry_evaluation.py:341: RuntimeWarning: divide by zero encountered in double_scalars
  vd = 100 * (volume2 - volume1).astype(float) / volume1.astype(float)
C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\lisa\volumetry_evaluation.py:341: RuntimeWarning: divide by zero encountered in double_scalars
  vd = 100 * (volume2 - volume1).astype(float) / volume1.astype(float)
C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\lisa\volumetry_evaluation.py:341: RuntimeWarning: divide by zero encountered in double_scalars
  vd = 100 * (volume2 - volume1).astype(float) / volume1.astype(float)
C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\lisa\volumetry_evaluation.py:341: RuntimeWarning: divide by zero encountered in double_scalars
  vd = 100 * (volume2 - volume1).astype(float) / volume1.astype(float)
C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\scipy\ndimage\interpolation.py:583: UserWarning: From scipy 0.13.0, the output shape of zoom() is calculated with round() instead of int() - for these inputs the size of the returned array has changed.
  "the returned array has changed.", UserWarning)
C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\scipy\ndimage\interpolation.py:583: UserWarning: From scipy 0.13.0, the output shape of zoom() is calculated with round() instead of int() - for these inputs the size of the returned array has changed.
  "the returned array has changed.", UserWarning)
C:\Users\Jirik\Miniconda3\envs\lisa\lib\site-packages\scipy\ndimage\interpolation.py:583: UserWarning: From scipy 0.13.0, the output shape of zoom() is calculated with round() instead of int() - for these inputs the size of the returned array has changed.
  "the returned array has changed.", UserWarning)

In [6]:
# dfnew.to_csv(fnamenew, index=False)
to_file(str(i), op.join(latex_dir, "msgc_dataset_size.tex"))

Experiment 2: constant image size, various object size


In [7]:
point_step = 3
# point_step = 10

# i = 0
np.random.seed(rnd_seed)
experiment_label = "object size"
# sh 155,160, r10, dpoff 3, seeds 3
# dataparams_sh =  list(range(44, 195, 10))
dataparams_sh = [200]
# dataparams_sh =  list(range(44, 195, 1))
# dataparams_sh =  range(44, 195, 50)
# dp_radius = [10]
dp_radius = list(range(5, 50, point_step))
dp_offset = [0.03, 0.05]
dp_seedsz = [3]

skip2 = True

if not skip2:
    it = itertools.product(dataparams_sh, dp_offset, dp_radius, dp_seedsz)
    for i, data_params in enumerate(it):
        print(i)
        df, dfnew = run_gc_3_times(data_params, segparamsTri, experiment_label, i, df, dfnew)
#     i += 1

In [8]:
point_step = 3
point_step = 10

# i = 0
np.random.seed(rnd_seed)
experiment_label = "object size"
# sh 155,160, r10, dpoff 3, seeds 3
# dataparams_sh =  list(range(44, 195, 10))
dataparams_sh = [200]
# dataparams_sh =  list(range(44, 195, 1))
# dataparams_sh =  range(44, 195, 50)
# dp_radius = [10]
dp_radius = list(range(5, 50, point_step))
dp_offset = [0.03, 0.05]
dp_seedsz = [3]


it = itertools.product(dataparams_sh, dp_offset, dp_radius, dp_seedsz)
for i, data_params in enumerate(it):
    print(i)
    df, dfnew = run_gc_3_times(data_params, segparamsTri, experiment_label, i, df, dfnew)
#     i += 1


0
1
2
3
4
5
6
7
8
9

In [9]:
dp_radius


Out[9]:
[5, 15, 25, 35, 45]

In [10]:
len(list(itertools.product(dataparams_sh, dp_offset, dp_radius, dp_seedsz)))


Out[10]:
10