Releases: jhuus/HawkEars
1.0.8
This release includes updated models. Changes are:
- Rename Common Redpoll (CORE) to Redpoll (REDP)
- Rename Leopard Frog to Northern Leopard Frog (code remains FROG-LEOP)
- Update low-band classifier to improve detection of grouse drumming and fluttering. When grouse fluttering is detected, it defaults to Spruce Grouse but selects Sharp-tailed Grouse if it has higher scores from the main models.
- Update training data to improve precision/recall for a number of species. This includes adding sound types for Northern Leopard Frog, adding soundscape-based data for several species, and adding non-target sounds to reduce false positives (e.g. in one case insect sounds were being misidentified as Least Sandpiper)
- Add a --fast argument to analyze.py. When specified, HawkEars uses only four of the six models in the ensemble. It excludes the two slowest models, so inference speed is about 38% faster. In a test of diverse soundscapes with 119 species, using --fast with the default threshold, precision decreased from 96.44% to 96.09% and recall decreased from 46.97% to 46.24%. Also note that location/date processing adds significant overhead, up to about 30%, which may not be justified if inference time is an issue. In this test, adding location/date processing increased precision from 96.44% to 96.63% and reduced recall from 46.97% to 46.90%. Increasing the threshold from .8 to .9 gave precision of 97.67% and recall of 37.9%.
- Fix a bug introduced in 1.0.5, which caused analyze.py to fail when --filelist was specified and the given file included locations and dates.
1.0.7
Further testing of 1.0.6 revealed that it was miscalibrated. Results for threshold=.85 were about the same as threshold=.8 for release 1.0.5. Rather than changing the default threshold, we updated the scaling coefficients so 1.0.7 is calibrated about the same as 1.0.5.
1.0.6
What's Changed
- Support was added for the following species:
- Black Rail (BLRA)
- Clapper Rail (CLRA)
- Fish Crow (FICR)
- King Rail (KIRA)
- Rock Ptarmigan (ROPT)
- Spruce Grouse (SPGR)
- The xeno.py script, which downloads recordings from Xeno-Canto, was updated to use v3 of the Xeno-Canto API.
- Training code was updated to use asymmetric rather than symmetric label smoothing.
- Low-frequency spectrograms used for Ruffed Grouse drumming detection were shifted up by a few rows. This improved recall, since the bottom few rows are often very loud noise which can be safely ignored.
1.0.5
What's Changed
- A new --recurse argument was added to analyze.py. Specify --recurse when the input directory has subdirectories containing recordings to process.
- A new --rtype argument was added to analyze.py to define the output format. The default is "--rtype audacity", but you can also specify "--rtype csv" or "--rtype both". The csv option defines a new output format, which is saved as HawkEars_labels.csv in the output directory.
- The tools/xeno.py script was updated to use v3 of the Xeno-Canto API.
- A list of classes (bird species etc.) was added to the end of HawkEars_summary.txt, which is written to the output directory by analyze.py.
- Pacific-slope Flycatcher (PSFL) was renamed Western Flycatcher (WEFL).
Note that analyze.py was substantially rewritten to support the new --recurse and --rtype arguments, and to clean up the code. The new version uses threads in all cases, where the previous version used threads on Windows and processes on Linux. The new version is therefore a little slower on Linux, but the code is simpler.
1.0.4
This release improves the calibration of output predictions, and provides tools to calibrate future HawkEars models.
What's Changed
- Predictions from the included models are generally higher, and closer to probabilities. That is, scores of .85 are now expected to be correct about 85% of the time. In previous releases, they were correct >90% of the time.
- Because scores are higher, the default min_score was increased from .75 to .80.
- The score_exponent is replaced with scaling_coefficient and scaling_intercept. These are used in main_model.py to implement Platt scaling.
- Three new scripts are included to support calibration: pickle_test.py, calibrate.py and plot_calibration_curve.py. See the comments in those scripts for more details.
- A new del_recording.py script is included to delete a recording from a database.
- We fixed an indexing bug in species_handlers.py.
1.0.3
This release adds support for Apple Metal processors (M1, M2, ...) and Intel OpenVINO during inference.
What's Changed
- When running analyze.py on a Mac with a Metal processor (M1, M2, ...), performance will be much better than in previous releases.
- When running analyze.py with an Intel or AMD CPU and no GPU, performance will be much better if you install Intel OpenVINO ("pip install openvino").
- When running analyze.py, additional settings ("device", "num_threads" and "openvino") are written to HawkEars_summary.txt.
- When running analyze.py, "special" quote characters in all class names are converted to "plain" quote characters. This ensures that classes in the ignore list will match classes in the supported list if the only difference is the type of quote character.
1.0.2
This release mainly addresses the issue of identifying which version and parameters were used for a particular inference run.
What's Changed
- The current version number is now available in a version.txt file in the root directory.
- When checkpoints are saved during training, additional metadata is added to them. The extra metadata was also added to the existing checkpoints.
- When you run inference (analyze.py), it will write a HawkEars_summary.txt file to the output folder, providing detailed information about parameters and models used. It is formatted as YAML, which can be easily read by people or software.
- The hop_length parameter is now calculated dynamically, rather than being defined in base_config.py. This allows you to change other audio parameters without having to update the hop length. For example, setting cfg.audio.segment_len=10 before calling plot_spec will now correctly plot 10-second spectrograms. Before, that only worked if you also updated hop_length.
1.0.1
This release provides a number of improvements related to species occurrence data.
What's Changed
- Replaced the eBird barchart data with better occurrence data from the ebirdst R package, except for a few species not supported by ebirdst, for which we kept the barchart data.
- Added species occurrence support for the following US states:
- Connecticut
- Delaware
- Illinois
- Indiana
- Iowa
- Maryland
- Massachusetts
- New Jersey
- Rhode Island
- South Dakota
- Virginia
- West Virginia
- Wisconsin
- Note that the above means all eBird counties in those states are now supported during inference, using the --lat, --lon, --region and --filelist arguments.
- Previously, the code referred to "species frequency data". That has been changed to "species occurrence data" throughout, with corresponding renaming of files, classes, variables, etc.
- Fixed bug when the --filelist argument was used and locations were provided for some but not all recordings in the list.
- Updated perch.py to work with the latest opensoundscape version (0.11.0).
1.0.0
This release provides updated models and several small changes.
What's Changed
- New models are available with better accuracy due to the use of the timm AdamP optimizer (see below). Training data was also improved for several frog species.
- The Adam optimizer from torch was replaced with two timm optimizers: AdamP and RAdam. A new fast_optimizer training parameter can be set to True for Radam or False (default) for AdamP. RAdam trains as fast as Adam, but gives slightly better results. AdamP trains 25-30% slower, but gives a small additional improvement. The new models in this release were trained with AdamP.
- A new model/gernet.py script was added to support custom configurations of the gernet model from timm. It's a fast model that isn't as accurate as hgnet, but can work well in an ensemble.
- Several scripts in the tools directory were updated to improve the consistency of their arguments.
- A new tools/find_dup_recordings.py script was added for finding duplicate recordings in a database.