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.2 KiB
1.2 KiB
How to configure spectrogram preprocessing
Use this guide to set STFT, frequency range, and spectrogram transforms.
1) Configure STFT and frequency range
preprocess:
stft:
window_duration: 0.002
window_overlap: 0.75
window_fn: hann
frequencies:
min_freq: 10000
max_freq: 120000
2) Configure spectrogram transforms
spectrogram_transforms are applied in order.
preprocess:
spectrogram_transforms:
- name: pcen
time_constant: 0.4
gain: 0.98
bias: 2.0
power: 0.5
- name: spectral_mean_subtraction
- name: scale_amplitude
scale: db
Common built-ins:
pcenspectral_mean_subtractionscale_amplitude(dborpower)peak_normalize
3) Configure output size
preprocess:
size:
height: 128
resize_factor: 0.5
4) Keep train and inference settings aligned
Use the same preprocessing setup for training and prediction whenever possible. Large mismatches can degrade model performance.
Related pages
- Why consistency matters:
{doc}
../../explanation/preprocessing-consistency - Preprocessing config reference:
{doc}
../../reference/configs/data/preprocessing-config