Commit f4fe5f85 authored by Jiri Borovec's avatar Jiri Borovec

experiments on real data

parent 5342bb82
# Intro
* **WWW:** https://gitlab.fel.cvut.cz/borovji3/atomicpatterndict
* **SSH:** git@gitlab.fel.cvut.cz:borovji3/atomicpatterndict.git
* **HTTPS:** https://gitlab.fel.cvut.cz/borovji3/atomicpatterndict.git
# Data
Actually we are working on with synthetic datset which was generated using
containing script - generate_dataset.py with some default parameters
......@@ -7,7 +11,14 @@ containing script - generate_dataset.py with some default parameters
all data are stored on standard paths within the university datagrid
# Experiments
all experiment ar located in experiments.py
1. simple check weher the unary cost is computet correctly in 3 simple images
2. performing experiment on synthetic clear dataset
\ No newline at end of file
## Synthetic datasets
all experiment ar located in **experiments_alpe.py**
1. simple check where the unary cost is computet correctly in 3 simple images
2. performing experiment on synthetic clear dataset
## Real Drosophila segm.
The segmentation are probabilistic so the binarization is required, **preproc_real_data.py**
\ No newline at end of file
This diff is collapsed.
......@@ -17,7 +17,7 @@ jirka = False
if jirka:
DEFAULT_PATH_DATA = '/jirka/jirka/TEMP/'
else:
# DEFAULT_PATH_DATA = '/datagrid/Medical/microscopy/drosophila_segmOvary/'
# PATH_DATA_SYNTH = '/datagrid/Medical/microscopy/drosophila_segmOvary/'
DEFAULT_PATH_DATA = '/datagrid/temporary/Medical/'
DEFAULT_DIR_APD = 'atomicPatternDictionary_v2'
......
"""
run experiments with Atomic Learning Pattern Encoding
Example run:
>> nohup python experiments_alpe.py > ~/Medical-temp/experiments_APD-v1/nohup.log &
"""
# to suppres all visu, has to be on the beginning
......@@ -103,8 +101,8 @@ def threshold_image_otsu(img):
def threshold_image_adapt(img):
img_th = filters.threshold_adaptive(img, 80)
selem = morphology.disk(5)
img_th = filters.threshold_adaptive(img, 120)
selem = morphology.disk(15)
img_th = morphology.opening(img_th, selem)
return img_th
......@@ -134,16 +132,20 @@ def binarise_main(params=DEFAULT_PARAMS):
imgs = extend_images(imgs)
imgs = crop_images(imgs)
p_export = os.path.join(params['in_path'], params['dataset'] + '_binary')
if not os.path.exists(p_export):
os.mkdir(p_export)
imgs_th = threshold_images(imgs, threshold_image_fix)
p_out = os.path.join(params['in_path'], params['dataset']+'_binary-fix')
p_out = os.path.join(p_export, 'binary-fix')
gen_data.dataset_export_images(p_out, imgs_th, names)
imgs_th = threshold_images(imgs, threshold_image_otsu)
p_out = os.path.join(params['in_path'], params['dataset']+'_binary-otsu')
p_out = os.path.join(p_export, 'binary-otsu')
gen_data.dataset_export_images(p_out, imgs_th, names)
imgs_th = threshold_images(imgs, threshold_image_adapt)
p_out = os.path.join(params['in_path'], params['dataset']+'_binary-adapt')
p_out = os.path.join(p_export, 'binary-adapt')
gen_data.dataset_export_images(p_out, imgs_th, names)
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment