Table of Contents

Class FrameDropout<T>

Namespace
AiDotNet.Augmentation.Video
Assembly
AiDotNet.dll

Randomly drops frames from video.

public class FrameDropout<T> : TemporalAugmenterBase<T>, IAugmentation<T, ImageTensor<T>[]>

Type Parameters

T

The numeric type for calculations.

Inheritance
FrameDropout<T>
Implements
Inherited Members

Remarks

For Beginners: Frame dropout randomly removes some frames from the video, simulating frame drops in real-world video capture or network streaming. This helps models become robust to missing frames.

When to use:

  • Training for real-world video processing with potential frame drops
  • Reducing overfitting to exact frame sequences
  • Simulating lower frame rate videos

Constructors

FrameDropout(double, int, double, double)

Creates a new frame dropout augmentation.

public FrameDropout(double dropoutRate = 0.1, int minFramesToKeep = 2, double probability = 0.3, double frameRate = 30)

Parameters

dropoutRate double

Probability of dropping each frame (default: 0.1).

minFramesToKeep int

Minimum frames to keep (default: 2).

probability double

Probability of applying this augmentation (default: 0.3).

frameRate double

Frame rate of the video (default: 30).

Properties

DropoutRate

Gets the probability of dropping each frame.

public double DropoutRate { get; }

Property Value

double

Remarks

Default: 0.1 (10% of frames dropped)

MinFramesToKeep

Gets the minimum number of frames to keep.

public int MinFramesToKeep { get; }

Property Value

int

Remarks

Default: 2

Methods

ApplyAugmentation(ImageTensor<T>[], AugmentationContext<T>)

Implement this method to perform the actual augmentation.

protected override ImageTensor<T>[] ApplyAugmentation(ImageTensor<T>[] data, AugmentationContext<T> context)

Parameters

data ImageTensor<T>[]

The input data.

context AugmentationContext<T>

The augmentation context.

Returns

ImageTensor<T>[]

The augmented data.

GetParameters()

Gets the parameters of this augmentation.

public override IDictionary<string, object> GetParameters()

Returns

IDictionary<string, object>

A dictionary of parameter names to values.