Upload an image to detect objects
Find and highlight trash in images
Identify objects in images using URLs or uploads
Ultralytics YOLOv8 Gradio Application for Testing ๐
Identify labels in an image with a score threshold
Identify objects in images
Detect objects in uploaded images
Detect objects in images using ๐ค Transformers.js
Count objects in an image by drawing a region of interest
Identify and label objects in images using YOLO models
Detect objects in images and get details
Generic YOLO Models Trained on COCO
Identify car damage in images
Transformers.js is a powerful JavaScript library designed for object detection tasks. It enables developers to easily integrate real-time object detection into web applications by leveraging modern AI and machine learning frameworks. The library simplifies the process of detecting objects within images, making it accessible for both beginners and advanced users.
npm install transformers.js
import Transformers from 'transformers.js';
const detector = new Transformers.Detector('yolo');
const image = new Image();
image.src = 'path/to/your/image.jpg';
detector.detect(image).then(results => {
// Process the results
});
results.forEach(item => {
console.log(`Detected ${item.label} with ${item.confidence.toFixed(2)} confidence`);
});
What browsers are supported by Transformers.js?
Transformers.js is designed to work with modern browsers that support HTML5 and ES6 features. It is tested on Chrome, Firefox, and Edge.
How can I improve the performance of Transformers.js?
To optimize performance, ensure you're using a modern GPU, reduce the image size, or use a lighter model architecture.
Can I use custom models with Transformers.js?
Yes, Transformers.js allows you to use custom models. You can load a model using a TensorFlow.js or ONNX.js format and pass it to the detector.