Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shifted Begin Time (s) reported in output table when using high overlap #384

Open
scrameri opened this issue Jul 16, 2024 · 0 comments
Open

Comments

@scrameri
Copy link

scrameri commented Jul 16, 2024

Hi Stefan,

Many thanks for this amazing set of tools!

Describe the bug
Using analyzer.py with --overlap 2.9 causes Begin Time (s) in the output file to be shifted relative to the true begin time in the audiofile. The reported time is a couple of seconds earlier. I didn't notice this behaviour when using --overlap 0.

Code Used

python3 analyze.py --i path/to/folder/ --slist path/to/results/ --o path/to/results/  --sensitivity 0.5 --min_conf 0.05 --fmin 0 --fmax 16000 --overlap 2.9 --output_file BirdNET.selection.table_sensitivity_0.5_fmax_16000_overlap_2.9.txt --locale de

Expected behavior
Begin Time (s) is expected to exactly match the beginning of a call in the audio file, regardless of the --overlap setting.

Selection	View	Channel	Begin Time (s)	End Time (s)	Low Freq (Hz)	High Freq (Hz)	Common Name	Species Code	Confidence	Begin Path	File Offset (s)
1	Spectrogram 1	1	606.7000000000694	609.7000000000694	0	8000.0	Waldkauz	tawowl1	0.0974	path/to/folder/20240425_202300.WAV	606.7000000000694
2	Spectrogram 1	1	606.8000000000694	609.8000000000694	0	8000.0	Waldkauz	tawowl1	0.2410	path/to/folder/20240425_202300.WAV	606.8000000000694
3	Spectrogram 1	1	606.9000000000694	609.9000000000694	0	8000.0	Waldkauz	tawowl1	0.6160	path/to/folder/20240425_202300.WAV	606.9000000000694
4	Spectrogram 1	1	607.0000000000695	610.0000000000695	0	8000.0	Waldkauz	tawowl1	0.8510	path/to/folder/20240425_202300.WAV	607.0000000000695
5	Spectrogram 1	1	607.1000000000695	610.1000000000695	0	8000.0	Waldkauz	tawowl1	0.7917	path/to/folder/20240425_202300.WAV	607.1000000000695
6	Spectrogram 1	1	607.2000000000695	610.2000000000695	0	8000.0	Waldkauz	tawowl1	0.9630	path/to/folder/20240425_202300.WAV	607.2000000000695

However, the audiofile shows that the first call starts at ca. 610 seconds, about 3 seconds later than reported. In this case, the size of the shift is about the same as the size of --overlap.

Questions

  • Is this expected?
  • Can I always add --overlap to the reported Begin Time (s) to create correct audio subsets?

Any help is appreciated!

Session Info

  • OS: MacOS, 14.2.1
  • Python 3.9.6
  • birdnetlib 0.17.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant