Skip to Content
Applied SciencesApplied Sciences
  • Article
  • Open Access

1 December 2026

17 Pages

Top-Layer Fiber Orientation Classification at Crossings in Confocal Micrographs of Kozo Paper: Patch-Size Dependence and Error Analysis

,
and
1
School of Information Science and Technology, Aichi Prefectural University, Nagakute 480-1198, Japan
2
Faculty of Fine Arts, Aichi University of the Arts, Nagakute 480-1194, Japan
*
Authors to whom correspondence should be addressed.
†
These authors contributed equally to this work.
This article belongs to the Section Computing and Artificial Intelligence

Abstract

Non-destructive image analysis of paper has characterized fiber orientation mainly as distributions over entire fields of view, without resolving individual fiber crossings. This study addresses a local task: classifying the orientation of the top-layer fiber at a given crossing. In confocal micrographs of handmade Japanese (kozo) paper, a single observer annotated 804 crossings in 201 images, selected to yield a class-balanced dataset, and orientation was quantized into four 45° classes. A Vision Transformer (ViT-B/16) and two convolutional neural networks (CNNs; EfficientNet-B0 and Inception-ResNet-v2) were evaluated by image-level three-fold cross-validation at patch sizes of 128, 256, and 512 pixels. At 128 pixels, all three models achieved macro F1-scores of 82.9–86.4%. At 512 pixels, the F1-score fell from each model’s best value by 6.5 points for the ViT and by 22.2 and 15.9 points for the CNNs, a difference associated largely with the effective input resolution. Crossings misclassified at all patch sizes concentrated near class boundaries (69.6% within ±10°, versus 41.8% of all samples). These results show that top-layer fiber orientation at individual crossings can be classified from a small local patch, identify patch size as a critical design parameter, and suggest that continuous orientation estimation may reduce the remaining errors.

1. Introduction

The physical properties of fibrous materials such as paper and non-woven fabrics—including tensile strength, permeability, and liquid absorbency—are governed not by the characteristics of individual fibers alone, but by the three-dimensional (3D) geometry of the network they form: how densely fibers cross one another, in which directions they run, and in what order they are stacked. Determining this geometry without damaging the specimen is a long-standing requirement, since the standard procedure for identifying the fiber components of a sheet requires disintegrating a portion of it into a fiber suspension for staining and microscopy [1], an intervention that is unacceptable for historical documents and cultural properties. Fiber orientation is particularly informative in this context: the orientation distribution of a handmade sheet reflects the motion of the papermaking screen, and can therefore be used to infer the technique by which the sheet was formed [2]. Conventional non-destructive analyses have accordingly quantified orientation at the statistical level, estimating orientation distributions over an entire field of view using the fast Fourier transform and the Hough transform [3,4]. More recently, deep learning has been applied to related surface-image tasks; patch-based convolutional neural networks, for instance, classify the plant species of handmade paper fibers from macro photographs [5]. Both lines of work, however, compress an entire field of view into a single descriptor—an orientation histogram or a class label—and do not describe the structure at individual fiber crossings: which fiber lies on the top layer, and along which direction that fiber runs. Such local information is one of the elements needed to describe how fibers are stacked in the network, and it cannot be obtained from field-level descriptors.
Determining which of two overlapping structures lies in front at a crossing is not unique to fibrous materials. In tree-like structures such as retinal vessels, crossings in the projected image are inherently ambiguous, and existing methods resolve them by imposing a global prior on the tree topology [6,7,8]; related work on curvilinear structure delineation instead preserves the connectivity of the extracted mask [9,10]. These approaches rely on sparse, rooted structures whose branches can be traced over long distances. A micrograph of paper offers none of this: hundreds of fibers of nearly identical appearance overlap densely; most of them enter and leave the field of view without endpoints, and no global structure is available to disambiguate a given crossing. The ambiguity must therefore be resolved locally, from the appearance of the crossing itself, and none of these methods estimates the planar orientation of the occluding structure. To the best of our knowledge, the estimation of the top-layer fiber orientation at individual crossings has not been formulated for the microscopic analysis of fibrous materials.
Within this local formulation, the natural approach is patch-based classification: a window is extracted around each crossing (Figure 1), and a network predicts the orientation of the fiber occupying the top layer. Patch-based classification with convolutional neural networks (CNNs) has been the principal approach adopted for non-destructive fiber analysis, applied to macro photographs acquired with consumer cameras [5] and to confocal micrographs [11,12]. In every case, however, the label describes the field of view as a whole—the species of the constituent fiber—rather than a structure at a specific location within it. The optical cues that identify the top-layer fiber at a crossing—the continuity of the occluding contour and the shading along it—are expected to be available within such a window. In this study, the orientation is quantized into four classes of 45° over the range [0°, 180°) (Figure 2).
Figure 1. Confocal micrograph of kozo fibers and the local patch used for top-layer orientation estimation. (a) Original image (2048 × 2048 pixels, 750 × 750 μm (nominal), 0.366 μm/pixel), acquired in confocal mode with a 20× objective. Fiber widths vary substantially within this single field of view, ranging from thin individual fibers to broad bundles. The green square marks the region enlarged in (b,c). (b) A 256- × 256-pixel patch (94 × 94 μm) centered on a fiber crossing, shown without annotation. (c) The same patch, with the yellow dot marking the center of the crossing and the red double-headed arrow indicating the orientation of the top-layer fiber. During annotation, the top-layer fiber was identified from the continuity of the occluding contour and the shading along it, rather than from focal blur. Panels (b,c) are shown at an enlarged display scale.
Figure 2. Quantization of top-layer fiber orientation into four classes. Because a fiber is a line-like structure whose two ends are not distinguished, its orientation is defined modulo 180°. The range [0°, 180°) is therefore divided into four classes of 45°, each centered on a cardinal or diagonal direction: Class 0 (horizontal), Class 1 (positive diagonal), Class 2 (vertical), and Class 3 (negative diagonal). Class 0 wraps around the origin, comprising the intervals [157.5°, 180°) and [0°, 22.5°). Arrows indicate the center direction of each class, and dashed lines mark the class boundaries at 22.5°, 67.5°, 112.5°, and 157.5°. A six-class variant of the same scheme is examined in Section 3.2. Angles are measured counterclockwise from the horizontal axis of the image, so that Class 1 corresponds to fibers rising from lower left to upper right.
The patch size, however, involves a trade-off. In fiber species identification [5], enlarging the patch improved accuracy, because the label describes the entire field of view and every additional fiber constitutes further evidence. Here, the label is anchored to a single crossing, and the additional area is occupied by neighboring crossings and unrelated fibers whose appearance is similar to that of the target. Because the effective receptive field of a CNN covers only a fraction of its theoretical receptive field [13] and its feature maps are typically aggregated by global average pooling, such distractors can dilute the evidence specific to the target as the patch grows. Nor can the patch simply be made small: fiber widths vary substantially within a single field of view (Figure 1), so a single fixed patch size must accommodate the widest fibers present, and for the many thinner ones it will inevitably enclose unrelated structures. This motivates models that can weight the contents of a large patch adaptively, retaining the context needed to determine orientation while suppressing structures unrelated to the target crossing.
Vision Transformers (ViTs) [14] offer a mechanism of this kind. Rather than applying a fixed convolutional kernel uniformly across the image, a ViT divides the input into a sequence of tokens and computes attention weights that depend on the content of the input itself. A token corresponding to an unrelated fiber can, in principle, be down-weighted relative to one carrying evidence about the target crossing. Content-dependent weighting can also be added to CNNs through attention modules: squeeze-and-excitation (SE) [15] reweights feature channels and is incorporated in EfficientNet-B0, and the convolutional block attention module (CBAM) [16] additionally reweights spatial positions. In standard CNN backbones, however, spatial selection of this kind is not an intrinsic part of the architecture. Whether the self-attention of a ViT is advantageous for the present task is an empirical question, which motivates the comparison below. We therefore apply ViT-based local patch classification to confocal micrographs of handmade Japanese (kozo) paper, and compare it with two CNNs across three patch sizes.
The novelty of this work lies not in a new network architecture but in the task it defines and in the analysis of how and where the models fail. The main contributions are threefold:
  • We formulate the estimation of the top-layer fiber orientation at individual fiber crossings as a local patch classification task and, to the best of our knowledge, provide the first quantitative reference results for it using a ViT and two CNN architectures (EfficientNet-B0 and Inception-ResNet-v2).
  • We show that enlarging the patch degrades performance in all three models, but to markedly different extents. As the patch grows to 512 pixels, the F1-scores of EfficientNet-B0 and Inception-ResNet-v2 fall by 22.2 and 15.9 points from their best values, respectively, whereas that of the ViT falls by 6.5 points. Relating these results to the effective sampling of the crossing at the network input, we show that much of this difference is associated with input resolution rather than with architecture alone, which yields a practical guideline for choosing the patch size.
  • We analyze which crossings fail across patch sizes and show that the errors persisting at all three patch sizes concentrate near the class boundaries (69.6% within ±10°, against 41.8% of all samples), suggesting that part of the remaining error arises from the discrete quantization of orientation.

