PSRTOptions
Options & Configuration · AiDotNet.Video.Options
Configuration options for PSRT-recurrent, the patch-alignment recurrent video super-resolution transformer.
Inheritance: ModelOptions → NeuralNetworkOptions → PSRTOptions
For Beginners
PSRT walks through a video forward and backward in time. To line up the previous frame with the current one it moves whole 8x8 tiles by their average motion, then lets attention fill in the details.
How It Works
Defaults follow Shi et al., NeurIPS 2022, and the authors’ release (XPixelGroup/RethinkVSRAlignment, psrt_recurrent_arch.py and options/4126_PSRTRecurrent_mix_precision_REDS_600K_N16.yml): 64-channel reconstruction, 120-channel embeddings, three RSTBs of six window-attention layers with 6 heads over 3x8x8 windows, MLP ratio 2, stochastic depth up to 0.1, 16-frame training sequences, Charbonnier loss (eps 1e-12 under the square root), Adam (0.9, 0.99) at 2e-4 with SPyNet at 0.125 times the rate and frozen for the first 5,000 iterations, cosine-annealed to 1e-7 over 600,000 iterations, and an exponential moving average of the weights (decay 0.999) for inference.
Constructors
| Constructor | Summary |
|---|---|
PSRTOptions() |
Initializes a new instance with default values. |
PSRTOptions(PSRTOptions other) |
Initializes a new instance by copying from another instance. |
Properties
| Property | Summary |
|---|---|
OnnxModelOptions OnnxOptions { get; set; } |
Gets or sets the ONNX runtime options. |
double CharbonnierEpsilon { get; set; } |
Gets or sets the Charbonnier ε; BasicSR’s loss is sqrt(d² + 1e-12), so ε = 1e-6. |
double DropPathRate { get; set; } |
Gets or sets the largest stochastic-depth rate, reached by the last layer of each transformer (0.1). |
double LearningRate { get; set; } |
Gets or sets Adam’s starting learning rate (2e-4). |
double MinLearningRate { get; set; } |
Gets or sets the floor of the cosine schedule (1e-7). |
double MlpRatio { get; set; } |
Gets or sets the MLP width as a multiple of the embedding (2). |
double SpyNetLearningRateMultiplier { get; set; } |
Gets or sets the multiplier of SPyNet’s learning rate (0.125, i.e. |
double? EmaMomentum { get; set; } |
Gets or sets the momentum of the weights’ moving average used for inference (0.001, ema_decay 0.999); null disables it and inference uses the trained weights. |
int CosineIterations { get; set; } |
Gets or sets the iterations of the cosine schedule (600,000). |
int EmbedDim { get; set; } |
Gets or sets the embedding width of every alignment transformer (120). |
int FlowFreezeIterations { get; set; } |
Gets or sets the iterations SPyNet stays frozen at the start of training (5,000). |
int MidChannels { get; set; } |
Gets or sets the width of the reconstruction convolutions (64). |
int NumFrames { get; set; } |
Gets or sets the frames of a training sequence (16, the REDS recipe). |
int NumHeads { get; set; } |
Gets or sets the window-attention heads (6). |
int WindowSize { get; set; } |
Gets or sets the spatial window size (8; windows are 3x8x8, the three aligned frames). |
int[] Depths { get; set; } |
Gets or sets the window-attention layers of each RSTB in an alignment transformer ([6, 6, 6]). |
string ModelPath { get; set; } |
Gets or sets the path to the ONNX model file. |