2.15.1
版本发布时间: 2024-02-21 22:47:47
xenova/transformers.js最新发布版本:2.17.2(2024-05-29 22:36:30)
What's new?
-
Add Background Removal demo in https://github.com/xenova/transformers.js/pull/576 (online demo).
-
Add support for owlv2 models in https://github.com/xenova/transformers.js/pull/579
Example: Zero-shot object detection w/
Xenova/owlv2-base-patch16-ensemble
.import { pipeline } from '@xenova/transformers'; const detector = await pipeline('zero-shot-object-detection', 'Xenova/owlv2-base-patch16-ensemble'); const url = 'http://images.cocodataset.org/val2017/000000039769.jpg'; const candidate_labels = ['a photo of a cat', 'a photo of a dog']; const output = await detector(url, candidate_labels); console.log(output); // [ // { score: 0.7400985360145569, label: 'a photo of a cat', box: { xmin: 0, ymin: 50, xmax: 323, ymax: 485 } }, // { score: 0.6315087080001831, label: 'a photo of a cat', box: { xmin: 333, ymin: 23, xmax: 658, ymax: 378 } } // ]
-
Add support for Adaptive Retrieval w/ Matryoshka Embeddings (nomic-ai/nomic-embed-text-v1.5) in https://github.com/xenova/transformers.js/pull/587 and https://github.com/xenova/transformers.js/pull/588 (online demo).
-
Add support for Gemma Tokenizer in https://github.com/xenova/transformers.js/pull/597 and https://github.com/xenova/transformers.js/pull/598
Full Changelog: https://github.com/xenova/transformers.js/compare/2.15.0...2.15.1