The official homepage of the (outdated) COCO-Stuff 10K dataset.

Overview

COCO-Stuff 10K dataset v1.1 (outdated)

Holger Caesar, Jasper Uijlings, Vittorio Ferrari

Overview

COCO-Stuff example annotations

Welcome to official homepage of the COCO-Stuff [1] dataset. COCO-Stuff augments the popular COCO [2] dataset with pixel-level stuff annotations. These annotations can be used for scene understanding tasks like semantic segmentation, object detection and image captioning.

Overview

Highlights

  • 10,000 complex images from COCO [2]
  • Dense pixel-level annotations
  • 91 thing and 91 stuff classes
  • Instance-level annotations for things from COCO [2]
  • Complex spatial context between stuff and things
  • 5 captions per image from COCO [2]

Updates

  • 11 Jul 2017: Added working Deeplab models for Resnet and VGG
  • 06 Apr 2017: Dataset version 1.1: Modified label indices
  • 31 Mar 2017: Published annotations in JSON format
  • 09 Mar 2017: Added label hierarchy scripts
  • 08 Mar 2017: Corrections to table 2 in arXiv paper [1]
  • 10 Feb 2017: Added script to extract SLICO superpixels in annotation tool
  • 12 Dec 2016: Dataset version 1.0 and arXiv paper [1] released

Results

The current release of COCO-Stuff-10K publishes both the training and test annotations and users report their performance individually. We invite users to report their results to us to complement this table. In the near future we will extend COCO-Stuff to all images in COCO and organize an official challenge where the test annotations will only be known to the organizers.

For the updated table please click here.

Method Source Class-average accuracy Global accuracy Mean IOU FW IOU
FCN-16s [3] [1] 34.0% 52.0% 22.7% -
Deeplab VGG-16 (no CRF) [4] [1] 38.1% 57.8% 26.9% -
FCN-8s [3] [6] 38.5% 60.4% 27.2% -
DAG-RNN + CRF [6] [6] 42.8% 63.0% 31.2% -
OHE + DC + FCN+ [5] [5] 45.8% 66.6% 34.3% 51.2%
Deeplab ResNet (no CRF) [4] - 45.5% 65.1% 34.4% 50.4%
W2V + DC + FCN+ [5] [5] 45.1% 66.1% 34.7% 51.0%

Dataset

Filename Description Size
cocostuff-10k-v1.1.zip COCO-Stuff dataset v. 1.1, images and annotations 2.0 GB
cocostuff-10k-v1.1.json COCO-Stuff dataset v. 1.1, annotations in JSON format (optional) 62.3 MB
cocostuff-labels.txt A list of the 1+91+91 classes in COCO-Stuff 2.3 KB
cocostuff-readme.txt This document 6.5 KB
Older files
cocostuff-10k-v1.0.zip COCO-Stuff dataset version 1.0, including images and annotations 2.6 GB

Usage

To use the COCO-Stuff dataset, please follow these steps:

  1. Download or clone this repository using git: git clone https://github.com/nightrome/cocostuff10k.git
  2. Open the dataset folder in your shell: cd cocostuff10k
  3. If you have Matlab, run the following commands:
  • Add the code folder to your Matlab path: startup();
  • Run the demo script in Matlab demo_cocoStuff();
  • The script displays an image, its thing, stuff and thing+stuff annotations, as well as the image captions.
  1. Alternatively run the following Linux commands or manually download and unpack the dataset:
  • wget --directory-prefix=downloads http://calvin.inf.ed.ac.uk/wp-content/uploads/data/cocostuffdataset/cocostuff-10k-v1.1.zip
  • unzip downloads/cocostuff-10k-v1.1.zip -d dataset/

MAT Format

The COCO-Stuff annotations are stored in separate .mat files per image. These files follow the same format as used by Tighe et al.. Each file contains the following fields:

  • S: The pixel-wise label map of size [height x width].
  • names: The names of the thing and stuff classes in COCO-Stuff. For more details see Label Names & Indices.
  • captions: Image captions from [2] that are annotated by 5 distinct humans on average.
  • regionMapStuff: A map of the same size as S that contains the indices for the approx. 1000 regions (superpixels) used to annotate the image.
  • regionLabelsStuff: A list of the stuff labels for each superpixel. The indices in regionMapStuff correspond to the entries in regionLabelsStuff.

