Giter VIP home page Giter VIP logo

birdnet_lite_plugin's Introduction

CC BY-NC-SA 4.0

BirdNET_Plugin for avian diversity monitoring on the edge

The original BirdNET-Lite repository with the model for identification of birds by sounds is completely developed by Stefan Kahl, Shyam Madhusudhana, and Holger Klinck.

This repository is a clone of the original one with the necessary modifications added in order to make it work as a plugin on the nodes of the the Sage project.

Basically I have incorporated the pywaggle functionality which allows to collect sounds from microphones as inputs for the model which identifies the birds that might have produced such sounds. Afterwards I use pywaggle to publish the model results as well as performance measures.

Usage

Please, reffer to the pywaggle and BirdNET-Lite repositories to instal the necessary dependences.

For usage just clone this repository

https://github.com/dariodematties/BirdNET_Lite_Plugin

Then

cd BirdNET_Lite_Plugin

and run

python3 analyze.py --num_rec 6 --sound_int 5

which will record 6 audio files of 10 seconds each, analyze them, publish the results and inference times of each file and finally remove the recorded input files.

LOADING TF LITE MODEL... DONE!
IN THIS RUN  6  FILES OF  5.0  SECONDS WILL BE PROCESSED
RECORDING NUMBER:  0
RECORDING AUDIO FROM MIC DURING:  5.0  SECONDS...  DONE!
RECORDING NUMBER:  1
RECORDING AUDIO FROM MIC DURING:  5.0  SECONDS...  DONE!
RECORDING NUMBER:  2
RECORDING AUDIO FROM MIC DURING:  5.0  SECONDS...  DONE!
RECORDING NUMBER:  3
RECORDING AUDIO FROM MIC DURING:  5.0  SECONDS...  DONE!
RECORDING NUMBER:  4
RECORDING AUDIO FROM MIC DURING:  5.0  SECONDS...  DONE!
RECORDING NUMBER:  5
RECORDING AUDIO FROM MIC DURING:  5.0  SECONDS...  DONE!
FILES IN DATASET: 6
READING AUDIO DATA... DONE! READ 2 CHUNKS.
READING AUDIO DATA... DONE! READ 2 CHUNKS.
READING AUDIO DATA... DONE! READ 2 CHUNKS.
READING AUDIO DATA... DONE! READ 2 CHUNKS.
READING AUDIO DATA... DONE! READ 2 CHUNKS.
READING AUDIO DATA... DONE! READ 2 CHUNKS.
ANALYZING AUDIO... DONE! Time 0.3 SECONDS
ANALYZING AUDIO... DONE! Time 0.2 SECONDS
ANALYZING AUDIO... DONE! Time 0.2 SECONDS
ANALYZING AUDIO... DONE! Time 0.2 SECONDS
ANALYZING AUDIO... DONE! Time 0.2 SECONDS
ANALYZING AUDIO... DONE! Time 0.2 SECONDS
PUBLISHING DETECTION 0 ... DONE!
PUBLISHING DETECTION 1 ... DONE!
PUBLISHING DETECTION 2 ... DONE!
PUBLISHING DETECTION 3 ... DONE!
PUBLISHING DETECTION 4 ... DONE!
PUBLISHING DETECTION 5 ... DONE!
REMOVING THE INPUT COLLECTED BY THE MICROPHONE ... DONE!

Beyond publishing, if you want to save the outputs of the model in files, first create a folder in the directory of the project; let's say

mkdir output

Then, run the following command

python3 analyze.py --num_rec 6 --sound_int 5 --o output --min_conf 0.01

This will instruct the script to save the results of the analysis of the different recordings in the directory output

The format of the output is

tart (s);End (s);Scientific name;Common name;Confidence
0.0;3.0;Dicrurus paradiseus;Greater Racket-tailed Drongo;0.025848534
0.0;3.0;Capito wallacei;Scarlet-banded Barbet;0.019484155
0.0;3.0;Dendrocopos leucotos;White-backed Woodpecker;0.013595802
0.0;3.0;Myophonus horsfieldii;Malabar Whistling-Thrush;0.012276235
0.0;3.0;Grallaria flavotincta;Yellow-breasted Antpitta;0.01151198
0.0;3.0;Formicarius rufipectus;Rufous-breasted Antthrush;0.011332592
3.0;6.0;Capito wallacei;Scarlet-banded Barbet;0.058079723
3.0;6.0;Saltator grossus;Slate-colored Grosbeak;0.03138132
3.0;6.0;Sylvia abyssinica;African Hill Babbler;0.023456778
3.0;6.0;Copsychus luzoniensis;White-browed Shama;0.02323199
3.0;6.0;Hypsipetes everetti;Yellowish Bulbul;0.022299841
3.0;6.0;Sylvia atriceps;Rwenzori Hill Babbler;0.016690737
3.0;6.0;Copsychus malabaricus;White-rumped Shama;0.016142305
3.0;6.0;Saltator fuliginosus;Black-throated Grosbeak;0.0121659925

birdnet_lite_plugin's People

Contributors

dariodematties avatar kahst avatar

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.