object Florence2Utils
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Florence2Utils
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- case class BBox(bbox: Seq[Double], catName: String) extends Product with Serializable
- case class BBoxesResult(bboxes: Seq[BBox]) extends Florence2Result with Product with Serializable
- sealed trait Florence2Result extends AnyRef
- case class MixedResult(bboxes: Seq[BBox], bboxesLabels: Seq[String], polygons: Seq[Seq[Double]], polygonsLabels: Seq[String]) extends Florence2Result with Product with Serializable
- case class OCRInstance(quadBox: Seq[Double], text: String) extends Product with Serializable
- case class OCRResult(instances: Seq[OCRInstance]) extends Florence2Result with Product with Serializable
- case class PhraseGroundingInstance(bbox: Seq[Seq[Double]], catName: String) extends Product with Serializable
- case class PhraseGroundingResult(instances: Seq[PhraseGroundingInstance]) extends Florence2Result with Product with Serializable
- case class PolygonInstance(polygons: Seq[Seq[Double]], catName: String, bbox: Option[Seq[Double]] = None) extends Product with Serializable
- case class PolygonsResult(instances: Seq[PolygonInstance]) extends Florence2Result with Product with Serializable
- case class PureTextResult(text: String) extends Florence2Result with Product with Serializable
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def bufferedImageToBase64PNG(image: BufferedImage): String
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- val colorMap: Array[Color]
- def constructPrompts(texts: Seq[String]): Seq[String]
- def convertToODFormat(mixed: MixedResult): Map[String, Any]
- def dequantizeBox(bins: Seq[Int], imageSize: (Int, Int)): Seq[Double]
- def dequantizeCoordinates(bins: Seq[Int], imageSize: (Int, Int)): Seq[Double]
- def drawOcrBBoxes(image: BufferedImage, quadBoxes: Seq[Seq[Double]], labels: Seq[String]): BufferedImage
- def drawPolygons(image: BufferedImage, polygons: Seq[Seq[Seq[Double]]], labels: Seq[String], fillMask: Boolean = false): BufferedImage
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def getBaseTaskToken(task: String): String
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def parseOCR(text: String, imageSize: (Int, Int)): Seq[OCRInstance]
- def parseOD(text: String, imageSize: (Int, Int)): Seq[BBox]
- def parsePhraseGrounding(text: String, imageSize: (Int, Int)): Seq[PhraseGroundingInstance]
- def parsePolygons(text: String, imageSize: (Int, Int)): Seq[PolygonInstance]
- def plotBBox(image: BufferedImage, bboxes: Seq[Seq[Double]], labels: Seq[String]): BufferedImage
- def postProcessGeneration(text: String, task: String, imageSize: (Int, Int)): Florence2Result
- def postProcessImage(image: BufferedImage, task: String, result: Florence2Result, textInput: Option[String] = None): Option[String]
Post-processes an image according to the task and model output, returning a base64-encoded PNG.
Post-processes an image according to the task and model output, returning a base64-encoded PNG.
- image
The input BufferedImage
- task
The task string (e.g. "<OD>", "<CAPTION_TO_PHRASE_GROUNDING>", etc.)
- result
The post-processed Florence2Result
- textInput
Optional text input (for phrase grounding, etc.)
- returns
Option[String] with base64 PNG, or None if no visualization is needed
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val taskAnswerPostProcessingType: Map[String, String]
- val taskPromptsWithInput: Map[String, String]
- val taskPromptsWithoutInputs: Map[String, String]
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)