Datasets:
File size: 4,158 Bytes
e4d46d3 b0f6f5a e4d46d3 538b0cc e4d46d3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | ---
license: other
license_name: transparent-460-non-commercial
license_link: >-
https://github.com/AnyiRao/segment-anything-with-clip/blob/main/LICENSE
language:
- en
tags:
- image-matting
- transparent-objects
- alpha-matte
- trimap
- computer-vision
- matting
size_categories:
- n<1K
task_categories:
- image-segmentation
pretty_name: Transparent-460
dataset_info:
features:
- name: fg
dtype: image
- name: alpha
dtype: image
splits:
- name: train
num_examples: 410
- name: test
num_examples: 50
---
# 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 |
|:-:|:-:|:-:|
|  |  |  |
## 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:
```python
# 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
```python
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
```bibtex
@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},
}
```
|