Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Contrast Enhancement with UNet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nuno Pimpão Santos Martins
Contrast Enhancement with UNet
Commits
a39c9657
Commit
a39c9657
authored
1 year ago
by
Nuno Pimpão Santos Martins
Browse files
Options
Downloads
Patches
Plain Diff
update iou restore script for latest quantificaitons
parent
4607594a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iou_restore_mask.py
+9
-9
9 additions, 9 deletions
iou_restore_mask.py
with
9 additions
and
9 deletions
iou_restore_mask.py
+
9
−
9
View file @
a39c9657
...
@@ -11,7 +11,7 @@ from tqdm import tqdm
...
@@ -11,7 +11,7 @@ from tqdm import tqdm
# ---
# ---
# Load threshold data
# Load threshold data
# ---
# ---
table_path
=
'
w:
\\
NPC_adult_new
\\
quantification_data
\\
iou_quantification
\\
iou_quantification_fcenet
toinput_2
_2023-07-
10
\\
'
table_path
=
'
w:
\\
NPC_adult_new
\\
quantification_data
\\
iou_quantification
\\
iou_quantification_fcenet
_newmasks
_2023-07-
22
\\
'
table_list
=
os
.
listdir
(
table_path
)
table_list
=
os
.
listdir
(
table_path
)
table_list
.
sort
()
table_list
.
sort
()
table_list
=
[
x
for
x
in
table_list
if
x
.
find
(
'
.csv
'
)
>
0
]
table_list
=
[
x
for
x
in
table_list
if
x
.
find
(
'
.csv
'
)
>
0
]
...
@@ -20,24 +20,24 @@ table_list = [x for x in table_list if x.find('.csv') > 0]
...
@@ -20,24 +20,24 @@ table_list = [x for x in table_list if x.find('.csv') > 0]
# Data Import
# Data Import
# ---
# ---
# results paths
# results paths
results_path
=
'
w:
\\
NPC_adult_new
\\
dl_training
\\
results
\\
contrastenhance_128x128px_maeloss_20pxblurrad_poissonnoise_adaptive0p6to0p5_unet5
\\
'
results_path
=
'
w:
\\
NPC_adult_new
\\
dl_training
\\
fcenet
\\
results
\\
'
pred1_mask_path
=
results_path
+
'
results
_20230707_biasfree
\\
'
pred1_mask_path
=
results_path
+
'
results
\\
'
pred1_suffix_substring
=
'
.tif
'
pred1_suffix_substring
=
'
_pred_renorm
.tif
'
pred1_save_path
=
os
.
path
.
join
(
pred1_mask_path
,
'
masks
'
)
pred1_save_path
=
os
.
path
.
join
(
pred1_mask_path
,
'
masks
'
)
if
not
os
.
path
.
exists
(
pred1_save_path
):
if
not
os
.
path
.
exists
(
pred1_save_path
):
os
.
mkdir
(
pred1_save_path
)
os
.
mkdir
(
pred1_save_path
)
pred2_mask_path
=
results_path
+
'
results_2
0230707_biasfree_doublerestore
\\
'
pred2_mask_path
=
results_path
+
'
results_
x
2
\\
'
pred2_suffix_substring
=
'
.tif
'
pred2_suffix_substring
=
'
_x2
.tif
'
pred2_save_path
=
os
.
path
.
join
(
pred2_mask_path
,
'
masks
'
)
pred2_save_path
=
os
.
path
.
join
(
pred2_mask_path
,
'
masks
'
)
if
not
os
.
path
.
exists
(
pred2_save_path
):
if
not
os
.
path
.
exists
(
pred2_save_path
):
os
.
mkdir
(
pred2_save_path
)
os
.
mkdir
(
pred2_save_path
)
pred3_mask_path
=
results_path
+
'
results_
20230708_biasfree_
x3
\\
'
pred3_mask_path
=
results_path
+
'
results_x3
\\
'
pred3_suffix_substring
=
'
.tif
'
pred3_suffix_substring
=
'
_x3
.tif
'
pred3_save_path
=
os
.
path
.
join
(
pred3_mask_path
,
'
masks
'
)
pred3_save_path
=
os
.
path
.
join
(
pred3_mask_path
,
'
masks
'
)
if
not
os
.
path
.
exists
(
pred3_save_path
):
if
not
os
.
path
.
exists
(
pred3_save_path
):
...
@@ -69,7 +69,7 @@ for table_name in tqdm(table_list, total=len(table_list)):
...
@@ -69,7 +69,7 @@ for table_name in tqdm(table_list, total=len(table_list)):
# print('line len: ', data_table[0].shape)
# print('line len: ', data_table[0].shape)
table_name_noext
=
table_name
[
12
:
table_name
.
index
(
'
_mask
'
)]
table_name_noext
=
table_name
[
12
:
table_name
.
index
(
'
.csv
'
)]
print
(
table_name_noext
)
print
(
table_name_noext
)
time_image
=
time
.
time
()
time_image
=
time
.
time
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment