mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-21 00:01:50 +02:00
feat(birdnet-pi): add option for tphakala model v2
This commit is contained in:
@@ -42,6 +42,23 @@ fi
|
||||
# General elements
|
||||
##################
|
||||
|
||||
# Use tphakala model v2 if enabled
|
||||
if bashio::config.true 'Use_tphakala_model_v2'; then
|
||||
echo "... applying tphakala model v2"
|
||||
if [ -d "$HOME/BirdNET-Pi/model/labels_nm" ]; then
|
||||
mv "$HOME/BirdNET-Pi/model/labels_nm" "$HOME/BirdNET-Pi/model/labels_nm2" || bashio::log.warning "Failed to move labels_nm"
|
||||
fi
|
||||
if [ -d "$HOME/BirdNET-Pi/model/labels_go" ]; then
|
||||
mv "$HOME/BirdNET-Pi/model/labels_go" "$HOME/BirdNET-Pi/model/labels_nm" || bashio::log.warning "Failed to move labels_go"
|
||||
fi
|
||||
if [ -f "$HOME/BirdNET-Pi/model/BirdNET_GLOBAL_6K_V2.4_MData_Model_V2_FP16.tflite" ]; then
|
||||
mv "$HOME/BirdNET-Pi/model/BirdNET_GLOBAL_6K_V2.4_MData_Model_V2_FP16.tflite" "$HOME/BirdNET-Pi/model/BirdNET_GLOBAL_6K_V2.4_MData_Model_V2_FP16.tflite2" || bashio::log.warning "Failed to move base model"
|
||||
fi
|
||||
if [ -f "$HOME/BirdNET-Pi/model/BirdNET-Go_classifier.tflite" ]; then
|
||||
mv "$HOME/BirdNET-Pi/model/BirdNET-Go_classifier.tflite" "$HOME/BirdNET-Pi/model/BirdNET_GLOBAL_6K_V2.4_MData_Model_V2_FP16.tflite" || bashio::log.warning "Failed to move Go classifier"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Correct language labels according to birdnet.conf
|
||||
echo "... adapting labels according to birdnet.conf"
|
||||
if export "$(grep "^DATABASE_LANG" /config/birdnet.conf)"; then
|
||||
|
||||
Reference in New Issue
Block a user