Datasets:
File size: 1,328 Bytes
a057e47 0adc810 e86e3cb |
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 |
---
pretty_name: InkEraser
license: apache-2.0
language:
- zh
- en
task_categories:
- image-to-image
size_categories:
- 1K<n<10K
tags:
- image-to-image
- inpainting
- handwriting
- paired-images
configs:
- config_name: default
drop_labels: true
---
# ynyg/InkEraser
筆跡擦除數據集,用於將含有筆跡的圖像(source)轉換為去除筆跡的目標圖像(target)。
## 文件結構
```
data/
train/
source/ # 原圖(含筆跡)
target/ # 目標(去筆跡)
val/
source/
target/
```
## 配對規則
- `source/` 與 `target/` 中使用**完全相同的文件名**進行一一對應。
- 圖像格式:`.jpg`。
## 數據量(當前倉庫)
- train:1511 對
- val:115 對
- 合計:1626 對
## 使用示例(Python)
```python
from huggingface_hub import snapshot_download
from pathlib import Path
from PIL import Image
root = Path(snapshot_download("ynyg/InkEraser", repo_type="dataset"))
for split in ["train", "val"]:
src_dir = root / "data" / split / "source"
tgt_dir = root / "data" / split / "target"
for src_path in src_dir.glob("*.jpg"):
tgt_path = tgt_dir / src_path.name
# 成對讀取
src_img = Image.open(src_path)
tgt_img = Image.open(tgt_path)
# TODO: your training code
```
## 授權
Apache-2.0 |