Convert Datumaro annotation data to Farmland Segmentation JSON 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
• 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
• 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)