1 Introduction

Javanese script (Aksara Jawa) is a central component of Indonesian cultural heritage, historically used in literary works, archival records, and official documents, yet its public familiarity and practical use have declined with the dominance of Latin script in the digital era [1]. This situation has driven initiatives in digital preservation and revitalization, where automatic optical character recognition (OCR) is expected to support educational tools, searchable archives, and large scale digitization of historical sources [2] [1]. Within this context, robust Javanese character recognition is not only a technical classification problem but also a prerequisite for sustainable access to endangered script resources. Recent work demonstrates that data driven visual models can achieve strong performance on Javanese OCR. Classical machine learning approaches, such as random forests paired with carefully designed preprocessing, have achieved up to 97.7% accuracy on a 20 character handwritten subset [3]. Supervised deep models further improve scalability: a CNN–SVM hybrid trained on 15,600 digital and handwritten characters reports 98.35% accuracy [4], and a custom convolutional network attains 97.29% on 120 handwritten classes [2]. Transfer learning has also been explored, with a fine tuned ResNet 18 on the Hanacaraka dataset achieving 91% accuracy alongside balanced precision, recall, and F1 score [1]. These studies collectively demonstrate the feasibility of image based Javanese OCR while establishing competitive supervised baselines. Despite these advances, the Javanese OCR literature highlights persistent challenges that strain conventional supervised pipelines. Many datasets focus on a restricted subset of Carakan characters or lack diversity in style, background, and acquisition conditions, limiting generalization to real world materials [2]. Confusion analyses consistently reveal systematic errors among visually similar characters and diacritics, such as pairs with subtle structural differences or compound forms [2] [1]. Neighboring work on low resource non Latin OCR attributes similar errors to features such as stacked glyphs, ligatures, non uniform character widths, and missing word boundaries, which complicate segmentation and classification [5] [6]. Fine grained recognition studies further emphasize that subtle inter class distinctions, high intra class variability, and limited annotation budgets jointly create conditions where stronger representation learning is necessary [7]. Self supervised learning, and in particular self distillation with vision transformers (ViTs), offers a promising route to address these representation challenges without relying exclusively on large labeled corpora [8] [6]. DINO and its successor DINOv2 learn general purpose visual embeddings by matching teacher–student representations across multi scale views, and DINOv2 incorporates large scale curated training that improves stability and transfer [6]. On natural image benchmarks, DINOv2 features enable strong performance even with frozen encoders and linear probing, reporting competitive ImageNet 1K classification and ADE20K segmentation accuracies [8]. Domain specific studies show that frozen DINOv2 backbones can support parameter efficient adaptation, reducing trainable parameters by up to two orders of magnitude while remaining competitive [6], and that DINO style features substantially improve scarce label microscopy classification, as in Cell DINO [9]. These results suggest that self supervised ViTs may be well suited to low resource, fine grained visual domains. At the same time, the broader transfer learning literature cautions against assuming that frozen ViT representations are universally optimal. Comparative studies indicate that the relative benefit of frozen backbones, linear probes, and full fine tuning is strongly task dependent, and that linear probing is not always a reliable proxy for end to end performance [10]. For fine grained recognition with limited data, partially frozen configurations—such as freezing early transformer blocks while adapting later ones—can outperform both full freezing and full fine tuning [7]. Work on parameter efficient fine tuning (PEFT), including visual prompt tuning and low rank adaptation, shows that lightweight adaptation can surpass simple linear probes in few shot scenarios [11]. In handwritten text recognition, ViT only models have been observed to train unstably on smaller datasets, with CNN front ends improving convergence and accuracy, underscoring the need for task specific architectural and training choices [12]. Within this evidence landscape, a clear research gap emerges at the intersection of Javanese OCR and DINOv2 based transfer. Existing Javanese studies rely on classical models, CNNs, CNN–SVM hybrids, and supervised ResNet style transfer, but none evaluate self supervised ViTs or DINOv2 specifically for Aksara Jawa [3] [4] [2] [1]. Conversely, published DINOv2 applications focus on microscopy, biometrics, domain adaptation, and generic fine grained object recognition rather than historical scripts or low resource OCR [6] [9]. The most defensible goal, therefore, is not to claim that DINOv2 is categorically superior for Javanese classification, but to rigorously test whether its self supervised representations are appropriate for this small data, visually intricate script. This paper addresses that gap by conducting an ablation driven study of DINOv2 transfer for Javanese Aksara classification. We systematically compare frozen feature extraction with linear probing, selective fine tuning of later transformer blocks, and more extensive end to end adaptation under constrained labeled data. The study explicitly targets the empirical questions raised in prior work on low resource OCR and fine grained transfer: whether self supervised ViT features improve recognition of visually similar Javanese classes, and which adaptation regime offers the best accuracy–efficiency trade off [5] [11]. To ensure comparability with existing Javanese and handwriting benchmarks, we report accuracy, precision, recall, F1 score, and class wise confusion matrices, exposing failure modes that overall accuracy alone can obscure [1] [12]. In doing so, the paper aims to provide a protocol level assessment of DINOv2’s suitability for Javanese OCR, clarifying under which conditions—if any—self supervised ViT representations constitute a meaningful advance over established supervised baselines.

