-
Notifications
You must be signed in to change notification settings - Fork 0
Home
What: Automatic detector for blue whale B calls.
How: Matches spectrograms of the sound recording in Triton to a template spectrogram of a blue whale call, called the kernel. This template consists of the frequency at five time points from the third harmonic of a typical blue whale B call. The kernel must be updated within and between years.
Why: Blue whale B calls are very stereotyped calls, making them ideally suited for spectrogram correlation. Automatic detection is much faster than manual logging and precision/recall rates above 80% can often be achieved with minimal verification of the data.
Output: XML and xls files with the start times of individual B calls.
- MATLAB basics
- Opening LTSAs and logging calls in Triton
- MATLAB 2012b (or later)
- triton_dev_sherbert folder
- triton1.93.20160524 - B call detector folder
To run this detector, you must have a file called nilus.jar in a specific place in your MATLAB path (i.e., the static path MATLAB uses to load Java classes). To automatically get this correctly configured:
-
Close all instances of MATLAB and open a new one
-
Remove any Triton folders from your MATLAB path
-
Add the triton_dev_sherbert folder to the path with subfolders
-
In the command window type
dbNilusInit();
-
If you receive the below message, you're all set and you can take a look at what you need next to run the detector
If you receive the following message:
Type
Y
to get your path set up correctly -
Restart MATLAB when prompted
💡 Tip: Nilus is a standalone Java archive library. The Nilus package is an API that creates XML detection documents, which can be uploaded to the Tethys database. If you'd like a more detailed description of Nilus, read this
Getting Nilus set up can be tricky, and the above steps don't always work based on an individual's computer set up. Ultimately, dbNilusInit()
is trying to create a javaclasspath.txt file in the directory 'C: \ Users \ ... \ Documents \ MATLAB', where '...' is the name of the User Account you are currently using. If you are struggling to get Nilus to function properly, you can always create the javaclasspath.txt file yourself. In javaclasspath.txt you want to place the path to the nilus.jar file, which is '... \ Orig B call detector \ triton_dev_sherbert \ java \ dependency \ nilus.jar'.
There a few things you need before you can jump in and run the Bm-Bcall-Detector:
-
The groundtruth is a series of manually logged calls that you will use to optimize detector performance for a given dataset.
-
The kernel is the template that the detector uses to identify B calls in a dataset
-
The threshold is a parameter that the detector uses, which is based on groundtruth performance. You can't calculate a threshold without first making a groundtruth and a kernel
Now that you have an appropriate groundtruth, kernel, and threshold for your dataset, you can start detecting blue whale B calls!
-
Add the triton1.93.20160524 – B call detector folder to your MATLAB path
-
Open Example_params.m, located in triton1.93.20160524 - B call detector \ Remoras \ Blue Whale B Detector Remora
-
Update the following:
-
Line 5: Input directory (location of xwav files you want to run the detector on)
-
Line 6: Output directory (where you want the output detection files to be located)
-
Line 9-10: Kernel values (the 5 numbers you came up with for the kernel)
💡 Tip: The first line will have numbers 1-4 and the second line will have numbers 2-5. For example, the kernel shown below was 45.9, 45.4, 44.6, 44.1, and 43.4.
-
Line 11: Kernel name (the site/deployment # from which the kernel was made)
-
Line 18: Threshold value (the number from 25 to 45 you selected when comparing your groundtruth against the detector's performance)
-
-
Save Example_params.m
-
Open Triton
-
Go to Remoras > Blue whale B detector
-
A box will pop up requesting the path to Example_params.m. Enter or browse for the path to the file
-
Click continue
-
Another box will pop up where you can verify the parameters you entered in Example_params.m. Always verify! Make sure you will run the detector on the correct data, using the correct variables
-
If everything looks correct, click Yes
💡 Tip 1: If Example_params.m has the correct parameter values but they are incorrect in the pop-up window, click No and try typing
which Example_params
in the command window. Begin at Step 6 and the correct values should appear in the pop-up window💡 Tip 2: If the Project/Site/Deployment for the dataset you are trying to run is not found in the HARP database (or it’s in a different format), a box will pop up requesting you to manually enter in that information. If this happens, there will be no xml output, only xls.
-
The detector should start running through all the xwavs in your chosen directory. You can see its progress in the command window
-
When the detector is finished you should have both XML and xls output
-
Open the XML detection file with an XML editor (Notepad++ is a good one)
-
Verify that the following are correct in the XML and edit if necessary:
-
Project
-
Site
-
Deployment
-
UserID
-
Start effort
-
End effort
-
-
Detections that occur from February to May will need to be manually checked for false detections. If your XML file has detections during those months you will need to open the LTSA for the dataset in Triton and check if there actually were calls for those detections. If you find that there is no call for a detection, delete that entry in the XML file
💡 Tip: In SOCAL, blue whales B calls are rare from February to May and so the detector does not perform as well during these months. False detections can often be attributed to anthropogenic noise sources.
-
Save the edited XML into a new folder, regardless of whether you checked/deleted detections (you don’t want to overwrite the unedited detections)
💡 Tip: For each automatic detection you want to have a raw detection file and a checked detection file (representing what the detector gave you and what you’re actually going to use for call count analysis, respectively).
-
Once you have an XML file that has been checked for false calls, it can be submitted to the Tethys database