ovml_yolo_detect: Detect objects in image using a YOLO network

View source: R/yolo.R

ovml_yolo_detectR Documentation

Detect objects in image using a YOLO network

Description

Processing of a video file requires that ffmpeg be installed on your system. ovideo::ov_install_ffmpeg() can help with this on Windows and Linux.

Usage

ovml_yolo_detect(
  net,
  image_file,
  conf = 0.6,
  nms_conf = 0.4,
  classes,
  batch_size = 4,
  ...
)

Arguments

net

yolo: as returned by ovml_yolo()

image_file

character: path to one or more image files, or a single video file (mp4, m4v, or mov extension)

conf

scalar: confidence level

nms_conf

scalar: non-max suppression confidence level

classes

character: vector of class names, only detections of these classes will be returned

batch_size

integer: the number of images to process as a batch. Increasing batch_size will make processing of multiple images faster, but requires more memory

...

: currently ignored

Value

A data.frame with columns "image_number", "image_file", "class", "score", "xmin", "xmax", "ymin", "ymax"

See Also

ovml_yolo()

Examples

## Not run: 
  dn <- ovml_yolo()
  img <- ovml_example_image()
  res <- ovml_yolo_detect(dn, img)
  ovml_ggplot(img, res)

## End(Not run)

openvolley/ovml documentation built on Aug. 2, 2022, 11:53 a.m.