birdnet-analyzer 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. birdnet_analyzer-2.0.0/LICENSE +19 -0
  2. birdnet_analyzer-2.0.0/PKG-INFO +129 -0
  3. birdnet_analyzer-2.0.0/README.md +83 -0
  4. birdnet_analyzer-2.0.0/birdnet_analyzer/__init__.py +8 -0
  5. birdnet_analyzer-2.0.0/birdnet_analyzer/analyze/__init__.py +5 -0
  6. birdnet_analyzer-2.0.0/birdnet_analyzer/analyze/__main__.py +4 -0
  7. birdnet_analyzer-2.0.0/birdnet_analyzer/analyze/cli.py +25 -0
  8. birdnet_analyzer-2.0.0/birdnet_analyzer/analyze/core.py +245 -0
  9. birdnet_analyzer-2.0.0/birdnet_analyzer/analyze/utils.py +701 -0
  10. birdnet_analyzer-2.0.0/birdnet_analyzer/audio.py +372 -0
  11. birdnet_analyzer-2.0.0/birdnet_analyzer/cli.py +707 -0
  12. birdnet_analyzer-2.0.0/birdnet_analyzer/config.py +242 -0
  13. birdnet_analyzer-2.0.0/birdnet_analyzer/eBird_taxonomy_codes_2021E.json +25280 -0
  14. birdnet_analyzer-2.0.0/birdnet_analyzer/embeddings/__init__.py +4 -0
  15. birdnet_analyzer-2.0.0/birdnet_analyzer/embeddings/__main__.py +3 -0
  16. birdnet_analyzer-2.0.0/birdnet_analyzer/embeddings/cli.py +13 -0
  17. birdnet_analyzer-2.0.0/birdnet_analyzer/embeddings/core.py +70 -0
  18. birdnet_analyzer-2.0.0/birdnet_analyzer/embeddings/utils.py +193 -0
  19. birdnet_analyzer-2.0.0/birdnet_analyzer/evaluation/__init__.py +195 -0
  20. birdnet_analyzer-2.0.0/birdnet_analyzer/evaluation/__main__.py +3 -0
  21. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/__init__.py +23 -0
  22. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/__main__.py +3 -0
  23. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/analysis.py +174 -0
  24. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/assets/arrow_down.svg +4 -0
  25. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/assets/arrow_left.svg +4 -0
  26. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/assets/arrow_right.svg +4 -0
  27. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/assets/arrow_up.svg +4 -0
  28. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/assets/gui.css +29 -0
  29. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/assets/gui.js +94 -0
  30. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/assets/img/birdnet-icon.ico +0 -0
  31. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/assets/img/birdnet_logo.png +0 -0
  32. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/assets/img/birdnet_logo_no_transparent.png +0 -0
  33. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/assets/img/clo-logo-bird.svg +1 -0
  34. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/embeddings.py +620 -0
  35. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/evaluation.py +813 -0
  36. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/localization.py +68 -0
  37. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/multi_file.py +246 -0
  38. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/review.py +527 -0
  39. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/segments.py +191 -0
  40. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/settings.py +129 -0
  41. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/single_file.py +269 -0
  42. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/species.py +95 -0
  43. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/train.py +698 -0
  44. birdnet_analyzer-2.0.0/birdnet_analyzer/gui/utils.py +808 -0
  45. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_af.txt +6522 -0
  46. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_ar.txt +6522 -0
  47. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_bg.txt +6522 -0
  48. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_ca.txt +6522 -0
  49. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_cs.txt +6522 -0
  50. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_da.txt +6522 -0
  51. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_de.txt +6522 -0
  52. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_el.txt +6522 -0
  53. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_en_uk.txt +6522 -0
  54. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_es.txt +6522 -0
  55. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_fi.txt +6522 -0
  56. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_fr.txt +6522 -0
  57. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_he.txt +6522 -0
  58. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_hr.txt +6522 -0
  59. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_hu.txt +6522 -0
  60. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_in.txt +6522 -0
  61. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_is.txt +6522 -0
  62. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_it.txt +6522 -0
  63. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_ja.txt +6522 -0
  64. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_ko.txt +6522 -0
  65. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_lt.txt +6522 -0
  66. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_ml.txt +6522 -0
  67. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_nl.txt +6522 -0
  68. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_no.txt +6522 -0
  69. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_pl.txt +6522 -0
  70. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_pt_BR.txt +6522 -0
  71. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_pt_PT.txt +6522 -0
  72. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_ro.txt +6522 -0
  73. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_ru.txt +6522 -0
  74. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_sk.txt +6522 -0
  75. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_sl.txt +6522 -0
  76. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_sr.txt +6522 -0
  77. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_sv.txt +6522 -0
  78. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_th.txt +6522 -0
  79. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_tr.txt +6522 -0
  80. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_uk.txt +6522 -0
  81. birdnet_analyzer-2.0.0/birdnet_analyzer/labels/V2.4/BirdNET_GLOBAL_6K_V2.4_Labels_zh.txt +6522 -0
  82. birdnet_analyzer-2.0.0/birdnet_analyzer/lang/de.json +335 -0
  83. birdnet_analyzer-2.0.0/birdnet_analyzer/lang/en.json +335 -0
  84. birdnet_analyzer-2.0.0/birdnet_analyzer/lang/fi.json +335 -0
  85. birdnet_analyzer-2.0.0/birdnet_analyzer/lang/fr.json +335 -0
  86. birdnet_analyzer-2.0.0/birdnet_analyzer/lang/id.json +335 -0
  87. birdnet_analyzer-2.0.0/birdnet_analyzer/lang/pt-br.json +335 -0
  88. birdnet_analyzer-2.0.0/birdnet_analyzer/lang/ru.json +335 -0
  89. birdnet_analyzer-2.0.0/birdnet_analyzer/lang/se.json +335 -0
  90. birdnet_analyzer-2.0.0/birdnet_analyzer/lang/tlh.json +335 -0
  91. birdnet_analyzer-2.0.0/birdnet_analyzer/lang/zh_TW.json +335 -0
  92. birdnet_analyzer-2.0.0/birdnet_analyzer/model.py +1243 -0
  93. birdnet_analyzer-2.0.0/birdnet_analyzer/search/__init__.py +3 -0
  94. birdnet_analyzer-2.0.0/birdnet_analyzer/search/__main__.py +3 -0
  95. birdnet_analyzer-2.0.0/birdnet_analyzer/search/cli.py +12 -0
  96. birdnet_analyzer-2.0.0/birdnet_analyzer/search/core.py +78 -0
  97. birdnet_analyzer-2.0.0/birdnet_analyzer/search/utils.py +111 -0
  98. birdnet_analyzer-2.0.0/birdnet_analyzer/segments/__init__.py +3 -0
  99. birdnet_analyzer-2.0.0/birdnet_analyzer/segments/__main__.py +3 -0
  100. birdnet_analyzer-2.0.0/birdnet_analyzer/segments/cli.py +14 -0
  101. birdnet_analyzer-2.0.0/birdnet_analyzer/segments/core.py +78 -0
  102. birdnet_analyzer-2.0.0/birdnet_analyzer/segments/utils.py +394 -0
  103. birdnet_analyzer-2.0.0/birdnet_analyzer/species/__init__.py +3 -0
  104. birdnet_analyzer-2.0.0/birdnet_analyzer/species/__main__.py +3 -0
  105. birdnet_analyzer-2.0.0/birdnet_analyzer/species/cli.py +14 -0
  106. birdnet_analyzer-2.0.0/birdnet_analyzer/species/core.py +35 -0
  107. birdnet_analyzer-2.0.0/birdnet_analyzer/species/utils.py +75 -0
  108. birdnet_analyzer-2.0.0/birdnet_analyzer/train/__init__.py +3 -0
  109. birdnet_analyzer-2.0.0/birdnet_analyzer/train/__main__.py +3 -0
  110. birdnet_analyzer-2.0.0/birdnet_analyzer/train/cli.py +14 -0
  111. birdnet_analyzer-2.0.0/birdnet_analyzer/train/core.py +113 -0
  112. birdnet_analyzer-2.0.0/birdnet_analyzer/train/utils.py +847 -0
  113. birdnet_analyzer-2.0.0/birdnet_analyzer/translate.py +104 -0
  114. birdnet_analyzer-2.0.0/birdnet_analyzer/utils.py +419 -0
  115. birdnet_analyzer-2.0.0/birdnet_analyzer.egg-info/PKG-INFO +129 -0
  116. birdnet_analyzer-2.0.0/birdnet_analyzer.egg-info/SOURCES.txt +120 -0
  117. birdnet_analyzer-2.0.0/birdnet_analyzer.egg-info/dependency_links.txt +1 -0
  118. birdnet_analyzer-2.0.0/birdnet_analyzer.egg-info/entry_points.txt +11 -0
  119. birdnet_analyzer-2.0.0/birdnet_analyzer.egg-info/requires.txt +29 -0
  120. birdnet_analyzer-2.0.0/birdnet_analyzer.egg-info/top_level.txt +1 -0
  121. birdnet_analyzer-2.0.0/pyproject.toml +84 -0
  122. birdnet_analyzer-2.0.0/setup.cfg +4 -0
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2024 birdnet-team
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
@@ -0,0 +1,129 @@
1
+ Metadata-Version: 2.4
2
+ Name: birdnet_analyzer
3
+ Version: 2.0.0
4
+ Summary: BirdNET analyzer for scientific audio data processing and bird classification.
5
+ Author: Stefan Kahl
6
+ Maintainer: Josef Haupt, Max Mauermann
7
+ License: MIT
8
+ Project-URL: Homepage, https://birdnet.cornell.edu/birdnet
9
+ Project-URL: Documentation, https://birdnet-team.github.io/BirdNET-Analyzer/
10
+ Project-URL: Repository, https://github.com/birdnet-team/BirdNET-Analyzer
11
+ Project-URL: Issues, https://github.com/birdnet-team/BirdNET-Analyzer/issues
12
+ Project-URL: Download, https://github.com/birdnet-team/BirdNET-Analyzer/releases/latest
13
+ Keywords: birdnet,birdnet-analyzer
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
17
+ Classifier: Topic :: Scientific/Engineering
18
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Requires-Python: >=3.11
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: librosa
24
+ Requires-Dist: resampy
25
+ Requires-Dist: tensorflow==2.15.1
26
+ Requires-Dist: scikit-learn==1.6.1
27
+ Requires-Dist: tqdm
28
+ Provides-Extra: train
29
+ Requires-Dist: keras-tuner; extra == "train"
30
+ Provides-Extra: server
31
+ Requires-Dist: bottle; extra == "server"
32
+ Requires-Dist: requests; extra == "server"
33
+ Provides-Extra: gui
34
+ Requires-Dist: birdnet-analyzer[embeddings,train]; extra == "gui"
35
+ Requires-Dist: gradio==5.25.2; extra == "gui"
36
+ Requires-Dist: pywebview; extra == "gui"
37
+ Requires-Dist: matplotlib; extra == "gui"
38
+ Requires-Dist: plotly[express]; extra == "gui"
39
+ Requires-Dist: seaborn; extra == "gui"
40
+ Requires-Dist: pywin32; platform_system == "Windows" and extra == "gui"
41
+ Provides-Extra: embeddings
42
+ Requires-Dist: perch-hoplite; extra == "embeddings"
43
+ Provides-Extra: all
44
+ Requires-Dist: birdnet-analyzer[gui,server]; extra == "all"
45
+ Dynamic: license-file
46
+
47
+ <div align="center">
48
+ <h1>BirdNET-Analyzer</h1>
49
+ <a href="https://birdnet-team.github.io/BirdNET-Analyzer/">
50
+ <img src="https://github.com/birdnet-team/BirdNET-Analyzer/blob/main/docs/_static/logo_birdnet_big.png?raw=true" width="300" alt="BirdNET-Logo" />
51
+ </a>
52
+ </div>
53
+ <br>
54
+ <div align="center">
55
+
56
+ ![License](https://img.shields.io/github/license/birdnet-team/BirdNET-Analyzer)
57
+ ![OS](https://badgen.net/badge/OS/Linux%2C%20Windows%2C%20macOS/blue)
58
+ [![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3110/)
59
+ ![Species](https://badgen.net/badge/Species/6512/blue)
60
+ ![Downloads](https://www-user.tu-chemnitz.de/~johau/birdnet_total_downloads_badge.php)
61
+
62
+ [![Docker](https://github.com/birdnet-team/BirdNET-Analyzer/actions/workflows/docker-build.yml/badge.svg)](https://github.com/birdnet-team/BirdNET-Analyzer/actions/workflows/docker-build.yml)
63
+ [![Reddit](https://img.shields.io/badge/Reddit-FF4500?style=flat&logo=reddit&logoColor=white)](https://www.reddit.com/r/BirdNET_Analyzer/)
64
+ ![GitHub stars)](https://img.shields.io/github/stars/birdnet-team/BirdNET-Analyzer)
65
+ [![GitHub release](https://img.shields.io/github/v/release/birdnet-team/BirdNET-Analyzer)](https://github.com/birdnet-team/BirdNET-Analyzer/releases/latest)
66
+
67
+ </div>
68
+
69
+ This repo contains BirdNET models and scripts for processing large amounts of audio data or single audio files.
70
+ This is the most advanced version of BirdNET for acoustic analyses and we will keep this repository up-to-date with new models and improved interfaces to enable scientists with no CS background to run the analysis.
71
+
72
+ Feel free to use BirdNET for your acoustic analyses and research.
73
+ If you do, please cite as:
74
+
75
+ ```bibtex
76
+ @article{kahl2021birdnet,
77
+ title={BirdNET: A deep learning solution for avian diversity monitoring},
78
+ author={Kahl, Stefan and Wood, Connor M and Eibl, Maximilian and Klinck, Holger},
79
+ journal={Ecological Informatics},
80
+ volume={61},
81
+ pages={101236},
82
+ year={2021},
83
+ publisher={Elsevier}
84
+ }
85
+ ```
86
+
87
+ ## Documentation
88
+
89
+ You can access documentation for this project [here](https://birdnet-team.github.io/BirdNET-Analyzer/).
90
+
91
+ ## Download
92
+
93
+ You can download installers for Windows and macOS from the [releases page](https://github.com/birdnet-team/BirdNET-Analyzer/releases/latest).
94
+
95
+ ## About
96
+
97
+ Developed by the [K. Lisa Yang Center for Conservation Bioacoustics](https://www.birds.cornell.edu/ccb/) at the [Cornell Lab of Ornithology](https://www.birds.cornell.edu/home) in collaboration with [Chemnitz University of Technology](https://www.tu-chemnitz.de/index.html.en).
98
+
99
+ Go to https://birdnet.cornell.edu to learn more about the project.
100
+
101
+ Want to use BirdNET to analyze a large dataset? Don't hesitate to contact us: ccb-birdnet@cornell.edu
102
+
103
+ **Have a question, remark, or feature request? Please start a new issue thread to let us know. Feel free to submit a pull request.**
104
+
105
+ ## License
106
+
107
+ - **Source Code**: The source code for this project is licensed under the [MIT License](https://opensource.org/licenses/MIT).
108
+ - **Models**: The models used in this project are licensed under the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/).
109
+
110
+ Please ensure you review and adhere to the specific license terms provided with each model.
111
+
112
+ *Please note that all educational and research purposes are considered non-commercial use and it is therefore freely permitted to use BirdNET models in any way.*
113
+
114
+ ## Funding
115
+
116
+ This project is supported by Jake Holshuh (Cornell class of ´69) and The Arthur Vining Davis Foundations.
117
+ Our work in the K. Lisa Yang Center for Conservation Bioacoustics is made possible by the generosity of K. Lisa Yang to advance innovative conservation technologies to inspire and inform the conservation of wildlife and habitats.
118
+
119
+ The development of BirdNET is supported by the German Federal Ministry of Education and Research through the project “BirdNET+” (FKZ 01|S22072).
120
+ The German Federal Ministry for the Environment, Nature Conservation and Nuclear Safety contributes through the “DeepBirdDetect” project (FKZ 67KI31040E).
121
+ In addition, the Deutsche Bundesstiftung Umwelt supports BirdNET through the project “RangerSound” (project 39263/01).
122
+
123
+ ## Partners
124
+
125
+ BirdNET is a joint effort of partners from academia and industry.
126
+ Without these partnerships, this project would not have been possible.
127
+ Thank you!
128
+
129
+ ![Logos of all partners](https://tuc.cloud/index.php/s/KSdWfX5CnSRpRgQ/download/box_logos.png)
@@ -0,0 +1,83 @@
1
+ <div align="center">
2
+ <h1>BirdNET-Analyzer</h1>
3
+ <a href="https://birdnet-team.github.io/BirdNET-Analyzer/">
4
+ <img src="https://github.com/birdnet-team/BirdNET-Analyzer/blob/main/docs/_static/logo_birdnet_big.png?raw=true" width="300" alt="BirdNET-Logo" />
5
+ </a>
6
+ </div>
7
+ <br>
8
+ <div align="center">
9
+
10
+ ![License](https://img.shields.io/github/license/birdnet-team/BirdNET-Analyzer)
11
+ ![OS](https://badgen.net/badge/OS/Linux%2C%20Windows%2C%20macOS/blue)
12
+ [![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3110/)
13
+ ![Species](https://badgen.net/badge/Species/6512/blue)
14
+ ![Downloads](https://www-user.tu-chemnitz.de/~johau/birdnet_total_downloads_badge.php)
15
+
16
+ [![Docker](https://github.com/birdnet-team/BirdNET-Analyzer/actions/workflows/docker-build.yml/badge.svg)](https://github.com/birdnet-team/BirdNET-Analyzer/actions/workflows/docker-build.yml)
17
+ [![Reddit](https://img.shields.io/badge/Reddit-FF4500?style=flat&logo=reddit&logoColor=white)](https://www.reddit.com/r/BirdNET_Analyzer/)
18
+ ![GitHub stars)](https://img.shields.io/github/stars/birdnet-team/BirdNET-Analyzer)
19
+ [![GitHub release](https://img.shields.io/github/v/release/birdnet-team/BirdNET-Analyzer)](https://github.com/birdnet-team/BirdNET-Analyzer/releases/latest)
20
+
21
+ </div>
22
+
23
+ This repo contains BirdNET models and scripts for processing large amounts of audio data or single audio files.
24
+ This is the most advanced version of BirdNET for acoustic analyses and we will keep this repository up-to-date with new models and improved interfaces to enable scientists with no CS background to run the analysis.
25
+
26
+ Feel free to use BirdNET for your acoustic analyses and research.
27
+ If you do, please cite as:
28
+
29
+ ```bibtex
30
+ @article{kahl2021birdnet,
31
+ title={BirdNET: A deep learning solution for avian diversity monitoring},
32
+ author={Kahl, Stefan and Wood, Connor M and Eibl, Maximilian and Klinck, Holger},
33
+ journal={Ecological Informatics},
34
+ volume={61},
35
+ pages={101236},
36
+ year={2021},
37
+ publisher={Elsevier}
38
+ }
39
+ ```
40
+
41
+ ## Documentation
42
+
43
+ You can access documentation for this project [here](https://birdnet-team.github.io/BirdNET-Analyzer/).
44
+
45
+ ## Download
46
+
47
+ You can download installers for Windows and macOS from the [releases page](https://github.com/birdnet-team/BirdNET-Analyzer/releases/latest).
48
+
49
+ ## About
50
+
51
+ Developed by the [K. Lisa Yang Center for Conservation Bioacoustics](https://www.birds.cornell.edu/ccb/) at the [Cornell Lab of Ornithology](https://www.birds.cornell.edu/home) in collaboration with [Chemnitz University of Technology](https://www.tu-chemnitz.de/index.html.en).
52
+
53
+ Go to https://birdnet.cornell.edu to learn more about the project.
54
+
55
+ Want to use BirdNET to analyze a large dataset? Don't hesitate to contact us: ccb-birdnet@cornell.edu
56
+
57
+ **Have a question, remark, or feature request? Please start a new issue thread to let us know. Feel free to submit a pull request.**
58
+
59
+ ## License
60
+
61
+ - **Source Code**: The source code for this project is licensed under the [MIT License](https://opensource.org/licenses/MIT).
62
+ - **Models**: The models used in this project are licensed under the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/).
63
+
64
+ Please ensure you review and adhere to the specific license terms provided with each model.
65
+
66
+ *Please note that all educational and research purposes are considered non-commercial use and it is therefore freely permitted to use BirdNET models in any way.*
67
+
68
+ ## Funding
69
+
70
+ This project is supported by Jake Holshuh (Cornell class of ´69) and The Arthur Vining Davis Foundations.
71
+ Our work in the K. Lisa Yang Center for Conservation Bioacoustics is made possible by the generosity of K. Lisa Yang to advance innovative conservation technologies to inspire and inform the conservation of wildlife and habitats.
72
+
73
+ The development of BirdNET is supported by the German Federal Ministry of Education and Research through the project “BirdNET+” (FKZ 01|S22072).
74
+ The German Federal Ministry for the Environment, Nature Conservation and Nuclear Safety contributes through the “DeepBirdDetect” project (FKZ 67KI31040E).
75
+ In addition, the Deutsche Bundesstiftung Umwelt supports BirdNET through the project “RangerSound” (project 39263/01).
76
+
77
+ ## Partners
78
+
79
+ BirdNET is a joint effort of partners from academia and industry.
80
+ Without these partnerships, this project would not have been possible.
81
+ Thank you!
82
+
83
+ ![Logos of all partners](https://tuc.cloud/index.php/s/KSdWfX5CnSRpRgQ/download/box_logos.png)
@@ -0,0 +1,8 @@
1
+ from birdnet_analyzer.analyze import analyze
2
+ from birdnet_analyzer.embeddings import embeddings
3
+ from birdnet_analyzer.train import train
4
+ from birdnet_analyzer.search import search
5
+ from birdnet_analyzer.segments import segments
6
+ from birdnet_analyzer.species import species
7
+
8
+ __all__ = ["analyze", "train", "embeddings", "search", "segments", "species"]
@@ -0,0 +1,5 @@
1
+ from birdnet_analyzer.analyze.core import analyze
2
+
3
+ __all__ = [
4
+ "analyze",
5
+ ]
@@ -0,0 +1,4 @@
1
+ from birdnet_analyzer.analyze.cli import main
2
+
3
+
4
+ main()
@@ -0,0 +1,25 @@
1
+ from birdnet_analyzer.utils import runtime_error_handler
2
+ from birdnet_analyzer import analyze
3
+
4
+
5
+ @runtime_error_handler
6
+ def main():
7
+ import os
8
+ from multiprocessing import freeze_support
9
+
10
+ import birdnet_analyzer.cli as cli
11
+
12
+ # Freeze support for executable
13
+ freeze_support()
14
+
15
+ parser = cli.analyzer_parser()
16
+
17
+ args = parser.parse_args()
18
+
19
+ try:
20
+ if os.get_terminal_size().columns >= 64:
21
+ print(cli.ASCII_LOGO, flush=True)
22
+ except Exception:
23
+ pass
24
+
25
+ analyze(**vars(args))
@@ -0,0 +1,245 @@
1
+ import os
2
+ from typing import List, Literal
3
+
4
+
5
+ def analyze(
6
+ input: str,
7
+ output: str | None = None,
8
+ *,
9
+ min_conf: float = 0.25,
10
+ classifier: str | None = None,
11
+ lat: float = -1,
12
+ lon: float = -1,
13
+ week: int = -1,
14
+ slist: str | None = None,
15
+ sensitivity: float = 1.0,
16
+ overlap: float = 0,
17
+ fmin: int = 0,
18
+ fmax: int = 15000,
19
+ audio_speed: float = 1.0,
20
+ batch_size: int = 1,
21
+ combine_results: bool = False,
22
+ rtype: Literal["table", "audacity", "kaleidoscope", "csv"]
23
+ | List[Literal["table", "audacity", "kaleidoscope", "csv"]] = "table",
24
+ skip_existing_results: bool = False,
25
+ sf_thresh: float = 0.03,
26
+ top_n: int | None = None,
27
+ merge_consecutive: int = 1,
28
+ threads: int = 8,
29
+ locale: str = "en",
30
+ ):
31
+ """
32
+ Analyzes audio files for bird species detection using the BirdNET-Analyzer.
33
+ Args:
34
+ input (str): Path to the input directory or file containing audio data.
35
+ output (str | None, optional): Path to the output directory for results. Defaults to None.
36
+ min_conf (float, optional): Minimum confidence threshold for detections. Defaults to 0.25.
37
+ classifier (str | None, optional): Path to a custom classifier file. Defaults to None.
38
+ lat (float, optional): Latitude for location-based filtering. Defaults to -1.
39
+ lon (float, optional): Longitude for location-based filtering. Defaults to -1.
40
+ week (int, optional): Week of the year for seasonal filtering. Defaults to -1.
41
+ slist (str | None, optional): Path to a species list file for filtering. Defaults to None.
42
+ sensitivity (float, optional): Sensitivity of the detection algorithm. Defaults to 1.0.
43
+ overlap (float, optional): Overlap between analysis windows in seconds. Defaults to 0.
44
+ fmin (int, optional): Minimum frequency for analysis in Hz. Defaults to 0.
45
+ fmax (int, optional): Maximum frequency for analysis in Hz. Defaults to 15000.
46
+ audio_speed (float, optional): Speed factor for audio playback during analysis. Defaults to 1.0.
47
+ batch_size (int, optional): Batch size for processing. Defaults to 1.
48
+ combine_results (bool, optional): Whether to combine results into a single file. Defaults to False.
49
+ rtype (Literal["table", "audacity", "kaleidoscope", "csv"] | List[Literal["table", "audacity", "kaleidoscope", "csv"]], optional):
50
+ Output format(s) for results. Defaults to "table".
51
+ skip_existing_results (bool, optional): Whether to skip analysis for files with existing results. Defaults to False.
52
+ sf_thresh (float, optional): Threshold for species filtering. Defaults to 0.03.
53
+ top_n (int | None, optional): Limit the number of top detections per file. Defaults to None.
54
+ merge_consecutive (int, optional): Merge consecutive detections within this time window in seconds. Defaults to 1.
55
+ threads (int, optional): Number of CPU threads to use for analysis. Defaults to 8.
56
+ locale (str, optional): Locale for species names and output. Defaults to "en".
57
+ Returns:
58
+ None
59
+ Raises:
60
+ ValueError: If input path is invalid or required parameters are missing.
61
+ Notes:
62
+ - The function ensures the BirdNET model is available before analysis.
63
+ - Results can be combined into a single file if `combine_results` is True.
64
+ - Analysis parameters are saved to a file in the output directory.
65
+ """
66
+ from multiprocessing import Pool
67
+
68
+ import birdnet_analyzer.config as cfg
69
+ from birdnet_analyzer.analyze.utils import analyze_file, save_analysis_params
70
+ from birdnet_analyzer.analyze.utils import combine_results as combine
71
+ from birdnet_analyzer.utils import ensure_model_exists
72
+
73
+ ensure_model_exists()
74
+
75
+ flist = _set_params(
76
+ input=input,
77
+ output=output,
78
+ min_conf=min_conf,
79
+ custom_classifier=classifier,
80
+ lat=lat,
81
+ lon=lon,
82
+ week=week,
83
+ slist=slist,
84
+ sensitivity=sensitivity,
85
+ locale=locale,
86
+ overlap=overlap,
87
+ fmin=fmin,
88
+ fmax=fmax,
89
+ audio_speed=audio_speed,
90
+ bs=batch_size,
91
+ combine_results=combine_results,
92
+ rtype=rtype,
93
+ sf_thresh=sf_thresh,
94
+ top_n=top_n,
95
+ merge_consecutive=merge_consecutive,
96
+ skip_existing_results=skip_existing_results,
97
+ threads=threads,
98
+ labels_file=cfg.LABELS_FILE,
99
+ )
100
+
101
+ print(f"Found {len(cfg.FILE_LIST)} files to analyze")
102
+
103
+ if not cfg.SPECIES_LIST:
104
+ print(f"Species list contains {len(cfg.LABELS)} species")
105
+ else:
106
+ print(f"Species list contains {len(cfg.SPECIES_LIST)} species")
107
+
108
+ result_files = []
109
+
110
+ # Analyze files
111
+ if cfg.CPU_THREADS < 2 or len(flist) < 2:
112
+ for entry in flist:
113
+ result_files.append(analyze_file(entry))
114
+ else:
115
+ with Pool(cfg.CPU_THREADS) as p:
116
+ # Map analyzeFile function to each entry in flist
117
+ results = p.map_async(analyze_file, flist)
118
+ # Wait for all tasks to complete
119
+ results.wait()
120
+ result_files = results.get()
121
+
122
+ # Combine results?
123
+ if cfg.COMBINE_RESULTS:
124
+ print(f"Combining results, writing to {cfg.OUTPUT_PATH}...", end="", flush=True)
125
+ combine(result_files)
126
+ print("done!", flush=True)
127
+
128
+ save_analysis_params(os.path.join(cfg.OUTPUT_PATH, cfg.ANALYSIS_PARAMS_FILENAME))
129
+
130
+
131
+ def _set_params(
132
+ input,
133
+ output,
134
+ min_conf,
135
+ custom_classifier,
136
+ lat,
137
+ lon,
138
+ week,
139
+ slist,
140
+ sensitivity,
141
+ locale,
142
+ overlap,
143
+ fmin,
144
+ fmax,
145
+ audio_speed,
146
+ bs,
147
+ combine_results,
148
+ rtype,
149
+ skip_existing_results,
150
+ sf_thresh,
151
+ top_n,
152
+ merge_consecutive,
153
+ threads,
154
+ labels_file=None,
155
+ ):
156
+ import birdnet_analyzer.config as cfg
157
+ from birdnet_analyzer.analyze.utils import load_codes # noqa: E402
158
+ from birdnet_analyzer.species.utils import get_species_list
159
+ from birdnet_analyzer.utils import collect_audio_files, read_lines
160
+
161
+ cfg.CODES = load_codes()
162
+ cfg.LABELS = read_lines(labels_file if labels_file else cfg.LABELS_FILE)
163
+ cfg.SKIP_EXISTING_RESULTS = skip_existing_results
164
+ cfg.LOCATION_FILTER_THRESHOLD = sf_thresh
165
+ cfg.TOP_N = top_n
166
+ cfg.MERGE_CONSECUTIVE = merge_consecutive
167
+ cfg.INPUT_PATH = input
168
+ cfg.MIN_CONFIDENCE = min_conf
169
+ cfg.SIGMOID_SENSITIVITY = sensitivity
170
+ cfg.SIG_OVERLAP = overlap
171
+ cfg.BANDPASS_FMIN = fmin
172
+ cfg.BANDPASS_FMAX = fmax
173
+ cfg.AUDIO_SPEED = audio_speed
174
+ cfg.RESULT_TYPES = rtype
175
+ cfg.COMBINE_RESULTS = combine_results
176
+ cfg.BATCH_SIZE = bs
177
+
178
+ if not output:
179
+ if os.path.isfile(cfg.INPUT_PATH):
180
+ cfg.OUTPUT_PATH = os.path.dirname(cfg.INPUT_PATH)
181
+ else:
182
+ cfg.OUTPUT_PATH = cfg.INPUT_PATH
183
+ else:
184
+ cfg.OUTPUT_PATH = output
185
+
186
+ if os.path.isdir(cfg.INPUT_PATH):
187
+ cfg.FILE_LIST = collect_audio_files(cfg.INPUT_PATH)
188
+ else:
189
+ cfg.FILE_LIST = [cfg.INPUT_PATH]
190
+
191
+ if os.path.isdir(cfg.INPUT_PATH):
192
+ cfg.CPU_THREADS = threads
193
+ cfg.TFLITE_THREADS = 1
194
+ else:
195
+ cfg.CPU_THREADS = 1
196
+ cfg.TFLITE_THREADS = threads
197
+
198
+ if custom_classifier is not None:
199
+ cfg.CUSTOM_CLASSIFIER = custom_classifier # we treat this as absolute path, so no need to join with dirname
200
+
201
+ if custom_classifier.endswith(".tflite"):
202
+ cfg.LABELS_FILE = custom_classifier.replace(".tflite", "_Labels.txt") # same for labels file
203
+
204
+ if not os.path.isfile(cfg.LABELS_FILE):
205
+ cfg.LABELS_FILE = custom_classifier.replace("Model_FP32.tflite", "Labels.txt")
206
+
207
+ cfg.LABELS = read_lines(cfg.LABELS_FILE)
208
+ else:
209
+ cfg.APPLY_SIGMOID = False
210
+ # our output format
211
+ cfg.LABELS_FILE = os.path.join(custom_classifier, "labels", "label_names.csv")
212
+
213
+ if not os.path.isfile(cfg.LABELS_FILE):
214
+ cfg.LABELS_FILE = os.path.join(custom_classifier, "assets", "label.csv")
215
+ cfg.LABELS = read_lines(cfg.LABELS_FILE)
216
+ else:
217
+ cfg.LABELS = [line.split(",")[1] for line in read_lines(cfg.LABELS_FILE)]
218
+ else:
219
+ cfg.LATITUDE, cfg.LONGITUDE, cfg.WEEK = lat, lon, week
220
+ cfg.CUSTOM_CLASSIFIER = None
221
+
222
+ if cfg.LATITUDE == -1 and cfg.LONGITUDE == -1:
223
+ if not slist:
224
+ cfg.SPECIES_LIST_FILE = None
225
+ else:
226
+ cfg.SPECIES_LIST_FILE = slist
227
+
228
+ if os.path.isdir(cfg.SPECIES_LIST_FILE):
229
+ cfg.SPECIES_LIST_FILE = os.path.join(cfg.SPECIES_LIST_FILE, "species_list.txt")
230
+
231
+ cfg.SPECIES_LIST = read_lines(cfg.SPECIES_LIST_FILE)
232
+ else:
233
+ cfg.SPECIES_LIST_FILE = None
234
+ cfg.SPECIES_LIST = get_species_list(cfg.LATITUDE, cfg.LONGITUDE, cfg.WEEK, cfg.LOCATION_FILTER_THRESHOLD)
235
+
236
+ lfile = os.path.join(
237
+ cfg.TRANSLATED_LABELS_PATH, os.path.basename(cfg.LABELS_FILE).replace(".txt", "_{}.txt".format(locale))
238
+ )
239
+
240
+ if locale not in ["en"] and os.path.isfile(lfile):
241
+ cfg.TRANSLATED_LABELS = read_lines(lfile)
242
+ else:
243
+ cfg.TRANSLATED_LABELS = cfg.LABELS
244
+
245
+ return [(f, cfg.get_config()) for f in cfg.FILE_LIST]