mirror of
https://github.com/macaodha/batdetect2.git
synced 2026-01-10 17:19:34 +01:00
Make sure training is still working
This commit is contained in:
parent
95a884ea16
commit
b056d7d28d
@ -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
|
||||
|
||||
12
justfile
12
justfile
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user