The viewer is disabled because this dataset repo requires arbitrary Python code execution. Please consider
removing the
loading script
and relying on
automated data support
(you can use
convert_to_parquet
from the datasets
library). If this is not possible, please
open a discussion
for direct help.
Dataset Card for "COCO Keypoints"
Quick Start
Usage
>>> from datasets.load import load_dataset
>>> dataset = load_dataset('whyen-wang/coco_keypoints')
>>> example = dataset['train'][0]
>>> print(example)
{'image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=640x360>,
'bboxes': [
[339.8800048828125, 22.15999984741211,
153.8800048828125, 300.7300109863281],
[471.6400146484375, 172.82000732421875,
35.91999816894531, 48.099998474121094]],
'keypoints': [[
[368, 61, 1], [369, 52, 2], [0, 0, 0], [382, 48, 2], [0, 0, 0],
[368, 84, 2], [435, 81, 2], [362, 125, 2], [446, 125, 2], [360, 153, 2],
[0, 0, 0], [397, 167, 1], [439, 166, 1], [369, 193, 2], [461, 234, 2],
[361, 246, 2], [474, 287, 2]
], [[...]]
]}
Visualization
>>> import cv2
>>> import numpy as np
>>> from PIL import Image
>>> def visualize(example):
image = np.array(example['image'])
bboxes = np.array(example['bboxes']).round().astype(int)
bboxes[:, 2:] += bboxes[:, :2]
keypoints = example['keypoints']
n = len(bboxes)
for i in range(n):
color = (255, 0, 0)
cv2.rectangle(image, bboxes[i, :2], bboxes[i, 2:], color, 2)
ks = keypoints[i]
for k in ks:
if k[-1] == 2:
cv2.circle(
image, k[:2], 5, (0, 255, 0), 1
)
return image
>>> Image.fromarray(visualize(example))
Dataset Summary
COCO is a large-scale object detection, segmentation, and captioning dataset.
Supported Tasks and Leaderboards
Languages
en
Dataset Structure
Data Instances
An example looks as follows.
{
"image": PIL.Image(mode="RGB"),
"bboxes": [
[339.8800048828125, 22.15999984741211,
153.8800048828125, 300.7300109863281],
[471.6400146484375, 172.82000732421875,
35.91999816894531, 48.099998474121094]],
"keypoints": [[
[368, 61, 1], [369, 52, 2], [0, 0, 0], [382, 48, 2], [0, 0, 0],
[368, 84, 2], [435, 81, 2], [362, 125, 2], [446, 125, 2], [360, 153, 2],
[0, 0, 0], [397, 167, 1], [439, 166, 1], [369, 193, 2], [461, 234, 2],
[361, 246, 2], [474, 287, 2]
], [[...]]
]
}
Data Fields
[More Information Needed]
Data Splits
name | train | validation |
---|---|---|
default | 64,115 | 2,693 |
Dataset Creation
Curation Rationale
[More Information Needed]
Source Data
Initial Data Collection and Normalization
[More Information Needed]
Who are the source language producers?
[More Information Needed]
Annotations
Annotation process
[More Information Needed]
Who are the annotators?
[More Information Needed]
Personal and Sensitive Information
[More Information Needed]
Considerations for Using the Data
Social Impact of Dataset
[More Information Needed]
Discussion of Biases
[More Information Needed]
Other Known Limitations
[More Information Needed]
Additional Information
Dataset Curators
[More Information Needed]
Licensing Information
Creative Commons Attribution 4.0 License
Citation Information
@article{cocodataset,
author = {Tsung{-}Yi Lin and Michael Maire and Serge J. Belongie and Lubomir D. Bourdev and Ross B. Girshick and James Hays and Pietro Perona and Deva Ramanan and Piotr Doll{'{a} }r and C. Lawrence Zitnick},
title = {Microsoft {COCO:} Common Objects in Context},
journal = {CoRR},
volume = {abs/1405.0312},
year = {2014},
url = {http://arxiv.org/abs/1405.0312},
archivePrefix = {arXiv},
eprint = {1405.0312},
timestamp = {Mon, 13 Aug 2018 16:48:13 +0200},
biburl = {https://dblp.org/rec/bib/journals/corr/LinMBHPRDZ14},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
Contributions
Thanks to @github-whyen-wang for adding this dataset.
- Downloads last month
- 50