Skip to content

This repository contains a Python script to convert YOLOv8 bounding box annotations into YOLOv8-compatible segmentation annotations. It bridges object detection and segmentation workflows, enabling the generation of segmentation masks from bounding box labels for enhanced model training and analysis.

Notifications You must be signed in to change notification settings

brunofgsilva/Bounding-box-to-segmentation-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

YOLOv8 Bounding Box to Segmentation Converter

This repository provides a Python script that converts YOLOv8 bounding box annotations into YOLOv8-compatible segmentation labels. The tool is designed to enhance segmentation workflows by leveraging bounding box annotations, enabling better model training for tasks requiring pixel-level precision.

Goal

The goal of this repository is to facilitate the conversion of existing YOLOv8 bounding box labels into segmentation labels.

Folder Structure

To use this script effectively, organize your project directory as follows:

├── images/ # Directory containing input images

│ ├── image1.jpg

│ ├── image2.jpg

│ └── ...

├── labels/ # Directory containing YOLOv8 bounding box annotations

│ ├── image1.txt

│ ├── image2.txt

│ └── ...

├── SAM_models/ # Directory containing SAM models

│ ├── sam_vit_l.pth

└── convertion.py # The Python script

Requirements:

About

This repository contains a Python script to convert YOLOv8 bounding box annotations into YOLOv8-compatible segmentation annotations. It bridges object detection and segmentation workflows, enabling the generation of segmentation masks from bounding box labels for enhanced model training and analysis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages