Description
I am using Label Studio to annotate an object-detection dataset that was originally downloaded from Roboflow in COCO format.
My goal is to maintain the dataset in Label Studio, continue adding new images and annotations over time, and eventually export the complete dataset with both images and annotations so that I can train an RF-DETR object-detection model.
However, after exporting the project from Label Studio, I receive the annotation JSON file, but the exported images folder is empty.
Environment
- Label Studio version:
1.23.0
- Operating system: Windows
- Dataset source: Roboflow
- Annotation types:
RectangleLabels and PolygonLabels
- Project ID:
23
- Project name:
aadhar_masking
1. Original Dataset
I downloaded my dataset from Roboflow in COCO format.
The dataset contained separate splits:
aadhar_detection_2.coco/
├── train/
│ ├── images
│ └── _annotations.coco.json
├── valid/
│ ├── images
│ └── _annotations.coco.json
└── test/
├── images
└── _annotations.coco.json
I wanted to import the existing COCO annotations into Label Studio instead of manually creating all the bounding boxes again.
2. COCO Import
I used label-studio-converter to convert the COCO annotations into Label Studio task JSON.
For example, for the training dataset:
label-studio-converter import coco -i "C:\Users\Meet Suthar\Downloads\aadhar_detection_2.coco\train\_annotations.coco.json" -o "C:\Users\Meet Suthar\Downloads\train_tasks.json" --image-root-url "/data/local-files/?d=C:/Users/Meet Suthar/Downloads/aadhar_detection_2.coco/train/"
I did the same for valid and test.
The resulting tasks were successfully imported into Label Studio.
3. Labeling Interface
The project uses both polygon and rectangle annotations.
The labeling configuration contains 14 classes:
<View>
<Image name="image" value="$image"/>
<PolygonLabels name="labelpolygons" toName="image">
<Label value="aadhar-WxPa"/>
<Label value="aadhaar_address"/>
<Label value="aadhaar_dob"/>
<Label value="aadhaar_gender"/>
<Label value="aadhaar_holder_name"/>
<Label value="aadhaar_logo"/>
<Label value="aadhaar_no"/>
<Label value="aadhaar_no_already_masked"/>
<Label value="aadhaar_photo"/>
<Label value="aadhaar_qr"/>
<Label value="aadhar_no_mask"/>
<Label value="aadharcard"/>
<Label value="emblem"/>
<Label value="gov_logo"/>
</PolygonLabels>
<RectangleLabels name="label_rectangles" toName="image">
<Label value="aadhar-WxPa"/>
<Label value="aadhaar_address"/>
<Label value="aadhaar_dob"/>
<Label value="aadhaar_gender"/>
<Label value="aadhaar_holder_name"/>
<Label value="aadhaar_logo"/>
<Label value="aadhaar_no"/>
<Label value="aadhaar_no_already_masked"/>
<Label value="aadhaar_photo"/>
<Label value="aadhaar_qr"/>
<Label value="aadhar_no_mask"/>
<Label value="aadharcard"/>
<Label value="emblem"/>
<Label value="gov_logo"/>
</RectangleLabels>
</View>
4. Local File Image Loading
The images were referenced using Label Studio's local-file mechanism:
The images could be displayed inside Label Studio after enabling local file serving.
However, I noticed an important limitation when exporting the project.
5. Dataset Size
The project currently reports:
Total tasks: 9470
Annotated tasks: 4735
Finished tasks: 4735
Useful annotations: 4735
Therefore, the project contains approximately:
9470 total tasks
4735 annotated tasks
4735 unannotated tasks
I want to use the annotated data for RF-DETR training and continue adding more images and annotations to the same project.
6. Main Problem
When I export the dataset from Label Studio, I receive something similar to:
export/
├── images/
│ └── [EMPTY]
└── result.json
The result.json file contains the task/annotation information, but the images directory does not contain the actual image files.
This means that I cannot directly use the exported dataset for RF-DETR training because RF-DETR requires both:
The annotation JSON alone is not sufficient to train the model.
7. Important Observation
The task data contains image references such as:
/data/local-files/?d=Users/Meet Suthar/...
This appears to reference files from the local machine rather than storing the actual image files inside the Label Studio project.
Therefore, when exporting the project, the annotations are exported but the actual image files are not included in the images directory.
8. New Images
I also started adding new images to the Label Studio project because I want this project to become an evolving dataset.
My intended workflow is:
Upload images from computer
↓
Label in Label Studio
↓
Add more images
↓
Annotate new images
↓
Export complete dataset
↓
Images + annotations
↓
COCO dataset
↓
Train RF-DETR
However, even after adding new images, exporting the project still results in an images directory that does not contain the expected image files.
9. Expected Behavior
I would expect an export containing the annotated dataset to provide something similar to:
dataset/
├── images/
│ ├── image001.jpg
│ ├── image002.jpg
│ ├── image003.jpg
│ └── ...
└── result.json
or another documented export structure where the actual image resources can be retrieved together with the annotations.
The goal is to obtain:
Images
+
Corresponding annotations
so that the result can be converted into a proper COCO dataset and used for RF-DETR training.
10. Questions
I would like to understand:
- If images are imported from a local Windows directory using
/data/local-files/?d=..., are the image files actually stored by Label Studio or are only references stored?
- Is there a supported way in Label Studio 1.23.0 to export a project containing both the annotations and the actual image files?
- If I upload additional images directly into Label Studio, what is the recommended storage/import method so that the images can later be exported with the annotations?
- What is the recommended workflow for maintaining a continuously growing object-detection dataset in Label Studio and periodically exporting the complete dataset for model training?
- Is there a recommended export format or API workflow for obtaining the actual image resources together with the annotations?
- If the original local images are no longer available on the machine, can Label Studio recover/download them if the tasks were created using local-file references?
11. Final Goal
The final goal is to use Label Studio as the continuously maintained annotation platform:
Label Studio
│
┌──────────┴──────────┐
│ │
Images Annotations
│ │
└──────────┬──────────┘
↓
Complete Dataset
↓
COCO Format
↓
RF-DETR
↓
Object Detection Model
I would appreciate clarification on the correct way to store/import the images so that the complete dataset can later be exported with both the image files and their annotations.
Description
I am using Label Studio to annotate an object-detection dataset that was originally downloaded from Roboflow in COCO format.
My goal is to maintain the dataset in Label Studio, continue adding new images and annotations over time, and eventually export the complete dataset with both images and annotations so that I can train an RF-DETR object-detection model.
However, after exporting the project from Label Studio, I receive the annotation JSON file, but the exported
imagesfolder is empty.Environment
1.23.0RectangleLabelsandPolygonLabels23aadhar_masking1. Original Dataset
I downloaded my dataset from Roboflow in COCO format.
The dataset contained separate splits:
I wanted to import the existing COCO annotations into Label Studio instead of manually creating all the bounding boxes again.
2. COCO Import
I used
label-studio-converterto convert the COCO annotations into Label Studio task JSON.For example, for the training dataset:
I did the same for
validandtest.The resulting tasks were successfully imported into Label Studio.
3. Labeling Interface
The project uses both polygon and rectangle annotations.
The labeling configuration contains 14 classes:
4. Local File Image Loading
The images were referenced using Label Studio's local-file mechanism:
The images could be displayed inside Label Studio after enabling local file serving.
However, I noticed an important limitation when exporting the project.
5. Dataset Size
The project currently reports:
Therefore, the project contains approximately:
I want to use the annotated data for RF-DETR training and continue adding more images and annotations to the same project.
6. Main Problem
When I export the dataset from Label Studio, I receive something similar to:
The
result.jsonfile contains the task/annotation information, but theimagesdirectory does not contain the actual image files.This means that I cannot directly use the exported dataset for RF-DETR training because RF-DETR requires both:
The annotation JSON alone is not sufficient to train the model.
7. Important Observation
The task data contains image references such as:
This appears to reference files from the local machine rather than storing the actual image files inside the Label Studio project.
Therefore, when exporting the project, the annotations are exported but the actual image files are not included in the
imagesdirectory.8. New Images
I also started adding new images to the Label Studio project because I want this project to become an evolving dataset.
My intended workflow is:
However, even after adding new images, exporting the project still results in an
imagesdirectory that does not contain the expected image files.9. Expected Behavior
I would expect an export containing the annotated dataset to provide something similar to:
or another documented export structure where the actual image resources can be retrieved together with the annotations.
The goal is to obtain:
so that the result can be converted into a proper COCO dataset and used for RF-DETR training.
10. Questions
I would like to understand:
/data/local-files/?d=..., are the image files actually stored by Label Studio or are only references stored?11. Final Goal
The final goal is to use Label Studio as the continuously maintained annotation platform:
I would appreciate clarification on the correct way to store/import the images so that the complete dataset can later be exported with both the image files and their annotations.