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, DotnetWrappable, 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. DotnetWrappable
  7. RWrappable
  8. PythonWrappable
  9. BaseWrappable
  10. HasOutputCol
  11. HasInputCol
  12. Transformer
  13. PipelineStage
  14. Logging
  15. Params
  16. Serializable
  17. Serializable
  18. Identifiable
  19. AnyRef
  20. 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. def dotnetAdditionalMethods: String
    Definition Classes
    DotnetWrappable
  17. def dotnetClass(): String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  18. lazy val dotnetClassName: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  19. lazy val dotnetClassNameString: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  20. lazy val dotnetClassWrapperName: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  21. lazy val dotnetCopyrightLines: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  22. def dotnetExtraEstimatorImports: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  23. def dotnetExtraMethods: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  24. lazy val dotnetInternalWrapper: Boolean
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  25. def dotnetMLReadWriteMethods: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  26. lazy val dotnetNamespace: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  27. lazy val dotnetObjectBaseClass: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  28. def dotnetParamGetter(p: Param[_]): String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  29. def dotnetParamGetters: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  30. def dotnetParamSetter(p: Param[_]): String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  31. def dotnetParamSetters: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  32. def dotnetWrapAsTypeMethod: String
    Attributes
    protected
    Definition Classes
    DotnetWrappable
  33. val dropNa: BooleanParam
  34. val emptyCntkModel: CNTKModel
  35. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  37. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  38. def explainParams(): String
    Definition Classes
    Params
  39. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  40. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  41. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  42. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  43. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  44. def getCntkModel: CNTKModel

  45. def getCutOutputLayers: Int

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

  48. def getInputCol: String

    Definition Classes
    HasInputCol
  49. def getInputNode: Int

  50. def getLayerNames: Array[String]

  51. def getMiniBatchSize: Int

  52. def getModel: SerializableFunction

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

    Definition Classes
    HasOutputCol
  55. def getParam(paramName: String): Param[Any]
    Definition Classes
    Params
  56. def getParamInfo(p: Param[_]): ParamInfo[_]
    Definition Classes
    BaseWrappable
  57. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  58. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  59. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  60. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  61. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  62. val inputCol: Param[String]

    The name of the input column

    The name of the input column

    Definition Classes
    HasInputCol
  63. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  64. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  65. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  66. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  67. val layerNames: StringArrayParam

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

  68. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  69. def logBase(methodName: String): Unit
    Attributes
    protected
    Definition Classes
    BasicLogging
  70. def logClass(): Unit
    Definition Classes
    BasicLogging
  71. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  72. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  73. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  74. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  75. def logErrorBase(methodName: String, e: Exception): Unit
    Attributes
    protected
    Definition Classes
    BasicLogging
  76. def logFit[T](f: ⇒ T): T
    Definition Classes
    BasicLogging
  77. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  78. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  79. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  80. def logPredict[T](f: ⇒ T): T
    Definition Classes
    BasicLogging
  81. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  82. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  83. def logTrain[T](f: ⇒ T): T
    Definition Classes
    BasicLogging
  84. def logTransform[T](f: ⇒ T): T
    Definition Classes
    BasicLogging
  85. def logVerb[T](verb: String, f: ⇒ T): T
    Definition Classes
    BasicLogging
  86. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  87. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  88. def makeDotnetFile(conf: CodegenConfig): Unit
    Definition Classes
    DotnetWrappable
  89. def makePyFile(conf: CodegenConfig): Unit
    Definition Classes
    PythonWrappable
  90. def makeRFile(conf: CodegenConfig): Unit
    Definition Classes
    RWrappable
  91. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  92. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  93. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  94. val outputCol: Param[String]

    The name of the output column

    The name of the output column

    Definition Classes
    HasOutputCol
  95. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  96. def pyAdditionalMethods: String
    Definition Classes
    PythonWrappable
  97. lazy val pyClassDoc: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  98. lazy val pyClassName: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  99. def pyExtraEstimatorImports: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  100. def pyExtraEstimatorMethods: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  101. lazy val pyInheritedClasses: Seq[String]
    Attributes
    protected
    Definition Classes
    PythonWrappable
  102. def pyInitFunc(): String
    Definition Classes
    PythonWrappable
  103. lazy val pyInternalWrapper: Boolean
    Attributes
    protected
    Definition Classes
    ImageFeaturizerPythonWrappable
  104. lazy val pyObjectBaseClass: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  105. def pyParamArg[T](p: Param[T]): String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  106. def pyParamDefault[T](p: Param[T]): Option[String]
    Attributes
    protected
    Definition Classes
    PythonWrappable
  107. def pyParamGetter(p: Param[_]): String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  108. def pyParamSetter(p: Param[_]): String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  109. def pyParamsArgs: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  110. def pyParamsDefaults: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  111. lazy val pyParamsDefinitions: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  112. def pyParamsGetters: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  113. def pyParamsSetters: String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  114. def pythonClass(): String
    Attributes
    protected
    Definition Classes
    PythonWrappable
  115. def rClass(): String
    Attributes
    protected
    Definition Classes
    RWrappable
  116. def rDocString: String
    Attributes
    protected
    Definition Classes
    RWrappable
  117. def rExtraBodyLines: String
    Attributes
    protected
    Definition Classes
    RWrappable
  118. def rExtraInitLines: String
    Attributes
    protected
    Definition Classes
    RWrappable
  119. lazy val rFuncName: String
    Attributes
    protected
    Definition Classes
    RWrappable
  120. lazy val rInternalWrapper: Boolean
    Attributes
    protected
    Definition Classes
    RWrappable
  121. def rParamArg[T](p: Param[T]): String
    Attributes
    protected
    Definition Classes
    RWrappable
  122. def rParamsArgs: String
    Attributes
    protected
    Definition Classes
    RWrappable
  123. def rSetterLines: String
    Attributes
    protected
    Definition Classes
    RWrappable
  124. def save(path: String): Unit
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  125. final def set(paramPair: ParamPair[_]): ImageFeaturizer.this.type
    Attributes
    protected
    Definition Classes
    Params
  126. final def set(param: String, value: Any): ImageFeaturizer.this.type
    Attributes
    protected
    Definition Classes
    Params
  127. final def set[T](param: Param[T], value: T): ImageFeaturizer.this.type
    Definition Classes
    Params
  128. def setCntkModel(value: CNTKModel): ImageFeaturizer.this.type

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

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

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

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

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

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

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

  138. def setModel(modelSchema: ModelSchema): ImageFeaturizer.this.type
  139. def setModelLocation(path: String): ImageFeaturizer.this.type
  140. def setOutputCol(value: String): ImageFeaturizer.this.type

    Definition Classes
    HasOutputCol
  141. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  142. val thisStage: Params
    Attributes
    protected
    Definition Classes
    BaseWrappable
  143. def toString(): String
    Definition Classes
    Identifiable → AnyRef → Any
  144. def transform(dataset: Dataset[_]): DataFrame
    Definition Classes
    ImageFeaturizer → Transformer
  145. def transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" )
  146. def transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" ) @varargs()
  147. 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
  148. def transformSchema(schema: StructType, logging: Boolean): StructType
    Attributes
    protected
    Definition Classes
    PipelineStage
    Annotations
    @DeveloperApi()
  149. val uid: String
    Definition Classes
    ImageFeaturizerBasicLogging → Identifiable
  150. val ver: String
    Definition Classes
    BasicLogging
  151. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  152. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  153. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  154. def write: MLWriter
    Definition Classes
    ComplexParamsWritable → MLWritable

Inherited from BasicLogging

Inherited from ComplexParamsWritable

Inherited from MLWritable

Inherited from Wrappable

Inherited from DotnetWrappable

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