Giter VIP home page Giter VIP logo

mcguirepr89 / birdnet-pi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kahst/birdnet-lite

1.2K 1.2K 134.0 256.31 MB

A realtime acoustic bird classification system for the Raspberry Pi 4B, 3B+, and 0W2 built on the TFLite version of BirdNET.

License: Other

Python 4.37% Shell 4.76% PHP 55.43% HTML 1.34% CSS 0.98% JavaScript 33.13%
birdnet birds birdsong-recognition birdsong-spectrogram tensorflowlite

birdnet-pi's Introduction

  • 👋 Hi, I’m @mcguirepr89
  • 👀 I’m interested in all things Linux, especially Raspberry Pis

birdnet-pi's People

Contributors

bogey3 avatar caiusx avatar cgomesu avatar croisez avatar dd4wh avatar drbazuk avatar ehpersonal38 avatar jaredb7 avatar jmherbst avatar joberreiter avatar joeweiss avatar jurriaan avatar kahst avatar knmurphy avatar lamkin avatar lloydbayley avatar lpmi-13 avatar mburrough avatar mcguirepr89 avatar nachtzuster avatar normanras avatar patrikbwi avatar pencotts avatar phaeton avatar phillprice avatar saintaardvark avatar srd424 avatar statik avatar timsterc avatar wrightrocket avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

birdnet-pi's Issues

minor issue: format of no. of detections

grafik

I noticed that the no. of detections is formatted as "2e+x" when it exceeds 100.
It would be desirable to have the no. of detections (for each hour) stated as "124", instead of "2e+024"

Wikipedia & AllAboutBirds links should use Scientific name

Patrick, thanks so much for the new version!!! The links are really awesome and very useful!
Please use Scientific names, because non-English Common name links lead to dead links if directed to Wikipedia.org.

I changed this line in stats.php to:

<td><a href=\"https://de.wikipedia.org/wiki/$dbsciname\" target=\"top\"/>Wikipedia</a>, <a href=\"https://allaboutbirds.org/guide/$dbsciname\" target=\"top\"/>All About Birds</a></td>

In the longterm it would be good to use dynamic Wikipedia links with the language indicated, see above for hardcoded German version . . . de.wikipedia.org

## Feature requests and todos

Feature requests and todos

I'm trying to keep the feature requests in one place so that I don't lose track of them. If you don't see your previously mentioned feature request below, please comment and let me know so that I will add it and it will not be forgotten nor overlooked -- thank you

  • Link recordings and spectrograms to database view #125
  • API access to database and data #125
  • Offload to USB -- possibly already remedied by having the File Manager? Still no USB to test with 😐 #57
  • DropIns directory for adding recordings to analysis service #118
  • Urban, Suburban, and Field (Research) options #115
  • Automatic/Dynamic include_species_list.txt by region -- possible utilizing eBird grid data #125 (comment)
  • New documentation for most things
  • New mobile.html
  • Add translations for web pages and tool to switch to them
  • Indicate false positive detections in database #125
  • Easy navigation to historical chart data (URL/Charts for now) #125
  • 1 extraction per detection (keep highest confidence score) #106
  • Have daily_plot.py read from database (scheduled for this weekend)
  • analyze.py read from stream / prevent model rebuilding in analyze.py on its way #125 (comment)
  • BirdWeather ID request form email template @timsterc
  • Build out first_boot.html

Originally posted by @mcguirepr89 in #125 (comment)

Read from a "not_these.list"

Hi @ALL, but also @CaiusX, my go-to pythonisto --
For our purposes, I think it would be best if the analyze.py script were able to read from a not_these.list -- I won't be refering to any blacklist nor any whitelist out of principled consideration, so please join me in using the appropriate phrasing when referring to this list.

As helpful as having the custom_species.txt list is in telling BirdNET-Pi which species it should consider for predictions, I think it would be equally helpful if we could set up a list that inverts that wish to tell BirdNET-Pi which species it should not consider for predictions. I imagine this process simply involves looking closer at the code for how the custom_species.txt list is used and replicate that for a not_these.list.

