Packages

c

com.johnsnowlabs.ml.ai

SmolVLMConfig

case class SmolVLMConfig(doResize: Boolean = true, size: Map[String, Int] = Map("longest_edge" -> 1536), maxImageSize: Map[String, Int] = Map("longest_edge" -> 384), doRescale: Boolean = true, rescaleFactor: Double = 1.0 / 255.0, doNormalize: Boolean = true, imageMean: Array[Double] = Array(0.5, 0.5, 0.5), imageStd: Array[Double] = Array(0.5, 0.5, 0.5), doImageSplitting: Boolean = true, doPad: Boolean = true, resample: Int = 1, doConvertRgb: Boolean = true, imageToken: String = "<image>", imageTokenId: Int = 49153, endOfUtteranceToken: String = "<end_of_utterance>", globalImageToken: String = "<global-img>", fakeImageToken: String = "<fake_token_around_image>", imageSeqLen: Int = 81, paddingConstant: Double = 0.0, unkTokenId: Int = 0, patchSize: Int = 14, returnPixelMask: Boolean = true) extends Product with Serializable

Configuration class for SmolVLM model parameters

doResize

Whether to resize input images

size

Target size for image resizing

maxImageSize

Maximum size for image processing

doRescale

Whether to rescale pixel values

rescaleFactor

Factor for pixel value rescaling

doNormalize

Whether to normalize pixel values

imageMean

Mean values for image normalization

imageStd

Standard deviation values for image normalization

doImageSplitting

Whether to split large images

doPad

Whether to pad images

resample

Resampling method for image resizing

doConvertRgb

Whether to convert images to RGB

imageToken

Special token for image placeholders

imageTokenId

Token ID for image placeholders

endOfUtteranceToken

Token indicating end of utterance

globalImageToken

Token for global image context

fakeImageToken

Token for image padding

imageSeqLen

Length of image sequence

paddingConstant

Value used for padding

patchSize

Size of image patches for processing

returnPixelMask

Whether to return pixel attention masks

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SmolVLMConfig
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SmolVLMConfig(doResize: Boolean = true, size: Map[String, Int] = Map("longest_edge" -> 1536), maxImageSize: Map[String, Int] = Map("longest_edge" -> 384), doRescale: Boolean = true, rescaleFactor: Double = 1.0 / 255.0, doNormalize: Boolean = true, imageMean: Array[Double] = Array(0.5, 0.5, 0.5), imageStd: Array[Double] = Array(0.5, 0.5, 0.5), doImageSplitting: Boolean = true, doPad: Boolean = true, resample: Int = 1, doConvertRgb: Boolean = true, imageToken: String = "<image>", imageTokenId: Int = 49153, endOfUtteranceToken: String = "<end_of_utterance>", globalImageToken: String = "<global-img>", fakeImageToken: String = "<fake_token_around_image>", imageSeqLen: Int = 81, paddingConstant: Double = 0.0, unkTokenId: Int = 0, patchSize: Int = 14, returnPixelMask: Boolean = true)

    doResize

    Whether to resize input images

    size

    Target size for image resizing

    maxImageSize

    Maximum size for image processing

    doRescale

    Whether to rescale pixel values

    rescaleFactor

    Factor for pixel value rescaling

    doNormalize

    Whether to normalize pixel values

    imageMean

    Mean values for image normalization

    imageStd

    Standard deviation values for image normalization

    doImageSplitting

    Whether to split large images

    doPad

    Whether to pad images

    resample

    Resampling method for image resizing

    doConvertRgb

    Whether to convert images to RGB

    imageToken

    Special token for image placeholders

    imageTokenId

    Token ID for image placeholders

    endOfUtteranceToken

    Token indicating end of utterance

    globalImageToken

    Token for global image context

    fakeImageToken

    Token for image padding

    imageSeqLen

    Length of image sequence

    paddingConstant

    Value used for padding

    patchSize

    Size of image patches for processing

    returnPixelMask

    Whether to return pixel attention masks

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. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. val doConvertRgb: Boolean
  7. val doImageSplitting: Boolean
  8. val doNormalize: Boolean
  9. val doPad: Boolean
  10. val doRescale: Boolean
  11. val doResize: Boolean
  12. val endOfUtteranceToken: String
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. val fakeImageToken: String
  15. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. val globalImageToken: String
  18. val imageMean: Array[Double]
  19. val imageSeqLen: Int
  20. val imageStd: Array[Double]
  21. val imageToken: String
  22. val imageTokenId: Int
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. val maxImageSize: Map[String, Int]
  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. val paddingConstant: Double
  29. val patchSize: Int
  30. val resample: Int
  31. val rescaleFactor: Double
  32. val returnPixelMask: Boolean
  33. val size: Map[String, Int]
  34. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  35. val unkTokenId: Int
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped