- 07 Mar 2025
- 1 Minute to read
- Print
- DarkLight
- PDF
Label spec using JSON
- Updated on 07 Mar 2025
- 1 Minute to read
- Print
- DarkLight
- PDF
In addition to creating label specs using text prompts and images, you can import a JSON file to create a base spec that can be edited further. This article explains how to create a spec using JSON.
Load basic JSON to initiate a label spec
This option lets you download a sample JSON file and update the file in the given structure/format.
Navigate to Label > Specs.
Click the drop-down arrow adjacent to the Add Spec button, and click Load JSON.
In the Load JSON window, click the Sample JSON option to download the sample file to your local folder.
A sample JSON file gets downloaded with the class definition, as shown below:Update the file with the class details in the same format.
You can add more than one class if needed.In the Load JSON screen, click the attachment icon to browse the updated file, double-click to attach the file, and click Proceed.
Select the Spec Type as Classification or Detection, and click Submit.
The label spec gets populated with the classes defined in the sample JSON file.Make any other necessary changes and approve the classes.
Save the label spec with a name.
Import JSON to create label specs
If you have already created a label spec, you can import the JSON file of the spec and create a new spec.
Navigate to Label > Specs.
Locate the spec for which you want to download the JSON, and click View.
On the spec page, click the Download Spec JSON button at the bottom-right corner.
The JSON file for the spec gets downloaded to your local folder.In the Labeling Specs page, click the drop-down arrow adjacent to the Add Spec button, and click Import Spec.
In the Import Spec screen, click the attachment icon to browse to the updated file, double-click to attach the file, and click Proceed.
Select the Spec Type as Classification or Detection, as needed, and click Submit.
A New Spec page appears with the classes populated as available in the imported spec JSON file.Note that no images are imported to the new spec in this process.
Make any necessary changes to the classes or other details.
Once all classes are approved, click Save to save the label spec with a name.