Datasets:
id stringlengths 11 11 | image imagewidth (px) 246 500 | mask imagewidth (px) 246 500 |
|---|---|---|
2007_000032 | ||
2007_000039 | ||
2007_000063 | ||
2007_000068 | ||
2007_000121 | ||
2007_000170 | ||
2007_000241 | ||
2007_000243 | ||
2007_000250 | ||
2007_000256 | ||
2007_000333 | ||
2007_000363 | ||
2007_000364 | ||
2007_000392 | ||
2007_000480 | ||
2007_000504 | ||
2007_000515 | ||
2007_000528 | ||
2007_000549 | ||
2007_000584 | ||
2007_000645 | ||
2007_000648 | ||
2007_000713 | ||
2007_000720 | ||
2007_000733 | ||
2007_000738 | ||
2007_000768 | ||
2007_000793 | ||
2007_000822 | ||
2007_000836 | ||
2007_000876 | ||
2007_000904 | ||
2007_001027 | ||
2007_001073 | ||
2007_001149 | ||
2007_001185 | ||
2007_001225 | ||
2007_001340 | ||
2007_001397 | ||
2007_001416 | ||
2007_001420 | ||
2007_001439 | ||
2007_001487 | ||
2007_001595 | ||
2007_001602 | ||
2007_001609 | ||
2007_001698 | ||
2007_001704 | ||
2007_001709 | ||
2007_001724 | ||
2007_001764 | ||
2007_001825 | ||
2007_001834 | ||
2007_001857 | ||
2007_001872 | ||
2007_001901 | ||
2007_001917 | ||
2007_001960 | ||
2007_002024 | ||
2007_002055 | ||
2007_002088 | ||
2007_002099 | ||
2007_002105 | ||
2007_002107 | ||
2007_002120 | ||
2007_002142 | ||
2007_002198 | ||
2007_002212 | ||
2007_002216 | ||
2007_002227 | ||
2007_002234 | ||
2007_002273 | ||
2007_002281 | ||
2007_002293 | ||
2007_002361 | ||
2007_002368 | ||
2007_002370 | ||
2007_002403 | ||
2007_002462 | ||
2007_002488 | ||
2007_002545 | ||
2007_002611 | ||
2007_002639 | ||
2007_002668 | ||
2007_002669 | ||
2007_002760 | ||
2007_002789 | ||
2007_002845 | ||
2007_002895 | ||
2007_002896 | ||
2007_002914 | ||
2007_002953 | ||
2007_002954 | ||
2007_002967 | ||
2007_003000 | ||
2007_003118 | ||
2007_003178 | ||
2007_003189 | ||
2007_003190 | ||
2007_003191 |
PASCAL VOC 2012
PASCAL VOC 2012, packed once with a config per task view, so that a project can pull the split it
needs without unpacking VOCtrainval_11-May-2012.tar and wiring up paths first.
from datasets import load_dataset
seg = load_dataset("shijli/voc2012", "segmentation") # 1464 train / 1449 val
aug = load_dataset("shijli/voc2012", "segmentation_aug") # 10582 train / 1449 val
det = load_dataset("shijli/voc2012", "detection") # 5717 train / 5823 val
Configs
| config | train | val | columns |
|---|---|---|---|
segmentation (default) |
1464 | 1449 | id, image, mask |
segmentation_aug |
10582 | 1449 | id, image, mask |
detection |
5717 | 5823 | id, image, width, height, objects |
id is the original VOC image id (2007_000032), so any row joins back to a local VOC checkout.
VOC 2012 withholds its test annotations, so there is no test split.
Masks are labels, not pictures
A mask pixel's value is the class id. Masks are palette (mode P) PNGs, exactly as VOC ships
them: 0 is background, 1–20 are the classes below, and 255 marks the void border, which is
excluded from both training and scoring rather than being a 21st class.
import numpy as np
mask = np.array(seg["val"][0]["mask"]) # uint8, values in {0..20, 255}
Do not call .convert("RGB") on a mask: that turns class ids into display colors and destroys
the labels. The palette attached to each mask is for viewing only. Several VOC mirrors store masks
as RGB, which forces every consumer to reverse the VOC colormap before the labels mean anything;
this one does not.
Classes
background (0), then aeroplane, bicycle, bird, boat, bottle, bus, car, cat,
chair, cow, diningtable, dog, horse, motorbike, person, pottedplant, sheep,
sofa, train, tvmonitor (1–20). The detection config's objects.label is a ClassLabel
over the 20 object classes only, with no background entry, so its indices run 0–19.
The augmented split
segmentation_aug is the standard 10582-image train_aug set: the SBD annotations minus every
image held out for validation. Its train masks come from SBD, not from VOC. Its val split uses
the official VOC masks, the same 1449 images segmentation scores on, so a model trained on the
augmented set is measured against the same ground truth as one that was not.
Detection boxes
objects is a struct of parallel lists: label, bbox, difficult, truncated, pose.
r = det["train"][0]
for label, box in zip(r["objects"]["label"], r["objects"]["bbox"]):
...
Boxes are [xmin, ymin, xmax, ymax] exactly as the VOC XML gives them, which is 1-indexed and
inclusive on both corners. They are not converted, so they compare directly against the original
annotation files. The difficult flag is carried through rather than filtered, since whether to
drop those objects is the evaluation protocol's decision.
How this was packed
create_dataset.py in this repo is the script that produced these parquet files, from an unpacked
VOC2012 folder. Masks that already carry the VOC palette are published byte for byte; the SBD
masks, which ship as mode L with the same pixel values, are re-tagged as mode P with the VOC
palette so that every config decodes the same way.
Every mask in every split was checked against the source files after packing: all 14944 of them decode to arrays identical to the originals, with the void marker intact.
The same image appears in more than one config, since each config is self-contained. That is
deliberate: it means loading segmentation downloads that split alone rather than the whole
image pool.
License and attribution
The images come from flickr and remain under the copyright of their respective owners. They are distributed for non-commercial research and educational use under the terms of the PASCAL VOC challenge. This packaging adds no rights: use it under those same terms and cite the original work.
@article{everingham2015pascal,
title={The Pascal Visual Object Classes Challenge: A Retrospective},
author={Everingham, Mark and Eslami, S. M. Ali and Van Gool, Luc and
Williams, Christopher K. I. and Winn, John and Zisserman, Andrew},
journal={International Journal of Computer Vision},
volume={111}, number={1}, pages={98--136}, year={2015}
}
The segmentation_aug train masks are from SBD and should be cited separately:
@inproceedings{hariharan2011semantic,
title={Semantic Contours from Inverse Detectors},
author={Hariharan, Bharath and Arbelaez, Pablo and Bourdev, Lubomir and
Maji, Subhransu and Malik, Jitendra},
booktitle={International Conference on Computer Vision (ICCV)},
year={2011}
}
- Downloads last month
- 260