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
9aebddf8
Commit
9aebddf8
authored
1 year ago
by
Nuno Pimpão Santos Martins
Browse files
Options
Downloads
Patches
Plain Diff
update to psnr concatenation script for latest results
parent
40ce590e
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
processing_concatenate_psnr_metrics.py
+11
-7
11 additions, 7 deletions
processing_concatenate_psnr_metrics.py
with
11 additions
and
7 deletions
processing_concatenate_psnr_metrics.py
+
11
−
7
View file @
9aebddf8
...
...
@@ -5,7 +5,7 @@ from pathlib import Path
condition
=
'
psnr
'
data_path
=
'
w:
\\
NPC_adult_new
\\
quantification_data
\\
quantification_psnr
\\
'
data_path
=
'
w:
\\
NPC_adult_new
\\
quantification_data
\\
psnr_quantification
\\
quantification_psnr
_biasfree_20230720
\\
'
print
(
data_path
)
file_list
=
os
.
listdir
(
data_path
)
...
...
@@ -21,12 +21,16 @@ for filename in file_list:
with
open
(
os
.
path
.
join
(
data_path
,
filename
),
'
r
'
)
as
infile
:
reader
=
csv
.
reader
(
infile
)
for
line
in
reader
:
if
line
[
0
]
==
str
(
15
):
data_file
.
append
(
line
)
if
line
[
0
]
==
str
(
135
):
data_file
.
append
(
line
)
if
line
[
0
]
==
str
(
281
):
if
line
[
0
]
==
str
(
'
z_index
'
):
continue
else
:
data_file
.
append
(
line
)
# if line[0] == str(15):
# data_file.append(line)
# if line[0] == str(135):
# data_file.append(line)
# if line[0] == str(281):
# data_file.append(line)
for
i
in
range
(
len
(
data_file
)):
data_file
[
i
].
insert
(
0
,
condition
)
...
...
@@ -47,7 +51,7 @@ for filename in file_list:
path
=
Path
(
data_path
)
parent_path
=
str
(
path
.
parent
.
absolute
())
table_save_name
=
condition
+
'
_all_
metrics
.csv
'
table_save_name
=
condition
+
'
_all_
biasfree_metrics_20230720
.csv
'
with
open
(
os
.
path
.
join
(
parent_path
,
table_save_name
),
'
w
'
)
as
outfile
:
outfile
.
write
(
'
Condition,Z,PSNR, Position,
\n
'
)
for
item
in
outdata
:
...
...
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