JSON Format

Alternatively, we also provide stuff and thing annotations in the COCO-style JSON format. The thing annotations are copied from COCO. We encode every stuff class present in an image as a single annotation using the RLE encoding format of COCO. To get the annotations:

  • Either download them: wget --directory-prefix=dataset/annotations-json http://calvin.inf.ed.ac.uk/wp-content/uploads/data/cocostuffdataset/cocostuff-10k-v1.1.json
  • Or extract them from the .mat file annotations using this Python script.

Label Names & Indices

To be compatible with COCO, version 1.1 of COCO-Stuff has 91 thing classes (1-91), 91 stuff classes (92-182) and 1 class "unlabeled" (0). Note that 11 of the thing classes from COCO 2015 do not have any segmentation annotations. The classes desk, door and mirror could be either stuff or things and therefore occur in both COCO and COCO-Stuff. To avoid confusion we add the suffix "-stuff" to those classes in COCO-Stuff. The full list of classes can be found here.

The older version 1.0 of COCO-Stuff had 80 thing classes (2-81), 91 stuff classes (82-172) and 1 class "unlabeled" (1).

Label Hierarchy

The hierarchy of labels is stored in CocoStuffClasses. To visualize it, run CocoStuffClasses.showClassHierarchyStuffThings() (also available for just stuff and just thing classes) in Matlab. The output should look similar to the following figure: COCO-Stuff label hierarchy

Semantic Segmentation Models

To encourage further research of stuff and things we provide the trained semantic segmentation model (see Sect. 4.4 in [1]).

DeepLab VGG-16

Use the following steps to download and setup the DeepLab [4] semantic segmentation model trained on COCO-Stuff. It requires deeplab-public-ver2, which is built on Caffe:

  1. Install Cuda. I recommend version 7.0. For version 8.0 you will need to apply the fix described here in step 3.
  2. Download deeplab-public-ver2: git submodule update --init models/deeplab/deeplab-public-ver2
  3. Compile and configure deeplab-public-ver2 following the author's instructions. Depending on your system setup you might have to install additional packages, but a minimum setup could look like this:
  • cd models/deeplab/deeplab-public-ver2
  • cp Makefile.config.example Makefile.config
  • Optionally add CuDNN support or modify library paths in the Makefile.
  • make all -j8
  • cd ../..
  1. Configure the COCO-Stuff dataset:
  • Create folders: mkdir models/deeplab/deeplab-public-ver2/cocostuff && mkdir models/deeplab/deeplab-public-ver2/cocostuff/data
  • Create a symbolic link to the images: cd models/deeplab/cocostuff/data && ln -s ../../../../dataset/images images && cd ../../../..
  • Convert the annotations by running the Matlab script: startup(); convertAnnotationsDeeplab();
  1. Download the base VGG-16 model:
  • wget --directory-prefix=models/deeplab/cocostuff/model/deeplabv2_vgg16 http://calvin.inf.ed.ac.uk/wp-content/uploads/data/cocostuffdataset/deeplabv2_vgg16_init.caffemodel
  1. Run cd models/deeplab && ./run_cocostuff_vgg16.sh to train and test the network on COCO-Stuff.

DeepLab ResNet 101

The default Deeplab model performs center crops of size 513*513 pixels of an image, if any side is larger than that. Since we want to segment the whole image at test time, we choose to resize the images to 513x513, perform the semantic segmentation and then rescale it elsewhere. Note that without the final step, the performance might differ slightly.

  1. Follow steps 1-4 of the DeepLab VGG-16 section above.
  2. Download the base ResNet model:
  • wget --directory-prefix=models/deeplab/cocostuff/model/deeplabv2_resnet101 http://calvin.inf.ed.ac.uk/wp-content/uploads/data/cocostuffdataset/deeplabv2_resnet101_init.caffemodel
  1. Rescale the images and annotations:
  • cd models/deeplab
  • python rescaleImages.py
  • python rescaleAnnotations.py
  1. Run ./run_cocostuff_resnet101.sh to train and test the network on COCO-Stuff.

