View source: R/classification.R
predict_species | R Documentation |
Infer Species for Given Detections
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
)
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 |
detection manifest with added prediction and confidence columns
## Not run: animals <- predictSpecies(animals, classifier[[1]], classifier[[2]], raw=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.