SCNet<T>
Models & Types · AiDotNet.Audio.SourceSeparation
SCNet (Sparse Compression Network) for music source separation (Tong et al., 2024).
Inheritance: NeuralNetworkBase<T> → AudioNeuralNetworkBase<T> → SCNet<T>
Implements: IMusicSourceSeparator<T>
For Beginners
Instead of processing every individual frequency separately (which is slow), SCNet groups similar frequencies into clusters, processes the clusters efficiently, then expands back to full detail. Think of it like editing a compressed photo—you can make changes much faster, and the results still look great when decompressed.
Usage:
How It Works
SCNet uses sparse compression to reduce the frequency dimension before processing with attention layers, achieving competitive separation quality with significantly fewer parameters. It compresses frequency features into compact cluster representations, processes them, then decompresses back to the full frequency resolution for mask estimation.
Constructors
| Constructor | Summary |
|---|---|
SCNet(NeuralNetworkArchitecture<T> architecture, SCNetOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) |
|
SCNet(NeuralNetworkArchitecture<T> architecture, string modelPath, SCNetOptions options) |
Properties
| Property | Summary |
|---|---|
IReadOnlyList<string> SupportedSources { get; } |
|
int NumStems { get; } |
Methods
| Method | Summary |
|---|---|
ModelMetadata<T> GetModelMetadata() |
|
SourceSeparationResult<T> Separate(Tensor<T> audio) |
|
Task<SourceSeparationResult<T>> SeparateAsync(Tensor<T> audio, CancellationToken ct) |
|
Tensor<T> ExtractSource(Tensor<T> audio, string source) |
|
Tensor<T> ForwardForTraining(Tensor<T> input) |
|
Tensor<T> GetSourceMask(Tensor<T> audio, string source) |
|
Tensor<T> Remix(SourceSeparationResult<T> separationResult, IReadOnlyDictionary<string, double> sourceVolumes) |
|
Tensor<T> RemoveSource(Tensor<T> audio, string source) |