# Using edited roboflow detections as annotations for re-training?

**URL:** <https://discuss.roboflow.com/t/using-edited-roboflow-detections-as-annotations-for-re-training/6403>\
**Category:** 🤝  Community Help\
**Created:** [July 3, 2024, 4:39pm UTC](https://discuss.roboflow.com/t/using-edited-roboflow-detections-as-annotations-for-re-training/6403 "2024-07-03T16:39:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kedar](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/kedar/32/2676_2.png) [@kedar](https://discuss.roboflow.com/u/kedar)\
**Post date:** [July 3, 2024, 4:39pm UTC](https://discuss.roboflow.com/t/using-edited-roboflow-detections-as-annotations-for-re-training/6403/1 "2024-07-03T16:39:29Z")

</div>

Is there any obvious way to re-send edited roboflow inferences back to the upload que with active learning or batch upload queues?

Scenario:  
After the roboflow predictions/ detections are returned for an image, we then process the predictions and have a newly edited version of the same structure that we would like to include into our annotations queue for re-training.

I was looking for something here, like

```auto
project.upload(
    image_path="UPLOAD_IMAGE.jpg",
    batch_name="YOUR_BATCH_NAME",
    split="train",
    num_retry_uploads=3,
    tag="YOUR_TAG_NAME",
    annotations = edited_roboflow_predictions_or_detections,
    sequence_number=99,
    sequence_size=100
)

```

from [Upload one Image | Roboflow Docs](https://docs.roboflow.com/api-reference/images/upload-api)

What’s the best way to go about achieving this outside roboflow? Some way to auto-label with edited-predictions from custom trained models is difficult?

Many thanks 😟 🙏

or perhaps Piotr could knock on some doors to open source more libraries from Roboflow’s internal code to achieve this? 😉

---

<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:** [July 4, 2024, 1:11am UTC](https://discuss.roboflow.com/t/using-edited-roboflow-detections-as-annotations-for-re-training/6403/2 "2024-07-04T01:11:18Z")

</div>

Hi @kedar - do you mind telling me a bit about how you want to edit the annotations? Do you want a human to review and edit boxes, rename classes, or do some entirely different adjustment?

You can use the upload annotations endpoint to upload an annotation with an image ([docs](https://docs.roboflow.com/api-reference/images/upload-an-annotation)).

---

<div class="post-metadata">

**Author:** ![kedar](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/kedar/32/2676_2.png) [@kedar](https://discuss.roboflow.com/u/kedar)\
**Post date:** [July 4, 2024, 2:56pm UTC](https://discuss.roboflow.com/t/using-edited-roboflow-detections-as-annotations-for-re-training/6403/3 "2024-07-04T14:56:54Z")

</div>

Let’s imagine that the detections returned by roboflow are corrected on-site through a different custom interface (programmatic like removing duplicates, filtering by thresholds + 1st human input)  
We would like to send these corrected detections back with the image to our retraining queue instead of those predicted by the label-assist of our custom model (and then have non mandatory: 2nd human review in roboflow web ui)

does this help?

Thanks for helping out Jacob.

I checked the docs and it seems like we need to write a library to convert roboflow predictions into the \_annotations.coco.json format.

is that incorrect?

---

<div class="post-metadata">

**Author:** ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)\
**Post date:** [July 5, 2024, 6:35pm UTC](https://discuss.roboflow.com/t/using-edited-roboflow-detections-as-annotations-for-re-training/6403/4 "2024-07-05T18:35:07Z")

</div>

Hey @kedar

You’re on the right track!

You will have to convert the annotations to upload them back into Roboflow, but if you are using Supervision (which it sounds like you might be familiar with), you can use the [`DetectionDataset.as_pascal_voc`](https://supervision.roboflow.com/latest/datasets/core/) method to convert into the Pascal VOC format and upload that into Roboflow.

As for your review process, you can set `is_prediction` to `True` when using our Python SDK.

---

<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:** [July 26, 2024, 6:35pm UTC](https://discuss.roboflow.com/t/using-edited-roboflow-detections-as-annotations-for-re-training/6403/5 "2024-07-26T18:35:28Z")

</div>

Closed on July 26, 2024, 6:35pm UTC

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