COCO was built through the following steps.
- Choose the categories. 272 candidates were compiled from PASCAL VOC categories, frequently used object names, and objects that children aged 4–8 named around them, and the authors narrowed them to 91 by vote. Only objects (things) with everyday names that even a 4-year-old understands, such as "dog" or "chair," were chosen; things without clear boundaries (stuff), such as sky, road, or grass, were left out. All 20 VOC categories are included.
- Collect photos. Photos were gathered from Flickr by searching not for one category at a time but for pairs of categories, such as "dog + car," or combinations of scenes and objects. Searching for a single word yields mostly iconic photos with the object large in the center.
- Label which categories appear. Workers on Amazon Mechanical Turk (a service for outsourcing tasks online) answered whether each of 11 supercategories, such as animals or vehicles, is present, and if so placed an icon on that object. Each image is seen by 8 workers to reduce misses.
- Spot objects one by one. For each category, every object present is marked (up to 10 per image). This is also done by 8 workers.
- Draw outlines. Workers who passed a training task (about 1 in 3) drew an outline for each object. Each outline was checked by 3–5 workers, and poor ones were redrawn. When there were more than 10–15 objects of the same category (crowds, piles of bananas, and so on), the rest were grouped into a single "crowd" region.
According to the paper, workers spent more than 70,000 hours in total. Drawing outlines alone took over 22 hours per 1,000 objects.
Each image also has five English captions. Human keypoints, stuff regions, and panoptic annotations (a task that labels every pixel with things and stuff combined) were added later.
There are two splits, the 2014 and 2017 versions. Both re-split the same images; no new images or detection annotations were added.
| Version | Training | Validation | Test (labels not public) |
|---|
| 2014 | 82,783 images | 40,504 images | 40,775 images (used for the caption task) |
| 2017 | About 118,000 images | 5,000 images | 40,670 images (including 20,288 test-dev) |
Based on user feedback, the 2017 version shrank the validation set to 5,000 images and moved the rest to training. Even before that, it was common practice to add 35,000 of the 2014 validation images to training and evaluate on the remaining 5,000 (called minival). Object annotations (boxes and masks) exist for 80 categories. Of the 91, the 11 categories hat, shoe, eyeglasses, mirror, window, door, street sign, plate, desk, blender, and hair brush were not given masks, because they were too numerous, ambiguous, easily confused with other categories, or too rare.
The format is one JSON file per split. It contains images (image ID, size, file name, license number), annotations (the list of annotations), categories (category ID, name, supercategory), and licenses. Each object annotation has the following fields.
| Field | Contents |
|---|
bbox | Box. [x, y, width, height] (top-left corner coordinates and size, in pixels) |
segmentation | Mask. Polygons for a single object (multiple when split by occlusion); RLE (a compressed format representing pixels by run lengths of the same value) for crowds |
iscrowd | 1 for a crowd region, 0 for a single object |
area | Mask area (number of pixels) |
category_id | Category ID. In the range 1–90, with some unused numbers |
keypoints | People only. 17 points as a sequence of [x, y, v]. v is 0 for not labeled, 1 for labeled but occluded, 2 for visible |
A caption annotation is a pair of an image ID and a caption (one English sentence).