nodes / builtin / ai / localai
Detect Objects
Find objects and bounding boxes in an image, on-device
Find the objects in an image, with where each one is and how sure the model is, using a model that runs in your browser.
What it does
Section titled “What it does”Detect Objects runs the Image through the detection model you pick, such as COCO-SSD (MobileNet v2) (TensorFlow.js) or DETR ResNet-50 (transformers.js). It returns every object found with its label, a score from 0 to 1 and a box around it. The built-in models know about 80 everyday kinds of objects, such as person, car, dog, cup and laptop.
Objects below Confidence threshold are dropped, the rest are sorted best first and cut to Max objects. There is no cost per run and no API key.
When to use it
Section titled “When to use it”- Count things in an image: people in a photo, cars in a screenshot.
- Check whether an image contains a given object before you save or share it.
- Get positions to crop or highlight an object later.
For one overall label, use Classify Image. For a sentence describing the scene, use Caption Image.
Inputs and settings
Section titled “Inputs and settings”| Setting | Type | What it does |
|---|---|---|
| Model | Model picker | Any installed object-detection model, across engines. |
| Image | Media | Image URL, data URL, or $binary from a previous node. |
| Confidence threshold | Number | Default: 0.5 |
| Max objects | Number | Keep at most this many objects (highest score first). Default: 20 |
Image has four tabs. From input takes an expression that points to an image from an earlier node, such as {{ $input.dataUrl }} after Screenshot Page or {{ $binary }} for an attached file. URL takes a web address. Upload and Base64 store a fixed image with the node, handy for trying a model.
Outputs
Section titled “Outputs”-
Output
Each output item has these fields:
| Field | Type | What it holds |
|---|---|---|
| objects | List of entries | |
| count | Number | |
| top | Text | The best label, or null when none passed |
{ "objects": [], "count": 0, "top": "…"}objects: each entry is{ label, score, box }, best first.boxholdsxmin,ymin,xmaxandymax, in pixels from the top-left corner of the image.count: how many objects are inobjects, after the threshold and Max objects. It counts all kinds together.top: the label of the most confident object, ornullwhen nothing was found.
Dependencies and credentials
Section titled “Dependencies and credentials”None. This node needs no connection and has no slots for other nodes.
The Model picker lists your installed models first, then models that download on first use. Manage them on the Local AI page.
Example workflow
Section titled “Example workflow”Check whether the visible page shows a person:
- Screenshot Page with Mode
viewport(the visible part of the page). - Detect Objects with Model COCO-SSD (MobileNet v2), Image (From input)
{{ $input.dataUrl }}and Confidence threshold 0.6. - IF with the condition
{{ $input.top }}equalsperson, then continue from the true branch.
Common issues
Section titled “Common issues”- “Choose a detection model.” Model is empty. Pick one.
- “No image provided. Pass an image URL, a data URL, or a $binary image from a previous node.” Image is empty, or its expression returned nothing. Check the field you point to.
countis 0. Nothing passed Confidence threshold. Lower it, or check that the object is one the model knows.- Fewer objects than expected in a busy image. Raise Max objects.
- The first run is slow. The model downloads and loads on first use; later runs are fast.
Related nodes
Section titled “Related nodes”- Classify Image: one label for the whole image.
- Caption Image: describe the image in a sentence.
- Edit Image: crop or resize an image.
- Run Local Model: segmentation and depth maps.