2. Materials and Methods

2.1. Image Acquisition and Modality

The dataset for this study was constructed from the KoMiGaPf2024_WCM collection [17], restricted to the 300 images of handmade kozo (paper mulberry) paper it contains. These images were acquired from 60 sheets, with five non-overlapping fields of view per sheet; the file names identify the sheet, so that the images of each sheet are contiguous in file order. Images were acquired with a white-light confocal microscope (OPTELICS HYBRID+, Lasertec Corporation, Yokohama, Japan) using a 20× objective lens, operated in confocal mode. Each image comprises 2048 × 2048 pixels over a physical field of view of 750 × 750 μm, the nominal field of view of the 20× objective specified by the manufacturer, corresponding to a sampling interval of 0.366 μm/pixel. The image used in this study is the extended-focus color image output by the instrument, composed from a z-scan acquired at a step of approximately 3.1 μm, and is stored as an RGB PNG file. The instrument also records a conventional non-confocal image of the same field, which was not analyzed in this study.

2.2. Task Formulation

The task addressed in this study is to classify, at a given fiber crossing, the orientation of the fiber lying on the top layer. Two or more fibers may overlap at a single location; the task concerns only the fiber that occupies the top position, and no ordering is assigned among the fibers beneath it.
Identifying the top-layer fiber and estimating its orientation are not treated as separate steps: a single label encodes the orientation of whichever fiber occupies the top layer. A correct prediction therefore generally requires the top-layer fiber to be distinguished from the fibers beneath it; when the fibers at a crossing fall into the same orientation class, however, the label does not distinguish between them. The continuous orientation over [0°, 180°) is quantized into four classes of 45°, centered on the cardinal and diagonal directions (Figure 2). To examine the dependence on this choice, the same annotated angles were also requantized into six classes of 30° (Section 3.2).

2.3. Annotation and Dataset Construction

