Factral/prob8
By Factral · ↓ 0 · ♥ 0 · Updated 2025-01-28
What's in this repo
This page lists the files in Factral/prob8, including model.onnx.
- 1 ONNX models (.onnx files)
- 6 files, including 2 .json, 1 .md, 1 .onnx
- Last updated 2025-01-28
ONNX files
| File | Size | Download |
|---|---|---|
| onnx/model.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
https://huggingface.co/hustvl/yolos-tiny with ONNX weights to be compatible with Transformers.js.
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 Xenova/yolos-tiny.
import { pipeline } from "@huggingface/transformers";
const detector = await pipeline("object-detection", "Xenova/yolos-tiny");
const image = "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/cats.jpg";
const output = await detector(image, { threshold: 0.9 });
console.log(output);
Example output
[
{
score: 0.9921281933784485,
label: "remote",
box: { xmin: 32, ymin: 78, xmax: 185, ymax: 117 },
},
{
score: 0.9884883165359497,
label: "remote",
box: { xmin: 324, ymin: 82, xmax: 376, ymax: 191 },
},
{
score: 0.9197800159454346,
label: "cat",
box: { xmin: 5, ymin: 56, xmax: 321, ymax: 469 },
},
{
score: 0.9300552606582642,
label: "cat",
box: { xmin: 332, ymin: 25, xmax: 638, ymax: 369 },
},
]
Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using 🤗 Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).
Model info
Created: 2025-01-28
Updated: 2025-01-28
View on Hugging FaceFiles (6)
Related models
More from Factral
More models
No task type declared.