detectObjectBatch {animl}R Documentation

Run MegaDetector on a batch of images

Description

Runs MD on a list of image filepaths. Can resume for a results file and will checkpoint the results after a set number of images

Usage

detectObjectBatch(
  mdsession,
  images,
  mdversion = 5,
  min_conf = 0.1,
  batch = 1,
  outfile = NULL,
  checkpoint = 5000
)

Arguments

mdsession

should be the output from loadMDmodel(model)

images

list of image filepaths

mdversion

select MegaDetector version, defaults to 5

min_conf

Confidence threshold for returning bounding boxes, defaults to 0.1

batch

Process images in batches, defaults to 1

outfile

File containing previously checkpointed results

checkpoint

Bank results after processing a number of images, defaults to 5000

Value

a list of lists of bounding boxes for each image

Examples

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

## End(Not run)

[Package animl version 1.1.0 Index]