Four crossings were annotated in each image. The number per image was limited to four so that patches of 512 pixels, the largest size examined, would not overlap; overlapping patches would introduce correlated samples into the dataset. The four crossings were selected to provide one instance of each of the four orientation classes, so the annotator was aware of the target classes during selection.
Crossings were selected among those for which the top-layer fiber and its running direction could both be identified unambiguously by visual inspection, irrespective of how many fibers overlapped at that location. Crossings lying close enough to the image border that a 512-pixel patch would extend beyond it were excluded. For each selected crossing, the annotator recorded two points: the crossing point itself, and a second point along the top-layer fiber. The orientation angle was computed from the vector connecting them, rather than estimated by eye, and was then quantized into the four classes defined in Figure 2. When the computed class did not match the class being sought, the crossing was replaced with another candidate. Annotation was performed by a single observer, and inter-observer agreement was therefore not assessed.
Of the 300 kozo images, 202 yielded four non-overlapping crossings covering all four classes; the remaining 98 were excluded. One further image—the last in file order, set aside without reference to its content—was removed so that the images could be divided evenly into three folds, leaving 201 images from 53 sheets and 804 samples, balanced at 201 per class.
The resulting dataset is therefore not a random sample of crossings: it is restricted to fields of view containing an unambiguous instance of every orientation class, and consequently under-represents fields of view in which the fibers are aligned so predominantly in one or two directions that not all four classes could be found. This design is deliberate: a class-balanced set of crossings, each examined at three patch sizes, isolates the effect of the patch size and allows the errors to be analyzed by orientation without being dominated by the most frequent directions. The reported scores should therefore be read as performance under these conditions. Estimating the orientation at arbitrary crossings, including ambiguous ones, remains the ultimate goal and is not addressed here (Section 4.4).
Patches of 512, 256, and 128 pixels were extracted centered on the same annotated crossing point, so that the three patch sizes share an identical set of crossings. Differences in performance across patch sizes therefore do not arise from differences in the underlying samples. They do, however, reflect two coupled changes: a larger patch covers a wider field of view and, after resizing to the network input, samples the crossing more coarsely (Section 2.4).

2.4. Network Architectures and Experimental Setup

Three models were evaluated: a Vision Transformer (ViT-B/16) [14] and two CNNs, EfficientNet-B0 [18] and Inception-ResNet-v2 [19]. ViT-B/16 was selected to examine whether the content-dependent weighting afforded by self-attention is advantageous as the patch is enlarged. The two CNNs were chosen as representatives of a lightweight design and of a deep architecture, respectively, and both have been shown to be effective for patch-based fiber classification in earlier work [5,11,12]. The aim of the comparison is to characterize the task and its dependence on the patch size, rather than to identify the best-performing architecture; the three models span convolution, convolution with channel attention, and self-attention, and more recent architectures are discussed in Section 4.4. All models were initialized with weights pre-trained on ImageNet [20]; the ViT-B/16 weights provided with MATLAB correspond to an input resolution of 384 × 384, whereas the CNN weights correspond to their respective native resolutions. All layers were fine-tuned, and the final fully connected layer was replaced with a randomly initialized layer with four outputs (six for the six-class formulation). Each RGB patch was resized to the input resolution of the corresponding network using bicubic interpolation and normalized as listed in Table 1. As Table 1 shows, the input resolutions differ across the three models, as does their capacity, from 5.3 M to 86.8 M parameters. Each model was used at the input resolution for which its pre-trained weights were obtained, since changing it would introduce a mismatch with the pre-trained initialization. The comparison in Section 3.1 (Table 2) is therefore between configurations rather than between architectures in isolation (Section 4.4).
Table 1. Input specifications of the three models.
Table 2. Classification performance (%) for the four-class formulation (mean ± standard deviation over three folds).
Within a given model, the same resizing procedure was applied at every patch size, so that a 512-pixel patch and a 128-pixel patch reach the network at identical resolution. A larger patch therefore does not supply more pixels; it supplies the same number of pixels covering a wider area, at a coarser effective sampling of the crossing. For ViT-B/16, for example, a 128-pixel patch is upsampled by a factor of 3, whereas a 512-pixel patch is downsampled by a factor of 0.75.
The dataset was evaluated by three-fold cross-validation, partitioned at the image level rather than the patch level. Images were assigned to folds in file order: the first 67 images formed the first fold, the next 67 images formed the second, and the remaining 67 images formed the third. Because the images of each sheet are contiguous in file order, all images of a sheet fall in the same fold except for at most two sheets that straddle a fold boundary, so the partition is close to, although not strictly, a sheet-level one. In each fold, 134 images (536 patches) were used for training and the remaining 67 images (268 patches) were held out for testing, so that patches extracted from the same micrograph never appear in both the training and test sets. Because each image contributes exactly one patch of each class, the class balance is preserved in every fold without further stratification.
Performance was evaluated by precision, recall, and F1-score, each macro-averaged over the classes of the formulation concerned. Each score was computed on the test images of each fold and was reported as the mean ± standard deviation over the three folds. Because each test fold of the four-class formulation is class-balanced, the overall accuracy coincides with the macro-averaged recall in that formulation.
No data augmentation was applied. Rotation and reflection, the transformations most commonly used for microscopy images, alter the quantity being predicted: a 90° rotation maps Class 0 to Class 2, and a horizontal reflection exchanges Classes 1 and 3. Although such transformations could be combined with corresponding relabeling, they would also mix any direction-dependent characteristics of the material or the imaging between classes. Augmentation was therefore omitted, so that the training conditions were identical across models and patch sizes.
The networks were trained to minimize the cross-entropy loss using the Adam optimizer [21], with a learning rate of 1.0 × 10−4, a mini-batch size of 32, and 50 epochs. An L2 regularization factor of 1.0 × 10−4 (the MATLAB default) was applied; no learning-rate schedule or early stopping was used, and the network at the final epoch was evaluated. Each model was trained once for each fold. These settings were held identical across all models and patch sizes. All experiments were implemented in MATLAB R2025b (Deep Learning Toolbox) and executed on an NVIDIA DGX Station running Ubuntu 24.04.4 LTS.

3. Results

3.1. Primary Orientation Classification (Four-Class Formulation)

