Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
python3-imagej-tiff
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
python3-imagej-tiff
Commits
69def1b5
Commit
69def1b5
authored
Sep 01, 2018
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
next version
parent
f964c4f2
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1110 additions
and
10 deletions
+1110
-10
explore_data3.py
explore_data3.py
+1109
-0
nn_ds_neibs15.py
nn_ds_neibs15.py
+1
-10
No files found.
explore_data3.py
0 → 100644
View file @
69def1b5
This diff is collapsed.
Click to expand it.
nn_ds_neibs15.py
View file @
69def1b5
...
...
@@ -199,8 +199,6 @@ def getMoreFiles(fpaths,rslt):
print_time
(
"Done"
)
rslt
.
append
(
dataset
)
#from http://warmspringwinds.github.io/tensorflow/tf-slim/2016/12/21/tfrecords-guide/
def
read_and_decode
(
filename_queue
):
reader
=
tf
.
TFRecordReader
()
...
...
@@ -262,8 +260,6 @@ def extend_img_to_clusters(datasets_img,radius):
rec
[
'gt_ds'
]
=
add_neibs
(
add_margins
(
rec
[
'gt_ds'
]
.
reshape
((
height
,
width
,
-
1
)),
radius
,
np
.
nan
),
radius
)
.
reshape
((
num_tiles
,
-
1
))
pass
def
reformat_to_clusters
(
datasets_data
):
cluster_size
=
(
2
*
CLUSTER_RADIUS
+
1
)
*
(
2
*
CLUSTER_RADIUS
+
1
)
# Reformat input data
...
...
@@ -302,7 +298,6 @@ TILE_SIZE = TILE_SIDE* TILE_SIDE # == 81
rec
[
'target_disparity'
]
=
target_disparity
.
reshape
((
target_disparity
.
shape
[
0
],
-
1
))
rec
[
'gt_ds'
]
=
gt_ds
.
reshape
((
gt_ds
.
shape
[
0
],
-
1
))
def
replace_nan
(
datasets_data
):
cluster_size
=
(
2
*
CLUSTER_RADIUS
+
1
)
*
(
2
*
CLUSTER_RADIUS
+
1
)
# Reformat input data
...
...
@@ -353,7 +348,6 @@ def shuffle_chunks_in_place(datasets_data, tiles_groups_per_chunk):
ds
[
'target_disparity'
]
=
ds
[
'target_disparity'
]
.
reshape
((
chunks_per_file
,
-
1
))[
permut
]
.
reshape
((
groups_per_file
,
-
1
))
ds
[
'gt_ds'
]
=
ds
[
'gt_ds'
]
.
reshape
((
chunks_per_file
,
-
1
))[
permut
]
.
reshape
((
groups_per_file
,
-
1
))
def
_setFileSlot
(
train_next
,
files
):
train_next
[
'files'
]
=
files
train_next
[
'slots'
]
=
min
(
train_next
[
'files'
],
MAX_FILES_PER_GROUP
)
...
...
@@ -377,8 +371,6 @@ def replaceDataset(datasets_data, new_dataset, nset, period, findx):
datasets_data
[
findx
][
'gt_ds'
]
[
nset
::
period
]
=
new_dataset
[
'gt_ds'
]
def
zip_lvar_hvar
(
datasets_all_data
,
del_src
=
True
):
# cluster_size = (2 * CLUSTER_RADIUS + 1) * (2 * CLUSTER_RADIUS + 1)
# Reformat input data
...
...
@@ -416,7 +408,6 @@ def reduce_tile_size(datasets_data, num_tile_layers, reduced_tile_side):
[
...
,
offs
:
offs
+
reduced_tile_side
,
offs
:
offs
+
reduced_tile_side
]
.
reshape
(
-
1
,
num_tile_layers
*
reduced_tile_side
*
reduced_tile_side
))
def
result_npy_to_tiff
(
npy_path
,
absolute
,
fix_nan
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment