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.4 KiB
1.4 KiB
How to import legacy batdetect2 annotations
Use this guide if your annotations are in older batdetect2 JSON formats.
Two legacy formats are supported:
batdetect2: one annotation JSON file per recordingbatdetect2_file: one merged JSON file for many recordings
1) Choose the correct source format
Directory-based annotations (format: batdetect2):
sources:
- name: legacy_per_file
format: batdetect2
audio_dir: /path/to/audio
annotations_dir: /path/to/annotation_json_dir
Merged annotation file (format: batdetect2_file):
sources:
- name: legacy_merged
format: batdetect2_file
audio_dir: /path/to/audio
annotations_path: /path/to/merged_annotations.json
2) Set optional legacy filters
Legacy filters are based on annotated and issues flags.
filter:
only_annotated: true
exclude_issues: true
To load all entries regardless of flags:
filter: null
3) Validate and convert if needed
Check loaded records:
batdetect2 data summary path/to/dataset.yaml
Convert to annotation-set output for downstream tooling:
batdetect2 data convert path/to/dataset.yaml --output path/to/output.json
4) Continue with current workflows
- Run predictions:
{doc}
../inference/run-batch-predictions - Train on imported data:
{doc}
../../tutorials/train-a-custom-model - Field-level reference:
{doc}
../../reference/configs/data/data-sources