Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

GlyphWeave · 字织

English | 简体中文

The prepared handwritten character dataset for GlyphWeave. This repository distributes the project's complete data/processed/ directory: the label mapping, sample index, and all referenced image files. Training code, configurations, and models are maintained in the linked project.

Sources and terms

GlyphWeave prepares and indexes these upstream datasets; it does not claim authorship of their original images. Access, use, and redistribution remain subject to the respective upstream terms, including the CASIA agreement. The project code's license does not replace the dataset terms.

Classes and splits

Character group Classes
Chinese characters 7,185
Uppercase letters 26
Lowercase letters 26
Digits 10
Total 7,247

Labels are zero-based indices into metadata.json → classes. Keep this ordering when training and decoding predictions.

Split CASIA images EMNIST images Total images Classes
Training 2,725,168 628,142 3,353,310 7,247
Validation 304,858 69,790 374,648 7,247
Test 754,572 116,323 870,895 7,247
Total 3,784,598 814,255 4,598,853 7,247

These counts come from the released index, rather than the unfiltered upstream datasets. CASIA contributes all 7,247 classes; EMNIST contributes 62 letter and digit classes.

CASIA retains the official test split and holds out validation writers from the official training data. Its training, validation, and test splits contain 734, 82, and 204 writers respectively, with no writer overlap. EMNIST retains its official test split and uses class-stratified sampling for training and validation. Its writer IDs are unavailable, so writer separation cannot be established for those two splits.

Preparation uses seed 42 and validation fraction 0.1, removes 135 zero-size records and 1 blank image, and excludes non-target symbols. The project loader transposes raw EMNIST images once and inverts their polarity before shared image preprocessing. The stored images retain their source dimensions; resizing and training augmentation happen in the project loader.

Directory and format

The release contains 1,024 data files totaling 24,508,495,512 bytes (22.83 GiB): 1,020 GNT files, 2 IDX files, index.npy, and metadata.json. Documentation and integrity tools are additional files.

data/processed/
├── README.md
├── README.zh-CN.md
├── SHA256SUMS.txt
├── verify_dataset.py
├── metadata.json
├── index.npy
└── raw/
    ├── Gnt1.0Test/
    ├── Gnt1.0TrainPart1/
    ├── Gnt1.0TrainPart2/
    ├── Gnt1.0TrainPart3/
    ├── Gnt1.1Test/
    ├── Gnt1.1TrainPart1/
    ├── Gnt1.1TrainPart2/
    ├── Gnt1.2Test/
    ├── Gnt1.2TrainPart1/
    ├── Gnt1.2TrainPart2/
    ├── emnist-train.idx
    └── emnist-test.idx

metadata.json records format version 1, class ordering, source paths, CASIA writer lists, split totals, per-class counts, and the index checksum. Paths are relative to data/processed/.

index.npy is a structured NumPy array with 4,598,853 rows and the following fields:

Field NumPy dtype Meaning
file <u2 Index into the files list in metadata
offset <u8 Byte offset of the pixel data in that file
width <u2 Stored image width
height <u2 Stored image height
label <u2 Class index
split u1 0: training; 1: validation; 2: test
source u1 0: CASIA; 1: EMNIST

Use the project's dataset loader to read the byte offsets and apply the correct EMNIST orientation. This is the project's indexed GNT/IDX format; download the files and use that loader for training.

Complete download

Use Python 3.11 or newer for the supplied verifier. From a terminal, clone the project and download the complete dataset into its expected directory:

git clone https://github.com/13536309143/GlyphWeave.git
cd GlyphWeave
python -m pip install --upgrade huggingface_hub
hf download GeorgeWJJ/GlyphWeave --repo-type dataset --revision prepared-v1 --local-dir data/processed

On systems where Python is named python3, substitute that executable for python. The CLI command also works in Windows PowerShell. Allow at least 25 GiB of free space for the data, plus space for the project environment and training outputs. If interrupted, run the same download command again. The Hugging Face download guide describes revision selection and local directory downloads.

Alternatively, run this Python code from the project root:

from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="GeorgeWJJ/GlyphWeave",
    repo_type="dataset",
    revision="prepared-v1",
    local_dir="data/processed",
)

prepared-v1 pins this documented data release. Download the entire repository, including raw/; the index and metadata alone do not contain the images. After downloading and verifying, follow the linked project's environment installation and training instructions. The prepared release can be used directly without rerunning prepare_data.py.

Integrity checks

SHA256SUMS.txt lists SHA-256 hashes for all 1,024 data files. Run the supplied standard-library verifier from the project root:

python data/processed/verify_dataset.py data/processed

The verifier reads every data file, checks its SHA-256, verifies that the manifest covers all metadata references, and checks that the index hash agrees with metadata. It exits with a nonzero status on a missing file or mismatch. Hashing the full release takes time because it reads 22.83 GiB. A successful run ends with:

PASS: 1024 data files; SHA-256 and metadata references verified.

The expected SHA-256 for index.npy is:

ab95cdd227094c2e2b221ff958adce0d42b6b30a76089473316cbf4ec6b380b3

Verifying only this index does not verify the image files. Keep metadata.json, index.npy, and all referenced raw/ paths together when moving the dataset.

Downloads last month
561