Connect models to a camera stream
A ROS image subscriber stores the latest camera frame. A timer invokes the processing pipeline, while CvBridge handles conversion between ROS images and the model inputs.
PROJECT 02 / ROBOT PERCEPTION
Give robot images a semantic layer.
A ROS integration that turns camera images and text prompts into object masks and labels using Grounding DINO and Segment Anything.
01 / OVERVIEW
This workspace connects language-guided vision models to a robot’s camera stream. Grounding DINO finds objects named in a text prompt; Segment Anything turns the detected boxes into masks. The ROS wrapper publishes the resulting mask image and object labels for other nodes to consume.
02 / IMPLEMENTATION
A camera frame and the objects to look for.
Text-conditioned detection produces boxes and labels.
Detected boxes guide instance-mask prediction.
A colored mask image and timestamped labels are published.
The diagram follows the image-to-mask ROS wrapper in the public workspace.
A ROS image subscriber stores the latest camera frame. A timer invokes the processing pipeline, while CvBridge handles conversion between ROS images and the model inputs.
The launch configuration provides the text prompt, model checkpoints, and detection thresholds. Grounding DINO supplies candidate boxes and labels, and the SAM predictor generates a mask for each box.
The wrapper produces a colored mask image and an array of object labels. Both outputs carry the input image header, so downstream nodes retain the camera frame’s timestamp and frame information.
PROJECT CONTEXT
An integration workspace built around existing Grounding DINO and Segment Anything models. The project focuses on the ROS interface, configuration, and image-to-mask processing flow.
03 / CODE
A few useful places to start in the public repository.