mirror of
https://github.com/macaodha/batdetect2.git
synced 2026-07-07 21:00:10 +02:00
Some checks failed
CI / Checks (push) Has been cancelled
Docs Pages / Build Docs (push) Has been cancelled
CI / Tests (Python ${{ matrix.python-version }}) (3.10) (push) Has been cancelled
CI / Tests (Python ${{ matrix.python-version }}) (3.11) (push) Has been cancelled
CI / Tests (Python ${{ matrix.python-version }}) (3.12) (push) Has been cancelled
Docs Pages / Deploy Docs (push) Has been cancelled
1.3 KiB
1.3 KiB
How to configure target definitions
Use this guide to define which annotated sound events are considered valid detection targets.
1) Start from a targets config file
detection_target:
name: bat
match_if:
name: has_tag
tag:
key: call_type
value: Echolocation
assign_tags:
- key: call_type
value: Echolocation
- key: order
value: Chiroptera
match_if decides whether an annotation is included in the detection target.
2) Use condition combinators when needed
You can combine conditions with all_of, any_of, and not.
detection_target:
name: bat
match_if:
name: all_of
conditions:
- name: has_tag
tag:
key: call_type
value: Echolocation
- name: not
condition:
name: has_any_tag
tags:
- key: call_type
value: Social
- key: class
value: Not Bat
3) Verify with a small sample first
Before full training, inspect a small annotation subset and confirm that the selection logic keeps the events you expect.
Related pages
- Class mapping:
{doc}
define-target-classes - ROI mapping:
{doc}
configure-roi-mapping - Targets reference:
{doc}
../../reference/configs/data/targets-config-workflow