Skip to content

1.5.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Dec 05:01

Breaking

  • Requires macOS 14 and iOS 17, and depends on spfk-search.
  • KeywordDetection.detect throws KeywordDetectionError.noKeywordsDetected instead of returning an empty list, so no caller can write an empty list over a file's keywords. The error type now lives in this package.
  • ImageClassification.vagueIdentifiers is removed; KeywordDetectionOptions.excludedKeywords replaces it.

Added

  • ImageEmbedder and ImageEmbeddingModel.siglip2: SigLIP 2 image embeddings for similarity search, with Pillow's bicubic resize reproduced byte for byte and Core ML's concurrent prediction. Videos embed as the mean of three frames. Also CoreMLModelCompiler (compiles beside the model and renames into place) and ImageEmbeddingError.
  • TextEmbedder for typed phrases, with GemmaTokenizer (reproduces the reference ids on 186 fixture phrases), ByteLevelBPETokenizer, CanonicalTextCleaning and the TextTokenizer protocol. TextEmbeddingModel names its tokenizer, cleaning, start id, attention-mask input and compute units, so one embedder serves every model's text half.
  • AudioEmbedder, AudioEmbeddingModel.clap and TextEmbeddingModel.clap: CLAP (laion/larger_clap_general) embeddings of sound and of typed phrases in the same vector space.
  • ImageEmbeddingModel carries SigLIP 2's logit scale (112.6689) and bias (-16.771725); contentKeywordRule builds the default content keyword rule (floor -5, limit 5).
  • KeywordDetection.detect takes an optional ContentKeywordSource whose words join Vision's for a still image before they are merged and deduplicated.
  • KeywordDetectionOptions.excludedKeywords (default Structure, Land, Adult) and contentKeywordFloor.

Changed

  • Vision's "cloudy" is written as "Clouds"; Structure, Land and Adult are no longer written as detected keywords. A keyword a file already carries is kept.
  • A model compile removes staging folders an interrupted compile left, once they are 24 hours old.

Other

  • README says the package embeds sound, pictures and phrases.
  • The thread-budget test is tagged exclusive.