* Fix `detections_to_coco_annotations` function for empty polygons. * Add `segmentation` empty field for bboxes coco format * update coco.py Always include box, area, and segmentation in the result COCO JSON. * `as_coco()` : Add COCO format disjoint masks support * Fix `force_masks` parameter on `from_coco()` function Allows reconstruction of disjointed masks * Ensures the mask is binary * Refactor `coco_annotations_to_masks` to handle disjoint polygon segmentation and missing segmentation gracefully. Add corresponding unit tests. * Refactor `coco_annotations_to_masks` for improved type annotations and cleaner formatting * Add warnings for handling empty polygons during COCO segmentation and related unit tests --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: jirka <6035284+Borda@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>