---
title: COCO2017
canonical_url: "https://www.modelscope.cn/datasets/PAI/COCO2017"
md_url: "https://www.modelscope.cn/datasets/PAI/COCO2017.md"
repository: PAI/COCO2017
chinese_name: COCO2017
last_updated: 2023-09-21
license: "Apache License 2.0"
storage_size: "19 GB"
domain:
  - image
tasks:
  - image-segmentation
color_space:
  - "彩色图片"
size_scale:
  - 10k-1m
downloads: 149879
stars: 29
---

# COCO2017

> COCO2017 - PAI 在 ModelScope 开源的数据集。数据集描述 COCO2017数据集，官方地址。

PAI/COCO2017 是 ModelScope 魔搭社区上的image-segmentation数据集，涉及 image 领域，存储大小 19 GB，采用 Apache License 2.0 许可。

- **Repository**: PAI/COCO2017
- **License**: Apache License 2.0
- **Tasks**: image-segmentation
- **Domain**: image
- **Storage size**: 19 GB
- **Downloads**: 149879
- **Stars**: 29
- **Last updated**: 2023-09-21

Source: https://www.modelscope.cn/datasets/PAI/COCO2017

---

## 数据集描述
COCO2017数据集，[官方地址](http://cocodataset.org/)。

### 数据集简介
COCO2017包含训练集118287张，验证集5000张，80类。此外，该仓库还提供了一个训练子集（25504张）。

### 数据集支持的任务
实例分割。

## 数据集的格式和结构

### 数据格式

目录结构
```
COCO2017train
    ├── annotations
    │        └── instances_train2017.json
    └── train2017
COCO2017subtrain
    ├── annotations
    │        └── instances_subtrain2017.json
    └── subtrain2017
COCO2017val
    ├── annotations
    │        └── instances_val2017.json
    └── val2017
```

COCO的实例分割标注字段如下，完整的细节可参考[这里](https://cocodataset.org/#format-data)：
```
{
    "images": [image],
    "annotations": [annotation],
    "categories": [category]
}
image = {
    "id": int,
    "width": int,
    "height": int,
    "file_name": str,
}
annotation = {
    "id": int,
    "image_id": int,
    "category_id": int,
    "segmentation": RLE or [polygon],
    "area": float,
    "bbox": [x,y,width,height],
    "iscrowd": 0 or 1,
}
categories = [{
    "id": int,
    "name": str,
    "supercategory": str,
}]
```

### 数据集加载方式
本仓库目前提供了训练集、验证集和一个训练子集的下载。
```python
from modelscope.msdatasets import MsDataset
from modelscope.utils.constant import DownloadMode
dataset_train = MsDataset.load('COCO2017_Instance_Segmentation', split='train',  
                               download_mode=DownloadMode.FORCE_REDOWNLOAD)
dataset_subtrain = MsDataset.load('COCO2017_Instance_Segmentation', split='subtrain',  
                                  download_mode=DownloadMode.FORCE_REDOWNLOAD)
dataset_val = MsDataset.load('COCO2017_Instance_Segmentation', split='validation',  
                             download_mode=DownloadMode.FORCE_REDOWNLOAD)
print(dataset_train.config_kwargs)
print(dataset_subtrain.config_kwargs)
print(dataset_val.config_kwargs)
```

## 数据集版权信息
本数据集遵循Creative Commons Attribution 4.0 License，更多的版权、授权使用信息请参考[这里](https://cocodataset.org/#termsofuse)。

## 引用方式

```
@inproceedings{lin2014microsoft,
  title={Microsoft coco: Common objects in context},
  author={Lin, Tsung-Yi and Maire, Michael and Belongie, Serge and Hays, James and Perona, Pietro and Ramanan, Deva and Doll{\'a}r, Piotr and Zitnick, C Lawrence},
  booktitle={European conference on computer vision},
  pages={740--755},
  year={2014},
  organization={Springer}
}
```
