Commit f0f59f28 authored by Christoph Sommer's avatar Christoph Sommer

fixed gui bug to select higher pixel manipulation perc / print improvement

parent 0f3740af
This diff is collapsed.
.gitignore
MANIFEST.in
README.md
bif_care_predict.py
bif_care_templ.ipynb
requirements.txt
bif_care/__init__.py
bif_care/core.py
bif_care/gui.py
bif_care/qt_dir_dialog.py
bif_care/qt_file_dialog.py
bif_care/qt_files_dialog.py
bif_care/qt_filesave_dialog.py
bif_care/utils.py
bif_care.egg-info/PKG-INFO
bif_care.egg-info/SOURCES.txt
bif_care.egg-info/dependency_links.txt
bif_care.egg-info/top_level.txt
\ No newline at end of file
......@@ -104,8 +104,8 @@ def select_input(params=params):
if not check_ok:
text_convert_repy.value = msg
else:
z_dim = get_pixel_dimensions(get_file_list(params["in_dir"], params["glob"])[0]).z
pix_dim = get_pixel_dimensions(get_file_list(params["in_dir"], params["glob"])[0])
z_dim = pix_dim.z
if z_dim == 1:
params["axes"] = "YX"
......@@ -113,7 +113,9 @@ def select_input(params=params):
params["axes"] = "ZYX"
text_convert_repy.value = "Using CARE in {}D mode".format(len(params["axes"]))
params["train_channels"] = list(range(pix_dim.c))
text_convert_repy.value = "Using Noise2void in {}D mode with {} channels".format(len(params["axes"]), pix_dim.c)
btn_convert.on_click(btn_convert_clicked)
......@@ -212,7 +214,7 @@ def select_n2v_parameter():
### N2V perc pixel
###################
float_n2v_perc_pix = widgets.BoundedFloatText(min=0, max=0.016, step=0.001, value=params['n2v_perc_pix'])
float_n2v_perc_pix = widgets.BoundedFloatText(min=0, max=1, step=0.001, value=params['n2v_perc_pix'])
def on_n2v_perc_pix_change(change):
params['n2v_perc_pix'] = change.new
......
......@@ -11,9 +11,17 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Using TensorFlow backend.\n"
]
}
],
"source": [
"from bif_n2v import bif_n2v\n",
"# get_ipython().magic('reload_ext autoreload')\n",
......@@ -30,9 +38,24 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6929c1f0846a4793b4d088b766558cd7",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Label(value='Project:'), Button(description='New', style=ButtonStyle()), Button(…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"bif_n2v.select_project()"
]
......@@ -47,9 +70,24 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e480e663c5df408c9497e77516c1572b",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(VBox(children=(HBox(children=(Label(value='H:/projects/024_care_bif/n2v/test_TYX/in', layout=La…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"bif_n2v.select_input()"
]
......@@ -64,9 +102,94 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "7495c07abaf94f068fc8c1ed9d371c6f",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(Label(value='Channels', layout=Layout(width='200px')), SelectMultiple(index=(0,), options=('0',…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f08927ea6b864b15ae815b41ae5309e2",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(Label(value='Patch size', layout=Layout(width='200px')), HBox(children=(Label(value='Y'), Dropd…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f3a62f6a37aa4b9881551a650a0d9983",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(Label(value='#Patches per image (-1: all)', layout=Layout(width='200px')), BoundedIntText(value…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "5bb2c9d144b04e9483017c6ee981fce0",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(Label(value='Augment', layout=Layout(width='200px')), Dropdown(index=1, options=(('8 rotation/f…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "edb43f1d0da54acdac3968b42e4c15a0",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Label(value='Neighborhood radius', layout=Layout(width='200px')), BoundedIntText…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f61643ac2b004dde9170b2a569cf4ddf",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox(children=(HBox(children=(Label(value='#Epochs', layout=Layout(width='200px')), BoundedIntText(value=4, ma…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"bif_n2v.select_channel()\n",
"bif_n2v.select_patch_parameter()\n",
......@@ -88,7 +211,19 @@
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Loading images ...\n",
" -- H:\\projects\\024_care_bif\\n2v\\test_TYX\\in\\180508_LF-mCherryWT_63X_Opto16_rotated_Cell1_Movie1_Crop_Lifeact.tif Axes(t=2401, z=1, c=1, y=512, x=135)\n",
"Training ...\n",
" -- Channel 0\n",
"Generated patches: (33614, 64, 64, 1)\n"
]
}
],
"source": [
"bif_n2v.params.save()\n",
"a = bif_n2v.train_predict(n_tiles=(1,4,4))"
......@@ -99,7 +234,9 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"source": [
"bif_n2v.params"
]
},
{
"cell_type": "code",
......
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