Convert to COCO
The COCO format is widely used in the computer vision community and is supported by many popular frameworks and libraries. COCO format is a complex format that can contain multiple types of annotations. Supervisely supports conversions for instances, keypoints, and captions.
For more information on how to import COCO format data into Supervisely, see the Import from COCO guide.
Converting data using Supervisely Ecosystem Apps
Export to COCO. Convert project to COCO format. It is a simple and efficient way to export your project to COCO format.
Export COCO Keypoints. App converts Supervisely format project to COCO Keypoints format as a downloadable
.tar
archive.
Converting data using Supervisely Python SDK
Our Python SDK provides a simple way to convert your data to COCO format, allowing you to convert a Project, Dataset, or a single Annotation to COCO format. Easily convert your data in one line of code using the Supervisely Python SDK.
sly.convert.to_coco()
function automatically detects the input data type and converts it to Pascal VOC format. For example, you can pass a path to a project, sly.Project object, sly.Dataset object, or sly.Annotation object. For each input type, you need to provide dedicated parameters (as shown in the examples below).
Each dataset in the project will be converted to a separate COCO dataset. The single sly.Annotation
object will be converted to a list of COCO annotation format objects.
It supports the following geometry types: sly.Rectangle
, sly.Bitmap
, sly.Polygon
, sly.GraphNodes
.
Enabling the with_captions
parameter will include captions in the COCO annotations (if present in the project).
Convert a project to COCO format:
Convert a specific dataset to COCO format:
Convert a single
sly.Annotation
object to COCO format:
Last updated