If this is something you've experimented with, or can easily whip this up, that would be awesome! Otherwise, I'll update you here with my attempts at getting this working s0 we can add ourselves to these lists (the African Penguin, the Trumpeter Swan, and my girlfriend's laptop keyboard, the Turkey Vulture)
TTFN!

Can not find module "pytz" when analyzing spectrograms

My newly installed system is now up and running and I get spectrograms. However, no analysis results and when I checked the BirdNET-Lite log I see the following error message:

Traceback (most recent call last):
  File "analyze.py", line 25, in <module>
    import pytz
ModuleNotFoundError: No module named 'pytz'
RECORDING_LENGTH set to 15
python3 analyze.py --i /home/pi/BirdSongs/december-2021/08-onsdag/2021-12-08-birdnet-13:59:57.wav --o /home/pi/BirdSongs/december-2021/08-onsdag/2021-12-08-birdnet-13:59:57.wav.csv --lat 59.253 --lon 18.248 --week 46 --overlap 0.0 --sensitivity 1.25 --min_conf 0.7

Google says there is something with Python time zone stuff and I have tried to run the install commands "sudo pip install pytz" and "sudo pip3 install pytz" without any result, not even after reboot. I do not want to take a chance and dig too deep into the system because I am now eager to make this exciting system work.

BirdNET-Pi behind a reverse proxy?

Is it possible to disable or bypass the .local function? I guess this is the cause of the problem I have. I have several other web servers in my network and therefore use reverse proxy in my Synology NAS to direct calls from the Internet correctly, because in the router you can only control calls on one port to a specific server. This function requires that you enter an IP address and port number on the local network, a regular URL is not accepted. I have tried to enter both IP address and regular URL in the BirdNET-Pi configuration, but nothing works. So what I want is for the web server to respond to the local IP address instead of birdnetpi.local. I hope there is a solution to this.

Feature request: extractions of same length as recordings

Hi Patrick, I am still very happy with BirdNET-Pi and it is a very valuable tool for me in monitoring Pygmy Owls, as you know. I discovered they are more active in Janauary than in March (where most of the monitoring is regularly done) . . . :-) and my remote BirdNET-pi has been running successfully since November 2021 now!

This is a request for a "new"/modified feature:

  • if EXTRACTION_LENGTH is equal to RECORDING_LENGTH, I would like BirdNET-Pi to only "extract" the original recordings, not more
  • my standard setting is to set both values to 30 seconds: at the moment. However, this results in several redundant ("overlapping") recordings. But I would like to have extracted recordings that do not have the same audio in common. So, the best and easiest would be to just take the original recording (of 30sec length in my case) and save this as the "extractions", even if there is only one call in one of the original recordings
  • This behaviour could/should be available by setting a software switch in birdnet.conf

This would be awesome, if you could implement it! I tried to fiddle with the script file extract_new_birdsound.sh line 115ff., but my knowledge in shell script language is very poor, so your help would be very much appreciated !

Best regards, Frank DD4WH

Date of "Detected species" with max confidence score

In the "Databse view" there is a table with species sorted by maximum confidence scores, called "Detected species"

It seems the date for those events with max confidence score is not properly retrieved from the data base.
In my case, it uses a date/time where there are no extracted recordings of that particular species.

Hmm, the more I investigate this, I get the impression, it is a feature of the automatic deleting of files!
I did not know that the extracted files get deleted too! I do not think this is useful, but will think about this.

add sensitivity to parameters

Hi Patrick,

not sure about this, but my impression is, that the BirdNET-Lite system is started without setting the "sensitivity" parameter, which I think is a quite important one for the user to set.

So, I propose adding this to the config file.

I made a test with adding the SENSITIVITY variable to the birdnet_analysis.sh and according to the log it seems to work fine:

SENSITIVITY=1.25
cd ${HOME}/BirdNET-Lite || exit 1
for i in "${files[@]}";do
if [ -f ${1}/${i} ] && [ ! -f ${CUSTOM_LIST} ];then
set -x
python3 analyze.py
--i "${1}/${i}"
--o "${1}/${i}.csv"
--lat "${LATITUDE}"
--lon "${LONGITUDE}"
--week "${WEEK}"
--overlap "${OVERLAP}"
--min_conf "${CONFIDENCE}"
--sensitivity "${SENSITIVITY}"

Second System Crash - Low priority

Hi @mcguirepr89

My "second system"'s BirdNET-Pi crashed yesterday at around 14h27 my time.

The system is on a 32GB SD card - & seems to have around 12GB free disk space so memory isn't the problem. Its the original 0.9 installation with PiSound HAT mods and with PIV2 camera attached & live video feed window open.

It was running unattended headless with video streaming.

I don't think this is a high priority to get right before 0.10 release as its probably something to do with my "special needs" PiSound HAT & Video.

I have left it exactly as is if you want to dig through logs to see why.

nx://169.0.72.134:22684

Mail me for the pw if needed :).

Best
Dennis

DHCPCD Probleme

Dear Patrick, i have another problem with the internet.

The RPi says 'connection to dhcpcd lost' and woth the command 'sudo dhcpcd - 4' i can connect with the network manager and then i can connect to the website.
With the control 'journalctl -fu birdnet_analysis' i see the RPi working.

grafik
grafik
After that, wlan0 is still in preinit
grafik

