ONNX Model Zoo

CristianR8/Cacao-detection

By CristianR8 · ↓ 5 · ♥ 0 · Updated 2025-01-28

What's in this repo

This page lists the files in CristianR8/Cacao-detection, including model.onnx, model_fp16.onnx, model_quantized.onnx.

  • 3 ONNX models (.onnx files)
  • 8 files, including 3 .json, 3 .onnx, 1 .md
  • Last updated 2025-01-28

ONNX files

File Size Download
onnx/model.onnx — Download
onnx/model_fp16.onnx — Download
onnx/model_quantized.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

object-detection transformers.js
transformers.js onnx yolos object-detection base_model:hustvl/yolos-tiny base_model:quantized:hustvl/yolos-tiny region:us
↓ 5 ♥ 0

Created: 2025-01-27

Updated: 2025-01-28

View on Hugging Face

Files (8)

.gitattributes
README.md
config.json
onnx/model.onnx ONNX
onnx/model_fp16.onnx ONNX
onnx/model_quantized.onnx ONNX
preprocessor_config.json
quantize_config.json

Related models