Packages

class ImageFeaturizer extends Transformer with HasInputCol with HasOutputCol with Wrappable with ComplexParamsWritable with BasicLogging

The ImageFeaturizer relies on a CNTK model to do the featurization, one can set this model using the modelLocation parameter. To map the nodes of the CNTK model onto the standard "layers" structure of a feed forward neural net, one needs to supply a list of node names that range from the output node, back towards the input node of the CNTK Function. This list does not need to be exhaustive, and is provided to you if you use a model downloaded from the ModelDownloader, one can find this layer list in the schema of the downloaded model.

The ImageFeaturizer takes an input column of images (the type returned by the ImageReader), and automatically resizes them to fit the CMTKModel's inputs. It then feeds them through a pre-trained CNTK model. One can truncate the model using the cutOutputLayers parameter that determines how many layers to truncate from the output of the network. For example, layer=0 means that no layers are removed, layer=2 means that the image featurizer returns the activations of the layer that is two layers from the output layer.

Linear Supertypes
BasicLogging, ComplexParamsWritable, MLWritable, Wrappable, RWrappable, PythonWrappable, BaseWrappable, HasOutputCol, HasInputCol, Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ImageFeaturizer
  2. BasicLogging
  3. ComplexParamsWritable
  4. MLWritable
  5. Wrappable
  6. RWrappable
  7. PythonWrappable
  8. BaseWrappable
  9. HasOutputCol
  10. HasInputCol
  11. Transformer
  12. PipelineStage
  13. Logging
  14. Params
  15. Serializable
  16. Serializable
  17. Identifiable
  18. AnyRef
  19. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ImageFeaturizer()
  2. new ImageFeaturizer(uid: String)

    uid

    the uid of the image transformer

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def $[T](param: Param[T]): T
    Attributes
    protected
    Definition Classes
    Params
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. lazy val classNameHelper: String
    Attributes
    protected
    Definition Classes
    BaseWrappable
  7. final def clear(param: Param[_]): ImageFeaturizer.this.type
    Definition Classes
    Params
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  9. val cntkModel: TransformerParam
  10. def companionModelClassName: String
    Attributes
    protected
    Definition Classes
    BaseWrappable
  11. def copy(extra: ParamMap): Transformer
    Definition Classes
    ImageFeaturizer → Transformer → PipelineStage → Params
  12. def copyValues[T <: Params](to: T, extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  13. lazy val copyrightLines: String
    Attributes
    protected
    Definition Classes
    BaseWrappable
  14. val cutOutputLayers: IntParam

    The number of layer to cut off the end of the network; 0 leaves the network intact, 1 removes the output layer, etc.

  15. final def defaultCopy[T <: Params](extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  16. val dropNa: BooleanParam
  17. val emptyCntkModel: CNTKModel
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  20. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  21. def explainParams(): String
    Definition Classes
    Params
  22. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  23. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  24. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  26. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. def getCntkModel: CNTKModel

  28. def getCutOutputLayers: Int

  29. final def getDefault[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  30. def getDropNa: Boolean

  31. def getInputCol: String

    Definition Classes
    HasInputCol
  32. def getInputNode: Int

  33. def getLayerNames: Array[String]

  34. def getMiniBatchSize: Int

  35. def getModel: SerializableFunction

  36. final def getOrDefault[T](param: Param[T]): T
    Definition Classes
    Params
  37. def getOutputCol: String

    Definition Classes
    HasOutputCol
  38. def getParam(paramName: String): Param[Any]
    Definition Classes
    Params
  39. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  40. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  41. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  42. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  43. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  44. val inputCol: Param[String]

    The name of the input column

    The name of the input column

    Definition Classes
    HasInputCol
  45. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  46. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  47. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  48. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  49. val layerNames: StringArrayParam

    Array with valid CNTK nodes to choose from; the first entries of this array should be closer to the output node.

  50. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  51. def logBase(methodName: String): Unit
    Attributes
    protected
    Definition Classes
    BasicLogging
  52. def logClass(): Unit
    Definition Classes
    BasicLogging
  53. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  54. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  55. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  56. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  57. def logErrorBase(methodName: String, e: Exception): Unit
    Attributes
    protected
    Definition Classes
    BasicLogging
  58. def logFit[T](f: ⇒ T): T
    Definition Classes
    BasicLogging
  59. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  60. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  61. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  62. def logPredict[T](f: ⇒ T): T
    Definition Classes
    BasicLogging
  63. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  64. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  65. def logTrain[T](f: ⇒ T): T
    Definition Classes
    BasicLogging
  66. def logTransform[T](f: ⇒ T): T
    Definition Classes
    BasicLogging
  67. def logVerb[T](verb: String, f: ⇒ T): T
    Definition Classes
    BasicLogging
  68. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  69. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  70. def makePyFile(conf: CodegenConfig): Unit
    Definition Classes
    PythonWrappable
  71. def makeRFile(conf: CodegenConfig): Unit
    Definition Classes
    RWrappable
  72. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  73. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  74. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  75. val outputCol: Param[String]

    The name of the output column

    The name of the output column

    Definition Classes
    HasOutputCol
  76. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  77. def pyAdditionalMethods: String
    Definition Classes
    PythonWrappable
  78. lazy val pyClassDoc: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  79. lazy val pyClassName: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  80. def pyExtraEstimatorImports: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  81. def pyExtraEstimatorMethods: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  82. lazy val pyInheritedClasses: Seq[String]
    Attributes
    protected
    Definition Classes
    PythonWrappable
  83. def pyInitFunc(): String
    Definition Classes
    PythonWrappable
  84. lazy val pyInternalWrapper: Boolean
    Attributes
    protected
    Definition Classes
    ImageFeaturizerPythonWrappable
  85. lazy val pyObjectBaseClass: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  86. def pyParamArg[T](p: Param[T]): String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  87. def pyParamDefault[T](p: Param[T]): Option[String]
    Attributes
    protected
    Definition Classes
    PythonWrappable
  88. def pyParamGetter(p: Param[_]): String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  89. def pyParamSetter(p: Param[_]): String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  90. def pyParamsArgs: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  91. def pyParamsDefaults: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  92. lazy val pyParamsDefinitions: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  93. def pyParamsGetters: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  94. def pyParamsSetters: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  95. def pythonClass(): String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  96. def rClass(): String
    Attributes
    protected
    Definition Classes
    RWrappable
  97. def rDocString: String
    Attributes
    protected
    Definition Classes
    RWrappable
  98. def rExtraBodyLines: String
    Attributes
    protected
    Definition Classes
    RWrappable
  99. def rExtraInitLines: String
    Attributes
    protected
    Definition Classes
    RWrappable
  100. lazy val rFuncName: String
    Attributes
    protected
    Definition Classes
    RWrappable
  101. lazy val rInternalWrapper: Boolean
    Attributes
    protected
    Definition Classes
    RWrappable
  102. def rParamArg[T](p: Param[T]): String
    Attributes
    protected
    Definition Classes
    RWrappable
  103. def rParamsArgs: String
    Attributes
    protected
    Definition Classes
    RWrappable
  104. def rSetterLines: String
    Attributes
    protected
    Definition Classes
    RWrappable
  105. def save(path: String): Unit
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  106. final def set(paramPair: ParamPair[_]): ImageFeaturizer.this.type
    Attributes
    protected
    Definition Classes
    Params
  107. final def set(param: String, value: Any): ImageFeaturizer.this.type
    Attributes
    protected
    Definition Classes
    Params
  108. final def set[T](param: Param[T], value: T): ImageFeaturizer.this.type
    Definition Classes
    Params
  109. def setCntkModel(value: CNTKModel): ImageFeaturizer.this.type

  110. def setCutOutputLayers(value: Int): ImageFeaturizer.this.type

  111. final def setDefault(paramPairs: ParamPair[_]*): ImageFeaturizer.this.type
    Attributes
    protected
    Definition Classes
    Params
  112. final def setDefault[T](param: Param[T], value: T): ImageFeaturizer.this.type
    Attributes
    protected
    Definition Classes
    Params
  113. def setDropNa(value: Boolean): ImageFeaturizer.this.type

  114. def setInputCol(value: String): ImageFeaturizer.this.type

    Definition Classes
    HasInputCol
  115. def setInputNode(value: Int): ImageFeaturizer.this.type

  116. def setLayerNames(value: Array[String]): ImageFeaturizer.this.type

  117. def setMiniBatchSize(value: Int): ImageFeaturizer.this.type

  118. def setModel(model: SerializableFunction): ImageFeaturizer.this.type

  119. def setModel(modelSchema: ModelSchema): ImageFeaturizer.this.type
  120. def setModelLocation(path: String): ImageFeaturizer.this.type
  121. def setOutputCol(value: String): ImageFeaturizer.this.type

    Definition Classes
    HasOutputCol
  122. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  123. def toString(): String
    Definition Classes
    Identifiable → AnyRef → Any
  124. def transform(dataset: Dataset[_]): DataFrame
    Definition Classes
    ImageFeaturizer → Transformer
  125. def transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" )
  126. def transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" ) @varargs()
  127. def transformSchema(schema: StructType): StructType

    Add the features column to the schema

    Add the features column to the schema

    returns

    schema with features column

    Definition Classes
    ImageFeaturizer → PipelineStage
  128. def transformSchema(schema: StructType, logging: Boolean): StructType
    Attributes
    protected
    Definition Classes
    PipelineStage
    Annotations
    @DeveloperApi()
  129. val uid: String
    Definition Classes
    ImageFeaturizerBasicLogging → Identifiable
  130. val ver: String
    Definition Classes
    BasicLogging
  131. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  132. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  133. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  134. def write: MLWriter
    Definition Classes
    ComplexParamsWritable → MLWritable

Inherited from BasicLogging

Inherited from ComplexParamsWritable

Inherited from MLWritable

Inherited from Wrappable

Inherited from RWrappable

Inherited from PythonWrappable

Inherited from BaseWrappable

Inherited from HasOutputCol

Inherited from HasInputCol

Inherited from Transformer

Inherited from PipelineStage

Inherited from Logging

Inherited from Params

Inherited from Serializable

Inherited from Serializable

Inherited from Identifiable

Inherited from AnyRef

Inherited from Any

getParam

param

setParam

Ungrouped