Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cns-group-public
aff-seg
Commits
02a33b84
Commit
02a33b84
authored
Sep 28, 2018
by
timo
Browse files
better score presentation
parent
49baf4b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
ade.py
View file @
02a33b84
...
...
@@ -920,7 +920,7 @@ class AffHQ12(_DatasetBySample):
seg_img
=
cv2
.
imread
(
filename
)
assert
seg_img
is
not
None
,
'image not found: {}'
.
format
(
filename
)
seg
+=
[
self
.
threshold
(
seg_img
)]
seg
+=
[
np
.
uint8
(
seg_img
[:,
:,
0
]
>
0
)]
seg
=
np
.
array
(
seg
,
dtype
=
'float32'
)
# seg = seg.argmax(0)
...
...
paths.yaml
View file @
02a33b84
ADE20K_PATH
:
data
HQ_AFF
:
data/
E
xpert
HQ_AFF
:
data/
aff_e
xpert
OREGON_AFFORDANCES
:
data/Oregon_Affordance
AVA_DATA
:
data
CACHE
:
cache
...
...
score.py
View file @
02a33b84
...
...
@@ -56,6 +56,8 @@ def score(model_name, dataset_name, batch_size):
for
j
in
range
(
len
(
metrics
)):
metrics
[
j
].
add
(
pred
,
vars_y
)
print
(
'
\n\n
Final scores:'
)
for
i
in
range
(
len
(
metrics
)):
score
=
metrics
[
i
].
value
()
for
name
,
s
in
zip
(
metrics
[
i
].
names
(),
score
):
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment