Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mobilevitv2 #721

Merged
merged 4 commits into from
May 2, 2024
Merged

Add mobilevitv2 #721

merged 4 commits into from
May 2, 2024

Conversation

xenova
Copy link
Collaborator

@xenova xenova commented Apr 22, 2024

Looks good 👍

import { pipeline } from '@xenova/transformers';

const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/tiger.jpg';
const classifier = await pipeline('image-classification', 'Xenova/mobilevitv2-1.0-imagenet1k-256', {
    quantized: false,
});
const output = await classifier(url);
// [{ label: 'tiger, Panthera tigris', score: 0.6491137742996216 }]

Closes #720

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@xenova xenova mentioned this pull request Apr 22, 2024
2 tasks
@xenova xenova merged commit 7122a0a into main May 2, 2024
4 checks passed
Th3G33k added a commit to Th3G33k/transformers.js that referenced this pull request May 11, 2024
* Add `ignore_merges` option to BPE tokenizers (huggingface#716)

* [version] Update to 2.17.1

* Use ungated version of mistral tokenizer (huggingface#718)

* Add mobilevitv2 (huggingface#721)

* Add support for MobileViTV2

* Update supported_models.py

* Add support for `do_flip_channel_order`

* Add unit test for `do_flip_channel_order=true`

* docs: update vanilla-js.md (huggingface#738)

minor fix

* Support reading data from blob URI (huggingface#645)

* Make blob as valid URL

* Create function to detect the blob URI

* Change to `isValidUrl`

* Remove comment

Co-authored-by: Joshua Lochner <[email protected]>

* Merge `isValidHttpUrl` into `isValidUrl`

* Correct implement

* Update docs

* Add test

* Remove export for `isValidUrl`

* Test read blob via `getFile`

* Use `res.text()` instead `res.body`

---------

Co-authored-by: Joshua Lochner <[email protected]>

* Add aggregation_strategy + start end tokens

* Beautify code

* tokenizers return_offsets_mapping

* QuestionAnswering start end char

---------

Co-authored-by: Joshua Lochner <[email protected]>
Co-authored-by: Ikko Eltociear Ashimine <[email protected]>
Co-authored-by: Hans <[email protected]>
@xenova xenova deleted the add-mobilevitv2 branch May 29, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding support for MobileViTV2 model
2 participants