org.apache.mxnet.infer

ImageClassifier

Related Docs: object ImageClassifier | package infer

class ImageClassifier extends Classifier

A class for image classification tasks. Contains helper methods.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ImageClassifier
  2. Classifier
  3. ClassifierBase
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ImageClassifier(modelPathPrefix: String, inputDescriptors: IndexedSeq[DataDesc], contexts: Array[Context] = Context.cpu(), epoch: Option[Int] = Some(0))

    modelPathPrefix

    Path prefix from where to load the model artifacts. These include the symbol, parameters, and synset.txt. Example: file://model-dir/resnet-152 (containing resnet-152-symbol.json, resnet-152-0000.params, and synset.txt).

    inputDescriptors

    Descriptors defining the input node names, shape, layout and type parameters

    contexts

    Device contexts on which you want to run inference; defaults to CPU

    epoch

    Model epoch to load; defaults to 0

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. val batch: Int

    Attributes
    protected[org.apache.mxnet.infer]
  6. val channel: Int

    Attributes
    protected[org.apache.mxnet.infer]
  7. def classify(input: IndexedSeq[Array[Float]], topK: Option[Int] = None): IndexedSeq[(String, Float)]

    Takes flat arrays as input and returns (Label, Score) tuples.

    Takes flat arrays as input and returns (Label, Score) tuples.

    input

    Indexed sequence one-dimensional array of floats

    topK

    (Optional) How many result (sorting based on the last axis) elements to return. Default returns unsorted output.

    returns

    Indexed sequence of (Label, Score) tuples

    Definition Classes
    ClassifierClassifierBase
  8. def classifyImage(inputImage: BufferedImage, topK: Option[Int] = None): IndexedSeq[IndexedSeq[(String, Float)]]

    To classify the image according to the provided model

    To classify the image according to the provided model

    inputImage

    Path prefix of the input image

    topK

    Number of result elements to return, sorted by probability

    returns

    List of list of tuples of (Label, Probability)

  9. def classifyImageBatch(inputBatch: Traversable[BufferedImage], topK: Option[Int] = None): IndexedSeq[IndexedSeq[(String, Float)]]

    To classify batch of input images according to the provided model

    To classify batch of input images according to the provided model

    inputBatch

    Input array of buffered images

    topK

    Number of result elements to return, sorted by probability

    returns

    List of list of tuples of (Label, Probability)

  10. def classifyWithNDArray(input: IndexedSeq[NDArray], topK: Option[Int] = None): IndexedSeq[IndexedSeq[(String, Float)]]

    Perform multiple classification operations on NDArrays.

    Perform multiple classification operations on NDArrays. Also works with batched input.

    input

    Indexed sequence of NDArrays

    topK

    (Optional) How many result (sorting based on the last axis) elements to return. Default returns unsorted output.

    returns

    Traversable sequence of (Label, Score) tuples

    Definition Classes
    ClassifierClassifierBase
  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. val contexts: Array[Context]

    Device contexts on which you want to run inference; defaults to CPU

    Device contexts on which you want to run inference; defaults to CPU

    Attributes
    protected
    Definition Classes
    Classifier
  13. val epoch: Option[Int]

    Model epoch to load; defaults to 0

    Model epoch to load; defaults to 0

    Attributes
    protected
    Definition Classes
    Classifier
  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  18. val handler: MXNetHandler

    Attributes
    protected[org.apache.mxnet.infer]
    Definition Classes
    Classifier
  19. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  20. val height: Int

    Attributes
    protected[org.apache.mxnet.infer]
  21. val inputDescriptors: IndexedSeq[DataDesc]

    Descriptors defining the input node names, shape, layout and type parameters

    Descriptors defining the input node names, shape, layout and type parameters

    Attributes
    protected
    Definition Classes
    Classifier
  22. val inputLayout: String

    Attributes
    protected[org.apache.mxnet.infer]
  23. val inputShape: Shape

    Attributes
    protected[org.apache.mxnet.infer]
  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  28. val predictor: PredictBase

    Attributes
    protected[org.apache.mxnet.infer]
    Definition Classes
    Classifier
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. val synset: IndexedSeq[String]

    Attributes
    protected[org.apache.mxnet.infer]
    Definition Classes
    Classifier
  31. val synsetFilePath: String

    Attributes
    protected[org.apache.mxnet.infer]
    Definition Classes
    Classifier
  32. def toString(): String

    Definition Classes
    AnyRef → Any
  33. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. val width: Int

    Attributes
    protected[org.apache.mxnet.infer]

Inherited from Classifier

Inherited from ClassifierBase

Inherited from AnyRef

Inherited from Any

Ungrouped