detectObject {animl}R Documentation

Run MD on a Single Image

Description

Returns the MD bounding boxes, classes, confidence above the min_conf threshold for a single image. #' Requires a an mdsession is already loaded (see loadMDModel() ) and the file path of the image in question.

Usage

detectObject(mdsession, imagefile, mdversion = 5, min_conf = 0.1)

Arguments

mdsession

Should be the output from loadMDmodel(model)

imagefile

The path for the image in question

mdversion

MegaDetector version, defaults to 5

min_conf

Confidence threshold for returning bounding boxes, defaults to 0.1

Value

a list of MD bounding boxes, classes, and confidence for the image

Examples

## Not run: 
 images <- read_exif(imagedir, 
                     tags = c("filename", "directory", "FileModifyDate"), 
                     recursive = TRUE)
 colnames(images)[1] <- "FilePath"
 mdsession <- loadMDModel(mdmodel)
 mdres <- classifyImageMD(mdsession, images$FilePath[1])

## End(Not run)

[Package animl version 1.1.0 Index]