mod convert;
mod reader;
mod types;
pub mod verify;
mod writer;
#[cfg(feature = "polars")]
mod arrow;
#[cfg(feature = "polars")]
pub mod studio;
pub use types::{
CocoAnnotation, CocoCategory, CocoCompressedRle, CocoDataset, CocoImage, CocoIndex, CocoInfo,
CocoLicense, CocoRle, CocoSegmentation,
};
pub use reader::{
CocoReadOptions, CocoReader, infer_group_from_filename, infer_group_from_folder,
read_coco_directory,
};
pub use writer::{CocoDatasetBuilder, CocoWriteOptions, CocoWriter};
pub use convert::{
box2d_to_coco_bbox, calculate_coco_area, coco_bbox_to_box2d, coco_polygon_to_polygon,
coco_rle_to_polygon, coco_segmentation_to_mask_data, coco_segmentation_to_polygon,
decode_compressed_rle, decode_rle, encode_rle, mask_to_contours, polygon_to_coco_polygon,
rle_to_mask_data, validate_coco_bbox,
};
#[cfg(feature = "polars")]
pub use arrow::{
ArrowToCocoOptions, CocoToArrowOptions, SCHEMA_VERSION, arrow_to_coco, coco_to_arrow,
};
#[cfg(feature = "polars")]
pub use studio::{
CocoExportOptions, CocoImportOptions, CocoImportResult, CocoUpdateOptions, CocoUpdateResult,
CocoVerifyOptions, export_studio_to_coco, import_coco_to_studio, update_coco_annotations,
verify_coco_import,
};
pub use verify::{
BboxValidationResult, CategoryValidationResult, MaskValidationResult, VerificationResult,
};
#[cfg(test)]
mod tests;