Detect objects in your images
Upload image to detect objects
Detect objects in images and get bounding boxes
Identify objects in real-time video feed
Identify segments in an image using a Detectron2 model
Identify objects in images using URLs or uploads
Detect and segment objects in images
Identify objects in images
Detect forklifts in images
Detect potholes in images and videos
Identify objects in your images using labels
Ultralytics YOLO11 Gradio Application for Testing
Stream webcam video and detect objects in real-time
Transformers.js is a lightweight JavaScript library designed for object detection in images. It allows developers to easily integrate Transformer-based models into web applications, enabling real-time detection and analysis of objects within images. The library simplifies the process of loading pre-trained models, processing images, and interpreting results.
• Pre-trained Model Support: Easily load popular Transformer models optimized for object detection.
• Real-time Processing: Efficiently process images and detect objects in real-time.
• Customizable Thresholds: Adjust detection thresholds to filter results based on confidence levels.
• Cross-platform Compatibility: Works seamlessly across modern web browsers.
• Minimal Dependencies: Lightweight and easy to integrate into existing web applications.
npm install transformers.js
const { Transformers } = require('transformers.js');
const model = new Transformers('object-detection');
const results = await model.detect(imageElement);
console.log(results); // Array of objects with confidence scores and coordinates
What browsers are supported by Transformers.js?
Transformers.js is designed to work with modern web browsers, including Chrome, Firefox, Safari, and Edge.
Can I use custom models with Transformers.js?
Yes, Transformers.js allows you to load custom Transformer models for specific use cases beyond pre-trained models.
How do I improve detection accuracy?
You can improve accuracy by adjusting the detection threshold or using more advanced models. Lowering the threshold may increase detection sensitivity.