mcubes / README.md
nvriese1's picture
Add dataset card + metadata for MCubeS
9e8c445 verified
|
Raw History Blame Contribute Delete
5.55 kB
---
license: mit
pretty_name: "MCubeS"
task_categories:
- image-segmentation
tags:
- computer-vision
- sidewalk
- road
- crosswalk
- building
- factory
- bicycle
- stop-sign
- railroad
- parking-meter
- fence
- pictograph
annotations_creators:
- expert-generated
size_categories:
- n<1K
source_datasets:
- original
configs:
- config_name: default
data_files:
- split: train
path: "train/*"
- split: validation
path: "valid/*"
- split: test
path: "test/*"
---
[![MCubeS - annotated computer-vision dataset on Pictograph](https://storage.googleapis.com/pictograph-assets/hf/heroes/mcubes.png)](https://pictograph.io/datasets/pictograph-research/mcubes)
[![Open in](https://img.shields.io/badge/Open_in-Pictograph-2c5aa0)](https://pictograph.io/datasets/pictograph-research/mcubes) ![task](https://img.shields.io/badge/task-image_segmentation-1a4480) ![images](https://img.shields.io/badge/images-500-555) [![license](https://img.shields.io/badge/license-mit-3cb44b)](https://opensource.org/license/mit)
**[View on Pictograph](https://pictograph.io/datasets/pictograph-research/mcubes)** · [Pictograph Research](https://pictograph.io/org/pictograph-research) · [MIT License](https://opensource.org/license/mit)
## About
**MCubeS** is a computer-vision dataset from [MCubeS (Multimodal Material Segmentation)](https://github.com/kyotovision-public/multimodal-material-segmentation), hosted on [Pictograph](https://pictograph.io/datasets/pictograph-research/mcubes). The most common detected objects are sidewalk, road, crosswalk, building, factory, bicycle. On Pictograph you can browse every annotated image, import it into your own workspace in one click, export it in a dozen formats, or train a model on it directly.
## At a glance
| Metric | Value |
| :--- | ---: |
| Images | 500 |
| Annotations | 99,352 |
| Classes | 20 |
| Annotation types | polygon |
| Splits | train, validation, test |
## Quick start
Load it in one line with the `datasets` library, then read each record's boxes and class names:
```python
from datasets import load_dataset
from PIL import ImageDraw
ds = load_dataset("pictograph/mcubes", split="train")
example = ds[0]
image = example["image"] # a PIL image
objects = example["objects"] # {bbox, categories, category_names}
# draw every bounding box with its class name
draw = ImageDraw.Draw(image)
for (x, y, w, h), name in zip(objects["bbox"], objects["category_names"]):
draw.rectangle([x, y, x + w, y + h], outline="red", width=3)
draw.text((x, y - 12), name, fill="red")
# polygon masks live under example["segmentation"]:
# [{"label": name, "category": idx, "points": [[x, y], ...]}, ...]
image.show()
```
Prefer a full annotation editor, one-click import, multi-format export, and one-click training? [Open this dataset on Pictograph](https://pictograph.io/datasets/pictograph-research/mcubes).
## Dataset structure
This dataset uses the Hugging Face `imagefolder` layout: each split directory holds the images plus a `metadata.jsonl` that links every image to its annotations by `file_name`.
| Field | Description |
| :--- | :--- |
| `file_name` | Path to the image within the split directory. |
| `objects.bbox` | Bounding boxes as `[x, y, width, height]` (pixels). |
| `objects.categories` | Integer class index per box (matches the class list below). |
| `objects.category_names` | Human class name per box. |
| `segmentation` | List of `{label, category, points}`; `points` is a polygon ring `[[x, y], ...]`. |
## Data instance
One record (bounding boxes are `[x, y, width, height]` in pixels; the class index maps into the class list below):
```python
{
"image": <PIL.Image (RGB)>,
"objects": {
"bbox": [[172.0, 192.0, 249.4, 152.7]],
"categories": [0],
"category_names": ["asphalt"]
},
"segmentation": [
{"label": "asphalt", "category": 0, "points": [[176.9, 207.2], [259.0, 274.1], ...]}
]
}
```
## Classes
Class index matches `objects.categories` in `metadata.jsonl`.
| # | Class | Annotations |
| ---: | :--- | ---: |
| 0 | asphalt | 2,503 |
| 1 | concrete | 16,773 |
| 2 | metal | 11,243 |
| 3 | road marking | 1,706 |
| 4 | fabric leather | 900 |
| 5 | glass | 15,251 |
| 6 | plaster | 1,507 |
| 7 | plastic | 2,517 |
| 8 | rubber | 4,545 |
| 9 | sand | 1,404 |
| 10 | gravel | 252 |
| 11 | ceramic | 2,116 |
| 12 | cobblestone | 525 |
| 13 | brick | 5,124 |
| 14 | grass | 2,855 |
| 15 | wood | 5,590 |
| 16 | leaf | 9,834 |
| 17 | water | 336 |
| 18 | human body | 518 |
| 19 | sky | 13,853 |
## License
Released under [MIT License](https://opensource.org/license/mit).
## Source and attribution
The images and annotations come from [MCubeS (Multimodal Material Segmentation)](https://github.com/kyotovision-public/multimodal-material-segmentation), created by Kyoto University (Liang et al., CVPR 2022) and released under MIT License. We are grateful to the original authors. If you use this data, please cite the original source above.
## Citation
```bibtex
@InProceedings{Liang_2022_CVPR,
author = {Liang, Yupeng and Wakaki, Ryosuke and Nobuhara, Shohei and Nishino, Ko},
title = {Multimodal Material Segmentation},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2022},
pages = {19800-19808}
}
```
---
*Published from [Pictograph](https://pictograph.io/datasets/pictograph-research/mcubes) - annotate, train, and deploy from one API.*