GithubHelp home page GithubHelp logo

pamguard / pamguard Goto Github PK

View Code? Open in Web Editor NEW
32.0 2.0 14.0 339.61 MB

Detection, Classification, and Localisation of marine mammal and other bioacoustic signals

Home Page: http://www.pamguard.org/

License: GNU General Public License v3.0

HTML 5.24% Java 91.47% CSS 2.43% Haskell 0.02% Shell 0.01% PureBasic 0.84% Rich Text Format 0.01%
detection classification localisation whales dolphins bats

pamguard's Introduction

PAMGuard

DOI

Introduction

PAMGuard is a bioacoustics analysis program designed for use in real time research contexts and for the processing of large datasets. PAMGuard provides users access to a suite of state-of-the-art auotmated analysis algorithms alongside displays for visualisation data and a comprehensive data management systems.

Why do we need PAMGuard?

PAMGuard fufills two main requirements within marine bioacoustics

  1. Real time operation: Almost all PAMGuard features and modules work in real time - this allows scientists and industry to detect, classify and localise the position of animals in real time on a standard consumer laptop, enabling mitigation and research surveys without expensive bespoke software solutions and the transparncy of open source software.

  2. Processing and visuslisation of large datasets: Off-the-shelf autonomous PAM devices, large scale surveys involving drifters, towed arrays, glidders, bottom mounted devices and real time continuous monitoring system all generate huge volumes of data whcih requires automated analysis approaches. PAMGuard allows the processing of very large passive acoustic datasets using automated algorothms and crucially provides comprehensive visualisation tools for a manual analyst to check the results.

Installation

PAMGuard is available on Windows and can be downloaded from the PAMGuard website. Note that we are considering MacOS and Linux installers but they are not available at this time.

Quick start tutorial

PAMGuard is a modular program with two modes; real-time and viewer. Typically a user will start with real-time model, either in the field collecting data or post processing sound files from a recorder. Once data are processed, users move on to viewer mode where data can be explored and further processed.

Upon opening PAMGuard for the first time you are greeted with a blank screen. You must add a series of modules to create the desired acosutic workflow - this is referred to as PAMGuard data model. For example if processing sound files then first add the Sound Acquisition module File->Add Modules->Sound Processing->Sound Acquisition. Then add the desired detection algorothms e.g. File->Add Modules->Detector->Click Detectors. Some modules (such as the click detector) have their own bespoke displays, others are added to more generalised displays. For example, the whistle and moan detector module shows detections on a spectrgram display, time base display, map etc.. First add a new tab using _File->Add Modules->Displays->User Display. Click on the user display tab and then from the top menu select User display-> New Spectrogram. Right click on the added spectrgram and select whistle and moan contours to show whistle detections overlaid on the raw spectrgram.

Make sure to add the database and binary file storage modules File->Add Modules->Utilities->...) to save data then press the run button (red button) and data will process. PAMGuard can handle huge datasets so running might take hours or even days. Progress is shown on the bottom of the screen.

Once the data has run, open PAMGuard viewer mode. Select the database you used to process the data along and thebianry file storage path and PAMGuard will open, showing an overview of the dataset in a new Data map tab. Right click anywhere on the data map and select "Center data here" - PAMGuard will load the data for the selected period which can be explored using whichever displays have been added to the data model.

Features

Hardware integration

PAMGuard connects with hardware such as various GPS and AIS systems and a multitude of different sound cards (e.g. National Instruments devices, SAIL DAQ cards, almost all ASIO sound cards and standard computer sound cards) for real time data collection and processing. PAMGuard also works with some very bespoke hardware such as DIFAR Sonobuoys;

Real time operation

PAMGuard takes advanatge of multi-core processors to run multiple signal processing automatic analysis algorithms in real time to detect whales, dolphins, bats etc. Data are shown in different displayes, including interactive spectrograms and maps. You might be using PAMGuard for simply viewing a spectrgram and making recordings or running deep learning algorithms for multiple species and loclaising the results to view locations on a map. Whatever acosutic workflow a user creates, PAMGuard can run it in real time.