Soundscape POST Response Status - 413

Hi, @timsterc!

I can't believe I haven't tested this yet, but it seems like recording lengths at and above 45 seconds are not posting to app.BirdWeather.com properly. Update: 42 seconds and less are POSTing without issue 👍

This error appears right after writing to the database when detections above the minimum confidence occur -- it appears the response from the POST from your nginx server is that the "Request Entity" size is too large.

Soundscape POST Response Status -  413
Exception in thread Thread-11:
Traceback (most recent call last):
  File "/home/pi/BirdNET-Pi/birdnet/lib/python3.9/site-packages/requests/models.py", line 910, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/BirdNET-Pi/./scripts/server.py", line 382, in handle_client
    sdata = response.json()
  File "/home/pi/BirdNET-Pi/birdnet/lib/python3.9/site-packages/requests/models.py", line 917, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Expecting value] <html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx/1.18.0 (Ubuntu)</center>
</body>
</html>
: 0

I'm thinking there is a way to handle this somewhere -- perhaps on the server side in nginx's allowable header size limit, or in the code itself, chopping the audio and spectrograms into smaller POSTs??

Anywho, let me know what else I can provide for you, or if this needs to be a hard limit when having BirdWeather enabled.

My best,
Patrick!

Image download in species stats

Just discovered the following:

grafik

Two things to notice: The lookup should return a picture of Pica pica (Eurasian Magpie) not Pica mauritanica (Maghreb magpie). But the screenshot actually shows Cittarium pica (a shell species).

Second LAN IP and some errors

Good morning! My second Pi 3B now shows some errors. It seems that the cooling is bad, but however, I wonder why there is this second LAN IP. It should only use 192.168.1.6 and not 192.168.1.150. Both of my Pi 3B should run the same version of birdnetpi updated yesterday. Don't know if the other errors are a real issue or if it's just because of bad cooling. I am going to change the cooling pad and look what happens.

