Detect objects in images
Find objects in images using text descriptions
Count objects in an image by drawing a region of interest
Detect defects in images and videos
Detect objects in an image
Identify objects in images using text queries
Upload images/videos to detect wildfires and smoke
Identify objects in images
Perform small object detection in images
Find objects in images
Identify objects in images using URLs or uploads
Analyze images to count and classify mosquito species
Upload an image to detect objects
Transformers.js is a lightweight JavaScript library designed for object detection in images. It allows developers to easily integrate deep learning models into web applications, enabling real-time detection and analysis of objects within images. Built with modern web technologies, Transformers.js provides a seamless and efficient way to leverage pre-trained models for accurate object detection.
• Real-time object detection: Detect objects in images instantly with high accuracy. • Support for popular models: Compatible with widely-used models such as YOLO, SSD, and more. • Web-friendly: Optimized for web applications, ensuring smooth integration with JavaScript frameworks. • Customizable: Allows fine-tuning of detection parameters to suit specific use cases. • Cross-browser compatibility: Works across modern web browsers for broader reach.
npm install transformers.js
import Transformers from 'transformers.js';
const detector = new Transformers.Detector('yolo');
detector.loadImage('path/to/image.jpg');
detector.detect().then(results => {
console.log(results); // Array of detected objects with bounding boxes
});
What browsers are supported by Transformers.js?
Transformers.js is designed to work with modern web browsers, including Chrome, Firefox, Safari, and Edge. Older browsers may require additional polyfills.
Can I use custom models with Transformers.js?
Yes, Transformers.js supports custom models. You can load your own pre-trained models by providing the model weights and configuration files.
How does Transformers.js ensure performance for real-time detection?
Transformers.js leverages WebGL and modern JavaScript optimizations to deliver fast inference times, making it suitable for real-time object detection tasks.