Map<String, dynamic> toJson() { return { "imageRotation": imageRotation, "polygon": polygon.map((e) => e.toJson()).toList(), }; }