Skip to contents

Models are implemented in Python and accessed via reticulate.

Usage

ovml_yolo(version = "7", device = 0, weights_file = "auto", ...)

Arguments

version

integer or string: one of

  • 7 or "7-tiny" : YOLO v7 or v7-tiny

device

string or numeric: "cpu" or 0, 1, 2 etc for GPU devices. Defaults to 0 but will silently fall back to "cpu" if torch reports that CUDA is not available

weights_file

string: either the path to the weights file that already exists on your system or "auto". If "auto", the weights file will be downloaded if necessary and stored in the directory given by ovml_cache_dir()

...

: currently ignored

Value

A YOLO network object

References

https://github.com/WongKinYiu/yolov7

Examples

if (FALSE) {
  dn <- ovml_yolo()
  img <- ovml_example_image()
  res <- ovml_yolo_detect(dn, img)
  ovml_ggplot(img, res)
}