Make sure training is still working

This commit is contained in:
mbsantiago 2025-09-08 18:03:56 +01:00
parent 95a884ea16
commit b056d7d28d
3 changed files with 3 additions and 41 deletions

View File

@ -6,33 +6,3 @@ sources:
description: Examples included for testing batdetect2
annotations_dir: example_data/anns
audio_dir: example_data/audio
classes:
# Each class has a name
- name: rhihip
# Can be specified by some tags
tags:
- key: species
value: Rhinolophus hipposideros
- name: myotis
# Or if needed by more complex conditions
condition:
name: has_any_tag
tag:
- key: species
value: Myotis myotis
- key: species
value: Myotis nattereri
- key: species
value: Myotis daubentonii
# Specifies how to translate back the "class" into
# the tag system
# If tags are provided and output_tags are not then
# just use the provided tags
output_tags:
- key: genus
value: Myotis

View File

@ -92,19 +92,11 @@ clean-build:
clean: clean-build clean-pyc clean-test clean-docs
# Examples
# Preprocess example data.
example-preprocess OPTIONS="":
batdetect2 preprocess \
--base-dir . \
--dataset-field datasets.train \
--config example_data/config.yaml \
{{OPTIONS}} \
example_data/config.yaml example_data/preprocessed
# Train on example data.
example-train OPTIONS="":
batdetect2 train \
--val-dir example_data/preprocessed \
--val-dataset example_data/dataset.yaml \
--config example_data/config.yaml \
{{OPTIONS}} \
example_data/preprocessed
example_data/dataset.yaml

View File

@ -282,7 +282,7 @@ def match_sound_events_and_raw_predictions(
config = config or MatchConfig()
target_sound_events = [
targets.transform(sound_event_annotation)
sound_event_annotation
for sound_event_annotation in clip_annotation.sound_events
if targets.filter(sound_event_annotation)
and sound_event_annotation.sound_event.geometry is not None