Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ data-bin/
scripts/libPeak/_peak_detection.cpp

# VSCODE
.vscode/ftp-sync.json
.vscode/settings.json
.vscode/

# Experimental Folder
experimental/*
Expand All @@ -143,4 +142,5 @@ outputs

# Other
results
logs
logs
data/
2 changes: 1 addition & 1 deletion configs/hyenas/finetune_mixup_100.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ task:
min_sample_size: 1000
min_label_size: 2936 # Empty label files have Bytesize 2936, so to exclude them set this to 2936
normalize: true
unique_labels: "['groan', 'oth', 'whoop', 'alarm_rumble', 'squitter', 'squeal', 'feeding', 'giggle', 'growl', 'focal']"
unique_labels: "['groan', 'oth', 'whoop', 'alarm_rumble', 'squitter', 'squeal', 'feeding', 'giggle', 'growl', 'snore', 'focal']"
with_labels: true
conv_feature_layers: '[(127, 63, 1)] +[(512, 10, 5)] + [(512, 3, 4)] + [(512, 3, 3)] + [(512, 3, 2)] + [(512, 3, 1)] + [(512, 2, 1)] * 2'
sample_rate: 24000
Expand Down
6 changes: 5 additions & 1 deletion scripts/get_ap_scores_from_predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ def remove_empty_rows(
Tuple[NDArray, NDArray]: Filtered predictions and targets with empty rows removed.

"""
non_empty_indices = np.where(targets.sum(axis=1) != 0)[0]
empty_indices_targets = np.where(targets.sum(axis=1) == 0)[0]
empty_indices_pred = np.where(predictions.sum(axis=1) == 0)[0]
empty_indices = np.intersect1d(empty_indices_pred, empty_indices_targets)
all_indices = np.arange(len(targets))
non_empty_indices = np.setdiff1d(all_indices, empty_indices)
return predictions[non_empty_indices], targets[non_empty_indices]


Expand Down