predict_species: Infer Species for Given Detections

View source: R/classification.R

predict_speciesR Documentation

Infer Species for Given Detections

Description

Infer Species for Given Detections

Usage

predict_species(
  detections,
  model,
  device = NULL,
  out_file = NULL,
  file_col = "Frame",
  crop = TRUE,
  resize_width = 299,
  resize_height = 299,
  normalize = TRUE,
  batch_size = 1,
  workers = 1
)

Arguments

detections

manifest of animal detections

model

loaded classifier model

device

send model to the specified device

out_file

path to csv to save results to

file_col

column in manifest containing file paths

crop

use bbox to crop images before feeding into model

resize_width

image width input size

resize_height

image height input size

normalize

normalize the tensor before inference

batch_size

batch size for generator

workers

number of processes

classes

data.frame of classes

raw

output raw logits in addition to manifest

Value

detection manifest with added prediction and confidence columns

Examples

## Not run: animals <- predictSpecies(animals, classifier[[1]], classifier[[2]], raw=FALSE)

icr-ctl/animl documentation built on July 5, 2025, 6:44 a.m.