Table 2 reports the performance of the three models on the four-class top-layer orientation task at each of the three patch sizes.
At 128 pixels, the tightest crop around the crossing, the three models fall within 3.5 points of one another in F1-score: ViT-B/16 attains 86.39 ± 2.80%, Inception-ResNet-v2 84.93 ± 1.09%, and EfficientNet-B0 82.91 ± 1.99%. The 1.46-point margin between the first two is comparable to the fold-to-fold variation, so the data do not support ranking the models at this patch size. What they do indicate is that the task is tractable under the present conditions: with the patch restricted to the immediate neighborhood of the crossing, all three models assign the correct orientation class in roughly five cases out of six.
The models diverge as the patch is enlarged, and they do not diverge in the same way. Between 128 and 256 pixels, ViT-B/16 declines by 3.94 points to 82.45 ± 2.60% and EfficientNet-B0 by 2.92 points to 79.99 ± 2.51%, whereas Inception-ResNet-v2 rises marginally to 85.08 ± 1.34%—its highest value across the three patch sizes, and the only case in which the best F1-score is not obtained at 128 pixels. Inception-ResNet-v2 thus leads ViT-B/16 by 2.63 points at this patch size, reversing the ordering seen at 128 pixels, although the margin remains comparable to the variation between folds.
At 512 pixels the separation is of a different order. EfficientNet-B0 falls to 60.68 ± 0.71%, 22.23 points below its value at 128 pixels; Inception-ResNet-v2 to 69.18 ± 2.68%, 15.90 points below its peak at 256 pixels; and ViT-B/16 to 79.91 ± 0.76%, 6.48 points below its value at 128 pixels. The margin of ViT-B/16 over EfficientNet-B0 is 19.23 points, and given the per-fold variation reported in Table 2, ViT-B/16 exceeded both CNNs in each of the three folds at this patch size.
Precision and recall track one another closely throughout, differing by at most 2.1 points in any condition. Even where performance is lowest—EfficientNet-B0 at 512 pixels records 61.35 ± 0.51% precision against 61.07 ± 0.57% recall—the two remain balanced, consistent with a general loss of discrimination rather than a collapse onto a subset of classes. How the errors relate to the class boundaries is examined in Section 4.2.

3.2. Sensitivity to the Choice of Quantization (Six-Class Formulation)

To examine how the results depend on the quantization, the annotated angles were requantized into six classes of 30°, centered on 0°, 30°, 60°, 90°, 120°, and 150° (Classes 0–5), with boundaries at 15°, 45°, 75°, 105°, 135°, and 165°; as in the four-class scheme, Class 0 wraps around the origin, comprising [165°, 180°) and [0°, 15°). ViT-B/16 was retrained under this formulation; the CNNs were not evaluated. The image set, the sample set, and the three-fold partition are identical to those used for the four-class formulation, so the two differ only in how the continuous orientation was binned. Because the crossings were selected to balance the four-class scheme, the six-class distribution is mildly unbalanced, ranging from 121 to 148 samples per class. Table 3 reports the outcome.
Table 3. Classification performance (%) for the six-class formulation, evaluated with ViT-B/16 (mean ± standard deviation over three folds).
Performance is lower throughout, as expected given the narrower bins. At 128 pixels the F1-score is 76.63 ± 1.63%, 9.76 points below the four-class value at the same patch size.
The response to an enlarged patch is qualitatively the same. The F1-score falls by 3.74 points to 72.89 ± 2.38% at 256 pixels and by a further 1.23 points to 71.66 ± 1.59% at 512 pixels, a total decline of 4.97 points, compared with 6.48 points in the four-class formulation. The difference between the two declines is, however, within the fold-to-fold variation, and the present data do not establish that the finer quantization reduces the cost of an enlarged patch.

4. Discussion

4.1. Errors That Persist Across Patch Sizes

The aggregate scores in Table 2 describe how often each model fails, but not whether the failures at different patch sizes involve the same crossings. Since the three patch sizes were extracted around an identical set of crossing points, and each sample appears in the test set of exactly one fold, every sample has one prediction at each patch size. For each of the 804 samples, we therefore recorded whether ViT-B/16 classified it correctly at 128, 256, and 512 pixels, and tabulated the resulting overlap. Figure 3 presents the result as an UpSet plot.
Figure 3. Overlap of misclassifications across the three patch sizes for the ViT-B/16 model, shown as an UpSet plot. Each column corresponds to one combination of patch sizes, indicated by the filled circles below; the bar gives the number of samples misclassified at exactly that combination and correctly classified at the others. Of the 804 samples, 254 were misclassified at at least one patch size.
Of the 804 samples, 254 were misclassified at at least one patch size—almost a third of the dataset—while the individual error counts are 109, 141, and 160. The errors are therefore only partially shared: enlarging the patch does not simply add failures to a fixed core, nor does it exchange one set of failures for another.
Two groups stand out. The largest single combination consists of 72 samples misclassified only at 512 pixels. These are crossings that both smaller patches resolve correctly and that the largest patch does not; they account for 45% of the errors at 512 pixels. The crossing itself is unchanged—the crossing point, the fiber, and its orientation are identical—so what differs is the patch: its wider extent and, after resizing, the coarser sampling of the crossing.
The second group is the 46 samples misclassified at all three patch sizes. These resist every patch size examined, from 47 μm to 188 μm across, and constitute 42% of the errors at 128 pixels. Their difficulty is not explained by the amount of surrounding structure included in the patch: the smallest patch contains little beyond the crossing itself, the largest contains a great deal, and both fail. This suggests that properties of these crossings themselves, rather than of their surroundings, account for the failure. Section 4.2 examines what they have in common.
The remaining samples fail at two patch sizes or at only one, in quantities that follow no simple pattern; for example, 27 samples fail at 256 and 512 pixels but not at 128, whereas 15 fail at 128 and 512 pixels but not at 256. The latter group, misclassified at the two outer patch sizes but not at the intermediate one, suggests that part of the error set reflects ordinary run-to-run variability of the classifier rather than any property of the underlying crossings.

4.2. Geometric Ambiguity at Class Boundaries

