Packages

object MllamaUtils

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MllamaUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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. def arrayToBufferedImage(imageArray: Array[Array[Array[Int]]]): BufferedImage

    Convert a 3D array to a BufferedImage

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def buildAspectRatioMask(aspectRatios: List[List[(Int, Int)]], maxImageTiles: Int): Array[Array[Array[Int]]]

    build aspect ratio mask

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. def convertAspectRatiosToIds(aspectRatios: List[List[(Int, Int)]], maxImageTiles: Int): Array[Array[Int]]

    Convert aspect ratios to IDs

  9. def convertSparseCrossAttentionMaskToDense(crossAttentionTokenMask: Array[Array[Array[Int]]], numTiles: Array[Array[Int]], maxNumTiles: Int, length: Int): Array[Array[Array[Array[Int]]]]
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def floatArrayToBufferedImage(imageArray: Array[Array[Array[Float]]], rescaleFactor: Double): BufferedImage

    Convert a 3D array of floats to a BufferedImage

  14. def getAllSupportedAspectRatios(maxImageTiles: Int): List[(Int, Int)]

    Get all supported aspect ratios for a given max number of image tiles

  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def getCrossAttentionTokenMask(inputIds: Array[Int], imageTokenId: Int): Array[Array[Int]]
  17. def getImageSizeFitToCanvas(imageHeight: Int, imageWidth: Int, canvasHeight: Int, canvasWidth: Int, tileSize: Int): (Int, Int)

    Get the size of the image that fits the canvas

  18. def getOptimalTiledCanvas(imageHeight: Int, imageWidth: Int, maxImageTiles: Int, tileSize: Int): (Int, Int)

    Get the optimal tiled canvas size for the image

  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def imageCropToArray(imgCrop: BufferedImage): Array[Array[Array[Int]]]

    Convert a crop of an image to a 3D array

  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. def packAspectRatios(aspectRatios: List[List[(Int, Int)]], padValue: Int = 1): Array[Array[Array[Int]]]

    Pack aspect ratios into a 3D array

  26. def packImages(batchImages: List[Array[Array[Array[Array[Array[Float]]]]]], maxImageTiles: Int): (Array[Array[Array[Array[Array[Array[Float]]]]]], List[List[Int]])

    Pack images into a 6D array

  27. def pad(image: BufferedImage, paddingConstant: Int, aspectRatio: (Int, Int), tileHeight: Int, tileWidth: Int): BufferedImage
  28. def padBufferedImage(image: BufferedImage, totalPadding: (Int, Int), constantColor: Int): BufferedImage
  29. def padConstant(image: Array[Array[Float]], padding: Int, constantValue: Float): Array[Array[Float]]
  30. def resizeImage(width: Int, height: Int, resample: Int, maxImageTiles: Int)(image: BufferedImage): (BufferedImage, (Int, Int))

    Resize an image to fit the canvas

  31. def splitToTiles(image: BufferedImage, numTilesHeight: Int, numTilesWidth: Int, mean: Array[Double], std: Array[Double], doNormalize: Boolean, doRescale: Boolean, rescaleFactor: Double): Array[Array[Array[Array[Float]]]]

    Split an image into tiles

  32. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped