Commit 02a33b84 authored by timo's avatar timo
Browse files

better score presentation

parent 49baf4b0
...@@ -920,7 +920,7 @@ class AffHQ12(_DatasetBySample): ...@@ -920,7 +920,7 @@ class AffHQ12(_DatasetBySample):
seg_img = cv2.imread(filename) seg_img = cv2.imread(filename)
assert seg_img is not None, 'image not found: {}'.format(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 = np.array(seg, dtype='float32')
# seg = seg.argmax(0) # seg = seg.argmax(0)
......
ADE20K_PATH: data ADE20K_PATH: data
HQ_AFF: data/Expert HQ_AFF: data/aff_expert
OREGON_AFFORDANCES: data/Oregon_Affordance OREGON_AFFORDANCES: data/Oregon_Affordance
AVA_DATA: data AVA_DATA: data
CACHE: cache CACHE: cache
......
...@@ -56,6 +56,8 @@ def score(model_name, dataset_name, batch_size): ...@@ -56,6 +56,8 @@ def score(model_name, dataset_name, batch_size):
for j in range(len(metrics)): for j in range(len(metrics)):
metrics[j].add(pred, vars_y) metrics[j].add(pred, vars_y)
print('\n\nFinal scores:')
for i in range(len(metrics)): for i in range(len(metrics)):
score = metrics[i].value() score = metrics[i].value()
for name, s in zip(metrics[i].names(), score): for name, s in zip(metrics[i].names(), score):
......
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