The 46 crossings misclassified at every patch size share a property that the aggregate scores conceal. Because the annotation recorded a continuous angle before quantization, each sample can be placed relative to the nearest class boundary, and the persistent errors can be compared against the dataset as a whole.
Figure 4a shows the annotated angles of all 804 samples on the semicircle of Figure 2, and Figure 4b shows the 46 persistent errors. The contrast is visible directly: the errors cluster along the dashed boundaries and are sparse near the class centers. Quantitatively, 32 of the 46 (69.6%) lie within ±10° of a boundary, against 41.8% of the dataset as a whole—a 1.66-fold enrichment. Under the null hypothesis that the persistent errors are drawn at random from the dataset, the binomial probability of this outcome is 1.3 × 10−4. Because this calculation treats the samples as independent and does not account for the grouping of four crossings within each image, the probability should be regarded as exploratory.
Figure 4. Annotated orientations of all samples and of the persistent errors for ViT-B/16. (a) Annotated orientations of all 804 samples, plotted on the semicircle of Figure 2; the radial position within each sector is randomized to reduce overlap and carries no meaning. (b) The 46 samples misclassified at all three patch sizes, plotted in the same way.
The choice of ±10° is arbitrary, and the enrichment does not depend on it. Figure 5 gives the distribution of angular distance to the nearest boundary for both groups, and Table 4 gives the enrichment at a range of thresholds. The pattern is monotonic: the narrower the band, the stronger the concentration. Within ±2° of a boundary the enrichment is 3.50-fold, within ±4° it is 3.00-fold, and it declines steadily to 1.08-fold at ±20°, by which point the band covers 88% of the dataset and the comparison loses meaning. Errors are thus not merely more common near boundaries; they become progressively more likely as the boundary is approached.
Figure 5. Angular distance to the nearest class boundary: full dataset versus persistent errors. Distribution of the angular distance from each sample to the nearest class boundary, for all 804 samples and for the 46 samples misclassified by ViT-B/16 at all three patch sizes. The maximum possible distance is 22.5°, at the center of a class. The persistent errors concentrate close to the boundaries: 69.6% lie within ±10° of one, against 41.8% of the dataset as a whole.
Table 4. Enrichment of persistent errors near class boundaries.
The direction of the errors is consistent with this account. Of the 46 persistent errors, between 78% and 87%—depending on the patch size—were assigned to a class adjacent to the true one rather than to the opposite class. An error caused by boundary ambiguity can only be an adjacent-class error, since a fiber lying just inside one class is geometrically closest to its neighbor. The observed rate exceeds the 67% that would arise if the two adjacent classes and the one opposite class were chosen at random, though not overwhelmingly, and the residual 13–22% assigned to the opposite class cannot be explained by boundary proximity. One possible source of these errors is the underlying fiber: at a near-perpendicular crossing, it falls in the opposite class, so predicting its orientation instead of that of the top-layer fiber would produce an opposite-class error. Because the orientation of the underlying fiber was not annotated, this cannot be verified with the present data.
Taken together, these observations indicate that a substantial part of what remains unresolved is a consequence of the quantization itself. A fiber running at 23° is, geometrically, almost indistinguishable from one at 22°, yet the two carry different labels; given the precision with which the angle can be annotated, such cases cannot be expected to be resolved reliably by any classifier operating on the discretized task. This bears on how the reported scores should be read: the macro F1-score of 86.39% at 128 pixels measures not only how well the orientation of the top-layer fiber is recognized, but also how well it is assigned to the correct one of four bins. The second requirement carries a cost that grows as the bins narrow, consistent with the lower scores of the six-class formulation in Table 3.

4.3. Class-Dependent Difficulty

Boundary proximity accounts for much of the persistent error but not all of it. Table 5 gives the 46 persistent errors broken down by true class: 16, 6, 21, and 3 for Classes 0 through 3, a sevenfold difference between the most and least affected classes in a dataset that contains exactly 201 samples of each. In an exploratory test that treats the persistent errors as independent, this distribution departs from a uniform one (χ2 = 18.5, df = 3, p = 3.4 × 10−4).
Table 5. Persistent errors by true class for ViT-B/16 in the four-class formulation.
This asymmetry does not appear to follow from how the samples are distributed relative to the boundaries. As Table 5 shows, the mean angular distance to the nearest boundary is nearly identical across the four classes, ranging only from 10.8° to 12.3° against a maximum possible value of 22.5°. Similar means do not, however, guarantee similar distributions close to the boundaries, so a contribution from boundary proximity cannot be ruled out entirely; on the evidence available, it does not account for the difference in error rate.
The distances at which the errors occur differ between classes. The six persistent errors of Class 1 lie a mean distance of 2.2° from a boundary, consistent with the geometric account of Section 4.2, whereas those of Class 2, which account for 21 of the 46, lie a mean distance of 8.2° from the nearest boundary. Several of these fall in the interior of the vertical sector (Figure 4b), where boundary ambiguity is unlikely to be the cause.
Why near-vertical fibers should be harder to classify is not established by the present data, but two possibilities can be noted. The first is the well-known anisotropy of handmade paper, whose orientation distribution reflects the motion of the papermaking screen during sheet formation [2], and the annotated angles concentrate near 0°/180° and 90° (Figure 4a); if near-vertical fibers more often form dense parallel bundles, individual fibers within them would be harder to isolate at a crossing. The second is anisotropy in the imaging, since the point spread and noise characteristics of a scanning confocal microscope need not be identical along the two image axes. Distinguishing these would require imaging the same specimen at a known rotation. The limits of the approach are thus not exhausted by the quantization: alongside the boundary ambiguity of Section 4.2, there is a class-dependent component that a different quantization would not necessarily remove.

4.4. Scope of the Findings