/usr/local/bin/extra_info.sh - /usr/local/bin/extra_info.sh: line 33: [: -eq: unary operator expected
/usr/local/bin/extra_info.sh: line 36: [: -eq: unary operator expected
Return value: 0

./xml.php on line 39
./includes/output/class.WebpageXML.inc.php on line 203 in function getJsonString()
./includes/output/class.WebpageXML.inc.php on line 190 in function getXMLString()
./includes/xml/class.XML.inc.php on line 884 in function getXml()
./includes/xml/class.XML.inc.php on line 873 in function _buildXml()
./includes/xml/class.XML.inc.php on line 909 in function _buildPlugins()
./plugins/viewer/class.viewer.inc.php on line 63 in function execute()
./includes/class.CommonFunctions.inc.php on line 293 in function executeProgram( "extra_info.sh", "", "........................................IPs.....................................\nLAN IP: 192.168.1.150\nPublic IP: 46.89.145.102\n..................................`vcgencmd stats`..............................\nthrottled=0x20002\nBinary: 100000000000000010\n100000000000000010\nISSUES DETECTED\nArm frequency capped\nArm frequency capping has occurred\n....................................Clock Speeds................................\narm:\tfrequency(48)=1087000000\ncore:\tfrequency(1)=400000000\nh264:\tfrequency(28)=0\nisp:\tfrequency(45)=0\nv3d:\tfrequency(46)=300000000\nuart:\tfrequency(22)=47999000\npwm:\tfrequency(25)=100000000\nemmc:\tfrequency(50)=200000000\npixel:\tfrequency(29)=337000\nvec:\tfrequency(10)=108000000\nhdmi:\tfrequency(0)=0\ndpi:\tfrequency(4)=0\n........................................Volts...................................\ncore:\tvolt=1.3188V\nsdram_c:\tvolt=1.2000V\nsdram_i:\tvolt=1.2000V\nsdram_p:\tvolt=1.2250V\n.....................................Caddyfile..................................\nhttp://localhost http://birdnetpi.local http://192.168.1.6 {\n root * /home/pi/BirdSongs/Extracted\n file_server browse\n basicauth /Processed* {\n birdnet JDJhJDE0JDFhNDU3NUtLL1d2Q20zZFlkWG9Eci5ZLnY0dEltN3hFWFBwb3poMUNaUWVVeE5BMXFFVi9L\n }\n basicauth /scripts* {\n birdnet JDJhJDE0JDFhNDU3NUtLL1d2Q20zZFlkWG9Eci5ZLnY0dEltN3hFWFBwb3poMUNaUWVVeE5BMXFFVi9L\n }\n basicauth /stream {\n birdnet JDJhJDE0JDFhNDU3NUtLL1d2Q20zZFlkWG9Eci5ZLnY0dEltN3hFWFBwb3poMUNaUWVVeE5BMXFFVi9L\n }\n basicauth /phpsysinfo* {\n birdnet JDJhJDE0JDFhNDU3NUtLL1d2Q20zZFlkWG9Eci5ZLnY0dEltN3hFWFBwb3poMUNaUWVVeE5BMXFFVi9L\n }\n reverse_proxy /stream localhost:8000\n php_fastcgi unix//run/php/php7.4-fpm.sock\n}\n.................................... Crontab....................................\n\nSHELL=/bin/sh\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n\n17 *\t* * *\troot cd / && run-parts --report /etc/cron.hourly\n25 6\t* * *\troot\ttest -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )\n47 6\t* * 7\troot\ttest -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )\n52 6\t1 * *\troot\ttest -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )\n*/5 * * * * pi /usr/local/bin/disk_check.sh &> /dev/null\n*/3 * * * * pi /usr/local/bin/cleanup.sh &> /dev/null\n@reboot pi /usr/local/bin/cleanup.sh &> /dev/null" )

Feature request: Removable USB Storage

I am looking for the audio files that have been recorded in the last two days, but I could not find them.

  • /BirdSongs/Extracted/Processed does not contain any files
  • /BirdSongs/Processed does only contain a collection of some files recorded during the day
  • there seems to be some kind of bug in the calculation of which files are being deleted in the "ring buffer" ?
  • But maybe I have misinterpreted that ALL the recordings of the last 48 hours are being preserved?

systemd[1]: birdnet_analysis.service: Scheduled restart job, restart counter is at 24.

I noticed these strange log and my swap file being 100% in use on my pi 3B. Might have something to do with that I just put the Pi 4B SD card into the pi 3B and forgot about the desktop environment, which is installed on SD. But I configured the pi not to boot into desktop. I restarted the pi, but the same log entries occur, but at least the swap file is only being used 3%, then. Restarted services, but again those log entries.

-- Journal begins at Mon 2022-02-14 01:24:09 CET. --
18:06:47 systemd[1]: birdnet_analysis.service: Scheduled restart job, restart counter is at 24.
18:06:47 systemd[1]: Stopped BirdNET Analysis.
18:06:47 systemd[1]: Started BirdNET Analysis.
18:06:48 birdnet_analysis.sh[2770]: Wed 16 Feb 18:06:48 CET 2022
18:06:48 systemd[1]: birdnet_analysis.service: Succeeded.
18:06:51 systemd[1]: birdnet_analysis.service: Scheduled restart job, restart counter is at 25.
18:06:51 systemd[1]: Stopped BirdNET Analysis.
18:06:51 systemd[1]: Started BirdNET Analysis.
18:06:52 birdnet_analysis.sh[2833]: Wed 16 Feb 18:06:52 CET 2022
18:06:52 systemd[1]: birdnet_analysis.service: Succeeded.
18:06:54 systemd[1]: birdnet_analysis.service: Scheduled restart job, restart counter is at 26.
18:06:54 systemd[1]: Stopped BirdNET Analysis.
18:06:54 systemd[1]: Started BirdNET Analysis.
18:06:55 birdnet_analysis.sh[2872]: Wed 16 Feb 18:06:55 CET 2022
18:06:55 systemd[1]: birdnet_analysis.service: Succeeded.
18:06:57 systemd[1]: birdnet_analysis.service: Scheduled restart job, restart counter is at 27.
18:06:57 systemd[1]: Stopped BirdNET Analysis.
18:06:57 systemd[1]: Started BirdNET Analysis.
18:06:59 birdnet_analysis.sh[2919]: Wed 16 Feb 18:06:59 CET 2022
18:06:59 systemd[1]: birdnet_analysis.service: Succeeded.
18:07:01 systemd[1]: birdnet_analysis.service: Scheduled restart job, restart counter is at 28.
18:07:01 systemd[1]: Stopped BirdNET Analysis.
18:07:01 systemd[1]: Started BirdNET Analysis.
18:07:02 birdnet_analysis.sh[2971]: Wed 16 Feb 18:07:02 CET 2022
18:07:02 systemd[1]: birdnet_analysis.service: Succeeded.
18:07:04 systemd[1]: birdnet_analysis.service: Scheduled restart job, restart counter is at 29.
18:07:04 systemd[1]: Stopped BirdNET Analysis.
18:07:04 systemd[1]: Started BirdNET Analysis.
18:07:05 birdnet_analysis.sh[3021]: Wed 16 Feb 18:07:05 CET 2022
18:07:05 systemd[1]: birdnet_analysis.service: Succeeded.
18:07:07 systemd[1]: birdnet_analysis.service: Scheduled restart job, restart counter is at 30.
18:07:07 systemd[1]: Stopped BirdNET Analysis.
18:07:07 systemd[1]: Started BirdNET Analysis.
18:07:08 birdnet_analysis.sh[3066]: Wed 16 Feb 18:07:08 

Can it run on RPi 3?

Hi,

I'm wondering if you think this could run on RPi 3? If so, would it require difficult changes?

Thanks!

Microphone recommendation

Hi! Great project! We are setting up a pi here in Norway.

I was wondering if you have a recommendation on a good enough usb microphone to use for capturing bird song.

Thank you!

Birdnet log and web terminal link

The links I provided for birdnet log and web terminal in the settings seem not to be taken by birdnetpi. I ran the following commands via SSH, as you recommended: stop_core_services.sh && update_birdnet.sh && restart_services.sh
After this I checked the menu.html and it still uses the old link, which is in my case https://birdnetgv.ddnss.de:8080

Local webserver

Hi, I have just set up birdnet-pi and there seems to be a problem with the local webserver. It does not show anything any more. At first startup it was okay, but still no recordings (of course). After updating and restart the problem occured. It's the same from my PC and on birdnet-pi, so it shouldn't be a network issue. I did not investigate much by now.

Experimenting with RPi Zero 2W

Patrick, thanks again for the accurate installation guide for RPi Zero 2W. HERE
I open this issue to have a place specifically for feedback on how BirdNET-Pi v0.11 (forms branch) is performing on this hardware. Feel free to close this issue or move it to another -more appropriate- place :-).

These are my experiences running BirdNET-Pi for half a day now (changed overlap to 0.5 and min conf to 0.5, language to german, set appropriate URL IP adress to successfully connect via Android phone):

  • BirdNET-Pi works well and seems to keep up with analysing the files in the first hour or so
  • when the Pi heats up, it reaches about 60 degrees Celsius and the load for the four processors goes up
  • however, that does not influence the time for the TFlite analysis which seems to stay at about 12 seconds for a 30 second recording
  • compared to BirdNET-Pi on RPi4B and RPi3B+, the web interface is (much) slower to respond and sometimes after updating or reboot, one has to wait for a minute or even longer until everything runs smoothly again

A serious issue is that after running for one hour or a bit longer, BirdNET-Pi seems to hang and no files are being processed any more. The log shows this:

Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/bin/server.py", line 315, in handle_client
    writeResultsToFile(detections, min_conf, args.o)
  File "/usr/local/bin/server.py", line 204, in writeResultsToFile
    with open(path, 'w') as rfile:
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/BirdSongs/February-2022/08-Tuesday/2022-02-08-birdnet-23:57:08.wav.csv

I experienced this three times yesterday and this night. So it seems it is a reproducable issue.

After rebooting, log and analysis still seem to be stuck (the date and time of the file still shows a very old file):

with open(path, 'w') as rfile:
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/BirdSongs/February-2022/08-Tuesday/2022-02-08-birdnet-23:57:08.wav.csv
birdnet_server.service: Main process exited, code=killed, status=9/KILL
birdnet_server.service: Failed with result 'signal'.
Stopped BirdNET Analysis Server.
birdnet_server.service: Consumed 18min 48.826s CPU time.
Started BirdNET Analysis Server.
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
INFO: Created TensorFlow Lite delegate for select TF ops.
INFO: TfLiteFlexDelegate delegate: 1 nodes delegated out of 182 nodes with 1 partitions.

After RESTART ALL SERVICES it seems it has resumed analysis and shows the usual output, which confirms it really takes the real time recordings and processes without lag:

 ('Perdix perdix_Rebhuhn', 0.049771078)
 ('Perdix perdix_Rebhuhn', 0.0641239)
 ('Perdix perdix_Rebhuhn', 0.04529362)
 ('Perdix perdix_Rebhuhn', 0.051011525)
[NEW CONNECTION] ('127.0.0.1', 33360) connected.
[ACTIVE CONNECTIONS] 1
READING AUDIO DATA... DONE! READ 12 CHUNKS.
FULL FILENAME: -/home/pi/BirdSongs/February-2022/09-Wednesday/2022-02-09-birdnet-08:50:33.wav-
Date-time: 2022-02-09 08:50:33

Hope this helps in finding the issue. Keep up the excellent work!

Analysis service stopped

Hi @mcguirepr89

Just checked my installation - looks as if the Analysis service fell over a while back - fortunately had logging on in the browser - point where it stopped in the attached.

Feel free to drop by to have a look - I'll leave it in this state without a reboot/services restart.

Be
BirdNet-Pi Crash.txt
st

How to handle wifi-access (and more) "in the field"?

Hi,

I want to try BirdNET-pi in sessions in the field, running from a powerbank.

I'm now trying to figure out how to handle wifi/access to the RPi. Any experiences with this?

I tried "sudo raspi-config" to connect the RPi to my smartphone hotspot hoping I could open birdnetpi.local from that, but it doesn't work. However, it does have a connection. I used an app to find the IP of the RPi on my phones' network, and opening that ip with :8080 opened the green BirdNET-Pi log screen. :80 just showed a white page. So, not really a solution yet. I installed BirdNET-Pi by first installing RaspiOS, then the "newinstaller".

I think the optimal solution would be:

  1. The website (birdnetpi.local) should work when connected to a phone-hotspot as well (no clue if possible?)
  2. If the RPi doesn't find a network, it creates its' own hotspot (how to handle password?) where birdnetpi.local works. I think I saw this mentioned as a feature in another thread, but unsure how to configure it, or if it's even available with my installation method?

Bonus info:
Just got my RPi 4 2gb mounted in an Argon Neo case without a fan. Running at 48-51 degrees. Very smooth! Hoping to run it with a good powerbank in the field.

Birding-Pi Statistics window not scrollable

if you click on "Recognized Birds" you get a nice statistics window with a species list and the no. of detections and max confidence scores.
However, as the window fills with more species over time, it is no longer possible to see the top of the list, because the page is not scrollable.
I illustrate this with a screenshot of my RPi where I attached a 5`` TFT screen with a resolution of 800x480.

The species list has 29 entries in this example:

grafik

The problem is also present with higher resolutions and in windows opened on other computers in the same home network.

chronological order of extracted audio files

just a very small "cosmetic issue" :-)

  • by default the extracted files under by_common_name come sorted by name and not by date ("Modified") --> because the confidence score is part of the filename, the sorting by name does not exactly match the sorting by date
  • I can successfully sort them by clicking on the "Modified" sorting arrow
  • However, it would be good to have them sorted by date/Modified as the default setting

