Package: sheepdog 3.2.1

sheepdog: Sample, Validate and Calibrate 'BirdNET' Detections

Tools to check whether automated detections from 'BirdNET' custom classifiers in passive acoustic monitoring are real. The package builds clip sets for manual validation (top-score, random-occasion or random-recording designs), summarises the reviewed clips, calibrates confidence scores into probabilities of true detection with hierarchical logistic models, and turns calibrated detections into nightly detection histories and effort-standardised community matrices.

Authors:Diogo B. Provete [aut, cre]

sheepdog_3.2.1.tar.gz
sheepdog_3.2.1.zip(r-4.7-any)sheepdog_3.2.1.zip(r-4.6-any)sheepdog_3.2.1.zip(r-4.5-any)
sheepdog_3.2.1.tgz(r-4.6-any)sheepdog_3.2.1.tgz(r-4.5-any)
sheepdog_3.2.1.tar.gz(r-4.7-any)sheepdog_3.2.1.tar.gz(r-4.6-any)
sheepdog_3.2.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
sheepdog/json (API)

# Install 'sheepdog' in R:
install.packages('sheepdog', repos = c('https://diogoprov.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/diogoprov/sheepdog/issues

Pkgdown/docs site:https://provetelab.org

On CRAN:

Conda:

anurabioacousticsbirdnetecoacousticspassive-acoustic-monitoringwildlife-monitoring

4.04 score 42 exports 33 dependencies

Last updated from:89a6cf3b5a (on main). Checks:6 ERROR, 3 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develERROR386
source / vignettesOK665
linux-releaseOK282
macos-releaseERROR102
macos-oldrelERROR113
windows-develERROR134
windows-releaseERROR222
windows-oldrelERROR197
wasm-releaseOK284

Exports:assign_reviewersbuild_community_matricesbuild_training_setcalibratecalibration_diagnosticscalibration_effortcalibration_foldscalibration_modelscalibration_priorcalibration_sensitivitycell_statusclassify_reviewcommunity_matricescommunity_matrices_drawscompare_calibration_modelsconsensus_verdictscut_clipsdetection_historyexclude_training_clipsextract_validation_clipsfit_calibrationhistory_drawsnightly_presencepack_clipsplot_calibrationplot_calibration_drawsplot_precisionpost_validationprecision_by_binprior_predictive_calibrationread_selection_tablesread_validation_tablesread_validationsretraining_clipsreviewer_agreementscore_detectionsselect_calibration_modelselect_clipssplit_by_reviewersuggest_core_speciessuggest_thresholdssummarise_history

Dependencies:bitbit64clicliprcpp11crayondplyrgenericsgluehmslifecyclemagrittrpillarpkgconfigprettyunitspROCprogresspurrrR6Rcppreadrrlangstringistringrtibbletidyrtidyselecttzdbutf8vctrsvroomwithrzip

Performance
Real data: the Curiango study | Candidates for one species | Predictions on held-out nights | Nightly histories and the cell-status regression | Multispecies: simulation with known truth | Detection histories, core species and matrices | Computing time | What you can do, and what did not consistently improve | Reproduce the results

Last update: 2026-10-23
Started: 2026-10-23

Calibrating confidence scores
Why calibrate | The example data | Candidate models | Comparing models by cross-validation | Scoring the probabilities and choosing a model | Fitting the calibration model | Calibration curves | Scoring every detection | Nightly detection histories | Choosing p_min and k | When the global model is enough | Model checks | One species, or one site | Keeping recordings and nights intact | The calibrate() wrapper | References

Last update: 2026-10-23
Started: 2026-10-22

Migrating from sheepdog 2.x to 3.0.0
What changes | Preserve the 2.x selection | Use the new selection | Review the downstream results

Last update: 2026-10-23
Started: 2026-10-23

Choosing a sampling design
Example data | "top": the highest scores | "random_detections": observation-confirmation design | "random_recordings": multiple-method design | Comparing the selected scores | Limiting the effort | Hand-off to occupancy models | References

Last update: 2026-10-22
Started: 2026-10-22

Bayesian calibration with brms
The model | The prior | Prior predictive check | Fitting | Posterior predictive check | Sensitivity to the prior | Posterior calibration curves | Scoring the detections | Two rules for a reliable detection | Propagating the uncertainty to the community matrices | The calibrate() wrapper | References

Last update: 2026-10-22
Started: 2026-10-22

From detections to community analyses
The calibrated detection history | Why the entry rule must be strict | Choosing the core species | Building the matrices | Sensitivity to the repetition rule | Writing the matrices to disk | Preparing the samples | Distance-based ordination: PCoA on Bray–Curtis | Model-based ordination: GLLVM | Model-based inference: species responses to season | Caveats | References

Last update: 2026-10-22
Started: 2026-10-22

Retraining the classifier with validated clips
What BirdNET-Analyzer expects | The reviewed clips | Keeping an independent test set | Building the training folders | Which clips to add | Training | After retraining

Last update: 2026-10-22
Started: 2026-10-22

Get started with sheepdog
Example data | Reading the selection tables | Selecting the clips to review | Cutting the clips | The manual review (simulated) | Summarising the review | Where next

Last update: 2026-10-22
Started: 2026-10-22

How many clips should I validate?
Example data | Stage 2: the effort curve | How the curve is built | The two curves | Reading the curve | Stage 1: which cells lack support | The practical decision

Last update: 2026-10-22
Started: 2026-10-22

Integration with crywolf: clip manifest and validation tables
Occasion | clip_manifest.csv | validation_by_clip.csv | Files written by v1.2.0 | Reading the validation in crywolf

Last update: 2026-10-21
Started: 2026-10-21

The FrogNet workflow
Stage 1a: clips to validate | Estimating false-positive rates | Stage 1b: after the review | Stage 2: calibration | Stage 3: community matrices | A runnable example

Last update: 2026-10-21
Started: 2026-10-21

Readme and manuals

Help Manual

Help pageTopics
Assign the clips to several reviewersassign_reviewers
Write the community matricesbuild_community_matrices
Build the training folders for BirdNET-Analyzerbuild_training_set
Calibrate confidence scores and build detection historiescalibrate
Convergence diagnostics of a Bayesian calibration modelcalibration_diagnostics
Effort curve of the calibrationcalibration_effort
Assign cross-validation folds for calibrationcalibration_folds
Candidate calibration modelscalibration_models
Example prior for a Bayesian calibration modelcalibration_prior
Prior and likelihood sensitivity of a Bayesian calibration modelcalibration_sensitivity
Status of each site x species cell for the community matricescell_status
Classify the reviewed clipsclassify_review
Community matrices from the detection historycommunity_matrices
Community matrices over posterior drawscommunity_matrices_draws
Compare calibration models by cross-validationcompare_calibration_models
Consensus verdicts of several reviewersconsensus_verdicts
Cut the selected clipscut_clips
Nightly detection historydetection_history
Leave the training clips out of a manifestexclude_training_clips
Build the validation clip setextract_validation_clips
Fit the calibration modelfit_calibration
Nightly detection histories over posterior drawshistory_draws
Confirmed presence by nightnightly_presence
Pack the clips into one zip per speciespack_clips
Plot the calibration curvesplot_calibration
Calibration curves of posterior (or prior) drawsplot_calibration_draws
Plot the precision curvesplot_precision
Summarise the manual validationpost_validation
Precision by confidence binprecision_by_bin
Prior predictive calibration curvesprior_predictive_calibration
Read BirdNET selection tablesread_selection_tables
Read and stack the validation tablesread_validation_tables
Read the validation tables for calibrationread_validations
Positive clips for retrainingretraining_clips
Agreement between reviewersreviewer_agreement
Score every detection with the calibration modelscore_detections
Select the calibration modelselect_calibration_model
Select the clips to validateselect_clips
Copy each reviewer's clips to their own foldersplit_by_reviewer
Suggest the core species of the community matricessuggest_core_species
Suggest a confidence threshold per speciessuggest_thresholds
Summarise the detection history by site and speciessummarise_history