Skip to content

Conversation

@xenova
Copy link
Collaborator

@xenova xenova commented Apr 30, 2025

Added to transformers yesterday in huggingface/transformers#36261. Paired with huggingface/optimum#2249.

Example usage:

import { pipeline } from "@huggingface/transformers";

const detector = await pipeline("object-detection", "onnx-community/dfine_s_coco-ONNX");

const image = "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg";
const output = await detector(image, { threshold: 0.5 });
console.log(output);

See list of supported models: https://huggingface.co/models?library=transformers.js&other=d_fine&sort=trending

cc @qubvel

@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 merged commit a98b284 into main Apr 30, 2025
4 checks passed
@xenova xenova deleted the add-dfine branch April 30, 2025 23:36
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.

3 participants