Keep up the good work!

Species stats does not show

On the new page "Species stats":

  • this page is not shown in the "mobile" version of the BirdNET-Pi page
  • on the standard page version (on my PC): if I choose a species from the dropw-down menu, and press Show species statistics, nothing is happening
  • maybe language issue?
  • I use locale settings for Gerrmany
  • I use German Common names

--> if I move the mouse over the button Show species statistics, the link that is displayed in the lower left corner of the screen is birdnetpi.local

grafik

Feature requests

Hi,

Here are some suggested features/additions/changes. Instead of creating a billion tickets, I guess this is easier.

Idea 1
Option 1.1: Link species name in i.e. the Database view to the corresponding "By Common Name" folder for easy access to files

Option 1.2: Link species names to a species profile-page with relevant stuff like:

  • Window or shortcut to "By Common Name" folder
  • External link to a google-search with the scientific name
  • Link to "pro" information about the species, e.g. the GBIF.org species page
  • Link to species page/search query in xeno-canto.org

Idea 2

  • Remove "View"-word from the links in the top. I personally don't think they are needed.

Idea 3

  • Simple descriptions below the buttons in Tools. It's not too obvious what they do (i.e. is "Shutdown" for shutting down the birdnet-service, or the whole RPi. What is the difference between the 5 restart options. I'm not even sure what Caddy is at the moment :P )

