Skip to main content

Run in Colab

Step through this example interactively
The question() helper takes an image() node alongside a natural-language prompt and returns a textual answer plus optional grounded citations (points, boxes, or polygons). Use it for operator checklists, product audits, and narrated walkthroughs.

Basic usage

Parameters:
format is available only through the CLI flag (--format text|json). The Python helper always returns a PerceiveResult.
Returns: PerceiveResult object:
  • text (str): Answer to your question.
  • reasoning (str | None): Chain-of-thought when reasoning=True.
  • boxes, points, polygons (list | None): Populated based on the expects you requested. Each list has its own boxes_to_pixels / points_to_pixels / polygons_to_pixels helper for normalized → pixel conversion.

Example: Studio scene walkthrough

In this example we download a photo of an outdoor scene, ask “What stands out in this studio?” and overlay the returned bounding boxes so operators can see cited evidence.
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 image Q&A from the CLI by passing the image, question, and desired output preferences:
Examples:
Run through the full Jupyter notebook here. Reach out to Perceptron support if you have questions.