Table of Contents

Class DetectionModel

Namespace
Emgu.CV.Dnn
Assembly
Emgu.CV.dll

This class represents high-level API for object detection networks.

public class DetectionModel : Model, IDisposable
Inheritance
DetectionModel
Implements
Inherited Members

Constructors

DetectionModel(Net)

Create model from deep learning network.

public DetectionModel(Net net)

Parameters

net Net

DNN Network

DetectionModel(string, string)

Create detection model from network represented in one of the supported formats.

public DetectionModel(string model, string config = null)

Parameters

model string

Binary file contains trained weights.

config string

Text file contains network configuration.

Properties

NmsAcrossClasses

It true, will perform non-maximum suppression across classes

public bool NmsAcrossClasses { get; set; }

Property Value

bool

Methods

Detect(IInputArray, VectorOfInt, VectorOfFloat, VectorOfRect, float, float)

Given the input frame, create input blob, run net and return result detections.

public void Detect(IInputArray frame, VectorOfInt classIds, VectorOfFloat confidences, VectorOfRect boxes, float confThreshold = 0.5, float nmsThreshold = 0)

Parameters

frame IInputArray

The input image.

classIds VectorOfInt

Class indexes in result detection.

confidences VectorOfFloat

A set of corresponding confidences.

boxes VectorOfRect

A set of bounding boxes.

confThreshold float

A threshold used to filter boxes by confidences.

nmsThreshold float

A threshold used in non-maximum suppression. The default value 0 means we will not perform non-maximum suppression.

DisposeObject()

Release the memory associated with this detection model.

protected override void DisposeObject()