Skip to content

Dataset for segmentation task

David Lopera edited this page Sep 23, 2019 · 3 revisions

Create dataset for segmentation task

Learn how to build a dataset for segmentation tasks through PyTorchCV Studio. Once you build the segmentation dataset, you can use the Models module for develop a model.

Prerequisites

  • A set of images to build your object segmentation dataset.

Create a new dataset

In PyTorchCV Studio select the first option (Datasets) on the top left.

  1. To create the dataset, click on add button. The Create New Dataset dialog box will appear.

  1. Enter a name and description (optional) for the dataset and click OK.

  2. The new dataset will appear in the Datasets window.

  1. You have different options to manage the dataset:
  • Delete dataset: To delete the dataset from application.
  • Edit dataset: To update the name and description.
  • Refresh dataset: Refresh the size of the dataset based on the total size of the images associated.
  • Download annotations: Download the annotations into a json file.

Add images

  1. To add images, double click in the Dataset, a new tab will open.

  1. Drag and Drop the images you want to add to the dataset. When the loading process is finished, you should see something like this.

  1. In the dataset window you can:
  • Delete an image.
  • Zoom in/out an image.
  • Edit the annotations associated to the image.
  • Double click to add/edit annotations and assign a label.

Labels and annotations

  1. After the selection of the image, you must see a windows like this.

  1. In this window you can:
  • Create and edit labels.
  • Create, edit and delete annotations.
  • Assign labels to polygons.
  • Navigate over the data set images.

Labels

  1. In the right panel on tab Labels you create the labels for the dataset. To create one, Right click over the list and add the label.

  1. The Create New Label dialog box will appear. Type a name and choose a color for the label you want to create.

Annotate images

  • You can add/edit annotations and assign labels to a specific image.
  • You can do annotations manually or auto-annotate images with a pretrained model to continue tagging the images by your own.

Manually tagging


  1. Select the polygon or freehand option from the panel on the bottom and draw a shape for the region of interest.

  1. Right click on the shape box and select the label you want to assign.

  1. The color of the shape box must change once you assign the label.

Auto tagging


  1. Select the tab Hub in the top right panel.

  1. In Models, Right click for add a model repository. By default the application suggest the models from PyTorch Vision GitHub repository. But also, you can add models from PyTorch Hub.

  1. After loading the models from repository, you will see something like this.

  1. Select one model and Right click for Auto-Label.

  1. If the selected model detects objects in the image, a shape is drawn.

  1. You can modify the polygon/shape and select the label for every shape drawn.