Skip to content

Commit b64091d

Browse files
fixed metric bug
1 parent 390627f commit b64091d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

SELD_evaluation_metrics.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ def update_seld_scores(self, pred, gt):
134134
if gt_val in pred_ind_list:
135135
gt_arr = np.array(gt[block_cnt][class_cnt][0][1][gt_ind])
136136
gt_ids = np.arange(len(gt_arr[:, -1])) #TODO if the reference has track IDS use here - gt_arr[:, -1]
137-
gt_doas = gt_arr[:, :-1]
137+
gt_doas = gt_arr[:, 1:]
138138

139139
pred_ind = pred_ind_list.index(gt_val)
140140
pred_arr = np.array(pred[block_cnt][class_cnt][0][1][pred_ind])
141-
pred_doas = pred_arr[:, :-1]
141+
pred_doas = pred_arr[:, 1:]
142142

143143
if gt_doas.shape[-1] == 2: # convert DOAs to radians, if the input is in degrees
144144
gt_doas = gt_doas * np.pi / 180.

cls_compute_seld_results.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def reshape_3Dto2D(A):
128128

129129

130130
if __name__ == "__main__":
131-
pred_output_format_files = 'results/1_foa_dev_20220316104401_test' # Path of the DCASEoutput format files
131+
pred_output_format_files = 'results/1_1_dev_split0_accdoa_foa_20220428133518_val' # Path of the DCASEoutput format files
132132
params = parameters.get_params()
133133
# Compute just the DCASE final results
134134
score_obj = ComputeSELDResults(params)

0 commit comments

Comments
 (0)