Xenova/gelan-e_all
By Xenova · ↓ 5 · ♥ 0 · Updated 2025-06-30
What's in this repo
This page lists the files in Xenova/gelan-e_all, including model.onnx, model_fp16.onnx, model_quantized.onnx.
- 3 ONNX models (.onnx files)
- 7 files, including 3 .onnx, 2 .json, 1 .md
- Last updated 2025-06-30
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://github.com/WongKinYiu/yolov9 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/gelan-e_all.
import { AutoModel, AutoProcessor, RawImage } from '@huggingface/transformers';
// Load model
const model = await AutoModel.from_pretrained('Xenova/gelan-e_all', {
dtype: 'fp32', // (Optional) Use unquantized version.
})
// Load processor
const processor = await AutoProcessor.from_pretrained('Xenova/gelan-e_all');
// processor.feature_extractor.size = { shortest_edge: 128 } // (Optional) Update resize value
// Read image and run processor
const url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/city-streets.jpg';
const image = await RawImage.read(url);
const inputs = await processor(image);
// Run object detection
const threshold = 0.3;
const { outputs } = await model(inputs);
const predictions = outputs.tolist();
for (const [xmin, ymin, xmax, ymax, score, id] of predictions) {
if (score < threshold) break;
const bbox = [xmin, ymin, xmax, ymax].map(x => x.toFixed(2)).join(', ')
console.log(`Found "${model.config.id2label[id]}" at [${bbox}] with score ${score.toFixed(2)}.`)
}
// Found "car" at [157.78, 132.88, 223.89, 167.56] with score 0.89.
// Found "car" at [62.69, 120.29, 140.12, 146.40] with score 0.86.
// Found "bicycle" at [0.53, 180.42, 39.41, 204.48] with score 0.84.
// Found "bicycle" at [157.39, 163.91, 194.82, 189.06] with score 0.81.
// Found "person" at [192.77, 90.67, 207.29, 116.15] with score 0.80.
// Found "bicycle" at [124.00, 183.29, 162.22, 206.57] with score 0.78.
// Found "person" at [11.91, 164.63, 27.64, 200.17] with score 0.78.
// Found "person" at [166.75, 150.84, 187.49, 186.04] with score 0.74.
// ...
Demo
Test it out here!
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: 2024-02-26
Updated: 2025-06-30
View on Hugging Face