The comparison between models in Section 3.1 requires a caveat. As Table 1 records, the input resolution decreases from 384 to 299 to 224 pixels, and the parameter count decreases from 86.8 M to 55.9 M to 5.3 M, in the same order as the robustness to an enlarged patch. Two explanations other than self-attention are therefore possible. The first concerns the effective resolution at the crossing: a 512-pixel patch is reduced to 384 pixels for ViT-B/16 but to 224 pixels for EfficientNet-B0, so the crossing is sampled at 2.9 times the pixel density in the former. If the cues that identify the top-layer fiber are fine-grained, as the concentration of errors near class boundaries suggests, a model that preserves them better would appear more robust regardless of its architecture. The second concerns capacity: a model with sixteen times as many parameters may absorb the additional variability that a larger patch introduces.
The first explanation can be examined with the existing results. Table 6 orders the nine conditions by their effective sampling ratio, defined as the network input size divided by the patch size; a ratio above 1 means that the patch is upsampled before entering the network, and a ratio below 1 means that it is downsampled. Because the original images are sampled at 0.366 μm/pixel, the ratio also fixes the physical size of one input pixel, which ranges from 0.122 μm at a ratio of 3.00 to 0.837 μm at a ratio of 0.44 (Table 6); for ratios above 1, the patch is interpolated, and the information it carries remains limited by the original sampling. Ordered in this way, the F1-score increases almost monotonically with the ratio across all three models (Spearman’s ρ = 0.90), and the two lowest scores occur at the two lowest ratios. Conditions with similar ratios also yield similar scores regardless of the model: ViT-B/16 at 512 pixels (ratio 0.75) and EfficientNet-B0 at 256 pixels (ratio 0.88) attain 79.91% and 79.99%, respectively. Much of the difference between the models at large patch sizes can therefore be accounted for by how finely the crossing is sampled at the network input. With only nine conditions, each confounded with the model, this association is descriptive and does not exclude a contribution from capacity or self-attention.
Table 6. Effective sampling ratio (network input size divided by patch size), with the corresponding pixel size at the network input (0.366 μm/pixel divided by the ratio) in parentheses, and F1-score (%, mean ± standard deviation over three folds) for the nine conditions, ordered by ratio.
Why the effective sampling should matter can be understood from the scale of the cues that the classifier must resolve. The top-layer fiber is identified from the continuity of its occluding contour across the crossing, and its class from its direction. Resampling to a coarser grid removes fine detail: structure finer than about two pixels of the coarser of the original and input grids cannot be represented. For ratios of 1 and above, this limit is set by the original sampling, at about 0.73 μm, and upsampling adds no information; for ratios below 1, it rises to about 1.7 μm at a ratio of 0.44. This is consistent with the plateau of the scores at ratios above 1 and their decline below it (Table 6). The direction of a fiber is affected in a similar way. A straight segment spanning ℓ pixels determines its orientation only to within roughly arctan(1/ℓ), because its end points are localized to about one pixel; for a segment 20 μm long, this is about 1.0° when the original sampling is preserved, but about 2.4° at a ratio of 0.44. Since the persistent errors concentrate within a few degrees of a class boundary (Section 4.2, Table 4), a loss of angular precision of this size would be expected to turn near-boundary crossings into errors first. These estimates are approximate and do not establish the mechanism, but they show that the observed dependence on the sampling ratio is consistent with the scale of the cues on which the task depends.
The ordering of the models at large patch sizes is therefore better described as a property of the three models as evaluated, each used at the input resolution for which its pre-trained weights were obtained, than as an isolated effect of self-attention. The residual differences between the models are small: at 256 pixels, Inception-ResNet-v2 attains a higher F1-score than ViT-B/16 despite a lower sampling ratio, although the margin is within the fold-to-fold variation, and at ratios of 1.17 and above all scores lie between 82.45% and 86.39%. Representational differences reported between ViTs and CNNs, such as the earlier integration of global information in ViTs [22] and their robustness to occlusion [23], may still contribute, and architectures that combine local detail with global context, such as hierarchical transformers with shifted windows [24], could be examined in this setting. Separating resolution, capacity, and architecture conclusively would require training the architectures at matched input resolutions, which in turn requires pre-trained weights obtained at those resolutions. For the design of a classifier, the practical implication is that the patch size should be chosen together with the input resolution, so that the crossing is not substantially downsampled.
The dataset also defines the conditions under which the scores apply. It is also modest in size, with 804 crossings from 201 images, so the scores carry an uncertainty indicated by the fold-to-fold standard deviations of 0.5–2.8 points; the conclusions drawn here rest on differences that are large relative to this variation, such as those at 512 pixels, or on patterns that recur across conditions. Crossings were included only where a human observer could identify the top-layer fiber and its direction unambiguously, and images were retained only if four non-overlapping crossings covering all four classes could be found, which reduced 300 images to 202 and under-represents fields of view in which the fibers are predominantly aligned in one or two directions. Crossings within 256 pixels of the image border were also excluded, removing 44% of the image area, a constraint that a deployed pipeline could avoid by allowing patches to overlap. Annotation was performed by a single observer, so inter-observer agreement was not assessed; computing the angle from two recorded points removes the coarser source of error, but not the judgment of which fiber lies on top. Given the concentration of errors within a few degrees of a class boundary, the precision of the annotated angle in that regime cannot be assessed with the present data.
Finally, the scope of the study is limited in three respects. Only kozo was examined; whether the results transfer to other fibers such as mitsumata and gampi, or to non-woven synthetic materials, whose fiber networks are increasingly analyzed with deep learning in three-dimensional micro-CT data [25], is untested, and fiber width, surface texture, and the degree of bundling plausibly affect both the visibility of the occluding contour and the patch size required. The image collection used here also contains mitsumata and gampi [17], so this question can be addressed with the same acquisition protocol. Only the top-layer fiber was considered, whereas recovering the stacking structure of a sheet would require the complete ordering where three or more fibers overlap. And all images came from a single collection of kozo sheets; although the cross-validation is close to sheet-level (Section 2.4), generalization to sheets from other production batches or papermakers was not assessed.

5. Conclusions

