View Source TFLiteElixir.ImageClassification (tflite_elixir v0.3.7)

Experimental image classification module.

Summary

Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

predict(pid, input_path, opts \\ [])

View Source
@spec predict(
  pid(),
  binary()
  | %StbImage{data: term(), shape: term(), type: term()}
  | %Nx.Tensor{
      data: term(),
      names: term(),
      shape: term(),
      type: term(),
      vectorized_axes: term()
    },
  Keyword.t()
) :: term()
Link to this function

set_label(pid, label_file)

View Source
@spec set_label(pid(), String.t() | [String.t()]) :: :ok
Link to this function

set_label_from_associated_file(pid, associated_filename)

View Source
@spec set_label_from_associated_file(pid(), String.t()) :: :ok | {:error, String.t()}
Link to this function

start(model, opts \\ [])

View Source
@spec start(any(), any()) :: :ignore | {:error, any()} | {:ok, pid()}