Update README.md
Browse files
README.md
CHANGED
|
@@ -1,41 +1,91 @@
|
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Math-Strike Dataset
|
| 2 |
+
|
| 3 |
+
## Dataset Description
|
| 4 |
+
|
| 5 |
+
**Math-Strike** is a novel dataset featuring real and synthetic strike-outs, component-level annotations, and aligned LaTeX, designed to support research on strike-out removal and handwritten mathematical formula recognition.
|
| 6 |
+
|
| 7 |
+
Handwritten STEM manuscripts often contain strike-outs, overwrites, and other markings that disrupt mathematical content structure and reduce OCR/VLM recognition accuracy. This dataset provides a rigorous benchmark for training and evaluating models on connected-component classification, geometry-aware inpainting, and downstream compilable LaTeX generation.
|
| 8 |
+
|
| 9 |
+
The collection originates from the 2024-2025 mid-term and final examinations of a university's Multivariate Calculus Elite class.
|
| 10 |
+
|
| 11 |
+
### Dataset Subsets
|
| 12 |
+
|
| 13 |
+
The dataset is divided into two main subsets, easily accessible via Hugging Face's configuration system:
|
| 14 |
+
|
| 15 |
+
- **`real` (Math-Strike-Real)**: Contains only real, authentic strike-outs collected directly from student exam papers.
|
| 16 |
+
- **`synth` (Math-Strike-Synth)**: Contains synthetic strike-outs generated using an augmentation taxonomy of 20 diverse strike-out styles (e.g., wavy, zigzag, multi-crossed, blackout) to address class imbalance and improve model robustness against complex occlusion patterns.
|
| 17 |
+
|
| 18 |
+
Additionally, the `original_img` folder is provided in the repository, containing the full page-level raw scans with minimal border cropping and all original marks.
|
| 19 |
+
|
| 20 |
+
## Dataset Structure
|
| 21 |
+
|
| 22 |
+
### Data Instances
|
| 23 |
+
|
| 24 |
+
When loading the dataset via the `datasets` library, each instance represents a single connected component extracted from the manuscript.
|
| 25 |
+
|
| 26 |
+
**Example instance:**
|
| 27 |
+
|
| 28 |
+
```json
|
| 29 |
+
{
|
| 30 |
+
"id": 85235,
|
| 31 |
+
"page_img": "20250523024843071_page001.png",
|
| 32 |
+
"bbox": [5694, 6677, 91, 112],
|
| 33 |
+
"centroid": [5739.5, 6733.0],
|
| 34 |
+
"box_area": 4506,
|
| 35 |
+
"label": 0,
|
| 36 |
+
"comp_size": [112, 91],
|
| 37 |
+
"image": "<...>"
|
| 38 |
+
"file": "<...>"
|
| 39 |
+
}
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
### Data Fields
|
| 43 |
+
|
| 44 |
+
- **`id`** (int): Global component identifier.
|
| 45 |
+
- **`page_img`** (string): Source page filename.
|
| 46 |
+
- **`bbox`** (list): Bounding box coordinates in pixels.
|
| 47 |
+
- **`centroid`** (list): Geometric centre (x, y) of the component.
|
| 48 |
+
- **`box_area` / `pixel_area`** (int): Foreground-pixel count within the component.
|
| 49 |
+
- **`label`** (int): 0 = retained (valid mathematical symbol), 1 = removed (strike-out/noise).
|
| 50 |
+
- **`comp_size`** (list): Height and width of the bounding box.
|
| 51 |
+
- **`image`** (Image): The actual cropped PNG image of the component.
|
| 52 |
+
- **`file`** (string): The actual path of the image.
|
| 53 |
+
|
| 54 |
+
## Usage
|
| 55 |
+
|
| 56 |
+
You can easily load the dataset using the Hugging Face `datasets` library. The images and metadata are already pre-aligned in Parquet format.
|
| 57 |
+
|
| 58 |
+
```python
|
| 59 |
+
from datasets import load_dataset
|
| 60 |
+
|
| 61 |
+
# Load the subset with real strike-outs
|
| 62 |
+
dataset_real = load_dataset("Incinciblecolonel/MathStrike", name="real")
|
| 63 |
+
|
| 64 |
+
# Load the subset with synthetic strike-outs
|
| 65 |
+
dataset_synth = load_dataset("Incinciblecolonel/MathStrike", name="synth")
|
| 66 |
+
|
| 67 |
+
# Access the training split
|
| 68 |
+
train_data = dataset_real["train"]
|
| 69 |
+
print(train_data[0])
|
| 70 |
+
|
| 71 |
+
# Directly visualize the component image
|
| 72 |
+
train_data[0]["image"].show()
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
## License
|
| 76 |
+
|
| 77 |
+
The Math-Strike dataset is distributed under the **CC-BY-NC 4.0** license for non-commercial research and educational use.
|
| 78 |
+
|
| 79 |
+
## Citation
|
| 80 |
+
|
| 81 |
+
If you find this dataset useful for your research, please cite our paper:
|
| 82 |
+
|
| 83 |
+
```
|
| 84 |
+
@article{shen2026mathscrub,
|
| 85 |
+
title={MathScrub: Single-Pipeline Strike-Out Removal and LaTeX Generation for Handwritten Calculus Expressions},
|
| 86 |
+
author={Shen, Sen and Liu, Ning and Song, Lintao and Han, Dongkun},
|
| 87 |
+
journal={IEEE Transactions on Learning Technologies},
|
| 88 |
+
year={2026},
|
| 89 |
+
publisher={IEEE}
|
| 90 |
+
}
|
| 91 |
+
```
|