Preparing annotation file
This guide provides instructions on structuring annotation files correctly before importing them into Visual Layer. Visual Layer supports two annotation formats : COCO (JSON format) and CSV format. Ensuring proper structuring will prevent errors during dataset creation and allow seamless integration.
To convert YOLO annotation to VL format visit: Converting YOLO Annotations to Visual Layer Format
Tabular Formats: Parquet / CSV
Image Annotations
For full-image class labels, create an annotation file named image_annotations.csv
orimage_annotations.parquet
. Each row in the file represents an image and its corresponding label.
Example Format:
filename | label |
---|---|
IDX_DF_SIG21341_PlasmasNeg.png | IDX_DF |
IDX_DF_ALM00324_PlasmasPos.png | IDX_DF |
folder/IDX_RC_ALM04559_PlasmasNeg.png | IDX_RC |
- The
filename
column must contain relative paths. - The
label
column assigns a class to entire image. - Multiple labels can be stored as a list, e.g.,
['t-shirt', 'SKU12345']
. - You may also include a
caption
column for textual metadata.
Example for Multiple Labels:
filename | label |
---|---|
cool-tshirt.png | [“t-shirt”, “SKU12345”] |
cool-pants.jpg | [“pants”, “SKU231312”] |
Object Annotations
For object-level annotations, create an annotation file named object_annotations.csv
or object_annotations.parquet
. Each row represents a detected object, including its bounding box coordinates and class label.
Example Format:
filename | col_x | row_y | width | height | label |
---|---|---|---|---|---|
Kitti/raw/training/image_2/006149.png | 0 | 240 | 135 | 133 | Car |
Kitti/raw/training/image_2/006149.png | 608 | 169 | 59 | 43 | Car |
col_x
androw_y
define the top-left corner of the bounding box.width
andheight
must be greater than zero.- Each row corresponds to a single object within an image.
JSON Annotations (COCO Format)
Ensure The file is named annotations.json
.
Example JSON Format:
- Bounding boxes (
bbox
) follow the format[col_x, row_y, width, height]
.col_x
androw_y
define the top-left corner of the bounding box.width
andheight
must be greater than zero.
- Remove comments before uploading.
Summary of Bounding Box Formats
Format | Representation | File Type |
---|---|---|
JSON (COCO) | [x_min, y_min, width, height] | .json |
CSV(Image Labels) | [filename, label] | .csv |
CSV(Object Labels) | filename, col_x, row_y, width, height, label | .csv |
For instructions on importing annotation files, see Importing Annotations.
By following these guidelines, you can ensure that your annotation files are structured correctly and ready for seamless dataset creation in Visual Layer.