Annotation Tool

In [1] we present a simple and efficient stuff annotation tool which was used to annotate the COCO-Stuff dataset. It uses a paintbrush tool to annotate SLICO superpixels (precomputed using the code of Achanta et al.) with stuff labels. These annotations are overlaid with the existing pixel-level thing annotations from COCO. We provide a basic version of our annotation tool:

  • Prepare the required data:
    • Specify a username in annotator/data/input/user.txt.
    • Create a list of images in annotator/data/input/imageLists/<user>.list.
    • Extract the thing annotations for all images in Matlab: extractThings().
    • Extract the superpixels for all images in Matlab: extractSLICOSuperpixels().
    • To enable or disable superpixels, thing annotations and polygon drawing, take a look at the flags at the top of CocoStuffAnnotator.m.
  • Run the annotation tool in Matlab: CocoStuffAnnotator();
    • The tool writes the .mat label files to annotator/data/output/annotations.
    • To create a .png preview of the annotations, run annotator/code/exportImages.m in Matlab. The previews will be saved to annotator/data/output/preview.

Misc

References

Licensing

COCO-Stuff is a derivative work of the COCO dataset. The authors of COCO do not in any form endorse this work. Different licenses apply:

Contact

If you have any questions regarding this dataset, please contact us at holger-at-it-caesar.com.

