Title: | Machine Learning Tools for Volleyball |
---|---|
Description: | Image and video machine learning tools, for application to volleyball analytics. |
Authors: | Ben Raymond [aut, cre], Adrien Ickowicz [aut], openvolley.org [org] |
Maintainer: | Ben Raymond <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.5 |
Built: | 2024-11-13 05:29:53 UTC |
Source: | https://github.com/openvolley/ovmlpy |
Models are implemented in Python and accessed via reticulate
.
ovml_yolo(version = "7", device = 0, weights_file = "auto", ...)
ovml_yolo(version = "7", device = 0, weights_file = "auto", ...)
version |
integer or string: one of
|
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 |
... |
: currently ignored |
A YOLO network object
https://github.com/WongKinYiu/yolov7
## Not run: dn <- ovml_yolo() img <- ovml_example_image() res <- ovml_yolo_detect(dn, img) ovml_ggplot(img, res) ## End(Not run)
## Not run: dn <- ovml_yolo() img <- ovml_example_image() res <- ovml_yolo_detect(dn, img) ovml_ggplot(img, res) ## End(Not run)
Works on a single input image only, at the moment.
ovml_yolo_detect( net, image_file, conf = 0.25, nms_conf = 0.45, classes, as, ... )
ovml_yolo_detect( net, image_file, conf = 0.25, nms_conf = 0.45, classes, as, ... )
net |
yolo: as returned by |
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 |
as |
string: for object detection networks, "boxes" (default and only option); for pose detection "segments" (default) or "keypoints" |
... |
: currently ignored |
A data.frame with columns "image_number", "image_file", "class", "score", "xmin", "xmax", "ymin", "ymax", "frame"
## Not run: dn <- ovml_yolo() img <- ovml_example_image() res <- ovml_yolo_detect(dn, img) ovml_ggplot(img, res) ## End(Not run)
## Not run: dn <- ovml_yolo() img <- ovml_example_image() res <- ovml_yolo_detect(dn, img) ovml_ggplot(img, res) ## End(Not run)
Python and its required packages are installed into a virtual environment. ovml_yolo7_python_envname()
returns the name of the virtual environment used, and ovml_yolo7_python_envpath()
its path on the file system.
ovml_yolo7_python_setup() ovml_yolo7_python_envname() ovml_yolo7_python_envpath()
ovml_yolo7_python_setup() ovml_yolo7_python_envname() ovml_yolo7_python_envpath()
TRUE
(invisibly) on success