Skip to main content

ClikaRT::processor::processor_defaults

namespace

Default knob values the from_args factories apply when an argument is left {} (the documented HuggingFace/PIL defaults). Named here so callers see them in the header, arg.value_or(kImageDefault…), without reading the docs. The library static_asserts each against its internal default, so these and the internal defaults are one source of truth (a drift is a compile error).

Variables

kImageRescaleFactor

double kImageRescaleFactor = 1.0 / 255.0

pixel scale (1/255)

Declared in ClikaRT/processor/processor.h, line 45

kImageDoRescale

bool kImageDoRescale = true

Declared in ClikaRT/processor/processor.h, line 46

kImageDoNormalize

bool kImageDoNormalize = true

Declared in ClikaRT/processor/processor.h, line 47

kImageDoConvertRgb

bool kImageDoConvertRgb = true

Declared in ClikaRT/processor/processor.h, line 48

kImageResampleBicubic

int kImageResampleBicubic = 3

PIL bicubic (HF default).

Declared in ClikaRT/processor/processor.h, line 49

kImageAntialias

bool kImageAntialias = true

antialiased resize (PIL behavior)

Declared in ClikaRT/processor/processor.h, line 50

kAudioSamplingRate

std::int64_t kAudioSamplingRate = 16000

16 kHz

Declared in ClikaRT/processor/processor.h, line 51

kAudioFeatureSize

std::int64_t kAudioFeatureSize = 80

mel bins

Declared in ClikaRT/processor/processor.h, line 52

kAudioNFft

std::int64_t kAudioNFft = 400

Declared in ClikaRT/processor/processor.h, line 53

kAudioHopLength

std::int64_t kAudioHopLength = 160

Declared in ClikaRT/processor/processor.h, line 54

kVideoNumFrames

std::int64_t kVideoNumFrames = 0

0 = keep all / use fps

Declared in ClikaRT/processor/processor.h, line 55

kVideoFps

double kVideoFps = 0.0

0 = use num_frames

Declared in ClikaRT/processor/processor.h, line 56

ClikaRT/processor/processor.h

#include <ClikaRT/processor/processor.h>

Generic, config-driven media preprocessors that read a model's preprocessor config (ClikaRT has no native format of its own; the loader names the format it reads): an ImageProcessor (resize / crop / rescale / normalize), an AudioProcessor (raw waveform / log-mel / filterbank), a VideoProcessor (temporal sampling over the image pipeline), and a Processor bundle. Each turns file(s) / bytes / a Tensor into a preprocessed Tensor.

Placement: a processor binds a StreamOrDevice at load time (where its work runs by default); every process call takes an optional StreamOrDevice override ({} = use the bound one). A default-constructed binding is CPU.