Support for compressed audio

PAMGuard supports processing audio data from standard files (e.g. wav, aif) and also compressed files (e.g. .flac and .sud). Notew that sud files are created on SoundTraps widely used marine recorders and can be read by PAMGuard without decompressing - PAMGuard will automtically import click detections if present in sud files. PAMGuard also supports importing detection data from CPODs and FPODs.

Comprehensive data management system

PAMGuard is designed to collect/process data from large acosutic datasets. PAMGuard stores data in an SQLite databases and "Binary" files. The database stores important metadata such as when data has been processed and some low volume data streams such as GPS. Binary files are not human readbale but efficient to access - PAMGuard stores detection data (e.g. clicks, whistles, noise, etc) in these files. this allows PAMGuard to rapidly access data from large datasets. Data from binary files can be viewed in PAMGuard viewer mode or can be exported to MATLAB using the PAMGuard-MATLAB library or the exported to R using the R PAMBinaries package.

Access to detection and classification algorithms

PAMGuard allows users to inegrate automated detection and classification algorithms directly into their acosutic workflow. There are a multitude of differwent algorothms to choose from, including a basic click detector, whislte and moan detector, GPL detector, click train detectors and many others. The idea behind PAMGuard is allow researchers to access open source state-of-the-art algorithms devleoped within the scientific community - if you want to contribute and get your algorithm into PAMGuard get in touch.

Localisation

PAMGuard has a mutltude of different options for acoustic loclaisation. There's a comprehesnive beam forming module for beam forming arrays, a large aperture localiser for 3D loclaisation and target motion analysis for towed hydrophone arrays.

Soundscape analysis

PAMGuard has a noise band (which supports third octave noise bands) and long term spectral average module for soundscape analysis.

GIS

Almsot all detection data can be visualised on a map. PAMGaurd also supports plotting GPS and AIS data.

Suite of data visualisation tools

An important aspect of PAMGuard is the ability for users to explore porcessed data. PAMGuard allows users to visualise data at multiple different times scales, from inspecting individual waveforms microseconds long to datagrams showing detector output or soundscape metrics over days, weeks or even years.

Advanced manual annotation

The displays within PAMGuard support a variety of manual annotation tools. Users can add data to annotations in multiple ways, from simple text annotations to complex forms created by users.

Deep learning integration

PAMGuard allows users to run their own deep learning models using the deep learning module. AI can therfore be integrated into PAMGuard workflows, allowing for more efficient analysis of data.

Metadata standard and Tethys compatibility

PAMGuard Integrates with Tethys database. Users can export processed PAMGuard data to a Tethys database seamlessly; this ifeature is great for large scale projects or organisatiosn with long term datasets.

Feature roadmap

There's lots of features we would like to add to PAMGuard. If you want to add a feature you can either code it up yourself in Java and submit a pull request or get in touch with us to discuss how to it might be integrated. Some smaller features might be in our roadmap anyway but larger features usually require funding. Some features we are thinking about (but do not necassarily have time for yet) are;

  • Support for decidecade noise bands (base 10 filter bank) in noise band monitor to meet Euopean standards
  • Capabaility to export data directly from PAMGaurd e.g. as MAT files (in progress).
  • Automated test suite to make releases more stable. Note that unit and integration tests are also being slowly incorporated.
  • Support for ARM based computers (in progress).
  • A graphical user interface and Python library for training PAMGuard compatible deep learning models.

Development

This is the main code repository for the PAMGuard software and was created on 7 January 2022 from a sourceforge SVN repository revision r6278.

If you are a PAMGuard developer, you should clone and branch this repository and share with any collaborators in your own workspace. When your work is ready, contact the PAMGuard team to have your changes merged back into this repo.

PAMGuard uses Maven as build tool.

Organisation and License

PAMGuard is open source under an MIT license. It is currently primarily managed by the Sea Mammal Research Unit within the University of St Andrews. Please get in touch if you have any questions.

pamguard's People

Contributors

bluetintedfortress avatar briansmiller avatar douggillespie avatar kbolaughlin avatar m2oswald avatar macster110 avatar marie-r avatar stabbutt 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

Watchers

 avatar  avatar

pamguard's Issues

Logger forms data not plotting

Logger forms data were not plotting correctly. This was due to the required data selection functions not being fully implemented. This is now fixed and it should be possible to select what to plot based on selections from drop down lists within any form.

TD/Fx Display Freezes with Clicks

Hi All,

This is in reference to a long time issue I've had with the TD/Fx display freezes when I have clicks in one of the panels and am logging clicks to a DGL event (as I can't do that in the click detector panel). The problem was a little better I thought when I used the amplitude - stem button, but still problematic. The freezing happens after 30 minutes or after 2 minutes and seems to do it less if I have less data loaded, although if I have more than an hour of data loaded then it freezes more often (for all other panels, I have a day of data loaded and no freezing). I've tried de-selecting some clicks, and always de-select the unclassified. It makes it pretty time consuming to assign clicks to an event and

I have a Win 10, 32 GB RAM (but PG only has access to 16 GB, and I've tried more, less, with no difference), I have had this problem on different computers (others working through data and my laptop) and with all datasets and all versions of PAMGuard since about 2019 when I started it. Jamie and I have tried trouble shooting a lot but he can't replicate the problem. I am overlaying audio if that helps (to confirm species, etc.) but not in the TD/Fx display and the problem occurs without overlay as well.

Here's a video displaying the problem (one of my tests for Mike a while back, same freezing happens though - look at min 6):
https://screencast-o-matic.com/watch/crit14ViGB1

Here's a set of test files that have had the issue occur.
https://drive.google.com/drive/folders/1kvDAGPphWr-dL_IQXwdyya0sbvWtXfwL?usp=sharing

Appreciate any help!

Building from source

Hello,

I wonder if you can help, it appears that the geomajas link in the POM file is down.
Do you know of an alternative @douggillespie ?

I am trying to build a version that has the command/udp function to work with; and it appears the latest release version doesn't, it was fixed a few months after according to the commits.

That or can we get release of a new version posted?

Thank you,

"2-second glitch" in Whistle and Moan Detector

The Whistle and Moan Detector has this issue where false detections (as in contours are drawn when there isn't anything there, including in dead silence) are often produced within the first two seconds or so of sound files. This isn't a recent issue - it was happening as far back as 2020 when I started using PAMGuard. My team uses the WMD extensively, so a good chunk of our data is false detections produced by the 2-second glitch (as we like to call it). This also results in the data map in Viewer Mode having an absolute snowstorm of false markings on it, which makes it impossible to pick out minor encounters from outright false ones.

If this isn't an easy issue to outright fix, a good temporary solution could be to add an option in the WMD to not produce contours within the first two seconds of each file. That would be super helpful for us in the meantime.

Cheers.

Click classificatio symbols not showing in BT display

Symbols are not being coloured properly in PAMGuard. There seems to be two issues here.

The first is the most critical where symbols are not showing in PAMGuard. An example .psfx that shows this is here

image

The second is more general and may be difficult to fix. PAMGuard is first opened in viewer mode the click classi
fication symbols do not show properly. For example, if porpoise clicks are red triangles then these are not visible when PAMGuard is first opened - instead the clicks appear as black dots. The symbols are fixed by deselecting and then selecting "Colour by Click Classification" in the right click menu but this is incredibly confusing for users.

Note that is appears this is an issue when opening an older database with a new version of PAMGuard and/or opening the first time after processing data in real time mode. Once fixed, upon reopening PAMGuard is fine.

Example porpoise data - when first opened the clicks should be red but are black. Note there are two databases. Porpoise_DB opens fine but Porpoise_DB_original, which was generated with an older version of PG opens the clicks with the wrong colour.

https://drive.google.com/drive/folders/1SCTFgFRcu29QmpvuK3syClh1p-XD7_QF?usp=sharing

Threading hydrophone locator bug

The threading hydrophone locator was not working correctly in the latest release V2.02.02. The problem was particularly apparent in Viewer mode but may have given false array locations in normal mode under some circumstances. This is fixed in the code and will be in the next release.

UDP Control & Command Syntax

Hello @douggillespie

Two issues - I wonder if you can point me the right way. Firstly I appear to be unable to run a UDP command into Pamguard, its compiled OK (thanks for that), the port is open but it disconnects and closes after the first try and only a restart of the software opens it again.

For example:

Pamguard running --port 6666

Another cmd window ---> ncat -u -v localhost 6666 (I am using ncat for sending udp traffic from the nmap package)
command: ping
response: cmd ping not found (with a return/new line after the command in the response)
From then on there are no more responses to any commands & all connections are closed.
After this point the port on pamguard is closed (checked with nmap, and interestingly if you can the port that also crashes it) and it does not reopen till I restart the software. Any clues?

Secondly --- can I please ask for some more clarity on the syntax you expect for the 3 commands listed

  1. tellmodule
  2. getxmlsettings
  3. setxmlsettings

This may be because my attempts at "getxmlsettings" thus far have only resulted in either "No settings" or "Unspecified modules for settings"

For example getxmlsettings "Sound Acquisition" just returns no settings - which seems wrong?

Part of this is (and i have tried to search but I cannot locate it) there doesn;t appear to be a clear list of available module names, some like Sound Acquisition have a different type of Data Acquisition, others like Array Manager are both the name and type...

e.g command summary produces:
"Sound Acquisition:ch0,-0.0,-10.4,-46.6,ch1,0.0,-4.6,-22.1,<\Data Acquisition>"

So I presumed the module name is - Sound Acquisition? or is it Data? or is actually just Acquisition (as the kind of root module?)

Finally how did you then envisage someone then parsing the new xml file with setxmlsettings? Something like:
setxmlsettings ? or
setxmlsettings <type name?> <systemType Class="java.lang.String" Value="Audio File"/> (with escape characters used?, just the varrying parts? or the entire file escaped?)

Anyway if you could put an example for each just to read back a default value that would be really helpful.

Thank you very much for your time,

Sound Acquisition time zone issues

My team has occasionally come across an issue where Sound Acquisition seems to automatically interpret SoundTrap audio file dates as being in local time even when UTC is selected in the options dialog, as shown in the first image where the date in the audio file name is 2022-12-01-00:00:00, but that gets converted eight hours forward as if the original was in Canada/Pacific. Apparently some of the SoundTrap data we have was accidentally processed in local time, which is probably the culprit, but I'm not sure where in the code it reads the WAV file's metadata for a time zone (I'm assuming I'm just missing something). However, if I set the time zone to Canada/Pacific, it's now at 4am instead of midnight (second image), which doesn't make any sense anyway.

Any ideas?
Holly

image
image

Bug in SoundSpotClassifier, GenericDLClassifier, and KetosClassifier

private function and an overwritten function with the same name and parameters.

@OverRide
public void newResult(GenericPrediction modelResult, GroupedRawData groupedRawData) {
modelResult.setClassNameID(getClassNameIDs(genericModelParams));
modelResult.setBinaryClassification(isBinaryResult(modelResult, genericModelParams));
newResult(modelResult, groupedRawData);
}

The problem is that both functions are ambiguous, which means that in my case, newResult was calling itself endlessly. To fix this, the private function must be renamed.

ROCCA Memory leak

when unable to find raw data for a whistle, ROCCA would double the raw data keep time. Since it regularly can't find this data at the end of the file (e.g. when threading causes a whistle to arrive after the raw data are cleaned up) the keep time kept doubling until the memory usage of the raw datablock would kill PAMGuard. I've now hard limited this to 15 minutes, which is loads more than should ever be needed. A similar problem occurred in the Ishmael Localiser.

Bug with whistle contour (ROCCA)

Hello,
It's impossible for me to use ROCCA classifier with some files. The whistle contour doesn't appear after selecting the beginning and the end of the whistle or with "pick points". With other files, it works very good and some it doesn't do the exact whistle and go on places where there is no whistle even with a thresold of 10.
I see that the red vertical line (filter) is not on all the lenght of the files that doesn't work, and just at the end or doesnt' appear at all.
How can I resolve the problem and pick the whistles contour from my .wav files ? Thank you.

Non chronological order processing wav files.

Report by Brian Miller.

The behaviour of the Files and Folders Acquisition behaves very differently depending on weather I select just the folder name from the dialog, or whether I navigate into the folder and select all the files within within it. If I select all the files within the folder, then the behaviour seems to be consistent with prior versions of Pamguard, and the files are sorted by time/alphabetically and analysed in chronological order by the timestamp within the file name. If I select the just the folder, then the data appears to be analysed in random (non-chronological nor alphabetical) order. This random order happens regardless of whether I have checked the “Merge continuous files” checkbox or not. For my datasets, I’m not treating the files as continuous anyway – since for my instruments the filename timestamps use the more precise clock than the one in the A/D converter. But for someone who wants contiguous files merged this would likely be a problematic bug.

Clicks are not selectable in viewer mode above a load size of 00:30:00

When the loaded data in the click detector display is above 30 minutes, clicks can no longer be selected on the click display. Selecting a click selects another clicks randomly in another part of the data. This has been tested on multiple viewer databases with different samples rates and processing dates.

Offline analysis and viewer memory leak

The new(ish) background datablocks attached to 'normal' datablocks were not getting their data cleared when the main datablock data were cleared, so were accumulating too much data and bring the system down through lack of memory.

Large datasets cause PAMGuard freeze at startup

When processing large datasets, PAMGuard can freeze for minutes or even tens of minutes.

This is because ReprocessManager.checkIOFilesStatus() iterates through all files and extracts the time. For a sud files and some other types of audio file, this means opening the header of the file. For a few dozen files then the freeze is not perceptible, but for very large datasets e.g. a single deployment of an ST640 this results in a thread.

Action: Reprocess manager needs to be put on a seperate thread with an update progress bar to show the user PAMGuard is working

Recent versions of Pamguard crash or go painfully slow when processing lots of wav files

Hi,

I don't have much time to work on Pamguard code these days, but do have enough time to file a bug-report/feature regression.

I'm no longer able to effectively process large folders of wav files using the attached psf (spectrogram, Ishmael spectrogram correlation detectors, sqlite database). In 2.02.02 Pamguard just crashes hard and all windows dissapear, and the log (attached) provides no indication of what is going on. In 2.02.05 the log includes more detail, and pamguard manages to avoid a crash, but after about 1000 files starts running extremely slowly.

The last known good version of Pamguard where I could successfully complete this task was 2.02.00 (r5437).

Cheers,
Brian
PamguardLogs.zip
kerguelen2015_fullYear_Bm-Ant-ABZ_SpectroCorrelation_250Hz.zip

Jitter in time base display during wrapping

There is a jitter in the time base display spectrogram when using wrap mode. This makes the spectrogram difficult to use. The issue is due to the fact that JavaFX uses double values for pixel measurements and has been rectified in the next release.

New "overwrite existing output data" option clears entire binary file folder

Recently, I noticed a new feature that brings up a dialog when the record button is pressed, giving you the option to either overwrite binary files (if any are already present in the folder) or to not continue with processing. While I think this is a great addition in theory, I just discovered that instead of simply overwriting individual binary files that happen to have the same name when a new file is processed (as was previously the case), it now apparently just deletes every binary file that was in the folder. I just lost ten days of Whistle and Moan Detector data from that, as I was trying to process different audio files from a different time frame while using the same folder.

I would really appreciate it if there was an option to do it the old way, and if it was made more clear that the new option deletes all your binary files.

Cheers.

PAMGuard starts from last file when processing a folder 2-02-13

PAMGuard starts from the last file if "Start Normally" is selected when processing data. The last file is processed but all other files are ignored.

A work around is to select "Overwrite existing output data" but this will delete all binary files.

This has only been tested so far with a folder of sud files.

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.