3 Methodology

3.1 Data Splitting and Image Preprocessing

The Javanese Aksara images were obtained from the RayFox52/Aksara-jawa-carakan-murda dataset hosted on Hugging Face. Prior to any modeling, the raw training split was inspected to identify and remove corrupted or unreadable image files, ensuring dataset integrity in line with recommendations for historical character corpora [20]. Following cleaning, descriptive statistics of class labels were computed to assess potential imbalance and to characterize the distribution of the 27 Aksara classes, which is critical for fair evaluation in low-resource script recognition [21]. All subsequent randomized operations used a fixed random seed to support exact reproducibility across model variants. The curated dataset was partitioned into mutually exclusive subsets using stratified sampling, with 70% of the data allocated to training, 15% to validation, and 15% to testing. Stratification was performed at the class level so that the empirical label distribution was preserved across all splits, which is especially important when some characters are underrepresented [22]. Let D denote the full dataset and C the set of classes; for each class c∈C, the number of samples was decomposed as nctrain=0.7⁢nc, ncval=0.15⁢nc, and nctest=0.15⁢nc, with rounding handled to maintain the exact total. This strategy guarantees that no images are shared between subsets while maintaining class balance across folds. For all splits, images were first resized to 224×224 pixels and converted to three-channel RGB format. Each image I was then transformed into a tensor 𝐱∈𝐑3×224×224 and normalized using the standard ImageNet statistics,

𝐱norm=𝐱−𝝁𝝈,

where 𝝁=(0.485,0.456,0.406) and 𝝈=(0.229,0.224,0.225) are applied channel-wise. This normalization aligns the data distribution with that of the pretrained backbones and is standard practice for ImageNet-based models. For the training subset, data augmentation comprised random horizontal flipping with probability p=0.5 and random rotation sampled uniformly from [−10∘,10∘], followed by tensor conversion and normalization. In contrast, validation and test images underwent only deterministic resizing, tensor conversion, and normalization, without any random augmentation, to ensure stable and unbiased evaluation. The augmentation configuration follows script-aware recommendations that emphasize moderate geometric transformations to enrich low-resource character datasets while avoiding excessive distortion of glyph semantics [20].

Refer to caption

Figure 1. Diagram of the study workflow: a cleaned 4050-image, 27-class Javanese Aksara corpus is split 70/15/15, preprocessed and augmented for training, then passed to three frozen pretrained backbones (DINOv2 ViT-B/14, ConvNeXt-Tiny, ViT-B/16), each followed by a trained linear classification head for comparison.

Figure 1: Overview of the proposed methodology for Javanese Aksara character recognition, in which pretrained backbones (DINOv2, ConvNeXt-Tiny, and ViT-B/16) are kept frozen and compared using a linear probing classifier.

3.2 Pretrained Model Architecture and Linear Probing

The experimental comparison focused on three pretrained visual backbones: ConvNeXt-Tiny as a convolutional architecture, Vision Transformer ViT-B/16 as a supervised transformer baseline, and DINOv2 ViT-B/14 as a self-supervised vision transformer trained via student–teacher distillation [6] [23]. All models were initialized from publicly available ImageNet-scale checkpoints. For each backbone, all feature-extractor parameters were frozen, and only a lightweight classification head was trained, implementing a pure linear probing protocol in line with recent self-supervised transfer studies [6] [15]. Given an input image transformed to 𝐱norm, the frozen backbone fθ produced a fixed-dimensional feature representation 𝐳=fθ⁢(𝐱norm). For ConvNeXt-Tiny, global average pooling over the final convolutional feature maps yielded 𝐳∈𝐑d; for ViT-B/16 and DINOv2 ViT-B/14, 𝐳 corresponded to the [CLS] token embedding from the final transformer block. A linear classifier gϕ mapped this representation to class logits,

𝐨=gϕ⁢(𝐳)=W⁢𝐳+𝐛,

where W∈𝐑K×d and 𝐛∈𝐑K, with K=27 denoting the number of Javanese Aksara classes. The predicted class probabilities were obtained via the softmax function,

p⁢(y=k∣𝐱)=exp⁡(ok)∑j=1Kexp⁡(oj),

where ok is the logit for class k. Only the parameters ϕ={W,𝐛} were updated during training, isolating the representational quality of each backbone. This design follows the methodological rationale that frozen self-supervised ViTs such as DINOv2 can provide highly transferable, domain-robust features, and that linear probing offers a controlled way to compare convolutional and transformer-based representations under identical conditions [6]. The overall workflow for dataset preparation, stratified splitting, preprocessing, frozen-backbone feature extraction, linear classification, and comparative evaluation is summarized schematically in Figure 2. The figure illustrates the progression from data cleaning and partitioning, through distinct training versus evaluation transforms, to the three frozen backbones followed by global pooling and a linear classifier, and finally to metric computation and visualization using classification reports, confusion matrices, and learning curves.

Refer to caption

