COCO
The COCO dataset format is a popular format, designed for tasks involving object detection and instance segmentation. It’s supported by many annotation tools and model training frameworks, making it a safe default choice for typical object detection projects.
For more information, see:
COCO export
- Supported annotations: Bounding Boxes, Polygons, Masks, Ellipses (as masks).
- Attributes:
is_crowdThis can either be a checkbox or an integer (with values of 0 or 1). It indicates whether the instance (a group of objects) should be represented as an RLE-encoded mask or a set of polygons in thesegmentationfield of the annotation file. The largest (by area) shape in the group sets the properties for the entire object group. If the attribute is not specified, the input shape type is used (polygon or mask). IfTrueor 1, all shapes within the group will be converted into a single mask. IfFalseor 0, all shapes within the group will be converted into polygons.- Arbitrary attributes: These will be stored within the custom
attributessection of the annotation.
- Tracks: Supported (via the
track_idcustom attribute).
The downloaded file is a .zip archive with the following structure:
taskname.zip/
├── images/
│ └── <subset_name>/
│ ├── <image_name1.ext>
│ ├── <image_name2.ext>
│ └── ...
└── annotations/
├── instances_<subset_name>.json
└── ...
When exporting a dataset from a Project, subset names will mirror those used within the project itself. Otherwise, a singular default subset will be created to house all the dataset information.
COCO import
- Supported annotations: Bounding Boxes (if the
segmentationfield is empty), Polygons, Masks. - Attributes: Supported, as described in the export section
- Tracks: Supported (via the
track_idcustom attribute). - Supported tasks:
instances,person_keypoints(only segmentations will be imported),panoptic.
Upload format: a .json file with annotations
or a .zip archive with the structure described above or
here
(without images).
Note
Even thoughlicenses and info fields are required according to format specifications,
CVAT does not require them to import annotations.
How to create a task from MS COCO dataset
-
Download the MS COCO dataset.
For example
val imagesandinstancesannotations -
Create a CVAT task with the following labels:
person bicycle car motorcycle airplane bus train truck boat "traffic light" "fire hydrant" "stop sign" "parking meter" bench bird cat dog horse sheep cow elephant bear zebra giraffe backpack umbrella handbag tie suitcase frisbee skis snowboard "sports ball" kite "baseball bat" "baseball glove" skateboard surfboard "tennis racket" bottle "wine glass" cup fork knife spoon bowl banana apple sandwich orange broccoli carrot "hot dog" pizza donut cake chair couch "potted plant" bed "dining table" toilet tv laptop mouse remote keyboard "cell phone" microwave oven toaster sink refrigerator book clock vase scissors "teddy bear" "hair drier" toothbrush -
Select
val2017.zipas data (See Creating an annotation task guide for details) -
Unpack
annotations_trainval2017.zip -
click
Upload annotationbutton, chooseCOCO 1.1and selectinstances_val2017.jsonannotation file. It can take some time.