from grid.model.perception.str.mgp_str import MGPSTRcar = AirGenCar()# We will be capturing an image from the AirGen simulator # and run model inference on it.img = car.getImage("front_center","rgb").datamodel = MGPSTR(use_local =True)result = model.run(rgbimage=img, prompt=<prompt>)print(result)
The MGPSTR class implements a wrapper for the MGPSTR (Multi-Granularity Prediction for Scene Text Recognition) model,
which recognizes text in images.
from grid.model.perception.str.mgp_str import MGPSTRcar = AirGenCar()# We will be capturing an image from the AirGen simulator # and run model inference on it.img = car.getImage("front_center","rgb").datamodel = MGPSTR(use_local =True)result = model.run(rgbimage=img, prompt=<prompt>)print(result)
This model is best suited for recognizing text in images (OCR).
This code is licensed under the Apache 2.0 License.
from grid.model.perception.str.mgp_str import MGPSTRcar = AirGenCar()# We will be capturing an image from the AirGen simulator # and run model inference on it.img = car.getImage("front_center","rgb").datamodel = MGPSTR(use_local =True)result = model.run(rgbimage=img, prompt=<prompt>)print(result)