编辑 | blame | 历史 | 原始文档

---
title: Semantic Segmentation with Polygons
type: templates
category: Computer Vision
cat: computer-vision
order: 101
meta_title: Semantic Segmentation with Polygons Data Labeling Template

meta_description: Template for performing semantic segmentation with polygons with Label Studio for your machine learning and data science projects.

If you need to perform semantic segmentation on images using polygons, use this template.



Open in Label Studio

Interactive Template Preview

Labeling Configuration

<View>
  <Header value="Select label and click the image to start"/>
  <Image name="image" value="$image" zoom="true"/>
  <PolygonLabels name="label" toName="image"
                 strokeWidth="3" pointSize="small"
                 opacity="0.9">
    <Label value="Airplane" background="red"/>
    <Label value="Car" background="blue"/>
  </PolygonLabels>
</View>

About the labeling configuration

All labeling configurations must be wrapped in View tags.

You can add a header to provide instructions to the annotator:
xml <Header value="Select label and click the image to start"/>

Use the Image object tag to specify the image data and allow annotators to zoom the image:
xml <Image name="image" value="$image" zoom="true"/>

Use the PolygonLabels control tag to allow annotators to create polygons for specific labels.
xml <PolygonLabels name="label" toName="image" strokeWidth="3" pointSize="small" opacity="0.9"> <Label value="Airplane" background="red"/> <Label value="Car" background="blue"/> </PolygonLabels>
Annotators can control the opacity of the polygons using the opacity argument, and the styling of the polygon tool using the pointSize and strokeWidth arguments. Use the background argument with the Label control tag to control the color of each polygon.

Related tags