PrototypeMaskHead<T>
Models & Types · AiDotNet.ComputerVision.Segmentation.InstanceSegmentation
Prototype-based mask head for YOLO and SOLOv2.
Implements: IParameterChunkSource<T>, IParameterLayoutSource, IParameterSource<T>
For Beginners
Instead of predicting masks directly for each instance, prototype-based methods predict a set of prototype masks and per-instance coefficients. The final mask is a linear combination of prototypes weighted by coefficients.
Constructors
| Constructor | Summary |
|---|---|
PrototypeMaskHead(int inChannels, int numPrototypes) |
Creates a new prototype mask head. |
Properties
| Property | Summary |
|---|---|
int NumPrototypes { get; } |
Number of mask prototypes. |
Methods
| Method | Summary |
|---|---|
Tensor<T> AssembleMask(Tensor<T> prototypes, Tensor<T> coefficients) |
Assembles instance mask from prototypes and coefficients. |
Tensor<T> GeneratePrototypes(Tensor<T> features) |
Generates prototype masks from feature map. |
long GetParameterCount() |
|
void ReadParameters(BinaryReader reader) |
Reads parameters from binary reader. |
void WriteParameters(BinaryWriter writer) |
Writes parameters to binary writer. |