from grid.model.perception.segmentation.gsam import GroundedSAMcar = AirGenCar()# We will be capturing an image from the AirGen simulator # and run model inference on it.img = car.getImage("front_center","rgb").datamodel = GroundedSAM(use_local =False)result = model.run(rgbimage=img, prompt=<prompt>)print(result.shape)
The GroundedSAM class provides a wrapper for the GroundedSAM model, which segments objects in RGB images based on text prompts.
from grid.model.perception.segmentation.gsam import GroundedSAMcar = AirGenCar()# We will be capturing an image from the AirGen simulator # and run model inference on it.img = car.getImage("front_center","rgb").datamodel = GroundedSAM(use_local =False)result = model.run(rgbimage=img, prompt=<prompt>)print(result.shape)
This code is licensed under the Apache 2.0 License.
from grid.model.perception.segmentation.gsam import GroundedSAMcar = AirGenCar()# We will be capturing an image from the AirGen simulator # and run model inference on it.img = car.getImage("front_center","rgb").datamodel = GroundedSAM(use_local =False)result = model.run(rgbimage=img, prompt=<prompt>)print(result.shape)