Class SOLOv2<T>
- Assembly
- AiDotNet.dll
SOLOv2 (Segmenting Objects by Locations v2) for instance segmentation.
public class SOLOv2<T> : InstanceSegmenterBase<T>
Type Parameters
TThe numeric type used for calculations.
- Inheritance
-
SOLOv2<T>
- Inherited Members
Remarks
For Beginners: SOLOv2 is an anchor-free, box-free instance segmentation method. It directly predicts instance masks by location, dividing the image into a grid and predicting masks for each cell. This eliminates the need for ROI operations.
Key features: - Direct mask prediction without boxes - Dynamic convolution for mask generation - Grid-based location encoding - More efficient than two-stage methods
Reference: Wang et al., "SOLOv2: Dynamic and Fast Instance Segmentation", NeurIPS 2020
Constructors
SOLOv2(InstanceSegmentationOptions<T>)
Creates a new SOLOv2 model.
public SOLOv2(InstanceSegmentationOptions<T> options)
Parameters
optionsInstanceSegmentationOptions<T>
Properties
Name
Name of this segmentation model.
public override string Name { get; }
Property Value
Methods
GetParameterCount()
Gets the total parameter count.
public override long GetParameterCount()
Returns
LoadWeightsAsync(string, CancellationToken)
Loads pretrained weights.
public override Task LoadWeightsAsync(string pathOrUrl, CancellationToken cancellationToken = default)
Parameters
pathOrUrlstringcancellationTokenCancellationToken
Returns
SaveWeights(string)
Saves model weights.
public override void SaveWeights(string path)
Parameters
pathstring
Segment(Tensor<T>)
Performs instance segmentation on an image.
public override InstanceSegmentationResult<T> Segment(Tensor<T> image)
Parameters
imageTensor<T>Input image tensor [batch, channels, height, width].
Returns
- InstanceSegmentationResult<T>
Instance segmentation result with masks.