Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.07 KB

File metadata and controls

35 lines (23 loc) · 1.07 KB

Providers

All embedding providers implement EmbeddingProvider<T>. All detector providers implement DetectorProvider. Both bundled and downloaded models are supported. The recommended way to use downloaded models is via ModelManager.

Examples

Downloaded model

val textEmbedder = ModelManager.getTextEmbedder(application, ModelName.ALL_MINILM_L6_V2)
val imageEmbedder = ModelManager.getImageEmbedder(application, ModelName.DINOV2_SMALL)
val objectDetector = ModelManager.getObjectDetector(application, ModelName.ULTRA_LIGHT_FACE_DETECTOR)

Bundled model

val textEmbedder = ClipTextEmbedder(application, ModelAssetSource.Resource(R.raw.clip_text_encoder_quant), vocabSource = ModelAssetSource.Resource(R.raw.vocab), mergesSource = ModelAssetSource.Resource(R.raw.merges))
val imageEmbedder = ClipImageEmbedder(application, ModelAssetSource.Resource(R.raw.clip_image_encoder_quant))

Supported image embedders

  • dinov2_small
  • clip_vit_b_32_image
  • inception_resnet_v1 (face)

Supported text embedders

  • all_minilm_l6_v2
  • clip_vit_b_32_text