This study formulated the classification of the top-layer fiber orientation at individual fiber crossings as a local patch classification task and provided quantitative reference results for it on confocal micrographs of handmade Japanese (kozo) paper. Whereas conventional non-destructive analysis characterizes fiber orientation statistically over an entire field of view, the quantity estimated here is anchored to a single crossing.
Three models were compared across three patch sizes extracted around an identical set of 804 crossings. At 128 pixels, all three achieved macro F1-scores of 82.9–86.4%, within a margin comparable to the variation between folds, indicating that the top-layer fiber orientation at individual crossings can be classified from a small local patch under the present conditions. Larger patches degraded performance in all models, but to different extents: at 512 pixels, EfficientNet-B0 and Inception-ResNet-v2 lost 22.2 and 15.9 points from their best values, respectively, whereas ViT-B/16 lost 6.5 points and exceeded both CNNs in every fold. Relating the scores to the effective sampling of the crossing showed that much of this difference is associated with input resolution: conditions with similar sampling ratios yielded similar scores regardless of the model. Patch size is thus a critical design parameter for this task, and it should be chosen together with the input resolution of the classifier.
Examining which crossings fail, rather than how many, proved informative. The 46 crossings misclassified at all three patch sizes concentrate near the boundaries of the discrete orientation classes: 69.6% lie within ±10° of a boundary against 41.8% of the dataset, with a 3.5-fold enrichment within ±2°. Part of what remains unresolved is therefore a consequence of the quantization itself. Alongside this, near-vertical fibers failed seven times as often as fibers near 135°, including cases in the interior of the class where boundary ambiguity is unlikely to be the cause; this class-dependent component does not appear to be explained by the quantization or the patch size alone.
Several directions follow. Treating orientation as a continuous quantity would avoid the label ambiguity at class boundaries documented here, and imaging the same specimen at a known rotation would distinguish anisotropy in the material from anisotropy in the imaging. Locating crossings automatically and annotating the orientation of the underlying fiber would extend the task toward the stacking structure of a sheet. The findings also have practical implications. For developers of imaging and analysis systems, the dependence on effective sampling indicates that the field of view around a crossing should be chosen together with the input resolution of the classifier. For conservation science, where fiber identification still relies largely on the microscopy of sampled fibers [26], crossing-level measurements obtained non-destructively may eventually complement field-level orientation descriptors in characterizing how a sheet was formed [2], for example when comparing historical papers or selecting compatible repair papers, although relating them to papermaking technique will require validation on historical specimens. In the paper and non-woven industries, where the density and arrangement of fiber crossings govern mechanical properties, the same local analysis could support the inspection of fiber networks.

Author Contributions

