mirror of
https://github.com/macaodha/batdetect2.git
synced 2026-05-23 06:41:53 +02:00
1.6 KiB
1.6 KiB
How to save predictions in different output formats
Use this guide when you need BatDetect2 outputs in a specific representation for downstream tools.
Choose the format that matches the job
Current built-in output formats include:
raw: one NetCDF file per clip, best for rich structured outputs,parquet: tabular storage for data analysis workflows,soundevent: prediction-set JSON for soundevent-style tooling,batdetect2: legacy per-recording JSON output.
Select a format from the CLI
Use --format for quick experiments.
batdetect2 predict directory \
path/to/model.ckpt \
path/to/audio_dir \
path/to/outputs \
--format parquet
Use an outputs config for repeatable runs
Use an outputs config when you want reproducible control over format and transforms.
Example:
format:
name: raw
include_class_scores: true
include_features: true
include_geometry: true
transform:
detection_transforms: []
clip_transforms: []
Run with:
batdetect2 predict directory \
path/to/model.ckpt \
path/to/audio_dir \
path/to/outputs \
--outputs-config path/to/outputs.yaml
Pick the simplest useful format
- Use
rawif you want the richest output surface and easy round-tripping. - Use
parquetif you want tabular analysis in Python or data-lake workflows. - Use
soundeventif you want prediction-set JSON. - Use
batdetect2only when you need the legacy JSON shape.
Related pages
- Outputs config reference: {doc}
../reference/outputs-config - Output formats reference: {doc}
../reference/output-formats - Output transforms reference: {doc}
../reference/output-transforms