HumanSignal / HumanSignal/label-studio

Importing Pre-annotated data in done using yolov8 semantic segmentation (polygon) issue with JSON format compatibilty

Open
#6,113 1 comment 0 reactions 0 assignees View on GitHub
community:reviewed
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

**Describe the bug**
So I was trying to import data in Yolov8 text format to label studio. There was a tutorial that I followed explaining importing detection yolov8 format by converting it to label studio JSON format using LabelStudio-converter. That method worked fine when importing detection data containing the 4 coordinates. However, when I tried to import segmentation data containing multiple coordinates of the segmentation polygon the converter did not work. Thus, I wrote a script to convert the yolov8 seg format to label studio JSON format and the images were uploaded along with the coordinates in the columns, but for some reason the segmentations done would not appear on the image at all. I think it is a problem with the generated JSON format from my script so I would really appreciate the help from someone of the LS team. Attached below is snippets from LS, my python conversion script and an example of the generated JSON format.

**To Reproduce**
Steps to reproduce the behavior:
1. Run my py script on the images folder containing images, labels and classes
2. Import to LS
3. Open images to see annotations
4. See error (No annotations are found)

**Expected behavior**
The annotations should be present

**Screenshots**
![Screenshot 2024-07-21 152931](https://github.com/user-attachments/assets/e7ad19af-b568-4ef8-aac2-f6b7267bfc3c)
![Screenshot 2024-07-21 152944](https://github.com/user-attachments/assets/c160374d-2e23-467f-93cd-2c94e453b184)

**Environment (please complete the following information):**
- OS: windows
- Label Studio Version 1.12.1

**Additional context**
[output_new.json](https://github.com/user-attachments/files/16324440/output_new.json)
![Screenshot 2024-07-21 153214](https://github.com/user-attachments/assets/519b22c5-a565-4213-9a2f-933e0a716bce)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.