Detect objects using YOLO v2 object detector
The yolov2ObjectDetector
object defines the trained YOLO v2
object detector. To detect objects in an image, pass the trained YOLO v2 object detector to
the detect
object
function. The YOLO v2 object detector recognizes specific objects in images, based on the
training images and ground truth data used with the trainYOLOv2ObjectDetector
function. You can also use the
yolov2ObjectDetector
function to create the
yolov2ObjectDetector
object from a pretrained YOLO v2
network.
Create a yolov2ObjectDetector
object by calling the trainYOLOv2ObjectDetector
function with training data (requires Deep Learning Toolbox™).
detector = trainYOLOv2ObjectDetector(trainingData,____)
creates a YOLO v2 object detector by using the pretrained YOLO v2 network specified at the
input. detector
= yolov2ObjectDetector(network
)
The input network can also be an imported network from ONNX™ (Open Neural Network Exchange). For more information on how to create YOLO v2 object detector from an imported ONNX YOLO v2 network, see Import Pretrained ONNX YOLO v2 Object Detector.
specify image sizes used during training by using a name-value pair in addition to the
input argument in the previous syntax.detector
= yolov2ObjectDetector(___,'TrainingImageSize',trainingSizes
)
detect | Detect objects using YOLO v2 object detector |