-A realtime acoustic bird classification system for the Raspberry Pi 4B, 3B+, and 0W2
+A realtime acoustic bird classification system for the Raspberry Pi 4B, 400, 3B+, and 0W2
@@ -64,9 +64,9 @@ Currently listening in these countries . . . that I know of . . .
- Brazil
## Features
-* 24/7 recording and BirdNET-Lite analysis
-* Automatic extraction of detected data (creating audio clips of detected bird sounds)
-* Spectrograms available for all extractions
+* 24/7 recording and automatic identification of bird songs using BirdNET machine learning
+* Bird sounds are automatically extracted and catalogued
+* Visualize your recorded bird data and analyze trends
* Live audio stream & spectrogram
* Automatic disk space management, where old audio files are periodically purged
* [BirdWeather](https://app.birdweather.com) integration -- you can request a BirdWeather ID from BirdNET-Pi's "Tools" > "Settings" page
@@ -81,7 +81,7 @@ Currently listening in these countries . . . that I know of . . .
* Localization supported
## Requirements
-* A Raspberry Pi 4B, Raspberry Pi 3B+, or Raspberry Pi 0W2 (The 3B+ and 0W2 must run on RaspiOS-ARM64-**Lite**)
+* A Raspberry Pi 4B, Raspberry Pi 400, Raspberry Pi 3B+, or Raspberry Pi 0W2 (The 3B+ and 0W2 must run on RaspiOS-ARM64-**Lite**)
* An SD Card with the **_64-bit version of RaspiOS_** installed (please use Bullseye) -- Lite is recommended, but the installation works on RaspiOS-ARM64-Full as well. Downloads available within the [Raspberry Pi Imager](https://www.raspberrypi.com/software/).
* A USB Microphone or Sound Card
@@ -106,6 +106,7 @@ The BirdNET-Pi can be accessed from any web browser on the same network:
- Password is empty by default. Set this in "Tools" > "Settings" > "Advanced Settings"
Please take a look at the [wiki](https://github.com/mcguirepr89/BirdNET-Pi/wiki) and [discussions](https://github.com/mcguirepr89/BirdNET-Pi/discussions) for information on
+- [BirdNET-Pi's Deep Convolutional Neural Network(s)](https://github.com/mcguirepr89/BirdNET-Pi/wiki/BirdNET-Pi:-some-theory-on-classification-&-some-practical-hints)
- [making your installation public](https://github.com/mcguirepr89/BirdNET-Pi/wiki/Sharing-Your-BirdNET-Pi)
- [backing up and restoring your database](https://github.com/mcguirepr89/BirdNET-Pi/wiki/Backup-and-Restore-the-Database)
- [adjusting your sound card settings](https://github.com/mcguirepr89/BirdNET-Pi/wiki/Adjusting-your-sound-card)
@@ -180,5 +181,10 @@ Current database languages include the list below:
| Thai | 5580 | 87.71% |
| Ukrainian | 646 | 10.15% |
+## Screenshots
+
+
+
+
## :thinking:
Are you a lucky ducky with an extra Raspberry Pi 4B lying around? [Here's an idea!](https://foldingathome.org/alternative-downloads)
diff --git a/birdnet.conf-defaults b/birdnet.conf-defaults
index 9193b9b..e9cbbfb 100644
--- a/birdnet.conf-defaults
+++ b/birdnet.conf-defaults
@@ -6,6 +6,13 @@
SITE_NAME=""
+#--------------------------------- Model --------------------------------------#
+#_____________The variable below configures which BirdNET model is_____________#
+#______________________used for detecting bird audio.__________________________#
+#_It's recommended that you only change these values through the web interface.#
+
+MODEL=BirdNET_6K_GLOBAL_MODEL
+SF_THRESH=0.03
#--------------------- Required: Latitude, and Longitude ----------------------#
diff --git a/homepage/style.css b/homepage/style.css
index b152515..bb2ba6f 100644
--- a/homepage/style.css
+++ b/homepage/style.css
@@ -812,4 +812,8 @@ pre#timer.bash {
line-height:5px;
padding:3px;
background-color:#9fe29b
+}
+
+#ddnewline::before {
+ content: none;
}
\ No newline at end of file
diff --git a/homepage/views.php b/homepage/views.php
index 85f3d84..0544c88 100644
--- a/homepage/views.php
+++ b/homepage/views.php
@@ -6,7 +6,11 @@ $home = shell_exec("awk -F: '/1000/{print $6}' /etc/passwd");
$home = trim($home);
if(!isset($_SESSION['behind'])) {
$fetch = shell_exec("sudo -u".$user." git -C ".$home."/BirdNET-Pi fetch 2>&1");
- $_SESSION['behind'] = trim(shell_exec("sudo -u".$user." git -C ".$home."/BirdNET-Pi status | sed -n '2 p' | cut -d ' ' -f 7"));
+ $str = trim(shell_exec("sudo -u".$user." git -C ".$home."/BirdNET-Pi status"));
+ if (preg_match("/behind '.*?' by (\d+) commit(s?)\b/", $str, $matches)) {
+ $num_commits_behind = $matches[1];
+ $_SESSION['behind'] = $num_commits_behind;
+ }
if(isset($_SESSION['behind'])&&intval($_SESSION['behind']) >= 99) {?>
+
+
+
+
+
+
BirdNET_6K_GLOBAL_MODEL (2020)
+
This model comes from BirdNET-Lite, with bird sound recognition for more than 6,000 species worldwide. This is the default option and will generally work very well for most use cases.
+
BirdNET_GLOBAL_3K_V2.2_Model_FP16 (2022)
+
This model comes from BirdNET-Analyzer, a newer work-in-progress project with aims to improve on the old model. Currently it only supports about 3,500 species worldwide, so for users in North America, this model is generally much more accurate than the above model, but elsewhere it will be less accurate and possibly useless.
+
+
Location
@@ -511,3 +686,4 @@ if(isset($_GET['status'])){
+
diff --git a/scripts/createdb.sh b/scripts/createdb.sh
index 920fe23..4c66ff3 100755
--- a/scripts/createdb.sh
+++ b/scripts/createdb.sh
@@ -15,6 +15,8 @@ CREATE TABLE IF NOT EXISTS detections (
Sens FLOAT,
Overlap FLOAT,
File_Name VARCHAR(100) NOT NULL);
+CREATE INDEX "detections_Com_Name" ON "detections" ("Com_Name");
+CREATE INDEX "detections_Date_Time" ON "detections" ("Date" DESC, "Time" DESC);
EOF
chown $USER:$USER $HOME/BirdNET-Pi/scripts/birds.db
chmod g+w $HOME/BirdNET-Pi/scripts/birds.db
diff --git a/scripts/daily_plot.py b/scripts/daily_plot.py
index 59747f9..d42b76c 100755
--- a/scripts/daily_plot.py
+++ b/scripts/daily_plot.py
@@ -48,6 +48,8 @@ readings = 10
plt_top10_today = (df_plt_today['Com_Name'].value_counts()[:readings])
df_plt_top10_today = df_plt_today[df_plt_today.Com_Name.isin(plt_top10_today.index)]
+if df_plt_top10_today.empty: exit(0)
+
# Set Palette for graphics
pal = "Greens"
diff --git a/scripts/disk_check.sh b/scripts/disk_check.sh
index 743233e..c47c453 100755
--- a/scripts/disk_check.sh
+++ b/scripts/disk_check.sh
@@ -9,6 +9,9 @@ if [ "${used//%}" -ge 95 ]; then
purge) echo "Removing oldest data"
cd ${EXTRACTED}/By_Date/
curl localhost/views.php?view=Species%20Stats &>/dev/null
+ if ! grep -qxFe \#\#start $HOME/BirdNET-Pi/scripts/disk_check_exclude.txt; then
+ exit
+ fi
filestodelete=$(($(find ${EXTRACTED}/By_Date/* -type f | wc -l) / $(find ${EXTRACTED}/By_Date/* -maxdepth 0 -type d | wc -l)))
iter=0
for i in */*/*; do
diff --git a/scripts/install_config.sh b/scripts/install_config.sh
index 09334ad..d69e7d9 100755
--- a/scripts/install_config.sh
+++ b/scripts/install_config.sh
@@ -27,6 +27,14 @@ SITE_NAME="$HOSTNAME"
LATITUDE=$(curl -s4 ifconfig.co/json | jq .latitude)
LONGITUDE=$(curl -s4 ifconfig.co/json | jq .longitude)
+#--------------------------------- Model --------------------------------------#
+#_____________The variable below configures which BirdNET model is_____________#
+#______________________used for detecting bird audio.__________________________#
+#_It's recommended that you only change these values through the web interface.#
+
+MODEL=BirdNET_6K_GLOBAL_MODEL
+SF_THRESH=0.03
+
#--------------------- BirdWeather Station Information -----------------------#
#_____________The variable below can be set to have your BirdNET-Pi____________#
#__________________also act as a BirdWeather listening station_________________#
diff --git a/scripts/install_language_label.sh b/scripts/install_language_label.sh
index 4ba0b27..0129288 100755
--- a/scripts/install_language_label.sh
+++ b/scripts/install_language_label.sh
@@ -23,4 +23,11 @@ unzip -o $HOME/BirdNET-Pi/model/labels_l18n.zip $label_file_name \
&& mv -f $HOME/BirdNET-Pi/model/$label_file_name $HOME/BirdNET-Pi/model/labels.txt \
&& logger "[$0] Changed language label file to '$label_file_name'";
+label_file_name_flickr="labels_en.txt"
+
+unzip -o $HOME/BirdNET-Pi/model/labels_l18n.zip $label_file_name_flickr \
+ -d $HOME/BirdNET-Pi/model \
+ && mv -f $HOME/BirdNET-Pi/model/$label_file_name_flickr $HOME/BirdNET-Pi/model/labels_flickr.txt \
+ && logger "[$0] Set Flickr labels '$label_file_name_flickr'";
+
exit 0
diff --git a/scripts/install_language_label_nm.sh b/scripts/install_language_label_nm.sh
new file mode 100644
index 0000000..4569a0c
--- /dev/null
+++ b/scripts/install_language_label_nm.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+usage() { echo "Usage: $0 -l " 1>&2; exit 1; }
+
+while getopts "l:" o; do
+ case "${o}" in
+ l)
+ lang=${OPTARG}
+ ;;
+ *)
+ usage
+ ;;
+ esac
+done
+shift $((OPTIND-1))
+
+HOME=$(awk -F: '/1000/ {print $6}' /etc/passwd)
+
+label_file_name="labels_${lang}.txt"
+
+unzip -o $HOME/BirdNET-Pi/model/labels_nm.zip $label_file_name \
+ -d $HOME/BirdNET-Pi/model \
+ && mv -f $HOME/BirdNET-Pi/model/$label_file_name $HOME/BirdNET-Pi/model/labels.txt \
+ && logger "[$0] Changed language label file to '$label_file_name'";
+
+label_file_name_flickr="labels_en.txt"
+
+unzip -o $HOME/BirdNET-Pi/model/labels_nm.zip $label_file_name_flickr \
+ -d $HOME/BirdNET-Pi/model \
+ && mv -f $HOME/BirdNET-Pi/model/$label_file_name_flickr $HOME/BirdNET-Pi/model/labels_flickr.txt \
+ && logger "[$0] Set Flickr labels '$label_file_name_flickr'";
+
+exit 0
diff --git a/scripts/play.php b/scripts/play.php
index c211840..e4c020e 100644
--- a/scripts/play.php
+++ b/scripts/play.php
@@ -398,6 +398,11 @@ if($statement2 == False){
header("refresh: 0;");
}
$result2 = $statement2->execute();
+$num_rows = 0;
+while ($result2->fetchArray(SQLITE3_ASSOC)) {
+ $num_rows++;
+}
+$result2->reset(); // reset the pointer to the beginning of the result set
echo "