Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot load the dataset split (in streaming mode) to extract the first rows.
Error code:   StreamingRowsError
Exception:    CastError
Message:      Couldn't cast
text: string
fg: null
alpha: null
to
{'fg': Image(mode=None, decode=True), 'alpha': Image(mode=None, decode=True)}
because column names don't match
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/utils.py", line 99, in get_rows_or_raise
                  return get_rows(
                         ^^^^^^^^^
                File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
                  return func(*args, **kwargs)
                         ^^^^^^^^^^^^^^^^^^^^^
                File "/src/services/worker/src/worker/utils.py", line 77, in get_rows
                  rows_plus_one = list(itertools.islice(ds, rows_max_number + 1))
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2690, in __iter__
                  for key, example in ex_iterable:
                                      ^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2227, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2260, in _iter_arrow
                  pa_table = cast_table_to_features(pa_table, self.features)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/table.py", line 2223, in cast_table_to_features
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              text: string
              fg: null
              alpha: null
              to
              {'fg': Image(mode=None, decode=True), 'alpha': Image(mode=None, decode=True)}
              because column names don't match

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Transparent-460

Transparent object matting dataset introduced in TransMatting: Enhancing Transparent Objects Matting with Transformers (ECCV 2022).

Contains 460 transparent foreground images with corresponding alpha mattes. Foregrounds are composited onto background images to generate training/test pairs.

Dataset Preview

Foreground (fg) Alpha Matte Trimap
fg alpha trimap

Dataset Structure

Transparent-460/
├── Train/
│   ├── fg/                              # 410 foreground images (transparent objects)
│   ├── alpha/                           # 410 alpha mattes
│   ├── Composition_code.py             # compositing script
│   ├── transparent-460-train-fg-names.txt
│   └── transparent-460-train-bg-names.txt   # 41,000 COCO BG filenames (100 per FG)
└── Test/
    ├── fg/                              # 50 foreground images
    ├── alpha/                           # 50 alpha mattes
    ├── trimap/                          # 50 trimap masks
    ├── Composition_code.py             # compositing script
    ├── metric_evaluation.py
    ├── transparent-460-test-fg-names.txt
    └── transparent-460-test-bg-names.txt    # 1,000 Pascal VOC BG filenames (20 per FG)

Splits

Split FG images BG source Composited pairs
Train 410 COCO train2014 41,000
Test 50 Pascal VOC 2007 1,000

Data Fields

  • fg — foreground image of a transparent object (JPEG)
  • alpha — corresponding alpha matte (PNG, grayscale 0–255)
  • trimap — ternary region map for test set (PNG; 0=background, 128=unknown, 255=foreground)

Compositing

Background images are not included (COCO / Pascal VOC must be downloaded separately). Use the provided Composition_code.py to composite FG images onto BG images:

# Each train FG is composited onto 100 COCO BG images.
# Each test FG is composited onto 20 Pascal VOC BG images.
python Composition_code.py

Example Usage

from datasets import load_dataset

ds = load_dataset("Thinnaphat/transparent-460")

# Train split
train_sample = ds["train"][0]
fg_image  = train_sample["fg"]    # PIL Image
alpha_map = train_sample["alpha"] # PIL Image (grayscale)

# Test split
test_sample = ds["test"][0]
fg_image   = test_sample["fg"]
alpha_map  = test_sample["alpha"]
trimap_map = test_sample["trimap"]

License

Non-commercial research use only.

  1. Available for non-commercial research purposes only.
  2. Images obtained from the Internet; authors not responsible for content.
  3. No reproduction, duplicate, copy, sell, trade, or resell for commercial purposes.
  4. No further public distribution except internal use within a single organization.
  5. Authors reserve the right to terminate access at any time.

Citation

@inproceedings{cai2022TransMatting,
  title={TransMatting: Enhancing Transparent Objects Matting with Transformers},
  author={Cai, Huanqia and Xue, Fanglei, and Xu, Lele and Guo, Lili},
  booktitle={European Conference on Computer Vision (ECCV)},
  year={2022},
}
Downloads last month
820