docs.unity3d.com
    Show / Hide Table of Contents

    Class RoiAlign

    Represents an RoiAlign region of interest alignment layer. This calculates an output tensor by pooling the input tensor across each region of interest given by the rois tensor.

    Inheritance
    Object
    Layer
    RoiAlign
    Inherited Members
    Layer.inputs
    Layer.name
    Layer.outputs
    Layer.flags
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Sentis.Layers
    Syntax
    [Serializable]
    public class RoiAlign : Layer

    Constructors

    RoiAlign(String, String, String, String, RoiPoolingMode, Int32, Int32, Int32, Single)

    Initializes and returns an instance of RoiAlign region of interest alignment layer.

    Declaration
    public RoiAlign(string name, string input, string rois, string batchIndices, RoiPoolingMode mode, int outputHeight, int outputWidth, int samplingRatio, float spatialScale)
    Parameters
    Type Name Description
    String name

    The name to use for the output tensor of the layer.

    String input

    The name to use for the input tensor of the layer.

    String rois

    The name to use for the region of interest tensor of the layer.

    String batchIndices

    The name to use for the 1D input tensor where each element denotes the index of the image in the batch for a given region of interest.

    RoiPoolingMode mode

    The pooling mode of the operation as an RoiPoolingMode.

    Int32 outputHeight

    The height of the output tensor.

    Int32 outputWidth

    The width of the output tensor.

    Int32 samplingRatio

    The number of sampling points in the interpolation grid used to compute the output value of each pooled output bin.

    Single spatialScale

    The multiplicative spatial scale factor used to translate coordinates from their input spatial scale to the scale used when pooling.

    Fields

    mode

    The pooling mode of the operation as an RoiPoolingMode.

    Declaration
    public RoiPoolingMode mode
    Field Value
    Type Description
    RoiPoolingMode

    outputHeight

    The height of the output tensor.

    Declaration
    public int outputHeight
    Field Value
    Type Description
    Int32

    outputWidth

    The width of the output tensor.

    Declaration
    public int outputWidth
    Field Value
    Type Description
    Int32

    samplingRatio

    The number of sampling points in the interpolation grid used to compute the output value of each pooled output bin.

    Declaration
    public int samplingRatio
    Field Value
    Type Description
    Int32

    spatialScale

    The multiplicative spatial scale factor used to translate coordinates from their input spatial scale to the scale used when pooling.

    Declaration
    public float spatialScale
    Field Value
    Type Description
    Single

    Methods

    Execute(Tensor[], ExecutionContext)

    Executes the layer using the operations and variables from the ExecutionContext and returns the output tensor.

    If the layer has more than one output, output tensors are saved to variables.

    Declaration
    public override Tensor Execute(Tensor[] inputTensors, ExecutionContext ctx)
    Parameters
    Type Name Description
    Tensor[] inputTensors
    ExecutionContext ctx
    Returns
    Type Description
    Tensor
    Overrides
    Layer.Execute(Tensor[], ExecutionContext)

    ToString()

    Returns a string that represents the Layer.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Layer.ToString()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023