com.intel.analytics.bigdl.transform.vision.image

ImageFeature

class ImageFeature extends Serializable

Each ImageFeature keeps information about single image, it can include various status of an image, e.g. original bytes read from image file, an opencv mat, pixels in float array, image label, meta data and so on. it uses HashMap to store all these data, the key is string that identify the corresponding value

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

Instance Constructors

  1. new ImageFeature(bytes: Array[Byte], label: Any = null, uri: String = null)

    Create ImageFeature from original image in byte array, label and uri

    Create ImageFeature from original image in byte array, label and uri

    bytes

    image file in bytes

    label

    label

    uri

    image uri

  2. new ImageFeature()

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. def apply[T](key: String): T

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def bytes(): Array[Byte]

    image file in bytes

  9. def clear(): Unit

    clear ImageFeature

  10. def clone(): ImageFeature

    Definition Classes
    ImageFeature → AnyRef
  11. def contains(key: String): Boolean

  12. def copyTo[T](storage: Array[T], offset: Int, floatKey: String = ImageFeature.floats, toRGB: Boolean = true, greyToRGB: Boolean = false)(implicit arg0: ClassTag[T], ev: TensorNumeric[T]): Unit

    copy the float array to a storage

    copy the float array to a storage

    storage

    destination array

    offset

    offset to copy

    floatKey

    key that maps float array

    toRGB

    BGR to RGB

  13. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def floats(key: String = ImageFeature.floats): Array[Float]

    image pixels in float array

    image pixels in float array

    key

    key that maps float array

    returns

    float array

  17. def getChannel(): Int

    get current channel

  18. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  19. def getHeight(): Int

    get current height

  20. def getImInfo(): Tensor[Float]

    imInfo is a tensor that contains height, width, scaleInHeight, scaleInWidth e.

    imInfo is a tensor that contains height, width, scaleInHeight, scaleInWidth e.g. it is used in SSD and Faster-RCNN to post process the roi detection

  21. def getLabel[T](implicit arg0: ClassTag[T]): T

    get label from ImageFeature

  22. def getOriginalChannel: Int

    get original channel

  23. def getOriginalHeight: Int

    get original height

  24. def getOriginalSize: (Int, Int, Int)

    get original image size in (height, width, channel)

    get original image size in (height, width, channel)

    returns

    (height, width, channel)

  25. def getOriginalWidth: Int

    get original width

  26. def getSize: (Int, Int, Int)

    get current image size in (height, width, channel)

    get current image size in (height, width, channel)

    returns

    (height, width, channel)

  27. def getWidth(): Int

    get current width

  28. def hasLabel(): Boolean

    whether this ImageFeature contains label

    whether this ImageFeature contains label

    returns

  29. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  30. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  31. var isValid: Boolean

    whether this image feature is valid

  32. def keys(): Set[String]

  33. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  36. def opencvMat(): OpenCVMat

    get opencv mat from ImageFeature, note that it may be empty if it is released

  37. def predict(key: String = ImageFeature.predict): Any

    get prediction result from ImageFeature

    get prediction result from ImageFeature

    key

    key that maps prediction result

  38. def setLabel(labelMap: Map[String, Float]): Unit

    set label for imagefeature from label map

  39. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  40. def toString(): String

    Definition Classes
    AnyRef → Any
  41. def toTensor(floatKey: String, toChw: Boolean = true): Tensor[Float]

    Convert ImageFeature to image tensor

    Convert ImageFeature to image tensor

    floatKey

    key that maps the float array

    toChw

    transpose the image from hwc to chw

    returns

    tensor that represents an image

  42. def update(key: String, value: Any): Unit

  43. def uri(): String

    get uri from ImageFeature

    get uri from ImageFeature

    returns

  44. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped