Convert YOLO and COCO Annotations to DagsHub Format
  Back to blog home

Convert YOLO and COCO Annotations to DagsHub Format

Data Labeling Jun 25, 2023

DagsHub provides a free online data annotation tool, using Label Studio under the hood. The annotations are saved in open formats for versioning and loading of existing labeling projects.

However, we know not all projects start with DagsHub (yet πŸ˜‰), and some users join us with projects that already have annotations.

Now what?

To avoid re-annotating your data (heck no!) we developed a tool that converts annotations saved in popular formants, YOLO and COCO, to DagsHub format.

You can now upload your data, view the annotations on DagsHub, modify, and use them for ML training - without writing a single line of code!

Let's learn how you can do that.

What are YOLO and COCO Annotations?

Annotation formats define how object annotations are structured and represented in datasets. Two popular annotation formats widely used in the computer vision community are YOLO (You Only Look Once) and COCO (Common Objects in Context). These formats provide a standardized way to label objects with bounding boxes and associated class labels.

YOLO annotations are commonly used in object detection tasks and provide a straightforward format for labeling objects. It consist of text files, where each line represents an object and contains the class label, followed by the coordinates of the bounding box relative to the image size.

The annotations in COCO are stored in a JSON file, which is a structured data format that allows for flexibility and extensibility. The JSON file contains a dictionary with several key-value pairs, each representing different elements of the annotation.

  • The "images" section holds information about the images.
  • The "categories" section defines object classes.
  • The "annotations" section contains details about individual object instances, including bounding box coordinates, category IDs, and segmentation information.

How to convert YOLO annotations to DagsHub format?

  1. Open this Colab notebook

2. Upload a zip file containing your YOLO images, labels and classes file to the Colab runtime

3. Provide information regarding your repository and relative path to your zip file

4. Run the notebook

How to convert COCO annotations to DagsHub format?

  1. Upload your COCO images to your DagsHub repository

2. Open this Colab notebook

3. Upload only your COCO annotations JSON file Β to the Colab runtime

4. Provide information regarding your repository and the relative path to your JSON file

5. Run the notebook

How to view your annotations on DagsHub?

  1. Go to your DagsHub Repository.
  2. Click on any of your images and click on the annotation icone.

Why should I convert my Annotations to DagsHub Annotations?

By moving your annotations to DagsHub, you gain access to a fully configured and free annotation workspace, with Label Studio under the hood. This workspace has access to your DagsHub Storage and Git server, enabling you and your team to annotation the data without doing any MLOps work or moving to a third party platform.

Additionally, you can visualize and review the annotations alongside their data directly on DagsHub, eliminating the need to write complex code for visualization.

Last, DagsHub provides version control for your data, annotations, experiments and code, enabling to reproduce results with a click of a button.


Looking to convert other formats? Let us know!

If you have other annotation formats you'd like us to support, please reach out on our community Discord and we'll take care of it!

Tags

Nir Barazida

MLOps Team Lead @ DagsHub

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.