Usage (Transformers.js)
If you haven't already, you can install the Transformers.js JavaScript library from NPM using:
npm i @huggingface/transformers
Example: Perform object-detection with onnx-community/rfdetr_large-ONNX
.
import { pipeline } from '@huggingface/transformers';
const detector = await pipeline('object-detection', 'onnx-community/rfdetr_large-ONNX');
const img = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg';
const output = await detector(img, { threshold: 0.75 });
console.log(output);
- Downloads last month
- 5
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support
HF Inference deployability: The HF Inference API does not support object-detection models for transformers.js
library.