Skip to content

Polygons#8

Open
Jeffrey-Joan wants to merge 2 commits intomainfrom
polygons
Open

Polygons#8
Jeffrey-Joan wants to merge 2 commits intomainfrom
polygons

Conversation

@Jeffrey-Joan
Copy link
Collaborator

function mask_to_polygons_multi

  • Description: This function converts a multi-class mask image into a list of polygons, labels, and annotations.
  • Parameters: Takes a 2D numpy array representing the mask image.
  • Returns: Lists of polygon coordinates, corresponding class labels, and dictionaries containing bounding box information.

Usage:
mask = cv2.imread('mask.png', cv2.IMREAD_GRAYSCALE)
polygons, labels, annotations = mask_to_polygons_multi(mask)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant