added support for a custom_species_list.txt file

Added confidence score to extraction file
This commit is contained in:
Patrick McGuire
2021-09-29 17:23:35 -04:00
parent 130901c680
commit 9c185d49a2
2 changed files with 18 additions and 3 deletions
+13 -2
View File
@@ -2,6 +2,7 @@
# Runs BirdNET in virtual environment
#set -x
source /etc/birdnet/birdnet.conf
CUSTOM_LIST="/home/pi/BirdNET-Lite/custom_species_list.txt"
DAYS=(
"2 days ago"
"yesterday"
@@ -47,7 +48,7 @@ run_analysis() {
WEEK=$(date --date="${2}" +"%U")
cd ${HOME}/BirdNET-Lite || exit 1
for i in "${files[@]}";do
if [ -f ${1}/${i} ];then
if [ -f ${1}/${i} ] && [ ! -f ${CUSTOM_LIST} ];then
python3 analyze.py \
--i "${1}/${i}" \
--o "${1}/${i}.csv" \
@@ -56,7 +57,17 @@ run_analysis() {
--week "${WEEK}" \
--overlap "${OVERLAP}" \
--min_conf "${CONFIDENCE}"
fi
elif [ -f ${1}/${i} ] && [ -f ${CUSTOM_LIST} ];then
python3 analyze.py \
--i "${1}/${i}" \
--o "${1}/${i}.csv" \
--lat "${LATITUDE}" \
--lon "${LONGITUDE}" \
--week "${WEEK}" \
--overlap "${OVERLAP}" \
--min_conf "${CONFIDENCE}" \
--custom_list "${CUSTOM_LIST}"
fi
done
}