Idea 4

  • Simple explanations under the settings options (especially the advanced settings). I.e. a brief mention of the different "full disk behaviors".

Idea 5

  • Probably a tough one and maybe out of scope... Expose a (login protected) api for accessing the database of observations/extractions. This would allow someone (i.e. me) to create a supplement mobile-app (Flutter-based) for overview of observations (see spectrograms, play/save/share files, favorite/bookmarked observations) and management of multiple BirdNET-Pi's, for example through fixed ips/urls or by scanning for BirdNET-Pi's on the local network. Is it overkill? Not sure. Could make usability better in the field, and maybe more convenient experience if having a BirdNET-Pi in both your frontyard and backyard.

Spectrogram optimization

Proposal to change spectrogram.sh

sudo -u pi sox "${analyzing_now}" -n remix 1 rate 16k spectrogram -t "Currently Analyzing" -c "${analyzing_now}" -o "${spectrogram_png}"

  • will only show one channel when using a stereo USB audio soundcard
  • will only show bird-relevant parts of the frequency spectrum --> up to 8kHz with rate 16k, you could change this to rate 20k in order to enable a frequency spectrum up tp 10kHz

Sensitivity DB field is inaccurate

The "sensitivity" field is always recorded as ".75" in the database even when "analyze.py" is called with a different sensitivity argument.

This needs to be adjusted in analyze.py where the script writes to the database.

