Skip to content

Commit

Permalink
Merge pull request #19 from birdnet-team/17-implement-different-model…
Browse files Browse the repository at this point in the history
…-types

17 implement different model types
  • Loading branch information
fegue authored Sep 13, 2024
2 parents 7ed6f3f + 7cc5507 commit f2fac42
Show file tree
Hide file tree
Showing 36 changed files with 1,371 additions and 425 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
_other/
inst/doc
docs
dev/
15 changes: 12 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# Generated by roxygen2: do not edit by hand

S3method(labels_path,birdnet_model_custom)
S3method(labels_path,birdnet_model_protobuf)
S3method(labels_path,birdnet_model_tflite)
S3method(predict_species_at_location_and_time,birdnet_model_meta)
S3method(predict_species_from_audio_file,birdnet_model)
export(available_languages)
export(get_labels_path)
export(get_species_from_file)
export(birdnet_model_custom)
export(birdnet_model_meta)
export(birdnet_model_protobuf)
export(birdnet_model_tflite)
export(get_top_prediction)
export(init_model)
export(install_birdnet)
export(predict_species)
export(labels_path)
export(predict_species_at_location_and_time)
export(predict_species_from_audio_file)
export(read_labels)
import(reticulate)
importFrom(reticulate,configure_environment)
importFrom(reticulate,import)
Expand Down
17 changes: 17 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# birdnetR 0.2.0

This update brings significant changes and improvements, including support for loading pre-existing and custom-trained models, aligning the package with birdnet `0.1.6`.

#### breaking changes:
- The `init_model()` function is now **deprecated** and will be removed in the next version. Please use the `birdnet_model_*` function family for model initialization.
- `available_languages()` **update**: A new argument has been added to `available_languages()` to specify the BirdNET version, making it more flexible for different model versions.
- **Renaming** `get_labels_path` to `labels_path()`. It now requires a model object as its first argument.
- `predict_species()` was **renamed** to `predict_species_from_audio_file()`
- `predict_species_at_location_and_time()` was **changed** to requirer a model object as first argument.

#### New features:
* **Support for Custom Models:** You can now load custom-trained models
* **A new set of functions** (`birdnet_model_*`) to load pre-existing and custom-trained models. These functions offer a more flexible approach to model loading. See `?birdnet_model_load` for more details.
* **S3 Object-Oriented System:** The models are now implemented as S3 classes, and most of the functionality related to these models is provided through methods. This update makes the API cleaner and more consistent, and allows for better extensibility in future versions.


# birdnetR 0.1.2

Uses `birdnet v0.1.6` under the hood to fix an issue when downloading models.
Expand Down
1 change: 0 additions & 1 deletion R/birdnet-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
#' @importFrom reticulate use_python_version
## usethis namespace: end
NULL

12 changes: 12 additions & 0 deletions R/birdnetR-deprecated.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#' Deprecated Functions in the birdnetR Package
#'
#' These functions are deprecated and will be removed in future versions of the birdnetR package.
#' Please use the alternatives listed below.
#'
#' @name birdnetR-deprecated
#' @keywords internal
#' @section Deprecated functions:
#' \describe{
#' \item{\code{\link{init_model}}}{This function is deprecated. Use \code{\link{birdnet_model_tflite}} instead.}
#' }
NULL
Loading

0 comments on commit f2fac42

Please sign in to comment.