/detect
Detect objects and their locations in images.
Quick Start
First, install the package:
pip install moondream pillow
Place an image file in your working directory, then:
import moondream as md from PIL import Image # Initialize with API key model = md.vl(api_key="your-api-key") # Load an image image = Image.open("path/to/image.jpg") # Detect objects (replace 'subject' with what you want to detect) detect_result = model.detect(image, "subject") print("Detected objects:", detect_result["objects"])
The client libraries provide the simplest integration for working with the Moondream API.