image imagewidth (px) 28 2.84k | label stringlengths 1 426 |
|---|---|
α
ααααΎα αα·ααααΆααΆααα·ααα·ααααΆ ααΆαααα»αααααΆα α’α α‘α© (ααααΆαααα·ααααΆααΆααααα) | |
I. ααααΆααΈααΈα | |
$B$ : Β«ααα
αΆααααΆααααΌαααΆααααΈααΆααααα
αααα·αααΆα
αααΉα 5 Β» | |
α. $\lim_{x \rightarrow +\infty} \left[ \sqrt{x^2 + 2x + 3} - (x + 1) \right]$(ααΆααα·αααααα$.+\infty - \infty$ ) | |
ααα αααΌααααααΆααααα
αααα·αααΆα
αααΉα 5 ααΆα 13 αααΌα | |
ααΆαα±αα α
ααα½αααααΈαααα $n(B) =C(13, 3)$ | |
$= \lim_{x \rightarrow +\infty} \frac{\sqrt{(x^2 + 2x + 3)^2} - (x+1)^2}{\sqrt{x^2 + 2x + 3} + (x+1)}$ | |
$n(B) = \frac{13!}{(13-3)! \cdot 3!} = \frac{13 \cdot 12 \cdot 11 \cdot 10!}{10! \cdot 3 \cdot 2} = 286$ | |
$= \lim_{x \rightarrow +\infty} \frac{x^2 + 2x + 3 - (x^2 + 2x + 1)}{x \left( \sqrt{1 + \frac{2}{x} + \frac{3}{x^2}} + \left( 1 + \frac{1}{x} \right) \right)}$ | |
ααααΆα $P(B)= \frac{n(B)}{n(S)} = \frac{286}{560} = \frac{143}{280}$ | |
ααΌα
ααα: $P(B) = \frac{143}{280}$ α | |
$= \frac{2}{(+\infty)(\sqrt{1+0+0} + (1+0))} = \boxed{0}$ | |
$C$ : Β«ααα
αΆααααΆααααΌααααα½ααααααΆααααα
ααααΆα
αααΉα 4 Β» | |
ααα ααα
αΆααααΆαααΆααααΌααααα½ααααα
ααααΆα
αααΉα 4 ααα | |
8. $\lim_{x \rightarrow 0} \frac{-2x \sin x}{1 - \cos^2 x}$(ααΆααα·αααααα$\frac{0}{0}$ ) | |
αα
ααααααΌαααΈααααααΆααααα
αααα·αααΆα
αααΉα 4 | |
$= \lim{x \rightarrow 0} \frac{-2x \sin x}{\sin^2 x} = -2 \lim{x \rightarrow 0} \frac{x}{\sin x} = \boxed{-2}$ | |
ααΆαα±αα α
ααα½αααααΈαααα $n(C) =$C(4, 1)$\timesC(12, 2)$ | |
$n(C) = 4 \times \frac{12!}{(12-2)! \cdot 2!} = 4 \times \frac{12 \cdot 11 \cdot 10!}{10! \cdot 2} = 264$ | |
α. $\lim_{x \rightarrow -\frac{\pi}{2}} \frac{1 + \sin x}{\sin^4 x - 1}$(ααΆααα·αααααα$\frac{0}{0}$ ) | |
ααααΆα $P(C) = \frac{n(C)}{n(S)} = \frac{264}{560} = \frac{33}{70}$ | |
$= \lim_{x \to -\frac{\pi}{2}} \frac{1 + \sin x}{(\sin^2 x - 1)(\sin^2 x + 1)}$ | |
ααΌα
αααα $\boxed{$P($C$)$= \frac{33}{70}}$ α | |
$= \lim_{x \to -\frac{\pi}{2}} \frac{1 + \sin x}{(\sin x - 1)(\sin x + 1)(\sin^2 x + 1)}$ | |
III. a. αααααααΆααα
αααα»ααααα»ααα
ααα½ααα»ααααα·α
$\mathbb{C}$ | |
$= \lim_{x \to -\frac{\pi}{2}} \frac{1}{(\sin x - 1)(\sin^2 x + 1)}$ | |
ααααΆα $z^2 -$8z$+ 64 = 0$ | |
$(z - 4)^2 = -48$ | |
$= \frac{1}{(-1-1)\left[(-1)^2+1\right]} = \frac{1}{4}$ | |
$z = 4 \pm4i\sqrt{3}$ | |
II. ααααααΌααΆαααααααΉαααα·ααΆαααα | |
ααΌα
αααα $z = 4 + 4\text{i}\sqrt{3} \text{ , } z = 4 - 4\text{i}\sqrt{3}$ ααΆα«ααααααΈααΆα α | |
ααααΆα αααΌα $16$αααααααααααααααΈ$1$ααα$16$ α αΎα | |
b. ααααα $(2z_1 + \bar{z}_2)$ ααΆααααααααααΈαααααΆααα | |
ααα
αΆαααααααΌα $3$ α
ααααΈααααααα
ααααα | |
ααααΆα $z_1 = 4 +$4i$\sqrt{3}$αα·α$z_2 = 4 -$4i$\sqrt{3}$ | |
ααΆαα±αα α
ααα½αααααΈα’αΆα
$n(S) = C(16\,, \, 3)$ | |
ααΆαα±αα $\bar{z}_2 = 4 +$4i$\sqrt{3}$ | |
$n(S) = \frac{16!}{(16-3)!\cdot 3!} = \frac{16\cdot 15\cdot 14\cdot 13!}{13!\cdot 3\cdot 2} = 560$ | |
ααααΆα $(2z_1 + \bar{z}_2) = 2(4 +$4i$\sqrt{3}) + (4 +$4i$\sqrt{3})$ | |
$A$ : Β«ααα
αΆααααΆααααΌαααΆααααΈααΆαααααα»αααααα
ααααΆα
αααΉα 4Β» | |
$= 3(4 +$4i$\sqrt{3}) = 24\left(\frac{1}{2} + i\frac{\sqrt{3}}{2}\right)$ | |
ααα αααα
ααααΆα
αααΉα $4$ααΆα$4$αα»αααΈ$4 , 8 , 12 , 16$ | |
ααΆαα±αα α
ααα½αααααΈαααα $n(A) =$C(4, 3)$= 4$ | |
$= 24 \left( \cos \frac{\pi}{3} + i \sin \frac{\pi}{3} \right)$ | |
ααααΆα $P(A) = \frac{n(A)}{n(S)} = \frac{4}{560} = \frac{1}{140}$ | |
$(2z_1 + \bar{z}_2)^3 = \left[ 24 \left( \cos \frac{\pi}{3} + i \sin \frac{\pi}{3} \right) \right]^3$ | |
ααΌα
αααα $P(A) = \frac{1}{140}$ α | |
$= 13824 (\cos \pi + i \sin \pi) = -13824$ | |
IV. ααααΆααα’αΆααααααααΆαα | |
d. ααΆααααα αΆααααΈααΆαααααα $(ABC)$ | |
$\mathbf{I} = \int_{0}^{1} (x^2 + 1)^2 dx = \int_{0}^{1} (x^4 +$2x$^2 + 1) dx$ | |
ααα αααΈααΆαααααααααααααΌαααΆααααα αΆαααΆαααΆα | |
$(ABC) : a(x-x_0) + b(y-y_0) + c(z-z_0)=0$ | |
$= \left[\frac{x^5}{5} + \frac{2x^3}{3} + x\right]_0^1 = \left(\frac{1}{5} + \frac{2}{3} + 1\right) - 0 = \boxed{\frac{28}{15}}$ | |
ααααΆα $\vec{n} = (1, 1, 1)$ααΆααα·α
ααααααααΆααααααααα$(ABC)$ | |
$\mathbf{J} = \int_{0}^{\ln 6} (e^x - 1)dx = \left[e^x - x\right]_0^{\ln 6}$ | |
ααΆαααΆα $a=1, b=1, c=1$ | |
$= (e^{\ln 6} - \ln 6) - (1 - 0) = \boxed{5 - \ln 6}$ | |
α αΎα $(ABC)$ααΆααααΆαα
ααα»α
$A(1, -1, 4)$ | |
ααΆαααΆα $x_0 = 1, z_0 = -1, z_0 = 4$ | |
$\mathbf{K} = \int_{0}^{\frac{\pi}{4}} \left[\sin\left($3x$+ \frac{\pi}{4}\right) + \sin^4 x \cos x\right] dx$ | |
ααΆα $(ABC) : 1(x-1)+1(y-(-1))+1(z-4)=0$ | |
ααΌα
αααα $(ABC) : x + y + z - 4 = 0$ α | |
$= \left[ -\frac{1}{3}\cos\left($3x$+ \frac{\pi}{4}\right) + \frac{1}{5}\sin^5 x \right]_0^{\frac{\pi}{4}}$ | |
α. 2. αααα αΆαααΆααααΈααα $ABC$ ααΆααααΈααααααααα | |
$= \left( -\frac{1}{3}\cos\pi + \frac{1}{5}\left(\frac{\sqrt{2}}{2}\right)^5 \right) - \left( -\frac{1}{3}\cos\frac{\pi}{4} + 0 \right)$ | |
ααααΆα $AB = \sqrt{6^2 + 0^2 + (-6)^2} = 6\sqrt{2}$ α―αααΆαααααα | |
$AC = \sqrt{0^2 + 6^2 + (-6)^2} = 6\sqrt{2}$ α―αααΆαααααα | |
$= \left( \frac{1}{3} + \frac{\sqrt{2}}{40} \right) + \frac{\sqrt{2}}{6} = \frac{40 + 23\sqrt{2}}{120}$ | |
$BC = \sqrt{(-6)^2 + 6^2 + 0^2} = 6\sqrt{2}$ α―αααΆαααααα | |
V. α. 1. a. ααααΆααΌα’ααααααααααααα·α
ααα $\vec{AB},\vec{AC},\vec{BC}$ | |
ααα $\Delta ABC$ααΆα$AB = AC = BC = 6\sqrt{2}$ α―αααΆααααα | |
ααααΆα $A(1, -1, 4)$οΌ$B(7, -1, -2)$αα·α$C(1, 5, -2)$ | |
ααΌα
αααα $\boxed{\text{ααααΈααα ABC \text{ ααΆααααΈααααααααα }$ α}} | |
$\overrightarrow{AB} = (7 - 1, -1 + 1, -2 - 4) = \boxed{(6, 0, -6)}$ | |
$\overrightarrow{AC} = (1 - 1, 5 + 1, -2 - 4) = \boxed{(0, 6, -6)}$ | |
α. αααααααααΈααΆααααααΆαααααααααΆααααΈααΆααααααααΆααααααΆααΆαα»α | |
ααααΆα $y^2 + 4y - 8x - 12 = 0$ | |
$\overrightarrow{BC} = (1 - 7, 5 + 1, -2 + 2) = \boxed{(-6, 6, 0)}$ | |
$y^2 +$4y$+ 4 =$8x$+ 16$ | |
b. ααααΆαααααααΊααΆ α
ααα»α
$A$,B$αα·α C$αααααααΆαααααααα½α | |
$(y - (-2))^2 = 8(x - (-2))$ | |
α
ααα»α
$A,B$αα·α$C$αααααααΆαααααααα½α αα»αααααΆαα | |
ααΌα
ααα αααααααααααααΆ $(y - (-2))^2 = 8(x - (-2))$ α | |
ααΆαααααααααΆαα $\vec{AB} \times \vec{AC} \neq \vec{0}$ | |
β’ααααΌα’ααααααααααααΌα αααα»α αα·ααααΈααΆααααααΆααααααΆαααα·α | |
$\vec{AB} \times \vec{AC} = \begin{vmatrix} \vec{i} & \vec{j} & \vec{k} \\ 6 & 0 & -6 \\ 0 & 6 & -6 \end{vmatrix} = 36\vec{i} + 36\vec{j} + 36\vec{k} \neq \vec{0}$ | |
ααααΆα $(y - (-2))^2 = 8(x - (-2))$ | |
ααα’ααααΉα $(y - k)^2 =$4p$(x - h)$ | |
ααΆαααΆα $h = -2\ ,\ k = -2\ ,\ p = 2$ | |
ααΌα
αααα α
ααα»α
$A$$,B$αα·α$C$ αααααααΆαααααααα½α α | |
ααΌα
ααα ααΌα’ααααααααααΌα $V(h, k)$α¬$\boxed{V(-2, -2)}$ α | |
c. αααα αΆαααΆ $\vec{n} = (1, 1, 1)$ααΆααα·α
ααααααααΆαααα
ααΉα$(ABC)$ | |
ααΌα’αααααααααα»α $F(h+p, k)$α¬$F(0, -2)$ α | |
ααααΆα $\vec{AB} \times \vec{AC} = (36, 36, 36) = 6(1, 1, 1) = 6\vec{n}$ | |
αααααΆααααααΆαααα·α $x = k - p$α¬$x = -4$ α | |
αααα $\vec{AB} \times \vec{AC}$ααΌααΈααα’αααααΉα$\vec{n}$ | |
β’ ααααααΆαααΆααΌααααα | |
$\begin{array}{c|ccc} x & -2 & 0 & 0 \\ \hline y & 0 & -2 & 2 \end{array}$ |
- Benchmark Dataset for Cambodian Secondary STEM, Advanced Calculus & National Examinations (101,463 Samples)
- Dataset Overview
- Comprehensive Curriculum & Grade Coverage
- Mathematical Domain & Syntax Coverage
- Dataset Format & Schema
- Quick Start Examples
- Model Training Recommendations
- Citation & Attribution
- Acknowledgments & Contact
Khmer Math & STEM Textbook Line-Level OCR Dataset
Benchmark Dataset for Cambodian Secondary STEM, Advanced Calculus & National Examinations (101,463 Samples)
An authoritative, benchmark-grade dataset of 112,113 line-level image crops and verified ground-truth transcriptions extracted from official Cambodian Ministry of Education, Youth and Sport (MoEYS) STEM textbooks, national examination series, and high school competition archives.
Designed specifically for training and benchmarking state-of-the-art Optical Character Recognition (OCR), Mathematical Expression Recognition (MER), and Vision-Language Models (VLM) on mixed Khmer Unicode script and complex LaTeX mathematical notation.
Major v3.0 Expansion (+30,020 New Samples β Advanced Calculus Track): This update pushes the dataset beyond the 100,000 threshold (101,463 total samples) by incorporating a comprehensive, curriculum-aligned corpus dedicated to Upper-Secondary Advanced Calculus & Analysis:
- (Continuity of Functions): Pointwise continuity, interval continuity, piecewise functions, and Intermediate Value Theorem .
- (Derivatives & Differentiation): Product/Quotient/Chain rules, polynomial/trigonometric/exponential/logarithmic derivatives, tangent lines, inflection points, and extreme values.
- (Integrals & Primitives): Indefinite primitives, definite integrals, integration by parts ($\int u dv = uv - \int v du$), substitution methods, area under curves, and volumes of solids of revolution.
- (Differential Equations): First-order linear differential equations ($y' + ay = 0$), second-order linear differential equations ($y'' + ay' + by = 0$), characteristic equations, and initial value problems (ααααααααααΎα).
Dataset Overview
| Metric | Specification |
|---|---|
| Total Labeled Line Crops (Parquet) | 112,113 samples in data/train-*.parquet (14 partitions, ~1.79 GB) |
| Total Curated Annotations (Metadata) | 112,113 entries in labeled_metadata.csv & label_checkpoint.json |
| Languages | Khmer (km), English / Mathematical LaTeX (en) |
| Modality | Line-crop Images (image) + Dual-script Transcriptions (label) |
| Mathematical Notation | Standard LaTeX syntax enclosed in $ ... $ (\frac, \sqrt, \int, \lim, y'', \vec{u}, etc.) |
| Orthography Standard | Official Samdech Chuon Nath Khmer Dictionary & MoEYS Curricular Standards |
| Quality Assurance | Multi-pass human verification, AST syntax linting, Thai character sanitization |
| License | Apache-2.0 |
Comprehensive Curriculum & Grade Coverage
This dataset spans primary to upper-secondary education, covering all core STEM subjects taught across Cambodia:
| Grade / Academic Level | Curricular Track | Samples (Line Crops) | Core Topics Covered |
|---|---|---|---|
| Grade 12 Advanced Calculus (NEW Expansion) | Advanced Science Track | 30,020 | ααΆαααΆααααα’αα»αααα (Continuity): Pointwise/interval continuity, limits at points of discontinuity, Intermediate Value Theorem. ααααΈαα (Derivatives): Higher-order derivatives ($f'', y^{(n)}$), composite function differentiation, optimization, curve sketching. α’αΆααααααααΆα (Integrals): Primitives, definite integrals, integration by parts, rational fraction integration, area/volume integrals. αααΈααΆαααΈααααααααααα (Differential Equations): Linear 1st & 2nd order differential equations with constant coefficients. |
| Grade 12 Mathematics (Core) | Both Advanced & Basic Tracks | 15,289 | Advanced Track: Integrals, Limits, Complex Numbers, Differential Equations, 3D Analytic Geometry, Probability. Basic Track: Sequences, Financial Mathematics, Descriptive Statistics, Exponential Functions, Permutations & Combinations. |
| Grade 11 Mathematics | Both Advanced & Basic Tracks | 7,820 | Advanced Track: Derivatives, Numerical Sequences, Trigonometric Equations & Identities, 3D Vectors, Spatial Coordinates. Basic Track: Polynomial Operations, Linear Programming, Quadratic Inequalities, Basic Trigonometric Ratios. |
| Grade 10 Mathematics | Both Advanced & Basic Tracks | 6,121 | Advanced Track: Set Theory, Advanced Polynomial Factoring, Quadratic Systems, Analytic Geometry, In-depth Trigonometry. Basic Track: Linear Equations & Inequalities, Real Number Properties, Quadratic Equations, Right-Triangle Geometry. |
| Complex Numbers & Limits (Lim Phalkun Collection) | Upper Secondary & Advanced Exam Prep | 3,327 | Specialized advanced mathematics on complex numbers and limits (ααα·ααα·ααααΆ αα»ααααα·α αα·αααΈααΈα ααααααααααααααααΌ ααΉα ααααα»α) featuring algebraic and trigonometric forms of complex numbers, De Moivre's theorem, indeterminate limits ($\frac{0}{0}, \frac{\infty}{\infty}, \infty - \infty, 0 \cdot \infty$), trigonometric limits, and detailed step-by-step problem solutions. |
| Grade 9 National Diploma (Bac I) 1981β2012 Exam Archives | 31-Year National Examination Series | 1,857 | Complete historical collection of lower-secondary diploma exam papers and solutions (αααααααααααα·ααααΆααΆ αα·αα ααααΎα αααα‘ααααααΆααααααααααα·ααααΆαααααΌαα· α‘α©α¨α‘βα’α α‘α’) covering algebra, geometry proofs, polynomial divisions, radical simplifications, and equation systems. |
| Grade 9 Math Diploma Exam Prep Collection | National Diploma Examination Series | 2,530 | Dedicated national Grade 9 diploma examination archives (ααααααα·ααααΆααΆααα·ααα·ααααΆαααααΆααααααααααα‘αααΈααααΌα) featuring multi-part exam problems, linear equation systems, geometric proofs, and formal solution walkthroughs. |
| Grade 9 MoEYS Mathematics Textbook | Standard Middle School Curriculum | 4,317 | Standard Grade 9 textbook chapters covering algebra, proportions, functions, basic statistics, circles, and Pythagorean theorem applications. (Total Grade 9 Math: 8,704 crops) |
| Grades 6β8 Foundation Mathematics | Middle School Foundation | 6,349 | Fractions, Decimals, Integer Arithmetic, Angles, Polygons, Perimeter & Area, Ratios and Percentages, Pre-Algebra. |
| Physics Grades 11β12 | Pure Science Track | 6,531 | Classical Mechanics (Newton's Laws, Kinematics), Thermodynamics, DC & AC Circuits, Electromagnetism, Wave Optics, Nuclear Physics & Physical Constants. |
| Calculus & Analysis Track (Extended) | Calculus Intensive | 2,686 | Specialized derivatives of rational, trigonometric, exponential, and piecewise functions with complete step-by-step solutions. |
| Geometry & Trigonometry | Plane & Solid Geometry | 1,791+ | Euclidean proofs, geometric definitions, circle theorems, vectors, angle identities, and diagram annotations. |
| National Bac II Examination Archives | National Exam Series (2002β2024) | 12,825+ | Official examination papers and model answer keys from Cambodian national Grade 12 examinations spanning over two decades. |
Mathematical Domain & Syntax Coverage
Over 75.0% of the dataset contains combined Khmer text with mathematical expressions, while 25.0% represents pure explanatory Khmer prose:
| Mathematical Construct | LaTeX Syntax | Occurrences | Percentage | Example in Dataset |
|---|---|---|---|---|
| Equations & Systems | =, \begin{cases} |
38,000+ | 37.5% | αααΈααΆα $2x^2 - 5x + 3 = 0$ |
| Fractions & Quotients | \frac{a}{b} |
18,500+ | 18.2% | $f(x) = \frac{x^2 + 3x}{x - 1}$ |
| Khmer Technical Terminology | αααΈααΆα, α’αα»αααα, ααααΈαα | 16,000+ | 15.8% | αααααα’αα»αααα $f$ ααΎα ααααα $\mathbb{R}$ |
| Derivatives & Differential Equations | $f'(x)$, $y'' + ay' + by = 0$ | 12,800+ | 12.6% | ααααΈαααα $y' = 6x^2 - 4x + 1$, $y'' - 4y' + 4y = 0$ |
| Integrals & Primitives | \int_{a}^{b} f(x) dx |
6,800+ | 6.7% | α’αΆααααααααΆα $\int_0^1 (2x + 1) dx = [x^2 + x]_0^1$ |
| Limits & Continuity | \lim_{x \to a}, ααΆααααααα |
5,400+ | 5.3% | $\lim_{x \to 0} \frac{\sin x}{x} = 1$, $f$ ααΆααααααα $x_0$ |
| Greek Letters & Constants | $\alpha$, $\beta$, $\theta$, $\pi$, $\Delta$ | 4,600+ | 4.5% | ααΈαααααΈααΈααα $\Delta = b^2 - 4ac$ |
| Trigonometric Functions | \sin, \cos, \tan |
4,200+ | 4.1% | $\sin^2 x + \cos^2 x = 1$ |
| Radicals & Square Roots | \sqrt{x} |
3,800+ | 3.7% | α«αααΆαα $\sqrt{x^2 - 4} = 3$ |
| Inequalities & Intervals | \leq, \geq, <, > |
3,500+ | 3.4% | αα·ααααΆα $2x - 3 \leq 5$ |
| Summations & Vectors | \sum, \vec{u} |
3,100+ | 3.1% | ααααΌαααα·α ααα $\vec{u} + \vec{v} = \vec{0}$ |
| Matrices & Arrays | \begin{matrix} |
250+ | 0.2% | αααΆααααΈα $\begin{pmatrix} a & b \ c & d \end{pmatrix}$ |
Dataset Format & Schema
The dataset is partitioned into high-performance Apache Parquet files (data/train-*.parquet):
krotreaksmey/khmer-math-textbook/
βββ README.md # Comprehensive dataset documentation
βββ data/
β βββ train-00000-of-00014.parquet # Sharded Parquet partitions with embedded images
β βββ train-00001-of-00014.parquet
β βββ train-00002-of-00014.parquet
β βββ train-00003-of-00014.parquet
β βββ train-00004-of-00014.parquet
β βββ train-00005-of-00014.parquet
β βββ train-00006-of-00014.parquet
β βββ train-00007-of-00014.parquet
β βββ train-00008-of-00014.parquet
β βββ train-00009-of-00014.parquet
β βββ train-00010-of-00014.parquet
β βββ train-00011-of-00014.parquet
β βββ train-00012-of-00014.parquet
β βββ train-00013-of-00014.parquet # Total: 112,113 samples (~1.79 GB)
βββ labeled_metadata.csv # 101,463 entries (ID, Label)
βββ label_checkpoint.json # JSON index of ground-truth transcriptions
Schema Features
| Column | Type | Description |
|---|---|---|
image |
datasets.Image |
High-resolution grayscale or RGB crop of the text line. |
label |
Value("string") |
Ground-truth transcription containing Khmer Unicode and LaTeX math notation. |
Quick Start Examples
1. Load with Hugging Face datasets
from datasets import load_dataset
# Load full training split directly from Hugging Face Hub
dataset = load_dataset("krotreaksmey/khmer-math-textbook", split="train")
print(f"Total samples: {len(dataset):,}")
sample = dataset[0]
# Display sample
print("Transcription:", sample["label"])
# sample["image"].show()
2. Stream Dataset (Without Downloading Entire 1.79 GB Parquet Set)
from datasets import load_dataset
# Stream examples on-the-fly
dataset = load_dataset("krotreaksmey/khmer-math-textbook", split="train", streaming=True)
for sample in dataset.take(5):
print("Sample:", sample["label"])
3. PyTorch DataLoader for Training OCR / Vision Models
import torch
from datasets import load_dataset
from torch.utils.data import DataLoader
from torchvision import transforms
dataset = load_dataset("krotreaksmey/khmer-math-textbook", split="train")
transform = transforms.Compose([
transforms.Resize((48, 192)),
transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
])
def collate_fn(batch):
images = [transform(b["image"].convert("RGB")) for b in batch]
labels = [b["label"] for b in batch]
return torch.stack(images), labels
loader = DataLoader(dataset, batch_size=32, shuffle=True, collate_fn=collate_fn)
for batch_images, batch_labels in loader:
print(f"Batch shape: {batch_images.shape}, First label: {batch_labels[0]}")
break
Model Training Recommendations
- Pre-trained SOTA Recognition Model:
- TinyOCRkhmer (PARSeq v4.0): Official SOTA recognition weights (
best_khmer_parseq_model_101K_cer21.35%.pt, CER: 21.35%, WER: 37.67%) trained directly on this 101,463 sample dataset with full Colab training notebook.
- TinyOCRkhmer (PARSeq v4.0): Official SOTA recognition weights (
- Architecture Compatibility:
- Recommended Image Preprocessing:
- Resolution: 48px height x 192px width (or proportional aspect-ratio padding).
- High vertical clarity: Khmer subscript feet (
ααΎαα’αααα) and upper vowels require vertical preservation.
- Tokenization Tip:
- Ensure your tokenizer vocabulary includes all Khmer Unicode code points (
U+1780toU+17FF) and standard LaTeX math control words (\frac,\sqrt,\int,\lim, etc.).
- Ensure your tokenizer vocabulary includes all Khmer Unicode code points (
Citation & Attribution
If you use this dataset in your research or application, please cite:
@dataset{khmer_math_textbook_ocr_2026,
author = {krotreaksmey},
title = {Khmer Math & STEM Textbook Line-Level OCR Dataset (101K Samples)},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/datasets/krotreaksmey/khmer-math-textbook}}
}
Acknowledgments & Contact
Curated with the Khmer OCR & AI Vision Studio. Dedicated to empowering Cambodian students, educators, and AI researchers with high-accuracy digital tools for national education.
- Downloads last month
- 39