Class NonMaxSuppression
Represents a NonMaxSuppression object detection layer. This calculates an output tensor of selected indices of boxes from input boxes and scores tensors, and bases the indices on the scores and amount of intersection with previously selected boxes.
Inherited Members
Namespace: Unity.Sentis.Layers
Syntax
[Serializable]
public class NonMaxSuppression : Layer
Constructors
NonMaxSuppression(String, String, String, String, String, String, CenterPointBox)
Initializes and returns an instance of NonMaxSuppression object detection layer.
Declaration
public NonMaxSuppression(string name, string boxes, string scores, string maxOutputBoxesPerClass = null, string iouThreshold = null, string scoreThreshold = null, CenterPointBox centerPointBox = CenterPointBox.Corners)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | The name to use for the output tensor of the layer. |
| String | boxes | The name to use for the boxes tensor of the layer. |
| String | scores | The name to use for the scores tensor of the layer. |
| String | maxOutputBoxesPerClass | The name to use for an optional scalar tensor, with the maximum number of boxes to return for each class. |
| String | iouThreshold | The name to use for optional scalar tensor, with the threshold above which the intersect-over-union rejects a box. |
| String | scoreThreshold | The name to use for an optional scalar tensor, with the threshold below which the box score filters a box from the output. |
| CenterPointBox | centerPointBox | The format the |
Fields
centerPointBox
The format in which the box data is stored in the boxes tensor as a CenterPointBox.
Declaration
public CenterPointBox centerPointBox
Field Value
| Type | Description |
|---|---|
| CenterPointBox |
Methods
Execute(Tensor[], ExecutionContext)
Declaration
public override Tensor Execute(Tensor[] inputs, ExecutionContext ctx)
Parameters
| Type | Name | Description |
|---|---|---|
| Tensor[] | inputs | |
| ExecutionContext | ctx |
Returns
| Type | Description |
|---|---|
| Tensor |