Model Update: V2.3
note for me:
for f in BirdNET_GLOBAL_3K_V2.3_Labels_*.txt; do mv -- "$f" "labels_${f#BirdNET_GLOBAL_3K_V2.3_Labels_}"; done
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@
|
|||||||
*.pyc
|
*.pyc
|
||||||
*.flac
|
*.flac
|
||||||
.vscode
|
.vscode
|
||||||
model/*
|
|
||||||
datasets/
|
datasets/
|
||||||
birdnet.conf
|
birdnet.conf
|
||||||
IdentifiedSoFar.txt
|
IdentifiedSoFar.txt
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4
-4
@@ -120,7 +120,7 @@ if(isset($_GET["latitude"])){
|
|||||||
// Archive old language file
|
// Archive old language file
|
||||||
syslog_shell_exec("cp -f $home/BirdNET-Pi/model/labels.txt $home/BirdNET-Pi/model/labels.txt.old", $user);
|
syslog_shell_exec("cp -f $home/BirdNET-Pi/model/labels.txt $home/BirdNET-Pi/model/labels.txt.old", $user);
|
||||||
|
|
||||||
if($model == "BirdNET_GLOBAL_3K_V2.2_Model_FP16"){
|
if($model == "BirdNET_GLOBAL_3K_V2.3_Model_FP16"){
|
||||||
// Install new language label file
|
// Install new language label file
|
||||||
syslog_shell_exec("sudo chmod +x $home/BirdNET-Pi/scripts/install_language_label_nm.sh && $home/BirdNET-Pi/scripts/install_language_label_nm.sh -l $language", $user);
|
syslog_shell_exec("sudo chmod +x $home/BirdNET-Pi/scripts/install_language_label_nm.sh && $home/BirdNET-Pi/scripts/install_language_label_nm.sh -l $language", $user);
|
||||||
} else {
|
} else {
|
||||||
@@ -325,7 +325,7 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
|||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
document.getElementById('modelsel').addEventListener('change', function() {
|
document.getElementById('modelsel').addEventListener('change', function() {
|
||||||
if(this.value == "BirdNET_GLOBAL_3K_V2.2_Model_FP16"){
|
if(this.value == "BirdNET_GLOBAL_3K_V2.3_Model_FP16"){
|
||||||
document.getElementById("soft").style.display="unset";
|
document.getElementById("soft").style.display="unset";
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("soft").style.display="none";
|
document.getElementById("soft").style.display="none";
|
||||||
@@ -357,7 +357,7 @@ function sendTestNotification(e) {
|
|||||||
<label for="model">Select a Model: </label>
|
<label for="model">Select a Model: </label>
|
||||||
<select id="modelsel" name="model">
|
<select id="modelsel" name="model">
|
||||||
<?php
|
<?php
|
||||||
$models = array("BirdNET_6K_GLOBAL_MODEL", "BirdNET_GLOBAL_3K_V2.2_Model_FP16");
|
$models = array("BirdNET_6K_GLOBAL_MODEL", "BirdNET_GLOBAL_3K_V2.3_Model_FP16");
|
||||||
foreach($models as $modelName){
|
foreach($models as $modelName){
|
||||||
$isSelected = "";
|
$isSelected = "";
|
||||||
if($config['MODEL'] == $modelName){
|
if($config['MODEL'] == $modelName){
|
||||||
@@ -473,7 +473,7 @@ function runProcess() {
|
|||||||
<dt>BirdNET_6K_GLOBAL_MODEL (2020)</dt><br>
|
<dt>BirdNET_6K_GLOBAL_MODEL (2020)</dt><br>
|
||||||
<dd id="ddnewline">This is the BirdNET-Lite model, with bird sound recognition for more than 6,000 species worldwide. This is the default option and will generally work very for people in most of the world.</dd>
|
<dd id="ddnewline">This is the BirdNET-Lite model, with bird sound recognition for more than 6,000 species worldwide. This is the default option and will generally work very for people in most of the world.</dd>
|
||||||
<br>
|
<br>
|
||||||
<dt>BirdNET_GLOBAL_3K_V2.2_Model_FP16 (2022)</dt><br>
|
<dt>BirdNET_GLOBAL_3K_V2.3_Model_FP16 (2022)</dt><br>
|
||||||
<dd id="ddnewline">This is the BirdNET-Analyzer model, a newer work-in-progress project with aims to improve on the BirdNET-Lite model. Currently it only supports about 3,500 species worldwide, meaning for some regions (North America, Europe, Australia) it will usually outperform the BirdNET-Lite model, but for other regions it will be worse.</dd><br>
|
<dd id="ddnewline">This is the BirdNET-Analyzer model, a newer work-in-progress project with aims to improve on the BirdNET-Lite model. Currently it only supports about 3,500 species worldwide, meaning for some regions (North America, Europe, Australia) it will usually outperform the BirdNET-Lite model, but for other regions it will be worse.</dd><br>
|
||||||
<dt>[ In-depth technical write-up on the models <a target="_blank" href="https://github.com/mcguirepr89/BirdNET-Pi/wiki/BirdNET-Pi:-some-theory-on-classification-&-some-practical-hints">here</a> ]</dt>
|
<dt>[ In-depth technical write-up on the models <a target="_blank" href="https://github.com/mcguirepr89/BirdNET-Pi/wiki/BirdNET-Pi:-some-theory-on-classification-&-some-practical-hints">here</a> ]</dt>
|
||||||
</dl>
|
</dl>
|
||||||
|
|||||||
+3
-3
@@ -71,7 +71,7 @@ def loadModel():
|
|||||||
print('LOADING TF LITE MODEL...', end=' ')
|
print('LOADING TF LITE MODEL...', end=' ')
|
||||||
|
|
||||||
# Load TFLite model and allocate tensors.
|
# Load TFLite model and allocate tensors.
|
||||||
# model will either be BirdNET_GLOBAL_3K_V2.2_Model_FP16 (new) or BirdNET_6K_GLOBAL_MODEL (old)
|
# model will either be BirdNET_GLOBAL_3K_V2.3_Model_FP16 (new) or BirdNET_6K_GLOBAL_MODEL (old)
|
||||||
modelpath = userDir + '/BirdNET-Pi/model/'+model+'.tflite'
|
modelpath = userDir + '/BirdNET-Pi/model/'+model+'.tflite'
|
||||||
myinterpreter = tflite.Interpreter(model_path=modelpath, num_threads=2)
|
myinterpreter = tflite.Interpreter(model_path=modelpath, num_threads=2)
|
||||||
myinterpreter.allocate_tensors()
|
myinterpreter.allocate_tensors()
|
||||||
@@ -272,7 +272,7 @@ def analyzeAudioData(chunks, lat, lon, week, sensitivity, overlap,):
|
|||||||
start = time.time()
|
start = time.time()
|
||||||
print('ANALYZING AUDIO...', end=' ', flush=True)
|
print('ANALYZING AUDIO...', end=' ', flush=True)
|
||||||
|
|
||||||
if model == "BirdNET_GLOBAL_3K_V2.2_Model_FP16":
|
if model == "BirdNET_GLOBAL_3K_V2.3_Model_FP16":
|
||||||
if len(PREDICTED_SPECIES_LIST) == 0 or len(INCLUDE_LIST) != 0:
|
if len(PREDICTED_SPECIES_LIST) == 0 or len(INCLUDE_LIST) != 0:
|
||||||
predictSpeciesList(lat,lon,week)
|
predictSpeciesList(lat,lon,week)
|
||||||
|
|
||||||
@@ -584,7 +584,7 @@ def handle_client(conn, addr):
|
|||||||
post_commonName = "\"commonName\": \"" + entry[0].split('_')[1].split("/")[0] + "\","
|
post_commonName = "\"commonName\": \"" + entry[0].split('_')[1].split("/")[0] + "\","
|
||||||
post_scientificName = "\"scientificName\": \"" + entry[0].split('_')[0] + "\","
|
post_scientificName = "\"scientificName\": \"" + entry[0].split('_')[0] + "\","
|
||||||
|
|
||||||
if model == "BirdNET_GLOBAL_3K_V2.2_Model_FP16":
|
if model == "BirdNET_GLOBAL_3K_V2.3_Model_FP16":
|
||||||
post_algorithm = "\"algorithm\": " + "\"2p2\"" + ","
|
post_algorithm = "\"algorithm\": " + "\"2p2\"" + ","
|
||||||
else:
|
else:
|
||||||
post_algorithm = "\"algorithm\": " + "\"alpha\"" + ","
|
post_algorithm = "\"algorithm\": " + "\"alpha\"" + ","
|
||||||
|
|||||||
@@ -214,5 +214,13 @@ if ! grep LogLevel_SpectrogramViewerService /etc/birdnet/birdnet.conf &>/dev/nul
|
|||||||
sudo -u$USER echo "LogLevel_SpectrogramViewerService=\"error\"" >> /etc/birdnet/birdnet.conf
|
sudo -u$USER echo "LogLevel_SpectrogramViewerService=\"error\"" >> /etc/birdnet/birdnet.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if grep -q '^MODEL=BirdNET_GLOBAL_3K_V2.2_Model_FP16$' /etc/birdnet/birdnet.conf;then
|
||||||
|
language=$(grep "^DATABASE_LANG=" /etc/birdnet/birdnet.conf | cut -d= -f2)
|
||||||
|
sed -i 's/BirdNET_GLOBAL_3K_V2.2_Model_FP16/BirdNET_GLOBAL_3K_V2.3_Model_FP16/' /etc/birdnet/birdnet.conf
|
||||||
|
cp -f $home/BirdNET-Pi/model/labels.txt $home/BirdNET-Pi/model/labels.txt.old
|
||||||
|
sudo chmod +x $home/BirdNET-Pi/scripts/install_language_label_nm.sh && $home/BirdNET-Pi/scripts/install_language_label_nm.sh -l "$language"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
restart_services.sh
|
restart_services.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user