TemporalCrop<T>

Models & Types · AiDotNet.Augmentation.Video

Randomly crops a temporal segment from video.

Inheritance: AugmentationBase<T, ImageTensor<T>[]> → VideoAugmenterBase<T> → TemporalAugmenterBase<T> → TemporalCrop<T>

For Beginners

Temporal cropping takes a random consecutive portion of the video. For example, from a 10-second video, it might extract 8 seconds starting at a random point. This helps models learn to recognize actions regardless of when they occur in the video.

How It Works

When to use:

  • Action recognition where action can occur anywhere in the video
  • Training with variable-length videos
  • Reducing overfitting to specific temporal positions

Constructors

Constructor Summary
TemporalCrop(double minCropRatio, double maxCropRatio, double probability, double frameRate) Creates a new temporal crop augmentation.

Properties

Property Summary
double MaxCropRatio { get; } Gets the maximum crop ratio (fraction of original length to keep).
double MinCropRatio { get; } Gets the minimum crop ratio (fraction of original length to keep).

Methods

Method Summary
IDictionary<string, object> GetParameters()