Yolov10m
Latency-accuracy trade-offs | Size-accuracy trade-offs :-------------------------:|:-------------------------: latency-accuracy trade-offs | size-accuracy trade-offs
Source du modèle
- Type
- Other
- Taille du fichier
- 15,1–58,8 MB
- Version
- vRevision 6190f51
- Mis à jour
- 16 sept. 2026
- Téléchargements
- 5
- Source
- Hugging Face
Description de la source
YOLOv10: Real-Time End-to-End Object Detection
ONNX weights for https://github.com/THU-MIG/yolov10.
| Latency-accuracy trade-offs | Size-accuracy trade-offs |
|---|---|
| latency-accuracy trade-offs | size-accuracy trade-offs |
Usage (Transformers.js)
If you haven't already, you can install the Transformers.js JavaScript library from NPM using:
npm i @xenova/transformers
Example: Perform object-detection.
import { AutoModel, AutoProcessor, RawImage } from '@xenova/transformers';
// Load model
const model = await AutoModel.from_pretrained('onnx-community/yolov10m', {
// quantized: false, // (Optional) Use unquantized version.
})
// Load processor
const processor = await AutoProcessor.from_pretrained('onnx-community/yolov10m');
// 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 { pixel_values, reshaped_input_sizes } = await processor(image);
// Run object detection
const { output0 } = await model({ images: pixel_values });
const predictions = output0.tolist()[0];
const threshold = 0.5;
const [newHeight, newWidth] = reshaped_input_sizes[0]; // Reshaped height and width
const [xs, ys] = [image.width / newWidth, image.height / newHeight]; // x and y resize scales
for (const [xmin, ymin, xmax, ymax, score, id] of predictions) {
if (score < threshold) continue;
// Convert to original image coordinates
const bbox = [xmin * xs, ymin * ys, xmax * xs, ymax * ys].map(x => x.toFixed(2)).join(', ');
console.log(`Found "${model.config.id2label[id]}" at [${bbox}] with score ${score.toFixed(2)}.`);
}
// Found "car" at [559.30, 472.72, 799.58, 598.15] with score 0.95.
// Found "car" at [221.91, 422.56, 498.09, 521.85] with score 0.94.
// Found "bicycle" at [1.59, 646.99, 137.72, 730.35] with score 0.92.
// Found "bicycle" at [561.25, 593.65, 695.01, 671.73] with score 0.91.
// Found "person" at [687.74, 324.93, 739.70, 415.04] with score 0.89.
// ...
Sources
1 source
Sources
1 sourceVérifié 2 sept.
Download files
Artefacts du modèle
7 artefacts
Artefacts du modèle
7 artefactsExtraits de sources
2 extraits
Extraits de sources
2 extraits--- library_name: transformers.js pipeline_tag: object-detection license: agpl-3.0 --- # YOLOv10: Real-Time End-to-End Object Detection ONNX weights for https://github.com/THU-MIG/yolov10. Latency-accuracy trade-offs | Size-accuracy trade-offs :-------------------------:|:-------------------------:  |  ## Usage (Transformers.js) If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@xenova/transformers) using: ```bash npm i @xenova/transformers ``` **Example:** Perform object-detection. ```js import { AutoModel, AutoProcessor, RawImage } from '@xenova/transformers'; // Load model const model = await AutoModel.from_pretrained('onnx-community/yolov10m', { // quantized: false, // (Optional) Use unquantized version. }) // Load processor const processor = await AutoProcessor.from_pretrained('onnx-community/yolov10m'); // 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 { pixel_values, reshaped_input_sizes } = await processor(image); // Run object detection const { output0 } = await model({ images: pixel_values }); const predictions = output0.tolist()[0]; const threshold = 0.5; const [newHeight, newWidth] = reshaped_input_sizes[0]; // Reshaped height and width const [xs, ys] = [image.width / newWidth, image.height / newHeight]; // x and y resize scales for (const [xmin, ymin, xmax, ymax, score, id] of predictions) { if (score < threshold) continue; // Convert to original image coordinates const bbox = [xmin * xs, ymin * ys, xmax * xs, ymax * ys].map(x => x.toFixed(2)).join(', '); console.log(`Found "${model.config.id2label[id]}" at [${bbox}] with score ${score.toFixed(2)}.`); } // Found "car" at [559.30, 472.72, 799.58, 598.15] with score 0.95. // Found "car" at [221.91, 422.56, 498.09, 521.85] with score 0.94. // Found "bicycle" at [1.59, 646.99, 137.72, 730.35] with score 0.92. // Found "bicycle" at [561.25, 593.65, 695.01, 671.73] with sc...
Source context: 5 downloads · 0 likes · Pipeline object-detection · Library transformers.js · Repo ACbkgyu/yolov10m