@CaiusX -- any chance you'd be able to take a look at this with me in the next week or so? The issue is somewhere in the python where it parses the sensitivity value.
My best,
Patrick

Feature request: `history_plot.py` (or have `daily_plot.py` accept arguements)

It would be amazing if daily_plot.py would accept arguments in the form of a date or date range.

This could be a separate script, history_plot.py, but one that would be called dynamically with either a specific date or a date range.
With this, I would put together a PHP page that would feed the user-submitted date/date-range as arguments to the new history_plot.py so that we can see that beautiful chart using the dates of interest.

@CaiusX I will start hacking away at this in my usual fashion, but if you think this sounds interesting, please do let me know and I will work with you so that we're not both tinkering on the same changes.

Feature request: "Urban mode"

Many (if not most!) BirdNET-Pi users live in an urban environment and just hang the microphone out of their windows. This works very well, but also tends to capture high numbers of noise events commonly found in urban environments/cities. These can be police sirens, helicopters, planes, cars, and other technical noise but also child screaming and human talk.
Often, these noises are identified by BirdNET as bird species and this is somehow predictable, because these urban sound events have a striking similarity with certain bird calls/songs. One example is the Great Bittern, which emitts an extremely low sinusoid tone at 150Hz. This same pattern is produced by many starting cars, helicopters, aeroplanes etc., so the probability of having an ID of a bittern in the centre of a city is really high. But this bird species (specialized on specific wetlands) is extremely unlikely to emitt its breeding bird song in the centre of a city. So how do we handle these FALSE POSITIVES ? One solution could be the following:
URBAN MODE:

  • with a switch in the Advanced settings one could switch on or off the "urban mode"
  • "Urban mode" switches on an exclusion list (ie. a list of species that would be set to Confidence == 0, whenever they will be identified, because these species are 1.) extremely unlikely to be encountered in a city, and 2.) their sounds are pretty similar to sound events in cities.

For Europe, these species (which should be included in such an exclusion list) would be:

Botaurus stellaris_Great Bittern
Cygnus cygnus_Whooper Swan
Cygnus olor_Mute Swan (little children are often identified as Whooper Swans)
Tetrao tetrix_Black Grouse
Tetrao urogallus_Western Capercaillie
Tetrastes bonasia_Hazel Grouse
Bubo bubo_Eurasian Eagle-Owl
Ciconia ciconia_White Stork
Ciconia nigra_Black Stork
Caprimulgus europaeus_Eurasian Nightjar
Aegolius funereus_Boreal Owl
this list could surely be extended further . . .

For urban environments, this switch could eliminate a very large proportion of annoying false positive identifications associated with urban anthropogenic noises.

A big disadvantage would be that we would need separate exclusion lists/species additions for separate biogeographic regions in the world.

Solved: Trouble installing on a headless Pi with a remote desktop from Windows

Hi everyone,

i tried numerous times again and i cannot get the installer to work, also tried the rpialpha one with the same result.
The installer always stops after i insert my location, save and close the editor.
Then it just hangs there and nothing happens. If i iterrupt with ctrl-c it then says:

^Csed: can't read /home/pi/BirdNET-Lite/birdnet.conf: No such file or directory
Your compressed logs are located at /home/pi/BirdNET-Lite/logs.tar.gz
sed: can't read /home/pi/BirdNET-Lite/birdnet.conf: No such file or directory
Your compressed logs are located at /home/pi/BirdNET-Lite/logs.tar.gz

So this is a rundown of everything i do when i start from scratch:

Burn 2021-05-07-raspios-buster-arm64 with the Raspberry Pi Imager on a 32GB SD in Windows.
Boot with the Pi. SSH into the Pi from a Windows machine.
sudo apt-get install tightvncserver --yes
sudo apt-get install xrdp --yes
reboot
Open a remote desktop with the Pi from the windows machine.
curl -s https://raw.githubusercontent.com/mcguirepr89/BirdNET-Lite/rpi4/Birders_Guide_Installer.sh | bash
Then it updates quite a bit, then reboots.
again:
curl -s https://raw.githubusercontent.com/mcguirepr89/BirdNET-Lite/rpi4/Birders_Guide_Installer.sh | bash
Then it opens mousepad, i insert location data, passwords, save and close.
Then i am stuck....
It seems not to be able to read the configfile, and is waiting for the editor to finish.

Even when i reboot, start the script again, still stuck at the same step.
Do you have an idea what's happening?
It is probably something really simple that i am missing, as i am quite new to RPi and linux....
Thanks a million and best regards,

Nils

headless installation works - small additions for the WIKI

