Detect objects in images
Detect objects in images
Detect objects in images and videos
Detect objects in images and get bounding boxes
Identify the top 3 objects in an image
Find objects in images using text descriptions
Welcome to my portfolio
Upload an image to detect objects
Upload images/videos to detect wildfires and smoke
Upload image to detect objects
Detect objects in images
Identify objects in images and return details
State-of-the-art Zero-shot Object Detection
Transformers.js is a JavaScript library designed for object detection in images. It leverages modern JavaScript frameworks and APIs to provide a powerful, browser-based solution for detecting objects within visual content. The library is optimized for performance and ease of use, making it accessible to both developers and non-experts.
• Object Detection: Identify and locate objects within images using pre-trained models.
• Real-Time Processing: Enable real-time object detection in web applications.
• High Accuracy: Pre-trained models ensure accurate detection across various object types.
• Customizable Models: Supports popular models like YOLO, SSD, and others.
• Threshold Adjustment: Configure confidence thresholds for detection accuracy.
• Lightweight: Built for performance in web environments.
npm install transformers.js
const { ObjectDetector } = require('transformers.js');
const detector = new ObjectDetector('yolo');
const results = await detector.detect(imageElement);
results.forEach(object => {
console.log)object.label, object.x, object.y);
});
1. What browsers are supported by Transformers.js?
Transformers.js is designed to work with modern browsers supporting WebGL and WebAssembly for optimal performance.
2. Can I use custom models with Transformers.js?
Yes, Transformers.js allows integration with custom models as long as they are compatible with its architecture and formatting requirements.
3. How do I handle video streams?
For video streams, use the detect()
method iteratively on each frame or use a Web Workers pattern to maintain smooth performance.