Visual Intelligence Summit: Oct 22 in San Francisco Get your ticket

Convert annotation formats

How To Convert LabelBox JSON to Scaled-YOLOv4 TXT

In this guide, we show you how to convert data between the LabelBox and YOLOv4 Scaled formats for free. You can use your converted data to train Scaled YOLOv4 models and other models that support the YOLOv4 Scaled format.

LabelBox JSON

LabelBox is an outsourced label management service, specializing in on-premise "bring your own labeler" solutions.

Below, learn the structure of LabelBox JSON.

labelbox.jsonJSON
[{
    "ID": "a9b7c5d3e1f",
    "DataRow ID": "xy10z8a6b4c",
    "Labeled Data": "https://storage.labelbox.com/IMG_001.JPG",
    "Label": {
        "helmet": [{
            "geometry": [{
                "x": 690,
                "y": 1497
            }, {
                "x": 931,
                "y": 1497
            }, {
                "x": 931,
                "y": 1633
            }, {
                "x": 690,
                "y": 1633
            }]
        }, {
            "geometry": [{
                "x": 1079,
                "y": 1445
            }, {
                "x": 1324,
                "y": 1445
            }, {
                "x": 1324,
                "y": 1564
            }, {
                "x": 1079,
                "y": 1564
            }]
        }]
    },
    "Project Name": "Boggle",
    "External ID": "IMG_001.JPG"
}]

Scaled-YOLOv4 TXT

Scaled-YOLOv4 uses a variant on the Darknet TXT format with an additional data.yaml configuration file.

Below, learn the structure of Scaled-YOLOv4 TXT.

001.txt
1 0.617 0.3594420600858369 0.114 0.17381974248927037
1 0.094 0.38626609442060084 0.156 0.23605150214592274
1 0.295 0.3959227467811159 0.13 0.19527896995708155
1 0.785 0.398068669527897 0.07 0.14377682403433475
1 0.886 0.40879828326180256 0.124 0.18240343347639484
1 0.723 0.398068669527897 0.102 0.1609442060085837
1 0.541 0.35085836909871243 0.094 0.16952789699570817
1 0.428 0.4334763948497854 0.068 0.1072961373390558
1 0.375 0.40236051502145925 0.054 0.1351931330472103
1 0.976 0.3927038626609442 0.044 0.17167381974248927
data.yaml
train: ../train/images
val: ../valid/images

nc: 3
names: ['head', 'helmet', 'person']

Step 1: Create a free Roboflow public workspace

Roboflow is a universal conversion tool for computer vision annotation formats. The Public plan is the best way for those exploring personal projects, class assignments, and other experiments to try Roboflow. To convert your dataset, start by creating a free workspace on the Public plan.

Step 2: Upload your data into Roboflow

Once your account has been created, click Create New Project.

Roboflow's create project form, with Object Detection selected as the project type

Upload your data to Roboflow by dragging and dropping your LabelBox JSON images and annotations into the upload space.

Roboflow's upload page, with a drag-and-drop area for images, annotations, videos and PDFs

Step 3: Generate Dataset Version

Next, click "Generate New Version" to generate a new version of your dataset:

Roboflow's Generate a Dataset Version page, showing the source images and train/test split for a new version

You can then apply any preprocessing or augmentation steps to your dataset:

The augmentation step of a new dataset version, with 90° Rotate and Brightness added

Step 4: Export Dataset Version

After generating, you will be prompted to Export your dataset. You can choose to receive your dataset as a .zip file or a curl download link. Choose Scaled-YOLOv4 TXT when asked in what format you want to export your data. You will see a dropdown with various options like this:

Roboflow's Download dialog, with the export format list open and COCO highlighted

Congratulations, you have successfully converted your dataset from LabelBox JSON format to Scaled-YOLOv4 TXT format!

Video Tutorial

Convert Computer Vision Annotation Formats Tutorial

Want to dive deeper into converting annotation formats with Roboflow? In the tutorial below, we explore how to convert your data in the Roboflow dashboard. We also discuss rejecting annotations and train-test-validation splits.

Frequently Asked Questions

Yes! It is free to convert LabelBox JSON data into the Scaled-YOLOv4 TXT format on the Roboflow platform.

If you have between a few and a few thousand images, converting data between these formats will be quick. But, the time it takes to convert between data formats increases with the more images you have.

Show guide

Convert other formats to Scaled-YOLOv4 TXT

Start where you are

Speak with an AI expert

Our team will help you start solving business problems on the first call.

  • Solution architecting
  • Live demonstration
  • Pricing and specifications
  • Feasibility assessment

Over 16,000 organizations build with Roboflow.

Rivian
Pella
Chobani
USG Corporation
BNSF Railway
American Woodmark
Outcomes
Patrick Industries
Peer Robotics
Create Roboflow Workspace