Figure 2. Pipeline diagram: dataset preparation and stratified splitting feed separate training and evaluation transforms; three frozen backbones extract features for global pooling and a linear classifier; predictions are evaluated with accuracy, macro precision, recall and F1, confusion matrices, and learning curves.

Figure 2: Overall methodology for frozen-backbone Javanese Aksara recognition and comparative linear probing.

Methodologically, the figure emphasizes that all three architectures share identical inputs, transforms, optimization settings, and evaluation metrics. Consequently, any observed performance differences across ConvNeXt-Tiny, ViT-B/16, and DINOv2 ViT-B/14 can be attributed primarily to the underlying pretrained representations rather than to confounding implementation choices.

3.3 Experimental Setup and Training Configuration

All experiments used a unified training configuration to ensure a fair comparison across architectures. Images were processed at a resolution of 224×224 pixels, and training proceeded with a mini-batch size of 16 for a maximum of 20 epochs. Optimization employed the AdamW algorithm with an initial learning rate of 1×10−3 and weight decay of 1×10−4, consistent with common practice for linear probing on pretrained backbones [6]. The learning rate followed a cosine decay schedule over epochs, but no warm-up phase was introduced. The loss function for multi-class classification was the standard cross-entropy,

ℒCE=−1N⁢∑i=1N∑k=1K𝟏⁢(yi=k)⁢log⁡p⁢(yi=k∣𝐱i),

where N is the batch size, yi is the ground-truth label for sample i, 𝟏⁢(⋅) is the indicator function, and p⁢(yi=k∣𝐱i) is the predicted probability for class k. This objective penalizes misclassification proportionally to the negative log-likelihood of the true class and is widely adopted for multiclass recognition with frozen backbones [24]. Training was conducted using mixed-precision computation (FP16) whenever CUDA-enabled GPUs were available, reducing memory usage and improving throughput without affecting the frozen backbone parameters. A fixed random seed governed data loading order, augmentation randomness, weight initialization of the classifier heads, and any other stochastic elements of the pipeline, enabling deterministic repetition of all runs [25]. For each model, checkpoint selection was based on the highest macro-averaged F1-score achieved on the validation set, reflecting the importance of balanced performance across potentially imbalanced character classes [25] [24]. Only the classifier head parameters and corresponding optimizer states for the best epoch were stored; the backbone weights remained unchanged and were not re-saved, further emphasizing the linear probing nature of the study and aligning with parameter-efficiency goals in frozen DINOv2 transfer [6].

3.4 Evaluation Metrics and Comparative Analysis

After training, the best validation model for each architecture was evaluated on the held-out test set. Let T⁢Pk, F⁢Pk, F⁢Nk, and T⁢Nk denote the true positives, false positives, false negatives, and true negatives for class k, respectively. Overall accuracy was computed as

Accuracy=∑k=1KT⁢Pk+∑k=1KT⁢Nk∑k=1K(T⁢Pk+T⁢Nk+F⁢Pk+F⁢Nk),

measuring the proportion of correctly classified instances over all classes. To capture performance under class imbalance, macro-averaged precision, recall, and F1-score were additionally reported. For each class k, precision and recall were defined as

Precisionk=T⁢PkT⁢Pk+F⁢Pk,Recallk=T⁢PkT⁢Pk+F⁢Nk,

and the class-wise F1-score as

F1k=2⋅Precisionk⋅RecallkPrecisionk+Recallk.

Macro-averaged metrics were then obtained via

Macro-Precision=1K⁢∑k=1KPrecisionk,Macro-Recall=1K⁢∑k=1KRecallk,Macro-F1=1K⁢∑k=1KF1k,

giving equal weight to each class irrespective of its frequency, which is recommended for imbalanced multiclass problems [24]. Test loss and total training time were also recorded to characterize not only predictive performance but also computational efficiency of each backbone–head combination. To analyze per-class behavior, classification reports listing precision, recall, and F1 for each character were generated, and confusion matrices were computed, where entry (i,j) corresponds to the number of instances of true class i predicted as class j. Confusion matrices were visualized as heatmaps to expose systematic confusions between visually similar glyphs and to identify minority classes that remained difficult to recognize [25]. Comparative bar charts aggregated accuracy and macro-averaged metrics across the three models, while training–validation learning curves plotted loss and macro-F1 as a function of epochs, enabling inspection of convergence speed, potential underfitting or overfitting, and stability of the linear probes. Collectively, these diagnostic tools support a nuanced comparative analysis of ConvNeXt-Tiny, ViT-B/16, and DINOv2 ViT-B/14 under a strictly controlled frozen-backbone, linear-probing protocol.

4 Results

4.1 Confusion Matrix Analysis of ConvNeXt-Tiny

Figure 3 presents the confusion matrix of ConvNeXt-Tiny for the classification of 27 Javanese Aksara classes. The model achieved a test accuracy of 81.25%, a macro precision of 82.06%, a macro recall of 81.09%, and a Macro-F1 score of 80.72%. The confusion matrix exhibits a generally strong diagonal pattern, indicating that the model correctly recognizes many character categories. However, the off-diagonal values reveal differences in classification performance across individual classes.

Several classes achieved strong recognition performance. The model obtained an F1-score of 1.00 for 04_Ra, 17_Ga, 21_murda_ba, 24_murda_na, 25_murda_pa, and 26_murda_sa. In addition, 23_murda_ka and 27_murda_ta achieved F1-scores of 0.98, demonstrating consistently high classification performance for most of the murda characters. These results indicate that the learned visual representations are effective for distinguishing several character categories within the dataset.

Nevertheless, recognition errors remained evident among several base-character classes. The 01_Ha class achieved a precision of 0.64, a recall of 0.41, and an F1-score of 0.50, indicating that a substantial proportion of its actual samples were assigned to other classes. Similarly, 10_La achieved an F1-score of 0.47, with a recall of 0.36. Other challenging classes included 03_Ca and 08_Sa, which obtained F1-scores of 0.68 and 0.62, respectively. The confusion matrix also indicates notable misclassification between 03_Ca and 08_Sa, while 06_Da and 07_Ta exhibit additional classification errors.

Overall, ConvNeXt-Tiny provides competitive classification performance but does not recognize all character categories equally well. Its strong results on several murda classes contrast with the weaker performance of certain base characters. This finding highlights the importance of class-level evaluation rather than relying exclusively on overall accuracy. Further investigation of character shape, stroke configuration, and within-class visual variation may help explain the observed misclassification patterns.

Refer to caption

Figure 3. Confusion-matrix heatmap (27 by 27) for ConvNeXt-Tiny: dark diagonal shows correct classes; off-diagonal cells show confusions, weakest for Ha, La, Ca and Sa.

Figure 3: Confusion matrix of ConvNeXt-Tiny for 27-class Javanese Aksara classification on the held-out test set.

4.2 Confusion Matrix Analysis of ViT-B/16

Figure 4 illustrates the confusion matrix of ViT-B/16 for the same 27-class Javanese Aksara classification task. The model achieved a test accuracy of 77.30%, a macro precision of 80.84%, a macro recall of 77.15%, and a Macro-F1 score of 76.94%. Compared with ConvNeXt-Tiny, ViT-B/16 achieved lower overall accuracy and Macro-F1, indicating that its classification performance was less consistent under the evaluated experimental configuration.

The class-level results reveal considerable variation in recognition performance. The model achieved an F1-score of 1.00 for 21_murda_ba, 24_murda_na, and 26_murda_sa. Other strong results included 17_Ga and 23_murda_ka, both with F1-scores of 0.98, and 25_murda_pa, with an F1-score of 0.98. These results indicate that ViT-B/16 can effectively distinguish several character categories despite its comparatively lower aggregate performance.

The most notable weaknesses occurred in 01_Ha and 10_La. The 01_Ha class achieved a recall of 0.86 but a precision of only 0.38, resulting in an F1-score of 0.53. This pattern indicates that most actual Ha samples were recognized, but predictions of Ha also included substantial numbers of samples belonging to other classes. In contrast, 10_La achieved a precision of 1.00 but a recall of only 0.18, with an F1-score of 0.31. Thus, although predictions assigned to La were correct in the test set, the model failed to identify most actual La samples. The confusion matrix further reveals misclassification involving 06_Da, 08_Sa, and 09_Wa, which achieved F1-scores of 0.42, 0.62, and 0.56, respectively.

These findings suggest that ViT-B/16 produced uneven class-level predictions under the current training protocol. Its strong performance on selected murda classes did not compensate for weaker recognition of several base characters. The contrast between the precision and recall of 01_Ha and 10_La also demonstrates why both measures should be considered when analyzing multi-class classification results.

Refer to caption

Figure 4. Confusion-matrix heatmap (27 by 27) for ViT-B/16: strong murda-class diagonal; Ha shows high recall but low precision, and La shows high precision but very low recall.

Figure 4: Confusion matrix of ViT-B/16 for 27-class Javanese Aksara classification on the held-out test set.

4.3 Confusion Matrix Analysis of DINOv2 ViT-B/14

Figure 5 presents the confusion matrix of DINOv2 ViT-B/14. Among the three evaluated models, DINOv2 achieved the highest test accuracy of 83.22%, macro precision of 84.77%, macro recall of 83.14%, and Macro-F1 score of 83.31%. These results indicate that DINOv2 provided the strongest aggregate classification performance under the frozen-backbone linear-probing protocol.

DINOv2 demonstrated particularly strong performance across the murda character categories. The classes 21_murda_ba, 22_murda_ga, 23_murda_ka, 24_murda_na, and 25_murda_pa achieved F1-scores of 1.00. The 26_murda_sa class also achieved an F1-score of 1.00, while 27_murda_ta reached 0.98. Strong results were also observed for several base characters, including 04_Ra and 13_Ja, both with F1-scores of 0.96, and 16_Ma and 17_Ga, with F1-scores of 0.95 and 0.98, respectively.

Despite its stronger overall performance, DINOv2 retained weaknesses in specific character categories. The 06_Da class achieved a precision of 0.36, a recall of 0.45, and an F1-score of 0.40, representing the lowest class-level F1-score among its reported results. Similarly, 10_La achieved an F1-score of 0.45, with a precision of 0.50 and a recall of 0.41. The 01_Ha class obtained an F1-score of 0.58, while 08_Sa achieved 0.65. The confusion matrix also shows errors involving 15_Nya and 18_Ba, indicating that some character categories remain difficult to distinguish.

A comparison with the two baseline models reveals several improvements. For 03_Ca, DINOv2 achieved an F1-score of 0.75, exceeding ConvNeXt-Tiny at 0.68 and ViT-B/16 at 0.65. For 15_Nya, DINOv2 achieved 0.83, compared with 0.76 for ConvNeXt-Tiny and 0.81 for ViT-B/16. DINOv2 also improved the F1-score of 09_Wa to 0.81, compared with 0.72 and 0.56 for the respective baselines. However, its performance was not uniformly superior: 06_Da remained challenging, and the F1-score for 01_Ha was higher with ViT-B/16 than with DINOv2.

Overall, the results demonstrate that DINOv2 achieved the strongest aggregate test performance and high recognition scores across most murda classes. Nevertheless, the remaining errors in selected base characters indicate that self-supervised pretrained representations do not eliminate all fine-grained recognition difficulties. These findings support further investigation of DINOv2 feature representations and alternative training configurations for improving the recognition of visually challenging Javanese Aksara.

Refer to caption

Figure 5. Confusion-matrix heatmap (27 by 27) for DINOv2 ViT-B/14: the strongest overall diagonal of the three models; residual confusions concentrate in Da, La, Ha and Sa.

Figure 5: Confusion matrix of DINOv2 ViT-B/14 for 27-class Javanese Aksara classification on the held-out test set.

4.4 Comparative Validation Accuracy Analysis

Validation accuracy trajectories over 20 epochs showed consistent ordering among models. DINOv2 reached a peak validation accuracy of approximately 0.85, ConvNeXt-Tiny peaked at around 0.83, and ViT-B/16 at roughly 0.79. All models exhibited rapid gains in the first five epochs, followed by slower improvements and mild fluctuations. DINOv2 started from the strongest initial validation accuracy and remained competitive or superior at nearly all epochs, indicating that its self-supervised features provide a favorable initialization for linear classification in this domain [6]. ConvNeXt-Tiny briefly approached or slightly exceeded DINOv2 around epoch 10, but its curve saturated lower overall. ViT-B/16 improved more slowly and plateaued earlier, remaining consistently below the other two models. These validation accuracy patterns align with the final test accuracy ranking yet do not by themselves establish statistical significance.

Refer to caption

Figure 6. Line chart of validation accuracy over 20 epochs for ConvNeXt-Tiny, ViT-B/16 and DINOv2; DINOv2 stays highest (peak about 0.85), ConvNeXt-Tiny about 0.83, ViT-B/16 about 0.79.

Figure 6: Validation accuracy over 20 epochs for ConvNeXt-Tiny, ViT-B/16, and DINOv2.

4.5 Comparative Validation Macro-F1 Analysis

Macro-F1 trajectories provide a more balanced view of per-class performance. DINOv2 achieved a visible peak macro-F1 of approximately 0.85, ConvNeXt-Tiny around 0.82, and ViT-B/16 about 0.79. All three curves rose sharply in early epochs, then converged gradually with limited signs of overfitting. Because macro-F1 gives equal weight to each class, these results show that DINOv2 not only improves average accuracy but also better harmonizes precision and recall across the full 27-character inventory [24]. The gains are particularly meaningful in light of the class-wise disparities observed for 01_Ha and 10_La, where DINOv2 reduced extreme precision–recall imbalances seen in ViT-B/16. The close trailing performance of ConvNeXt-Tiny confirms that modern CNNs remain highly competitive for script recognition [3] [2], while ViT-B/16’s lower macro-F1 suggests that supervised ViT features alone are less aligned with Javanese glyph structure under a frozen protocol.

Refer to caption

Figure 7. Line chart of validation macro-F1 over 20 epochs for the three backbones; DINOv2 peaks at about 0.85, above ConvNeXt-Tiny (about 0.82) and ViT-B/16 (about 0.79).

Figure 7: Validation macro-F1 over 20 epochs for ConvNeXt-Tiny, ViT-B/16, and DINOv2.

4.6 Validation Loss and Model Convergence Analysis

Validation loss curves further elucidate convergence behavior. DINOv2 attained the lowest final validation loss (approximately 0.49), followed by ConvNeXt-Tiny (approximately 0.55) and ViT-B/16 (approximately 0.68). All models exhibited rapid loss reduction in the first few epochs and slower, monotonic or mildly fluctuating decreases thereafter, with no clear late-epoch divergence indicative of strong overfitting. The consistently lower loss for DINOv2 complements its superior validation accuracy and macro-F1, suggesting that its predictions are, on average, more confidently correct on the validation set. ConvNeXt-Tiny’s intermediate loss matches its intermediate metric performance, while ViT-B/16’s higher loss aligns with its weaker accuracy and macro-F1. Nonetheless, validation loss alone does not guarantee better generalization, which is instead supported here by the correspondence between validation trends and held-out test results.

Refer to caption

Figure 8. Line chart of validation loss over 20 epochs; DINOv2 ends lowest (about 0.49), then ConvNeXt-Tiny (about 0.55) and ViT-B/16 (about 0.68).

Figure 8: Validation loss over 20 epochs for ConvNeXt-Tiny, ViT-B/16, and DINOv2.

5 Discussion

5.1 DINOv2 Representations for Javanese Aksara

The empirical results demonstrate that frozen DINOv2 features coupled with a linear classifier provide a modest but consistent advantage over both ConvNeXt-Tiny and supervised ViT-B/16 for Javanese Aksara classification. This finding is consistent with reports that DINOv2 encoders yield strong, transferable representations across diverse visual domains, particularly in low-label settings [6] [8]. Notably, DINOv2’s gains are most visible in macro-F1 and in reductions of extreme precision–recall imbalances for difficult base characters, aligning with prior observations that self-supervised ViTs can better capture subtle, fine-grained visual distinctions [9] [7]. Compared with existing Javanese OCR work that relies on CNNs, hybrids, or supervised ResNet transfer [3] [4] [2] [1], the absolute accuracies reported here are somewhat lower. However, those studies differ substantially in dataset size, character inventory, and experimental protocol. Many earlier works target smaller or less visually heterogeneous class sets and often rely on end-to-end supervised training [3] [4] [2]. By contrast, the present study evaluates a more challenging 27-class inventory under a strictly frozen-backbone regime. Within this constrained setting, DINOv2’s superiority over a strong ConvNeXt baseline suggests that self-supervised ViT features are well suited to Javanese glyph structure and might further improve with partial or full fine-tuning [6] [10].

5.2 Comparison with Supervised ViT and CNN Baselines

The weaker performance of supervised ViT-B/16 relative to both DINOv2 and ConvNeXt-Tiny supports broader findings that not all pretrained ViT features transfer equally well to specialized tasks, and that self-supervised objectives can provide more robust, object-centered representations [6] [15]. The pronounced precision–recall imbalances for classes such as 01_Ha and 10_La indicate that the supervised ViT backbone, when frozen, learns less uniformly separable clusters for certain Javanese characters. This aligns with evidence that linear probing on supervised ViTs can underestimate their potential and that partial unfreezing or PEFT-style adaptation is often necessary for strong fine-grained performance [11]. At the same time, ConvNeXt-Tiny’s competitive performance confirms that modern CNNs remain a strong baseline for traditional-script OCR, echoing prior Javanese and Indic script results [3] [2] [13]. Its near-perfect recognition of many murda characters suggests that convolutional features capture shape-based regularities that are highly discriminative for stylized glyphs, even without transformer-style global attention. That DINOv2 only modestly surpasses ConvNeXt-Tiny indicates that self-supervised ViTs should be considered an incremental, not universal, improvement over well-tuned CNNs in this domain.

5.3 Error Patterns, Fine-Grained Confusions, and Remaining Challenges

Across all models, residual errors are concentrated in visually similar base consonants, particularly 01_Ha, 06_Da, 08_Sa, 10_La, and related classes. This mirrors systematic confusions reported in earlier Javanese OCR studies and in other low-resource non-Latin scripts, where subtle structural differences and compound forms are easily misclassified [2] [1] [5] [6]. DINOv2’s improvements for several of these categories—especially 03_Ca, 08_Sa, and 15_Nya—indicate that self-supervised features can partially mitigate fine-grained ambiguity, but do not fully resolve it. From a cultural-heritage perspective, such residual confusions may still impede downstream OCR pipelines for archival documents, where misrecognition of a small set of frequently occurring characters can propagate substantial transcription errors [1] [2]. Addressing these challenges likely requires combining stronger representations with task-specific mechanisms such as sequence modeling, context-aware decoding, or explicit modeling of diacritics and ligatures, as suggested in broader OCR research [5] [12].

5.4 Limitations and Implications for Future Work

Methodologically, the main limitation of this study is the exclusive focus on frozen-backbone linear probing. While this isolates representational quality and aligns with parameter-efficiency goals [6] [14], it underestimates the potential of all three backbones, particularly in light of evidence that partial or full fine-tuning can yield substantial gains in fine-grained and low-resource settings [7] [10]. Furthermore, only a single dataset with balanced classes and moderate size was considered; real-world Javanese materials are likely more heterogeneous and imbalanced [2] [19]. Despite these constraints, the results offer several implications. First, self-supervised DINOv2 features appear well aligned with Javanese Aksara and merit further investigation under more flexible adaptation regimes, including partial unfreezing and PEFT methods [11] [6]. Second, ConvNeXt-Tiny’s strong performance reinforces the importance of maintaining high-quality CNN baselines when assessing transformer-based OCR approaches [3] [13]. Finally, the observed error patterns underscore the need for evaluation protocols that go beyond accuracy to include macro-F1 and detailed confusion analysis, especially when targeting endangered scripts where specific confusions can have disproportionate cultural and linguistic impact [1] [24].

6 Conclusion

