Learn R Programming

animl (version 1.1.0)

predictSpecies: Classifies Crops Using Specified Models

Description

Classifies Crops Using Specified Models

Usage

predictSpecies(
  input,
  model,
  resize = 456,
  standardize = FALSE,
  batch = 1,
  workers = 1
)

Value

a matrix of likelihoods for each class for each image

Arguments

input

either dataframe with MD crops or list of filenames

model

models with which to classify species

resize

resize images before classification, defaults to 299x299px

standardize

standardize images, defaults to FALSE

batch

number of images processed in each batch (keep small)

workers

number of cores

Examples

Run this code
if (FALSE) {
pred <- classifySpecies(imagesallanimal, paste0(modelfile, ".h5"),
                      resize = 456, standardize = FALSE, batch_size = 64, workers = 8)
}

Run the code above in your browser using DataLab