tflite_flutter_helper library
TensorFlow Lite Flutter Helper Library
Makes use of TensorFlow Lite Interpreter on Flutter easier by providing simple architecture for processing and manipulating input and output of TFLite Models.
API is similar to the TensorFlow Lite Android Support Library.
Classes
- BertNLClassifier
- Classifier API for NLClassification tasks with Bert models, categorizes string into different classes. The API expects a Bert based TFLite model with metadata populated.
- BertNLClassifierOptions
- Options to configure BertNLClassifier.
- BertQuestionAnswerer
- Task API for BertQA models. */
- BoundingBoxUtils
- Helper class for converting values that represents bounding boxes into rectangles.
- CastOp
- Casts a TensorBuffer to a specified data type.
- Category
- Category is a util class, contains a label and a float value. Typically it's used as result of classification tasks.
- DequantizeOp
-
Dequantizes a TensorBuffer with given
zeroPoint
andscale
. - FileUtil
- File I/O utilities.
- FloatRingBuffer
- Actual implementation of the ring buffer. */
- ImageConversions
- Implements some stateless image conversion methods.
- ImageOperator
- Operates a TensorImage object. Used in ImageProcessor.
- ImageProcessor
- ImageProcessor is a helper class for preprocessing and postprocessing TensorImage.
- ImageProcessorBuilder
- The Builder to create an ImageProcessor, which could be executed later.
- LabelAxisOp
- Labels TensorBuffer with axisLabels for outputs.
- LabelAxisOpBuilder
- Builder class to build a LabelTensor Operator.
- LabelUtil
- Label operation utils.
- NLClassifier
- Classifier API for natural language classification tasks, categorizes string into different classes.
- NLClassifierOptions
- Options to identify input and output tensors of the model.
- NormalizeOp
- Normalizes a TensorBuffer with given mean and stddev: output = (input - mean) / stddev.
-
Operator<
T> -
The common interface for classes that carries an "apply" method, which converts
T
to another one. - Pos
- Position information of the answer relative to context. It is sortable in descending order based on logit.
-
Processor<
T> -
Processes
T
object with prepared Operator. - QaAnswer
- Answers to QuestionAnswerer. Contains information about the answer and its relative position information to the context.
- QuantizeOp
-
Quantizes a TensorBuffer with given
zeroPoint
andscale
. - QuestionAnswerer
- API to answer questions based on context. */
- RecorderStream
- ResizeOp
- As a computation unit for processing images, it can resize an image to user-specified size.
- ResizeWithCropOrPadOp
- As a computation unit for processing images, it could resize image to predefined size.
- Rot90Op
- Rotates image by multiples of 90 degree.
-
SequentialProcessor<
T> -
A processor base class that chains a serial of Operator of type
T
and executes them. -
SequentialProcessorBuilder<
T> - The builder class to build a Sequential Processor.
- SoundStream
- SupportPreconditions
- TensorAudio
- TensorAudioFormat
- Wraps a few constants describing the format of the incoming audio samples, namely number of channels and the sample rate. By default, channels is set to 1.
- TensorBuffer
- Represents the data buffer for either a model's input or its output.
- TensorBufferFloat
- Represents data buffer with float(double) values.
- TensorBufferUint8
- Represents data buffer with 8-bit unsigned integer values.
- TensorImage
-
TensorImage is the wrapper class for
Image
object. When using image processing utils in Flutter Helper library, it's common to convert image objects in variant types to TensorImage at first. - TensorLabel
- TensorLabel is an util wrapper for TensorBuffers with meaningful labels on an axis.
- TensorOperator
- Applies some operation on TensorBuffers.
- TensorProcessor
- TensorProcessor is a helper class for preprocessing and postprocessing tensors. It could transform a TensorBuffer to another by executing a chain of TensorOperator.
- TensorProcessorBuilder
- The Builder to create an TensorProcessor, which could be executed later.
Enums
- BoundingBoxType
- Denotes how a bounding box is represented.
- CoordinateType
- Denotes if the coordinates are actual pixels or relative ratios.
- ResizeMethod
- Algorithms for resizing.
- SoundStreamStatus
Constants
- methodChannel → const MethodChannel
- methodChannelName → const String
Properties
Functions
-
enumToString(
Object o) → String