Skip to main content

Run in Colab

Step through this example interactively
The detect() helper finds grounded objects in an image and returns normalized geometry. Use it to detect or count items in a scene, or to track objects across multiple frames.

Basic usage

Parameters:
The format argument is only available through the CLI flag (--format text|json). The Python helper always returns a PerceiveResult.
Returns: PerceiveResult object:
  • text (str): Model summary for the scene.
  • boxes, points, polygons (list | None): Populated based on expects. Each list has its own *_to_pixels(width, height) helper for normalized → pixel conversion.

Example: PPE compliance line

In this example, we download a photo of a factory worker, run detection for hard hats and safety vests, and overlay the returned bounding boxes to visualize the grounded output end to end.
All spatial outputs use a 0-1000 normalized coordinate system. Convert via result.points_to_pixels(width, height) before rendering overlays — see the coordinate system guide for more patterns.

CLI usage

Run detections straight from the CLI by specifying your source image, target classes, and geometry/output preferences:
Examples:

Best practices

  • Targeted prompts: Call out the exact categories you care about (“helmets, vests, goggles”) and set the classes list accordingly so Isaac 0.1 focuses on those objects.
  • Grounded exemplars: When objects are subtle, attach additional reference frames (multi-image inputs) or short textual descriptors so the model learns the trait you want detected — see the in-context-learning sections for more examples.
Run through the full Jupyter notebook here. Reach out to Perceptron support if you have questions.