# Instance segmentation polygons dataset to keypoint detection dataset

**URL:** <https://discuss.roboflow.com/t/instance-segmentation-polygons-dataset-to-keypoint-detection-dataset/7262>\
**Category:** 🤝  Community Help\
**Created:** [October 8, 2024, 5:09pm UTC](https://discuss.roboflow.com/t/instance-segmentation-polygons-dataset-to-keypoint-detection-dataset/7262 "2024-10-08T17:09:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kfir\_eliyahu](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/kfir_eliyahu/32/5650_2.png) [@kfir\_eliyahu](https://discuss.roboflow.com/u/kfir_eliyahu)\
**Post date:** [October 8, 2024, 5:09pm UTC](https://discuss.roboflow.com/t/instance-segmentation-polygons-dataset-to-keypoint-detection-dataset/7262/1 "2024-10-08T17:09:35Z")

</div>

Hi, I created a medium size dataset of polygons (all 4 points, 3 classes) using roboflow.  
I trained a YOLOv8-obb which was back then good enough for what I wanted but for now it isn’t good enough because the polygons are not exactly rectangles in the images.  
I couldn’t find a way to transform my data to a keypoint detection one so I’d be able to train a keypoint detection (which will supply to the polygon shape better).  
Is it even possible? Is there a way for me to achieve my goal without labeling my whole dataset again?  
Thank you in advance, your help will be highly appreciated

---

<div class="post-metadata">

**Author:** ![Jacob\_Witt](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/jacob_witt/32/347_2.png) [@Jacob\_Witt](https://discuss.roboflow.com/u/Jacob_Witt)\
**Post date:** [October 8, 2024, 5:34pm UTC](https://discuss.roboflow.com/t/instance-segmentation-polygons-dataset-to-keypoint-detection-dataset/7262/2 "2024-10-08T17:34:41Z")

</div>

We don’t have a good way to do that natively in the app.

I suggest exporting the instance segmentation annotation file from Roboflow and using chatgpt to write a conversion script that converts it to our keypoint format (see all format structures here), then re-upload to Roboflow.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)\
**Post date:** [October 29, 2024, 5:35pm UTC](https://discuss.roboflow.com/t/instance-segmentation-polygons-dataset-to-keypoint-detection-dataset/7262/3 "2024-10-29T17:35:18Z")

</div>

Closed on October 29, 2024, 5:35pm UTC

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