Headless installation according to the WIKI
#11

  • thanks for the WIKI entry for headless installation!
  • it works
  • please add in the WIKI, how to go to the "Advanced options" in Raspberry Pi Imager: by pressing CTRL + SHIFT + X [this is impossible to do if you do not know it, because there is no such option to click on or to choose in menu or any hint in the program . . .]
  • please add in the WIKI, that you need to install an SSH client like "putty" to connect to the PI in order to convince it to use VNC
  • my installation did not start with the RPi configuration screen: I had to go to the configurations one by one manually
  • updating was done during the run of your installation script
  • a little irritation on my side, because during the installation the script said "hostname birdnetpi cannot be resolved" several times
  • Apart from that, the WIKI entry explained the procedure perfectly and was easy to follow!
  • Thanks, Patrick!

BirdNet-Pi 0.2 Update Issue

Hi @mcguirepr89

Trying the 0.2 update script I get the attached in the console,

stops after OS update with:

error: pathspec 'testing' did not match any file(s) known to git.

Tried again, same error.

Will send the log files by e-mail.

Best
BirdNetPi_0.2_install.txt

-------------------------------------------------------------->>UPDATE
Installs fine after reboot - will test installation and report separately.

Best

Run on Docker?

Hello,

Looking to install this to learn and have fun with the kids :-)

I have a couple of docker stacks running on my server and some unifi cameras with feeds available - would it be possible to deploy this on a custom stack, based on something like Debian perhaps?

Many thanks in advance.

Calculation of week

it seems that BirdNET-Lite has a different logic of calculating the "week"

  • For us, a year has 52 weeks.
  • For BirdNET-Lite, a year has 48 weeks (4 weeks a month)
    "--week, Week of the year when the recording was made. Values in [1, 48] (4 weeks per month)." https://github.com/kahst/BirdNET-Lite

I would propose to calculate "week" as follows:

  • Jan day 1-7 --> week 1
  • Jan day 8-14 --> week 2
  • Jan day 15-21 --> week 3
  • Jan day 21-x --> week 4
  • Feb day 1-7 --> week 5
  • etc.

minor issue: calculation of "Last Hour"

grafik

It seems the no. of detections in the last hour is not always calculated correctly. Not sure why this is so. Maybe a cause of different time zones and the software not taking account of this!? --> AM/PM problem ?

multithreading

maybe we should consider adding multithreading in order to speed up BirdNET-Lite analysis. This does not seem to be relevant for the use of birdnet-system as a realtime device (because there is enough time while the RPi is recording), but should be extremely relevant when using birdnetsystem to analyse a large batch of recordings (made with other recorders etc.).

  • change line 27 of analyze.py to interpreter = tflite.Interpreter(model_path='model/BirdNET_6K_GLOBAL_MODEL.tflite', num_threads=2)
  • this achieved a 30% reduction of analysis time on my RPi
  • increasing num_threads to 3 did reduce analysis time further, but only a few%

Hostnames on the same network

The scripts force the hostname of every birdnetPi to be birdnetpi. This causes issues if you are trying to set up more than one on the same network.

It fails to resolve properly. I'm just getting a plain blank page.

I've done a wee hack to allow the setting of a custom hostname which then allows two BirdNET pi on the same network. Set the config variable BIRDNET_HOST to what you want, and that will be the name of the machine. This will be important if I am putting out a number on the same network and wanting unique hostnames.

Problem with the installation

Cannot access the webpage after installation, got the following error which run the installer script running over SSH:

pi@raspberrypi:~ $ ./Birders_Guide_Installer.sh 

Welcome to the Birders Guide Installer script!

The installer runs in two stages:
Stage 1 configures and enables the zRAM kernel module and allocates 4G
        to its swapping size if needed. This will trigger a reboot.
Stage 1 also ensures the system is up to date.
Stage 2 guides you through configuring the essentials and installs the full BirdNET-system.

Beginning Stage 1

Ensuring the system is up-to-date.
Alle Pakete sind aktuell.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
System Updated!
Stage 1 complete

Beginning stage 2

Checking for an internet connection to continue . . .
Connected!



Follow the instructions to fill out the LATITUDE and LONGITUDE variables
and set the passwords for the live audio stream. Save the file after editing
and then close the Mouse Pad editing window to continue.
./Birders_Guide_Installer.sh: Zeile 97:  2095 Trace/Breakpoint ausgelöst   mousepad ${my_dir}/Birders_Guide_Installer_Configuration.txt &> /dev/null
sed: /home/pi/BirdNET-system/birdnet.conf kann nicht gelesen werden: Datei oder Verzeichnis nicht gefunden
find: ‘./.step’: Keine Berechtigung
Your compressed logs are located at /home/pi/BirdNET-system/logs.tar.gz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.