Skip to content

Commit

Permalink
Fix to evaluation script
Browse files Browse the repository at this point in the history
  • Loading branch information
rmk6217 committed Sep 20, 2017
1 parent a6a17f3 commit dfbadc6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion evaluate_rit18.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def Evaluate_RIT18(y_true, y_pred, mask, file_name=None):
if y_true[-3:] == 'npy':
y_true = np.load(y_true)[mask>0].ravel()
elif y_true[-3:] == 'mat':
y_true = loadmat(y_true)[mask>0].ravel()
y_true = loadmat(y_true)['test_labels'][mask>0].ravel()
else:
raise IOError('Unrecognized filetype for y_true.')
elif type(y_true) == np.ndarray:
Expand Down Expand Up @@ -75,3 +75,7 @@ def Evaluate_RIT18(y_true, y_pred, mask, file_name=None):
savemat(file_name , metrics)

return metrics




0 comments on commit dfbadc6

Please sign in to comment.