Model Update: V2.4
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.
BIN
Binary file not shown.
+753
-593
File diff suppressed because it is too large
Load Diff
Binary file not shown.
+4
-4
@@ -150,7 +150,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.3_Model_FP16"){
|
if($model == "BirdNET_GLOBAL_6K_V2.4_Model_FP16"){
|
||||||
// Install new language label file
|
// Install new language label file
|
||||||
syslog_shell_exec("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("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 {
|
||||||
@@ -334,7 +334,7 @@ if (file_exists($home.'/BirdNET-Pi/scripts/thisrun.txt')) {
|
|||||||
<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.3_Model_FP16"){
|
if(this.value == "BirdNET_GLOBAL_6K_V2.4_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";
|
||||||
@@ -366,7 +366,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.3_Model_FP16");
|
$models = array("BirdNET_6K_GLOBAL_MODEL", "BirdNET_GLOBAL_6K_V2.4_Model_FP16");
|
||||||
foreach($models as $modelName){
|
foreach($models as $modelName){
|
||||||
$isSelected = "";
|
$isSelected = "";
|
||||||
if($config['MODEL'] == $modelName){
|
if($config['MODEL'] == $modelName){
|
||||||
@@ -483,7 +483,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.3_Model_FP16 (2023)</dt><br>
|
<dt>BirdNET_GLOBAL_6K_V2.4_Model_FP16 (2023)</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
@@ -72,7 +72,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.3_Model_FP16 (new) or BirdNET_6K_GLOBAL_MODEL (old)
|
# model will either be BirdNET_GLOBAL_6K_V2.4_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()
|
||||||
@@ -278,7 +278,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.3_Model_FP16":
|
if model == "BirdNET_GLOBAL_6K_V2.4_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)
|
||||||
|
|
||||||
@@ -593,7 +593,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.3_Model_FP16":
|
if model == "BirdNET_GLOBAL_6K_V2.4_Model_FP16":
|
||||||
post_algorithm = "\"algorithm\": " + "\"2p3\"" + ","
|
post_algorithm = "\"algorithm\": " + "\"2p3\"" + ","
|
||||||
else:
|
else:
|
||||||
post_algorithm = "\"algorithm\": " + "\"alpha\"" + ","
|
post_algorithm = "\"algorithm\": " + "\"alpha\"" + ","
|
||||||
|
|||||||
@@ -225,9 +225,9 @@ fi
|
|||||||
|
|
||||||
if grep -q '^MODEL=BirdNET_GLOBAL_3K_V2.2_Model_FP16$' /etc/birdnet/birdnet.conf;then
|
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)
|
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
|
sed -i 's/BirdNET_GLOBAL_3K_V2.2_Model_FP16/BirdNET_GLOBAL_6K_V2.4_Model_FP16/' /etc/birdnet/birdnet.conf
|
||||||
sed -i 's/BirdNET_GLOBAL_3K_V2.2_Model_FP16/BirdNET_GLOBAL_3K_V2.3_Model_FP16/' $HOME/BirdNET-Pi/scripts/thisrun.txt
|
sed -i 's/BirdNET_GLOBAL_3K_V2.2_Model_FP16/BirdNET_GLOBAL_6K_V2.4_Model_FP16/' $HOME/BirdNET-Pi/scripts/thisrun.txt
|
||||||
sed -i 's/BirdNET_GLOBAL_3K_V2.2_Model_FP16/BirdNET_GLOBAL_3K_V2.3_Model_FP16/' $HOME/BirdNET-Pi/birdnet.conf
|
sed -i 's/BirdNET_GLOBAL_3K_V2.2_Model_FP16/BirdNET_GLOBAL_6K_V2.4_Model_FP16/' $HOME/BirdNET-Pi/birdnet.conf
|
||||||
cp -f $HOME/BirdNET-Pi/model/labels.txt $HOME/BirdNET-Pi/model/labels.txt.old
|
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"
|
sudo chmod +x $HOME/BirdNET-Pi/scripts/install_language_label_nm.sh && $HOME/BirdNET-Pi/scripts/install_language_label_nm.sh -l "$language"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user