Openseed

class grid.model.perception.segmentation.gopenseed.Openseed(*args, **kwargs)

Openseed: Image Segmentation Model

This class implements a wrapper for the Openseed model, which segments images based on given queries.

Credits:

https://github.com/IDEA-Research/OpenSeeD

License:

This code is licensed under the Apache 2.0 License.

__init__()
Return type:

None

run(image, query)

Runs the Openseed segmentation model on the given image and returns the predicted segmentation mask.

Parameters:
  • image (np.ndarray) -- The input image as a NumPy array.

  • query -- The query for the segmentation model.

Returns:

The predicted segmentation mask as a NumPy array.

Return type:

np.ndarray

Example

>>> openseed = Openseed()
>>> seg = openseed.run(img, "turbine")