Farmland Segmentation Converter

Convert Datumaro annotation data to Farmland Segmentation JSON format

Datumaro to Farmland Segmentation Converter
Paste your Datumaro JSON content to convert to Farmland Segmentation format
Format Specifications
Supported formats and their structures

Datumaro Format

• Structure: items (each with image and annotations), nested categories.label.labels

• Geometry: Supports points (polygons) and bbox (bounding boxes)

• Categories: Nested structure with categories.label.labels array containing label definitions

• Label References: Annotations use label_id to reference category indices

Farmland Segmentation Format

annotation: Array of polygon objects with polygon, className, classId, red, green, blue

polygon: Array of point objects with x and y coordinates

• Class IDs are fixed numeric references (0-19 with gaps) with predefined class names

• RGB values are included directly in each annotation

• Supports multiple annotations from multiple images in a single file

Note: Class mapping is fixed and RGB values are included per annotation

Fixed Class Mapping (RGB values included per annotation):
0:etc
0,233,182
1:grass
255,196,0
2:tree
0,96,100
3:bush
130,119,0
4:concrete
50,15,242
6:person
170,0,255
7:puddle
0,87,155
8:rubble
239,154,154
9:barrier
144,202,249
11:fence
0,229,255
12:vehicle
97,97,97
13:object
255,204,128
14:pole
244,143,177
16:asphalt
118,255,3
17:building
58,8,62
18:dirt
117,104,77
19:void
0,0,0

Conversion Process

• Datumaro → Farmland Segmentation: Converts polygon and bbox annotations to polygon-based segmentation format

• Polygon Preservation: Keeps original polygon points as-is

• Bbox to Polygon: Converts bounding boxes to rectangular polygons

• Label Mapping: Maps Datumaro category names to fixed Farmland segmentation class IDs

• RGB Inclusion: Includes RGB color values directly in each annotation

• Coordinate System: Uses original polygon coordinates

• Fallback: Unknown categories default to "object" class (ID 13)