Lfm3VideoProcessor class final
The LFM3-VL video processor as LFM3-Omni configures it: frames sampled at fps (between minFrames and maxFrames), every frame resized to one size from the whole clip's pixel budget, and grouped in temporal pairs. Decoding the video and its soundtrack is the caller's responsibility.
Constructors
- Lfm3VideoProcessor({int patchSize = 16, int mergeSize = 2, int temporalPatchSize = 2, double fps = 2, int minFrames = 4, int maxFrames = 384, int minPixels = 4096, int maxPixels = 25165824, bool capPixelsPerFrame = false, int maxVideoTokens = 768})
-
Lfm3VideoProcessor.fromJson(Map<
String, Object?> json) -
factory
- Lfm3VideoProcessor.load(String modelDir)
-
factory
Properties
- capPixelsPerFrame → bool
-
final
- factor → int
-
no setter
- fps → double
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxFrames → int
-
final
- maxPixels → int
-
final
- maxVideoTokens → int
-
final
- mergeSize → int
-
final
- minFrames → int
-
final
- minPixels → int
-
final
- patchSize → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- temporalPatchSize → int
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prepareFrames(
List< Uint8List> frames, {required int height, required int width, required List<int> frameIndices, required double sourceFps}) → VisionVideoInput -
Resizes and groups already sampled frames: packed RGB, one size for all,
taken at
frameIndicesof a clip atsourceFps. -
resizedSize(
int frames, int height, int width) → (int, int) -
Upstream video
smart_resizeforframessampled frames. -
sampleIndices(
int totalFrames, double sourceFps) → List< int> -
Upstream
sample_frames: rounded linspace over the whole clip. -
toString(
) → String -
A string representation of this object.
inherited
-
withMaxPixels(
int pixels) → Lfm3VideoProcessor - A copy with a smaller whole-clip pixel budget, for bounded encoding.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited