Update README.md
Browse files
README.md
CHANGED
|
@@ -7,84 +7,59 @@ language:
|
|
| 7 |
- zh
|
| 8 |
- en
|
| 9 |
configs:
|
| 10 |
-
- config_name:
|
| 11 |
data_files:
|
| 12 |
- split: test
|
| 13 |
-
path:
|
| 14 |
-
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
path: data/medium/*.parquet
|
| 18 |
-
- config_name: hard
|
| 19 |
-
data_files:
|
| 20 |
-
- split: test
|
| 21 |
-
path: data/hard/*.parquet
|
| 22 |
tags:
|
| 23 |
- art
|
| 24 |
-
- calligraphy
|
| 25 |
-
- chinese
|
| 26 |
-
- visual-language-model
|
| 27 |
-
- document-understanding
|
| 28 |
size_categories:
|
| 29 |
- 1K<n<10K
|
|
|
|
| 30 |
---
|
| 31 |
|
| 32 |
-
# 🧠 CalliReader: Contextualizing Chinese Calligraphy via an Embedding-aligned Vision Language Model
|
| 33 |
|
|
|
|
| 34 |
<div align="center">
|
| 35 |
-
<a href="https://github.com/LoYuXr/CalliReader">📂 Code</a>
|
| 36 |
<a href="https://arxiv.org/pdf/2503.06472">📄 Paper</a>
|
| 37 |
</div>
|
| 38 |
|
| 39 |
-
|
| 40 |
|
| 41 |
-
**CalliBench** is a comprehensive benchmark designed to evaluate Vision-Language Models (VLMs) on the recognition and understanding of Chinese calligraphy.
|
| 42 |
|
| 43 |
-
### Dataset Subsets
|
| 44 |
|
| 45 |
-
|
| 46 |
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
- **Characteristics**: Mixed script styles, moderate complexity, historical variants
|
| 55 |
-
- **Use Case**: Intermediate-level analysis and contextual understanding
|
| 56 |
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
- **Characteristics**: Cursive scripts, complex layouts, rare characters, damaged works
|
| 60 |
-
- **Use Case**: Advanced contextual reasoning and expert-level interpretation
|
| 61 |
-
|
| 62 |
-
### Dataset Summary
|
| 63 |
-
|
| 64 |
-
- **Total Samples**: 3,192 image–annotation pairs
|
| 65 |
-
- **Tasks**:
|
| 66 |
-
- **Full-page recognition**: Complete transcription of calligraphy works
|
| 67 |
-
- **Contextual VQA**: Author identification, layout analysis, style classification, bilingual interpretation, and intent analysis
|
| 68 |
-
|
| 69 |
-
### Usage Examples
|
| 70 |
-
|
| 71 |
-
#### Loading Specific Subsets
|
| 72 |
-
|
| 73 |
-
```python
|
| 74 |
import pandas as pd
|
| 75 |
import io
|
| 76 |
from PIL import Image
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
-
|
| 82 |
-
df_medium = pd.read_parquet('./data/medium/medium.parquet')
|
| 83 |
|
| 84 |
-
|
| 85 |
-
df_hard = pd.read_parquet('./data/hard/hard.parquet')
|
| 86 |
|
| 87 |
-
|
| 88 |
-
sample = df_hard.iloc[0]
|
| 89 |
-
image_data = sample['image']
|
| 90 |
-
image = Image.open(io.BytesIO(image_data['bytes']))
|
|
|
|
| 7 |
- zh
|
| 8 |
- en
|
| 9 |
configs:
|
| 10 |
+
- config_name: Full-Page OCR # 例如:default
|
| 11 |
data_files:
|
| 12 |
- split: test
|
| 13 |
+
path:
|
| 14 |
+
- data/easy/*.parquet # 指定easy子文件夹下所有.parquet文件
|
| 15 |
+
- data/medium/*.parquet # 指定medium子文件夹下所有.parquet文件
|
| 16 |
+
- data/hard/*.parquet # 指定hard子文件夹下所有.parquet文件
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
tags:
|
| 18 |
- art
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
size_categories:
|
| 20 |
- 1K<n<10K
|
| 21 |
+
|
| 22 |
---
|
| 23 |
|
|
|
|
| 24 |
|
| 25 |
+
# 🧠 CalliReader: Contextualizing Chinese Calligraphy via an Embedding-aligned Vision Language Model
|
| 26 |
<div align="center">
|
| 27 |
+
<a href="https://github.com/LoYuXr/CalliReader">📂 Code</a>
|
| 28 |
<a href="https://arxiv.org/pdf/2503.06472">📄 Paper</a>
|
| 29 |
</div>
|
| 30 |
|
| 31 |
+
**CalliBench** is aimed to comprehensively evaluate VLMs' performance on the recognition and understanding of Chinese calligraphy.
|
| 32 |
|
|
|
|
| 33 |
|
|
|
|
| 34 |
|
| 35 |
+
## 📦 Dataset Summary
|
| 36 |
|
| 37 |
+
* **Samples**: 3,192 image–annotation pairs
|
| 38 |
+
* **Tasks**: **Full-page recognition** and **Contextual VQA** (choice of author/layout/style, bilingual interpretation, and intent analysis).
|
| 39 |
+
* **Annotations**:
|
| 40 |
+
|
| 41 |
+
* Metadata of author, layout, and style.
|
| 42 |
+
* Fine-grained annotations of **character-wise bounding boxes and labels**.
|
| 43 |
+
* Certain samples include **contextual VQA**.
|
| 44 |
|
| 45 |
+
## 🧪 How To Use
|
| 46 |
+
All **.parqeut** files of different tiers can be found in the sub-folders of **data**. **Pandas** can be used to parse and further process those files.
|
|
|
|
|
|
|
| 47 |
|
| 48 |
+
For example, to load a sample and convert its image into a .jpg file:
|
| 49 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
import pandas as pd
|
| 51 |
import io
|
| 52 |
from PIL import Image
|
| 53 |
|
| 54 |
+
df = pd.read_parquet('./data/hard/hard.parquet')
|
| 55 |
+
|
| 56 |
+
image_data = df.iloc[0]['image']
|
| 57 |
+
image = Image.open(io.BytesIO(image_data['bytes']))
|
| 58 |
+
|
| 59 |
+
image.save('output_image.jpg')
|
| 60 |
|
| 61 |
+
```
|
|
|
|
| 62 |
|
| 63 |
+
## 🤗 License
|
|
|
|
| 64 |
|
| 65 |
+
Apache 2.0 – open for research and commercial use.
|
|
|
|
|
|
|
|
|