Skip to content

Commit

Permalink
filter morepork for now
Browse files Browse the repository at this point in the history
  • Loading branch information
gferraro committed Apr 12, 2023
1 parent 6ad89e8 commit 60e2fda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Melt/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ def calc_cacophony_index(tracks, length):
return percents, version


def filter_trcks(tracks):
filtered_labels = ["noise"]
def filter_tracks(tracks):
filtered_labels = ["noise", "morepork"]
filtered = [t for t in tracks if t["species"] not in filtered_labels]
return filtered


def species_identify(file_name, metadata_name, models, bird_model):
labels = identify_species(file_name, metadata_name, models)
other_labels, length = classify(file_name, bird_model)
other_labels = filter_trcks(other_labels)
other_labels = filter_tracks(other_labels)
cacophony_index, version = calc_cacophony_index(other_labels, length)

labels.extend(other_labels)
Expand Down

0 comments on commit 60e2fda

Please sign in to comment.