Conceptualization, N.K. and R.T.; methodology, N.K. and R.T.; software, R.T.; validation, N.K. and R.T.; formal analysis, R.T.; investigation, R.T.; resources, N.K.; data curation, R.T.; writing—original draft preparation, R.T. and N.K.; writing—review and editing, N.K.; visualization, R.T.; supervision, N.K. and K.S.; project administration, N.K. and K.S.; funding acquisition, N.K. and K.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by JSPS KAKENHI, grant number JP22H00003. The APC was funded by JSPS KAKENHI.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The image dataset used in this study, KoMiGaPf2024_WCM, is archived on Zenodo with restricted access (https://doi.org/10.5281/zenodo.14550144). While the data are not openly downloadable, access may be granted upon reasonable request for academic and collaborative research purposes; interested researchers are encouraged to contact the authors via the contact information provided in the Zenodo record. Access will be granted on a case-by-case basis in accordance with the data usage policy. The annotations produced for this study (crossing coordinates, continuous orientation angles, and image identifiers) and the evaluation code are not publicly available at present; they may be shared within research collaborations upon reasonable request to the corresponding author. The fold assignment follows from the file order described in Section 2.4.

Acknowledgments

During the preparation of this manuscript, the authors used Claude (Anthropic; claude-opus-5-5) for the purposes of restructuring the manuscript text and checking the consistency of the reported values. The authors have reviewed and edited the output and take full responsibility for the content of this publication.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
3DThree-dimensional
CBAMConvolutional block attention module
CNNConvolutional neural network
RGBRed, green, and blue
SESqueeze-and-excitation
ViTVision Transformer

References

  1. ISO 9184-1:2023; Paper, Board and Pulps—Fibre Furnish Analysis—Part 1: General Method. International Organization for Standardization: Geneva, Switzerland, 2023.
  2. Han, Y.-H.; Enomae, T.; Isogai, A.; Yamamoto, H.; Hasegawa, S.; Song, J.-J.; Jang, S.-W. Traditional Papermaking Techniques Revealed by Fibre Orientation in Historical Papers. Stud. Conserv. 2006, 51, 267–276. [Google Scholar] [CrossRef] [Scilit]
  3. Ghassemieh, E.; Acar, M.; Versteeg, H.K. Microstructural Analysis of Non-Woven Fabrics Using Scanning Electron Microscopy and Image Processing. Part 1: Development and Verification of the Methods. Proc. Inst. Mech. Eng. Part L J. Mater. Des. Appl. 2002, 216, 199–207. [Google Scholar] [CrossRef]
  4. Ghassemieh, E.; Acar, M.; Versteeg, H.K. Microstructural Analysis of Non-Woven Fabrics Using Scanning Electron Microscopy and Image Processing. Part 2: Application to Hydroentangled Fabrics. Proc. Inst. Mech. Eng. Part L J. Mater. Des. Appl. 2002, 216, 211–218. [Google Scholar] [CrossRef]
  5. Kamiya, N.; Ashino, K.; Sakai, Y.; Zhou, Y.; Ohyanagi, Y.; Shibazaki, K. Non-Destructive Estimation of Paper Fiber Using Macro Images: A Comparative Evaluation of Network Architectures and Patch Sizes for Patch-Based Classification. NDT 2024, 2, 487–503. [Google Scholar] [CrossRef] [Scilit]
  6. Estrada, R.; Tomasi, C.; Schmidler, S.C.; Farsiu, S. Tree Topology Estimation. IEEE Trans. Pattern Anal. Mach. Intell. 2015, 37, 1688–1701. [Google Scholar] [CrossRef] [Scilit]
  7. Estrada, R.; Allingham, M.J.; Mettu, P.S.; Cousins, S.W.; Tomasi, C.; Farsiu, S. Retinal Artery-Vein Classification via Topology Estimation. IEEE Trans. Med. Imaging 2015, 34, 2518–2534. [Google Scholar] [CrossRef] [Scilit]
  8. Zhao, Y.; Xie, J.; Zhang, H.; Zheng, Y.; Zhao, Y.; Qi, H.; Zhao, Y.; Su, P.; Liu, J.; Liu, Y. Retinal Vascular Network Topology Reconstruction and Artery/Vein Classification via Dominant Set Clustering. IEEE Trans. Med. Imaging 2020, 39, 341–356. [Google Scholar] [CrossRef] [Scilit]
  9. Mosinska, A.; Márquez-Neila, P.; Koziński, M.; Fua, P. Beyond the Pixel-Wise Loss for Topology-Aware Delineation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–22 June 2018; pp. 3136–3145. [Google Scholar]
  10. Shit, S.; Paetzold, J.C.; Sekuboyina, A.; Ezhov, I.; Unger, A.; Zhylka, A.; Pluim, J.P.W.; Bauer, U.; Menze, B.H. clDice—A Novel Topology-Preserving Loss Function for Tubular Structure Segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA, 20–25 June 2021; pp. 16560–16569. [Google Scholar]
  11. Hosokawa, Y.; Ashino, K.; Shibazaki, K.; Kamiya, N. Comparison of Digital Camera and Confocal Microscope Images for Fiber Type Estimation in Traditional Japanese Paper Using Patch-Based Classification. In Proceedings of the Media Computing Conference 2025 (53rd Annual Conference of the Institute of Image Electronics Engineers of Japan), Saitama, Japan, 25–27 August 2025; pp. 1–2. [Google Scholar]
  12. Kamiya, N.; Ashino, K.; Hosokawa, Y.; Shibazaki, K. CycleGAN-Based Translation of Digital Camera Images into Confocal-Like Representations for Paper Fiber Imaging: Quantitative and Grad-CAM Analysis. Appl. Sci. 2026, 16, 814. [Google Scholar] [CrossRef] [Scilit]
  13. Luo, W.; Li, Y.; Urtasun, R.; Zemel, R. Understanding the Effective Receptive Field in Deep Convolutional Neural Networks. In Proceedings of the Advances in Neural Information Processing Systems 29 (NIPS 2016), Barcelona, Spain, 5–10 December 2016; pp. 4898–4906. [Google Scholar]
  14. Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An Image Is Worth 16×16 Words: Transformers for Image Recognition at Scale. In Proceedings of the 9th International Conference on Learning Representations (ICLR), Virtual, 3–7 May 2021. [Google Scholar]
  15. Hu, J.; Shen, L.; Sun, G. Squeeze-and-Excitation Networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–22 June 2018; pp. 7132–7141. [Google Scholar]
  16. Woo, S.; Park, J.; Lee, J.-Y.; Kweon, I.S. CBAM: Convolutional Block Attention Module. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
  17. Kamiya, N.; Ashino, K. KoMiGaPf2024_WCM: White Light Confocal Microscope Image Dataset of Kozo, Mitsumata, and Gampi Fibers (20×), Captured with Optelics Hybrid; Zenodo: Geneva, Switzerland, 2024. [Google Scholar] [CrossRef]
  18. Tan, M.; Le, Q.V. EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. In Proceedings of the 36th International Conference on Machine Learning (ICML), Long Beach, CA, USA, 9–15 June 2019; pp. 6105–6114. [Google Scholar]
  19. Szegedy, C.; Ioffe, S.; Vanhoucke, V.; Alemi, A.A. Inception-v4, Inception-ResNet and the Impact of Residual Connections on Learning. In Proceedings of the 31st AAAI Conference on Artificial Intelligence, San Francisco, CA, USA, 4–9 February 2017; pp. 4278–4284. [Google Scholar]
  20. Deng, J.; Dong, W.; Socher, R.; Li, L.-J.; Li, K.; Fei-Fei, L. ImageNet: A Large-Scale Hierarchical Image Database. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Miami, FL, USA, 20–25 June 2009; pp. 248–255. [Google Scholar]
  21. Kingma, D.P.; Ba, J. Adam: A Method for Stochastic Optimization. In Proceedings of the 3rd International Conference on Learning Representations (ICLR), San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
  22. Raghu, M.; Unterthiner, T.; Kornblith, S.; Zhang, C.; Dosovitskiy, A. Do Vision Transformers See Like Convolutional Neural Networks? In Proceedings of the Advances in Neural Information Processing Systems 34 (NeurIPS 2021), Virtual, 6–14 December 2021; pp. 12116–12128. [Google Scholar]
  23. Naseer, M.; Ranasinghe, K.; Khan, S.; Hayat, M.; Khan, F.S.; Yang, M.-H. Intriguing Properties of Vision Transformers. In Proceedings of the Advances in Neural Information Processing Systems 34 (NeurIPS 2021), Virtual, 6–14 December 2021; pp. 23296–23308. [Google Scholar]
  24. Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Guo, B. Swin Transformer: Hierarchical Vision Transformer Using Shifted Windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 11–17 October 2021; pp. 10012–10022. [Google Scholar]
  25. Grießer, A.; Westerteiger, R.; Glatt, E.; Hagen, H.; Wiegmann, A. Identification and Analysis of Fibers in Ultra-Large Micro-CT Scans of Nonwoven Textiles Using Deep Learning. J. Text. Inst. 2023, 114, 1647–1657. [Google Scholar] [CrossRef] [Scilit]
  26. Lukesova, H.; Holst, B. Identifying Plant Fibres in Cultural Heritage with Optical and Electron Microscopy: How to Present Results and Avoid Pitfalls. Herit. Sci. 2024, 12, 12. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.