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.6 |
Built: | 2024-12-22 05:20:51 UTC |
Source: | https://github.com/openvolley/ovml |
Construct YOLO network
ovml_yolo(version = 4, device = "cuda", weights_file = "auto", class_labels)
ovml_yolo(version = 4, device = "cuda", weights_file = "auto", class_labels)
version |
integer or string: one of
|
device |
string: "cpu" or "cuda" |
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 |
class_labels |
character: the class labels used for network training. If missing or NULL, these default to |
A YOLO network object
https://github.com/pjreddie/darknet, 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)
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.
ovml_yolo_detect( net, image_file, conf = 0.6, nms_conf = 0.4, classes, batch_size = 4, ... )
ovml_yolo_detect( net, image_file, conf = 0.6, nms_conf = 0.4, classes, batch_size = 4, ... )
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 |
batch_size |
integer: the number of images to process as a batch. Increasing |
... |
: currently ignored |
A data.frame with columns "image_number", "image_file", "class", "score", "xmin", "xmax", "ymin", "ymax"
## 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)