This study has demonstrated that self-supervised Vision Transformers, and DINOv2 in particular, constitute an effective approach for automatic classification of Javanese Aksara across 27 balanced character classes. Using a carefully curated dataset of 4050 images without corrupted samples, DINOv2 consistently outperformed both the supervised ViT baseline and the ConvNeXt-Tiny convolutional model. DINOv2 achieved the highest validation macro-F1 and test performance, with an accuracy of 0.8322 and a macro-F1 of 0.8331, indicating that self-supervised pretraining on large-scale visual data can transfer successfully to a low-resource, script-specific recognition task. The improvements over ConvNeXt-Tiny and ViT, which already attained strong results, underscore the suitability of self-supervised transformers for nuanced character-level distinctions, including between basic and murda variants of Javanese characters. Beyond overall performance, the detailed per-class results reveal that DINOv2 is particularly robust on complex and less frequent forms such as murda characters, which are classified with near-perfect precision and recall. At the same time, several base characters, especially those with visually similar shapes such as Da, La, and certain consonant groups, remain relatively challenging, as reflected in lower class-wise F1 scores. These findings highlight both the potential and the remaining difficulty of fully resolving fine-grained confusions in traditional scripts. The ablation study provides a systematic comparison of modern architectures under identical training and evaluation protocols, contributing an empirical foundation for model selection in Javanese Aksara recognition and, by extension, similar low-resource orthographic systems. The study is limited primarily by the dataset scale, the focus on isolated character images rather than syllabic clusters or contextual words, and the reliance on a single family of DINOv2 configurations without extensive hyperparameter exploration. Future research should expand the dataset with more diverse writing styles, noise conditions, and real-world document sources, and extend the task from character-level classification to sequence and word-level recognition. Further work could also examine lighter or distilled self-supervised models for deployment in resource-constrained settings, integrate language modeling for context-aware correction of character predictions, and explore cross-script transfer to related traditional scripts. Collectively, these directions can help transform self-supervised Vision Transformers into practical tools for the preservation, digitization, and revitalization of Javanese and other endangered writing systems.