Comments
  • Annotation tool

    Annotation tool

    cocostuff_error In Annotation tool, While doing this step: Extract the thing annotations for all images in Matlab: extractThings() I get error on Matlab Loading and preparing annotations... Undefined function or variable 'gasonMex' Did anyone had similar issue or know how to fix it? Thank you!

    opened by priyanka-chaudhary 11
  • when I look at the classes it only shows the stuff classes in the annotations.

    when I look at the classes it only shows the stuff classes in the annotations.

    Is the normal annotation (coco) of things not included in the JSON of stuff? As in how would i get the category of every object on an image and not just the category other for all the thing classes?

    opened by JaspervDalen 7
  • Mismatch of annotation format in cocostuff-10k-v1.1.json and convertAnnotationsJSON.py

    Mismatch of annotation format in cocostuff-10k-v1.1.json and convertAnnotationsJSON.py

    Hii

    The annotation for segmentation in cocostuff-10k-v1.1.json is a list. ie "segmentation":[ { "counts":xxxxxx, "size":[x,y] } ] How ever the output produced by convertAnnotationsJSON.py does not contain this . The corresponding code just has anndata['segmentation'] = Rs which will produce this "segmentation": { "counts":xxxxxx, "size":[x,y] }

    Is this a bug or my understanding is wrong ?

    opened by absurdvision 7
  • .mat to .png conversion on dataset annotation files

    .mat to .png conversion on dataset annotation files

    Hello after running the run_cocostuff_vgg16.sh script, I am getting this error :

    Could not open or find file cocostuff/data/annotations/COCO_train2014_000000034795.png

    It happens because all files' formats are .mat under annotations folder. I think this step doing it but I don't have any MATLAB experience and knowledge.

    Convert the annotations by running the Matlab script: startup(); convertAnnotationsDeeplab();

    thank you for all helps.

    opened by redzhepdx 6
  • Loading this dataset by using pycocotools

    Loading this dataset by using pycocotools

    Hello I want to load this dataset by using pycocotools but I got this problem 2018-01-21 22 01 01 And I am quite confused about some part of the file 'cocostuff-10k-v1.1.json' 2018-01-21 22 02 12

    opened by zhwuer 5
  • how to generate data/input/regions/***.mat?

    how to generate data/input/regions/***.mat?

    hi~ I download the code of SLIC_mex. i run the code of SLIC_mex successfully. but how to generate data/input/regions/***.mat?

    my software:matlabR2016a

    opened by Hjy20255 3
  • extractThings Problem

    extractThings Problem

    Thanks for your great work, but I met this following problems:

    extractThings Loading COCO API... Loading and preparing annotations... DONE (t=11.14s). Error using containers.Map/subsref The specified key is not present in this container.

    Error in CocoApi/getAnnIds (line 121) t = coco.loadAnns(coco.inds.imgAnnIdsMap(imgIds));

    Error in extractThings>getImLabelMap (line 88) annIds = cocoApi.getAnnIds('imgIds', imgId, 'iscrowd', []);

    Error in extractThings (line 71) labelMap = getImLabelMap(cocoApi, image, imageName);

    Could u tell me what's wrong here? I use new dataset. And I want to create new annotation of new classes. Thanks a lot.

    opened by NIEYALI 2
  • Convert to Yolo forman

    Convert to Yolo forman

    Hello! I download COCO dataset for training dataset on YOLO. But annotations turns out on .json format. How i convert them to YOLO? YOLO have a .txt labels .

    Thanks, and sorry if my question is stupid :-)

    opened by RushNuts 2
  • Unable to convert JSON to t7 format using COCO api

    Unable to convert JSON to t7 format using COCO api

    Hi I am trying to convert the provided json file cocostuff-10k-v1.1.json to t7 format using coco api available here. I am using the lua function coco.CocoApi("cocostuff-10k-v1.1.json") to do this. Iam getting an error convert: cocostuff-10k-v1.1.json --> .t7 [please be patient] ...ri/mnt_hari/torch/install/share/lua/5.1/coco/CocoApi.lua:142: Expected comma or array end but found T_OBJ_BEGIN at character 104320833 stack traceback: [C]: in function 'decode' ...ri/mnt_hari/torch/install/share/lua/5.1/coco/CocoApi.lua:142: in function '__convert' ...ri/mnt_hari/torch/install/share/lua/5.1/coco/CocoApi.lua:128: in function '__init' ...hari/mnt_hari/torch/install/share/lua/5.1/torch/init.lua:91: in function <...hari/mnt_hari/torch/install/share/lua/5.1/torch/init.lua:87> [C]: in function 'CocoApi' [string "_RESULT={coco.CocoApi("cocostuff-10k-v1.1.jso..."]:1: in main chunk [C]: in function 'xpcall' ...hari/mnt_hari/torch/install/share/lua/5.1/trepl/init.lua:661: in function 'repl' ...hari/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:204: in main chunk [C]: at 0x00405d50 [1.4312s] while running this. Is there a way to do this?

    opened by absurdvision 2
  • How to extract only the png from mat ?

    How to extract only the png from mat ?

    Hello,

    i downloaded the dataset but to only realize that the annotations folder has .mat files instead of png files.

    how can i covert these .mat files to png ?

    i plan to train them on pytorch deeplab v3

    opened by cmdrootaccess 1
  • How about the full class list of older cocostuff1.0?

    How about the full class list of older cocostuff1.0?

    Hi, @nightrome , I appreciate for your works, it really helpful. But for fair comparison, I have to evaluate the models on the older COCO_stuff dataset, i.e., vision 1.0. I have no idea about the full class list of it which only contains 172 classes. Can you help me to get these information? Thanks a lot.

    opened by wangq95 1
Owner
Holger Caesar
Author of the COCO-Stuff and nuScenes datasets.
Holger Caesar
Generative code template for PixelBeasts 10k NFT project.

generator-template Generative code template for combining transparent png attributes into 10,000 unique images. Used for the PixelBeasts 10k NFT proje

Yohei Nakajima 9 Aug 24, 2022
YOLOv5 🚀 is a family of object detection architectures and models pretrained on the COCO dataset

YOLOv5 ?? is a family of object detection architectures and models pretrained on the COCO dataset, and represents Ultralytics open-source research int

阿才 73 Dec 16, 2022
A set of tools for converting a darknet dataset to COCO format working with YOLOX

darknet格式数据→COCO darknet训练数据目录结构(详情参见dataset/darknet): darknet ├── class.names ├── gen_config.data ├── gen_train.txt ├── gen_valid.txt └── images

RapidAI-NG 148 Jan 3, 2023
Homepage of paper: Paint Transformer: Feed Forward Neural Painting with Stroke Prediction, ICCV 2021.

Paint Transformer: Feed Forward Neural Painting with Stroke Prediction [Paper] [PaddlePaddle Implementation] Homepage of paper: Paint Transformer: Fee

null 442 Dec 16, 2022
Json2Xml tool will help you convert from json COCO format to VOC xml format in Object Detection Problem.

JSON 2 XML All codes assume running from root directory. Please update the sys path at the beginning of the codes before running. Over View Json2Xml t

Nguyễn Trường Lâu 6 Aug 22, 2022
Txt2Xml tool will help you convert from txt COCO format to VOC xml format in Object Detection Problem.

TXT 2 XML All codes assume running from root directory. Please update the sys path at the beginning of the codes before running. Over View Txt2Xml too

Nguyễn Trường Lâu 4 Nov 24, 2022
UDP++ (ECCVW 2020 Oral), (Winner of COCO 2020 Keypoint Challenge).

UDP-Pose This is the pytorch implementation for UDP++, which won the Fisrt place in COCO Keypoint Challenge at ECCV 2020 Workshop. Top-Down Results on

null 20 Jul 29, 2022
This is a Python Module For Encryption, Hashing And Other stuff

EnroCrypt This is a Python Module For Encryption, Hashing And Other Basic Stuff You Need, With Secure Encryption And Strong Salted Hashing You Can Do

null 5 Sep 15, 2022
Official Implementation and Dataset of "PPR10K: A Large-Scale Portrait Photo Retouching Dataset with Human-Region Mask and Group-Level Consistency", CVPR 2021

Portrait Photo Retouching with PPR10K Paper | Supplementary Material PPR10K: A Large-Scale Portrait Photo Retouching Dataset with Human-Region Mask an

null 184 Dec 11, 2022
This is the official source code for SLATE. We provide the code for the model, the training code, and a dataset loader for the 3D Shapes dataset. This code is implemented in Pytorch.

SLATE This is the official source code for SLATE. We provide the code for the model, the training code and a dataset loader for the 3D Shapes dataset.

Gautam Singh 66 Dec 26, 2022
This is the dataset and code release of the OpenRooms Dataset.

This is the dataset and code release of the OpenRooms Dataset.

Visual Intelligence Lab of UCSD 95 Jan 8, 2023
A large dataset of 100k Google Satellite and matching Map images, resembling pix2pix's Google Maps dataset.

Larger Google Sat2Map dataset This dataset extends the aerial ⟷ Maps dataset used in pix2pix (Isola et al., CVPR17). The provide script download_sat2m

null 34 Dec 28, 2022
Dataset used in "PlantDoc: A Dataset for Visual Plant Disease Detection" accepted in CODS-COMAD 2020

PlantDoc: A Dataset for Visual Plant Disease Detection This repository contains the Cropped-PlantDoc dataset used for benchmarking classification mode

Pratik Kayal 109 Dec 29, 2022
EMNLP 2021: Single-dataset Experts for Multi-dataset Question-Answering

MADE (Multi-Adapter Dataset Experts) This repository contains the implementation of MADE (Multi-adapter dataset experts), which is described in the pa

Princeton Natural Language Processing 68 Jul 18, 2022
EMNLP 2021: Single-dataset Experts for Multi-dataset Question-Answering

MADE (Multi-Adapter Dataset Experts) This repository contains the implementation of MADE (Multi-adapter dataset experts), which is described in the pa

Princeton Natural Language Processing 39 Oct 5, 2021
LoveDA: A Remote Sensing Land-Cover Dataset for Domain Adaptive Semantic Segmentation (NeurIPS2021 Benchmark and Dataset Track)

LoveDA: A Remote Sensing Land-Cover Dataset for Domain Adaptive Semantic Segmentation by Junjue Wang, Zhuo Zheng, Ailong Ma, Xiaoyan Lu, and Yanfei Zh

Kingdrone 174 Dec 22, 2022
The Habitat-Matterport 3D Research Dataset - the largest-ever dataset of 3D indoor spaces.

Habitat-Matterport 3D Dataset (HM3D) The Habitat-Matterport 3D Research Dataset is the largest-ever dataset of 3D indoor spaces. It consists of 1,000

Meta Research 62 Dec 27, 2022