Import JSONL with classification label from annotation set

  • Project Type: Image Classification
  • Do you grant Roboflow Support permission to access your Workspace for troubleshooting? (Yes/No):Yes

I have a large custom dataset in Google Vertex, it’s not performing great, so i am considering RoboFlow. I have all my datasets that are already labeled in JSONL format and annotated:

{
“imageGcsUri”: “gs://bucket/filename.ext”,
“classificationAnnotation”: {
“displayName”: “LABEL”,
},
}

I can’t find in documentation how to ensure the annotation labels get copied over correctly. Any ideas or suggestions?

Also, based on the supported annotation formats, for JSONL, am I limited to using just the models for the supported annotations, or can those annotations be used for any model?

Hi Identa_Fly,

I can see you’re looking to import your Google Vertex dataset with JSONL classification annotations into Roboflow. The format you’ve shown is a pretty standard structure, but there are a few considerations for getting those labels imported correctly.

For image classification projects, Roboflow supports several import formats, but JSONL isn’t directly listed as one of the standard supported formats for classification. The typical supported formats for classification are folder-based structures (where folder names represent classes) or CSV files with image paths and corresponding labels.

Your best bet would be to convert your JSONL data into one of these supported formats. You could write a script to extract the image URIs and classification labels from your JSONL files and create either:

  1. A folder structure where each class gets its own folder containing the relevant images
  2. A CSV file with columns for image paths and class labels

Since you have GCS URIs, you’ll also need to download those images locally first before uploading to Roboflow, as the platform expects the actual image files rather than cloud storage references.

Regarding your second question about annotation format limitations: the supported annotation formats are tied to the project type you’re working with. For image classification projects, you’re working with class labels rather than spatial annotations, so the models you can train will be classification models.

The annotation format doesn’t restrict which specific model architectures you can use within that category.

Relevant Resources:

Best,

Bar Shimshon

Thanks for the info. I ended up making a solution similar to your suggestion, using the roboflow node JS API which allows me to 2 step it:

  • uploadImage() for the photo
  • uploadAnnotation() to the file referenced

I will say the documentation isn’t super clear about how it works - and I don’t understand why it can’t be done in a single step (which is what Vertex allows for) and the requirements to get an annotation file to need the file uploaded first + file name match, but that’s fine, it got figured out.

1 Like