References

  • [1] N. Fateah, S. Subhan, and Y. N. Ifriza, “Optimizing Javanese script recognition using fine-tuned ResNet-18 and transfer learning,” IAES Int. J. Artif. Intell. (IJ-AI), vol. 15, no. 1, pp. 443–453, Feb. 2026. doi: 10.11591/ijai.v15.i1.pp443-453.
  • [2] A. Susanto, I. U. W. Mulyono, C. A. Sari, E. H. Rachmawanto, D. R. I. M. Setiadi, and M. K. Sarker, “Improved Javanese script recognition using custom model of convolution neural network,” Int. J. Electr. Comput. Eng. (IJECE), vol. 13, no. 6, pp. 6629–6636, Dec. 2023. doi: 10.11591/ijece.v13i6.pp6629-6636.
  • [3] M. A. Rasyidi, T. Bariyah, Y. I. Riskajaya, and A. D. Septyani, “Classification of handwritten Javanese script using random forest algorithm,” Bull. Electr. Eng. Inform., vol. 10, no. 3, pp. 1308–1315, Jun. 2021. doi: 10.11591/eei.v10i3.3036.
  • [4] D. U. K. Putri, D. N. Pratomo, and A. Azhari, “Hybrid convolutional neural networks-support vector machine classifier with dropout for Javanese character recognition,” TELKOMNIKA, vol. 21, no. 2, p. 346, Apr. 2023. doi: 10.12928/telkomnika.v21i2.24266.
  • [5] R. Buoy, M. Iwamura, S. Srun, and K. Kise, “Toward a Low-Resource Non-Latin-Complete Baseline: An Exploration of Khmer Optical Character Recognition,” IEEE Access, vol. 11, pp. 128044–128060, 2023. doi: 10.1109/access.2023.3332361.
  • [6] A. Abedi, Q. M. J. Wu, N. Zhang, and F. Pourpanah, “Efficient unsupervised domain adaptation via self-supervised vision transformer and synergistic cross-domain alignment,” Int. J. Mach. Learn. Cybern., vol. 17, no. 9, 2024. doi: 10.1007/s13042-026-03248-5.
  • [7] Y. Lee, S. Lee, and S. Hwang, “Patch-Level Consistency Regularization in Self-Supervised Transfer Learning for Fine-Grained Image Recognition,” Appl. Sci., vol. 13, no. 18, p. 10493, Sep. 2023. doi: 10.3390/app131810493.
  • [8] K. Ohri, D. Sukheja, P. Kumar, S. Arora, and M. Kumar, “A Comprehensive Survey on Self-Supervised Learning on Computer Vision: Moving Beyond the Supervised Paradigm,” IEEE Access, vol. 14, pp. 127111–127148, 2026. doi: 10.1109/access.2026.3722626.
  • [9] T. Moutakanni, C. Couprie, S. Yi, M. Doron, Z. S. Chen, N. Moshkov, et al., “Cell-DINO: Self-supervised image-based embeddings for cell fluorescent microscopy,” PLoS Comput. Biol., vol. 21, no. 12, p. e1013828, Dec. 2025. doi: 10.1371/journal.pcbi.1013828.
  • [10] M. A. Gong, D. Ma, L. A. Budimir, I. Matovinovic, S. Loncaric, M. J. Ju, et al., “Representation Transfer of Foundation Models for Ultra-Widefield Retinal Imaging,” IEEE Access, vol. 14, pp. 149008–149023, 2026. doi: 10.1109/access.2026.3737380.
  • [11] S. J. Lee, “Few-Shot Adaptation of Foundation Vision Models for PCB Defect Inspection,” J. Imaging, vol. 11, no. 11, p. 415, Nov. 2025. doi: 10.3390/jimaging11110415.
  • [12] Y. Li, D. Chen, T. Tang, and X. Shen, “HTR-VT: Handwritten text recognition with vision transformer,” Pattern Recognit., vol. 158, p. 110967, 2024. doi: 10.1016/j.patcog.2024.110967.
  • [13] V. K. Chauhan, S. Singh, and A. Sharma, “HCR-Net: a deep learning based script independent handwritten character recognition network,” Multimedia Tools Appl., vol. 83, no. 32, pp. 78433–78467, 2021. doi: 10.1007/s11042-024-18655-5.
  • [14] X. Tang, X. Yue, H. Mane, D. Smolyak, D. Li, Q. Nguyen, et al., “Robust and scalable representation learning for Google Street View-based neighborhood indicators,” Neurocomputing, vol. 700, p. 134443, Nov. 2026. doi: 10.1016/j.neucom.2026.134443.
  • [15] S. Bianco, M. Buzzelli, G. Ciocca, F. Piccoli, and R. Schettini, “A study on the generalization of DINOv2 features for food recognition tasks: A unified evaluation framework,” Intell. Syst. Appl., vol. 29, p. 200632, Mar. 2026. doi: 10.1016/j.iswa.2026.200632.
  • [16] R. Missaoui, M. Del Coco, W. Saadaoui, W. Hechkel, A. Helali, P. Carcagnì, et al., “Brain Tumor Classification Using DINO Features and Lightweight Classifiers,” Electronics, vol. 15, no. 5, p. 952, Feb. 2026. doi: 10.3390/electronics15050952.
  • [17] M. M. H. Melon, S. R. Kazi, R. Uddin, H. Ahmed, D. Biswas, Y. Khan, et al., “Attention-guided fusion of Swin transformer and DINOv2 features for peripheral blood cell classification across eight classes,” Discover Artif. Intell., vol. 6, no. 1, Apr. 2026. doi: 10.1007/s44163-026-01211-5.
  • [18] U. N. Wisesty, A. F. Ihsan, M. D. Sulistiyo, D. Richasdy, P. E. Yunanto, G. Kosala, et al., “MNetNCR: MobileNet model for efficient traditional Nusantara script character recognition,” IAES Int. J. Artif. Intell. (IJ-AI), vol. 15, no. 2, pp. 1513–1528, Apr. 2026. doi: 10.11591/ijai.v15.i2.pp1513-1528.
  • [19] M. S. Rahman, K. C. Shekhor, M. A. Hossain, M. S. Hossain, C. Karmakar, M. A. Rahman, et al., “Self supervised iBOT vision transformer framework for data efficient white blood cell classification,” Discover Artif. Intell., vol. 6, no. 1, Apr. 2026. doi: 10.1007/s44163-026-01185-4.
  • [20] C. Zhang, W. Wang, and G. Zhang, “Construction of a Character Dataset for Historical Uchen Tibetan Documents under Low-Resource Conditions,” Electronics, vol. 11, no. 23, p. 3919, Nov. 2022. doi: 10.3390/electronics11233919.
  • [21] E. Paulus, J. C. Burie, and F. J. Verbeek, “Supervised learning for low-resource isolated glyph recognition in palm leaf manuscripts,” Pattern Recognit., vol. 172, p. 112616, 2025. doi: 10.1016/j.patcog.2025.112616.
  • [22] H. Qiu and J. Dong, “A Robust Residual Shrinkage Balanced Network for Image Recognition from Japanese Historical Documents,” J. Sensors, vol. 2023, no. 1, Jan. 2023. doi: 10.1155/2023/8316638.
  • [23] Y. Wang, Y. Deng, Y. Zheng, P. Chattopadhyay, and L. Wang, “Vision Transformers for Image Classification: A Comparative Survey,” Technologies, vol. 13, no. 1, p. 32, Jan. 2025. doi: 10.3390/technologies13010032.
  • [24] S. Farhadpour, T. A. Warner, and A. E. Maxwell, “Selecting and Interpreting Multiclass Loss and Accuracy Assessment Metrics for Classifications with Class Imbalance: Guidance and Best Practices,” Remote Sens., vol. 16, no. 3, p. 533, Jan. 2024. doi: 10.3390/rs16030533.
  • [25] A. Raza, F. Hanif, and H. A. Mohammed, “Clinical validation of lightweight CNN architectures for reliable multi-class classification of lung cancer using histopathological imaging techniques,” Sci. Rep., vol. 16, no. 1, Jan. 2026. doi: 10.1038/s41598-026-36652-6.