Skip to content

A Python program that can convert Segmentation mask 1.1 to Yolov8 format.

Notifications You must be signed in to change notification settings

woodsj1206/Convert-Segmentation-Mask-1.1-To-Yolov8

Repository files navigation

Convert-Segmentation-Mask-1.1-To-Yolov8

This Python program converts task datasets exported as Segmentation mask 1.1 from CVAT to YOLOv8 Instance Segmentation format.

Features

  • Handles multiple classes in a single image.
  • Saves labels in a labels folder.

Usage

  1. Run the SegmentationMaskToYolov8.py script.
  2. When prompted, enter the path of the labelmap.txt file, SegmentationClass folder, and SegmentationObject folder.
  3. Labels will be saved as text files and stored in a labels folder.

Example Usage

Screenshot

Labelmap.txt

# label:color_rgb:parts:actions
background:0,0,0::
dog:250,50,83::
horse:255,204,51::
human:42,125,209::

Example Image 1:

Screenshot Photo by Pixabay from Pexels.

Resulting Images:

SegmentationClass SegmentationObject
Screenshot Screenshot

Output:

Label Output
pexels-pixabay-162520.txt

Example Image 2:

Screenshot Photo by Yaroslav Shuraev from Pexels.

Resulting Images:

SegmentationClass SegmentationObject
Screenshot Screenshot

Output:

Label Output
pexels-yaroslav-shuraev-8499242.txt

Development Environment

  • IDE: Microsoft Visual Studio Community 2022
  • Language: Python 3.9

About

A Python program that can convert Segmentation mask 1.1 to Yolov8 format.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages