A method for identifying Chinese modern and contemporary coins based on deep learning

CN122551377APending Publication Date: 2026-08-11SHANGHAI ZHAOYONG ONLINE INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-15
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0010]针对现有技术存在的不足,本发明的目的是提供一种基于深度学习的中国近现代硬币的识别方法,其通过构建“原图目标定位、整币主体裁剪、整币类别识别、局部属性检测、属性多头分类、置信度输出”的一体化技术链路,解决复杂背景下硬币主体难以稳定提取、年份与面额细节难以辨识、相近类别混淆严重、识别结果缺乏可解释属性信息以及终端部署精度与效率难以兼顾的技术问题

Benefits of technology

本发明通过设置目标定位网络,将复杂背景中的整币主体从原始拍照图像中准确分离,显著降低背景纹理、封装标签、条码区对整币分类网络的干扰,从而提高复杂场景下的识别稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122551377A_ABST
    Figure CN122551377A_ABST
Patent Text Reader

Abstract

This invention discloses a deep learning-based method for recognizing modern and contemporary Chinese coins. The method includes: acquiring an original image containing the coin's main body; inputting the original image into a target localization network to locate the coin's main body region; cropping and scaling the region; inputting the scaled image into a whole-coin classification network to identify the whole-coin category; simultaneously, performing attribute region localization on the coin's main body region, extracting the year, denomination, and material regions, constructing an attribute input tensor, and inputting it into an attribute multi-head classification network to identify the year, denomination, and material attributes respectively; finally, outputting a structured recognition result. This invention effectively solves the problems of difficult coin body extraction in complex backgrounds, difficulty in identifying fine-grained features, easy confusion between similar categories, and lack of interpretability of recognition results by constructing an integrated link of target localization, high-precision and lightweight whole-coin classification, and attribute multi-head classification. It achieves high-precision, high-robustness, and flexibly deployable structured coin recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision, pattern recognition, deep learning and image processing, and in particular to a deep learning-based method for recognizing modern Chinese coins. Specifically, it relates to an integrated recognition method and system for detecting, cropping, classifying, classifying attributes and outputting results for images of modern Chinese coins. Background Technology

[0002] Chinese modern and contemporary coins are characterized by a long time span, frequent changes in design, a large amount of information carried on the coin's surface, and a concentrated distribution of similar categories. Represented by circulating coins, commemorative coins, proof coins, and graded / encapsulated coins, Chinese modern and contemporary coins exhibit significant differences in year, denomination, material, edge condition, obverse and reverse designs, inscription arrangement, decorative details, relief depth, wear, oxidation, and reflective properties. For coins of the same denomination, differences between years are limited to minor variations in numerals, year strokes, pattern lines, wheat ear and leaf veins, national emblem details, edge serrations, bead density, font thickness, and partial configurations of commemorative themes. Coins of different denominations but issued in the same period often share similar metallic hues, layouts, and main decorative patterns, making fine-grained identification difficult.

[0003] In traditional business processes, appraisers primarily rely on experience to manually observe the overall outline of the coin, the inscription, the year, the national emblem, the luster of the material, edge wear, and local patterns, then combine this with catalog information for judgment. This method is highly dependent on the knowledge and practical experience of the personnel, the recognition speed is limited by the visual retrieval process, consistency is insufficient, and it is difficult to maintain stable accuracy in high-concurrency image appraisal scenarios. For images with strong surface reflection, heavy patina, local stains, tilted shooting angles, and complex backgrounds, the cost of manual judgment increases further.

[0004] In existing automatic currency identification technologies, early solutions often relied on constructing artificial features based on edges, corners, color histograms, local gradient directions, scale-invariant features, and texture statistics. These features were then used to determine the currency type using support vector machines, template matching, or nearest neighbor classifiers. This type of solution is extremely sensitive to imaging conditions. When the captured image contains shadows, specular highlights, perspective distortion, background interference, packaging box borders, QR code labels, rating labels, or hand-held obstructions, the artificial features are prone to shifting, leading to overlapping feature distributions between different categories. For fine-grained local differences such as year numbers, denomination characters, and commemorative themes, artificial features struggle to simultaneously capture both local texture and global structure.

[0005] The identification of modern Chinese coins also exhibits a significant hierarchical structure. Complete coin category identification requires not only determining the specific category of the coin but also recognizing year information, face value, material information, proof attributes, and coin orientation. Single-step classification based solely on the entire coin image becomes increasingly difficult when the number of categories expands to the thousands. The model then needs to simultaneously learn the coin outline, year numbers, partial Chinese characters, national emblem patterns, wheat ear details, and special commemorative elements, leading to an increase in confusion pairs between categories. Classification based solely on local attribute regions, on the other hand, cannot accurately represent the global compositional differences of the entire coin. Therefore, the task of complete coin identification is essentially a fine-grained visual recognition problem that requires the coordinated operation of global classification and local attribute discrimination.

[0006] In real-world data acquisition environments, coin images come from various sources, including original photographs, cropped images, grading and encapsulation images, and display images with backgrounds. Original photographs often simultaneously show the coin itself, the encapsulation shell, the barcode area, the grading label, the background desktop, and even the banknote itself. Without prior localization of the coin area, the classification network will incorporate background textures, encapsulation borders, and label text into the learning process, thus reducing its ability to focus on the core areas of the coin. For single-coin images, directly compressing a large original image to a low-resolution input significantly weakens the stroke information of the year number and denomination characters, making it difficult for the model to stably distinguish fine-grained categories.

[0007] Deep learning methods can automatically learn edge, texture, shape, and semantic features through convolutional layers, exhibiting stronger representational capabilities compared to manual features. However, the task of recognizing modern Chinese coins still faces three core challenges: First, significant intra-class variations exist, with coins of the same category showing obvious appearance changes due to wear, stains, oxidation, patina, and photographic reflections; second, small inter-class variations exist, with differences between different years and versions mainly concentrated in local numerals, local textures, and fine relief structures; third, the complete business chain is not a simple classification task, but a combined recognition process including target localization, local attribute detection, whole coin classification, attribute classification, and confidence output. Deploying only a single network makes it difficult to simultaneously achieve recognition accuracy, attribute interpretability, and terminal deployment efficiency.

[0008] The existing technology suffers from at least the following problems. First, it lacks a front-end localization mechanism for complex photographed images. Inputting the coin body and background into the classification network, with background interference increasing the false recognition rate, is problematic. Second, it lacks a mechanism for modeling local salient regions for year numbers, denomination text, and material attributes, resulting in unclear fine-grained category boundaries. Third, a single input size makes it difficult to balance deployment efficiency with the fidelity of local details; low-resolution input weakens the details of the year, denomination, and texture, while high-resolution input increases the computational burden. Fourth, the category space exhibits a long-tail distribution. Once the number of coin categories reaches thousands, without introducing a multi-level recognition chain, the model is prone to systematic confusion between similar years, denominations, and designs. Fifth, it lacks structured confidence output and attribute output. The recognition result only provides a category number and cannot simultaneously explain the year, denomination, material, and special attributes, hindering authentication verification and business applications.

[0009] Furthermore, existing solutions lack comprehensive image enhancement design. If the training phase does not cover rotation, brightness fluctuations, contrast changes, scale variations, local cropping, and noise perturbations, the model's robustness under real-world photographic conditions is insufficient. For the coin task, rotation invariance, local texture stability, reflectivity tolerance, and local occlusion tolerance are key factors determining usability. The lack of systematic enhancements for these imaging perturbations may result in high accuracy in experimental settings, but significant performance degradation in real-world photographic environments. Summary of the Invention

[0010] To address the shortcomings of existing technologies, the present invention aims to provide a deep learning-based method for identifying modern Chinese coins. This method constructs an integrated technical chain that includes "original image target localization, whole coin body cropping, whole coin category identification, local attribute detection, attribute multi-head classification, and confidence output." This solves the technical problems of unstable extraction of coin bodies in complex backgrounds, difficulty in identifying year and denomination details, serious confusion between similar categories, lack of interpretable attribute information in the identification results, and difficulty in balancing accuracy and efficiency in terminal deployment.

[0011] The above-mentioned objective of this invention is achieved through the following technical solutions: This invention provides a method for identifying modern Chinese coins based on deep learning, comprising the following steps: Step S1: Image acquisition, obtaining the original image containing the main body of the coin; Step S2, Target localization: Input the original image into a pre-trained target localization network to detect and locate the main coin area in the image. The target localization network is a single-shot multi-frame detection network with an input size of 300×300 pixels and an output of candidate frames that include at least the whole coin area or the coin side area. Step S3: Image preprocessing, cropping the main body area of ​​the coin from the original image and scaling it to a preset size; Step S4: Coin classification. The scaled image of the main body area of ​​the coin is input into a pre-trained coin classification network to identify the coin's coin category. The coin classification network includes a high-precision coin classification network and / or a lightweight coin classification network. The input size of the high-precision coin classification network is 448×448 pixels, and the input size of the lightweight coin classification network is 224×224 pixels. Step S5: Attribute recognition. The attribute region is located in the image of the main body of the coin. Local attribute region images, including at least the year region, face value region, and material region, are extracted. The local attribute region images are combined to construct an attribute input tensor, which is then input into a pre-trained attribute multi-head classification network to identify the year attribute, face value attribute, and material attribute of the coin. Step S6: Output the results. The output should include at least the structured recognition results of the whole coin category and its confidence level, the year attribute and its confidence level, the denomination attribute and its confidence level, and the material attribute and its confidence level.

[0012] According to one embodiment of the present invention, the target positioning network is further used to locate the barcode area, graded coin area, coin side area, banknote area, and other areas; the method further includes an attribute region positioning network for locating the year area, face value area, special attribute area, and material area within the main body area of ​​the coin; the attribute input tensor is a three-channel combined image, wherein the first channel loads a grayscale image of the year area or special attribute area, the second channel loads a grayscale image of the face value area, the third channel loads a grayscale image of the material area, and missing attribute areas are filled with zero-value black images.

[0013] According to one embodiment of the present invention, the high-precision whole coin classification network is constructed based on an improved residual network. Its first layer is a 7×7 convolution with 32 output channels and a stride of 2. It is followed by four residual stages, each containing two BasicBlocks, with output channels of 64, 128, 256, and 512 respectively, and feature map sizes of 112×112, 56×56, 28×28, and 14×14 respectively. After the fourth residual stage, a 3×3 convolution is added with 512 input channels, 512 output channels, and a stride of 2 to obtain a 7×7 feature map. Then, an adaptive global average pooling and a fully connected layer are used to output the whole coin category vector.

[0014] According to one embodiment of the present invention, the lightweight coin classification network is a residual 18-layer network or a residual 50-layer network; the residual 18-layer network has a first layer of 7×7 convolution with 64 output channels and a stride of 2, followed by four residual stages, each stage containing 2 BasicBlocks, with output channels of 64, 128, 256, and 512 respectively; the residual 50-layer network has a first layer of 7×7 convolution with 64 output channels and a stride of 2, followed by four residual stages, with bottleneck blocks of 3, 4, 6, and 3 respectively, and output channels of 256, 512, 1024, and 2048 respectively.

[0015] According to one embodiment of the present invention, the attribute multi-head classification network shares a residual 18-layer convolutional backbone and sets up three parallel classification heads: the first classification head outputs a 59-dimensional attribute vector to represent the combination of year and special process attributes; the second classification head outputs a 32-dimensional attribute vector to represent the face value; and the third classification head outputs a 9-dimensional attribute vector to represent the material. Each classification head performs Softmax probability calculation and outputs the category index corresponding to the highest probability as the attribute result.

[0016] According to one embodiment of the present invention, a data enhancement step is further included, wherein the data enhancement includes offline enhancement and online enhancement; The offline enhancement includes rotating the whole coin image around its geometric center by 21°, 25°, 30°, 35°, 39°, 51°, 55°, 60°, 65°, 69°, 90°, 180°, and 270°. The online enhancement includes: scaling range of 0.9 to 1.1; rotation range of -180° to 180°; horizontal displacement parameter of 10.0 and vertical displacement parameter of 10.0; shearing parameter of 10; random cropping ratio of 0.3 to 1.0 and aspect ratio of 0.5 to 2.0; brightness perturbation probability of 0.5 and brightness offset of 32; contrast perturbation probability of 0.5 and contrast variation range of 0.5 to 1.5; hue perturbation probability of 0.5 and hue offset of 18; saturation perturbation probability of 0.5 and saturation variation range of 0.5 to 1.5; expansion fill probability of 0.5 and maximum expansion ratio of 4.0; Gaussian noise with zero mean and standard deviation of 0.01; and Gaussian blur kernel size discretely selected from 1, 3, 5, 7, and 9.

[0017] According to one embodiment of the present invention, in the image preprocessing step, different normalization processes are performed on images input to different networks: For the target positioning network and the 224×224 whole coin classification network, a three-channel BGR arrangement is adopted and channel mean subtraction is performed. The mean of the target positioning network is 104, 113, 127, the mean of the deep whole coin classification network is 103, 122, 134, and the mean of the light whole coin classification network is 87, 110, 124. For the 448×448 high-precision whole coin classification network, RGB arrangement is adopted. First, the pixel values ​​are scaled to the 0 and 1 range by 1 / 255, and then standardized according to the channel mean and standard deviation. The mean is 0.563, 0.537, 0.498, and the standard deviation is 0.221, 0.225, 0.235.

[0018] According to one embodiment of the present invention, in the training of the target localization network, the confidence loss adopts the Softmax form, the multi-box position loss adopts the SmoothL1 form, the positive and negative sample ratio is set to 3:1, the matching overlap threshold is set to 0.5, and in the inference stage, candidate boxes with a confidence greater than 0.01 are retained first, and then non-maximum suppression is performed with a suppression threshold of 0.45. In the training of the coin classification network, the high-precision coin classification network adopts a stochastic gradient descent optimizer with an initial learning rate of 0.1, momentum of 0.9, and weight decay of 5 × 10⁻⁶. -4 Batch size 32, training for 90 epochs, with the learning rate decreasing by 0.1 at the 30th, 50th, 65th and 80th epochs; In the training of the attribute multi-head classification network, the sum of the cross-entropy losses of the three classification heads is used as the total loss, and an adaptive decay strategy with loss as the monitoring quantity is adopted.

[0019] According to one embodiment of the present invention, in the result output step, if the main classification result and the attribute result are inconsistent, the system retains the main classification result and outputs the attribute result and the corresponding confidence score for secondary verification; if multiple coin main body regions are detected in the same image, they are sorted according to the product of the candidate box score of the main body region and the main classification score, and the candidate result with the highest comprehensive score is selected as the main output.

[0020] This invention also provides a deep learning-based identification system for modern and contemporary Chinese coins, used to execute the deep learning-based identification method for modern and contemporary Chinese coins described in the above embodiments, comprising: Image acquisition module, used to acquire original images containing the main body of the coin; The target localization module is used to load and run a pre-trained target localization network to locate the main coin region from the original image; The image preprocessing module is used to crop and scale the image of the main body area of ​​the coin; The whole coin classification module is used to load and run a pre-trained whole coin classification network to identify the whole coin category; The attribute recognition module is used to locate local attribute regions within the main body area of ​​the coin, construct attribute input tensors, and load and run a pre-trained multi-head attribute classification network to identify the coin's year, denomination, and material attributes. The results output module is used to output structured recognition results.

[0021] As a preferred implementation, the target localization network and the attribute region localization network employ a joint training strategy that shares a feature extraction backbone. Specifically, during the training phase, the backbone network of the target localization network (based on the VGG16 architecture) and the backbone network of the attribute region localization network share the weight parameters of the first 10 convolutional layers, with the two networks branching only at their respective task-specific layers (detection heads). This joint training strategy allows the backbone network to be supervised by both "currency region detection" and "attribute region detection" tasks simultaneously, forcing the backbone network to learn more discriminative general feature representations. Experimental data shows that after adopting the joint training strategy, the mAP (mean accuracy) for currency region detection of the target localization network is improved by 3.2%, the mAP for year region localization of the attribute region localization network is improved by 4.1%, and the total training time of the two networks is reduced by approximately 25%. This joint training approach of "hard parameter sharing" produced unexpected synergistic effects: the attribute region localization task guided the backbone network to focus on high-frequency detail areas such as text and numbers on the coin surface. These areas are also key clues for fine-grained differentiation in the whole coin classification task, thus making the features extracted by the backbone network more discriminative for the whole coin classification task. Conversely, the whole coin region detection task guided the backbone network to focus on the overall outline and structure of the coin, enabling the attribute region localization network to better locate local attribute regions under global constraints, avoiding mislocalization caused by blurred local features. This two-way promotion mechanism cannot be achieved by training a single network.

[0022] As a preferred implementation, the attribute multi-head classification network introduces an "attribute consistency constraint loss" during training. Since the year, denomination, and material attributes of coins have inherent constraints in reality (e.g., coins of a specific denomination can only appear in a specific year range, and a specific material can only correspond to a specific set of denominations), this invention adds an additional attribute consistency constraint loss L to the sum of the cross-entropy losses of the three classification heads. consistency The loss function is defined as follows: Here, C represents all attribute combinations that do not conform to real-world logic (such as the combination of "1 yuan denomination" and "aluminum material"), p_year(i) represents the probability that the year attribute is predicted as class i, p_denom(j) represents the probability that the denomination attribute is predicted as class j, and p_material(k) represents the probability that the material attribute is predicted as class k. The purpose of this loss function is to penalize attribute combinations that do not conform to real-world logic during training, forcing the network to learn the implicit relationships between attributes. Experimental results show that after introducing the attribute consistency constraint loss, the joint prediction accuracy of the three attribute heads (i.e., the proportion of samples where all three attributes are correctly predicted) increased from 86.7% to 91.3%, an improvement of 4.6 percentage points. The unexpected aspect of this improvement is that this loss function does not introduce any new labeled data; it only utilizes prior knowledge between attributes (which in existing technologies is usually only used for post-processing verification), encoding it as an auxiliary loss function to directly participate in gradient backpropagation. This achieves a paradigm shift from "post-verification" to "prior guidance," significantly improving the overall accuracy of attribute recognition.

[0023] As a preferred embodiment, this invention introduces a "cooperative enhancement strategy based on a physical imaging model" in the data enhancement step. Traditional image enhancement methods typically perform geometric and color transformations on images independently, ignoring the physical correlation between different transformations. This invention proposes a cooperative enhancement strategy that simulates a real shooting environment, specifically including: (1) joint brightness-contrast-saturation perturbation, based on the correlation between light intensity and color saturation in the physical imaging model, simultaneously reducing saturation when brightness is increased, simulating the physical phenomenon of color saturation reduction caused by reflection on the surface of a metal coin under strong light; (2) joint rotation-cropping-scaling transformation, simulating the coupling effect of perspective distortion and scale change caused by tilted shooting angle; (3) joint Gaussian noise-Gaussian blur, simulating a low-quality imaging scene caused by both inaccurate focusing and sensor noise. This cooperative enhancement strategy introduces physical imaging constraints at the data level, making the enhanced image closer to the distribution of the real acquisition scene. Experimental results show that after adopting this collaborative enhancement strategy, the model's recognition accuracy improved by 5.2%, 6.8%, and 4.5% under complex conditions such as low light, strong reflection, and slight defocus, respectively. Furthermore, the model's overall robustness to various imaging perturbations (measured by the average accuracy under multiple perturbation combinations) improved by 8.3%. This effect was unexpected: traditionally, it was believed that independent enhancements could cover various imaging conditions, and the difference between collaborative and independent enhancements was not significant. However, experiments have shown that the coupling relationships between different factors in the physical imaging model (such as the negative correlation between brightness and saturation, and the coupling between rotation and cropping) are disrupted in traditional independent enhancement, leading to a distribution shift between enhanced and real samples. The collaborative enhancement strategy of this invention introduces physical imaging model constraints for the first time in the field of coin recognition, making the distribution of enhanced samples closer to the real physical world's sample distribution, thereby significantly improving the model's generalization ability.

[0024] As a preferred embodiment, this invention introduces a "multi-scale feature fusion mechanism" into the high-precision whole-coin classification network. Based on the original network architecture, the feature maps from the third residual stage (output feature map size 28×28) and the fourth residual stage (output feature map size 14×14) are fused into the final feature vector through upsampling and feature concatenation. Specifically, the output feature map of the third residual stage is upsampled by 2x bilinearly to obtain a 56×56 feature map, and then reduced to 256 channels through a 1×1 convolution; the output feature map of the fourth residual stage is upsampled by 4x bilinearly to obtain a 56×56 feature map, and then reduced to 256 channels through a 1×1 convolution; the two upsampled feature maps are concatenated with the 56×56 feature map output from the second residual stage along the channel dimension to form a 56×56×768 fused feature map, which is then output as a whole-coin category vector through global average pooling and a fully connected layer. This multi-scale fusion mechanism enables the network to simultaneously utilize the fine texture information of shallow networks (such as the stroke details of year numbers and the subtle patterns of the national emblem) and the semantic information of deep networks (such as the overall composition and pattern layout of the coin), effectively alleviating the problem of lost detail information in deep features of traditional residual networks. In the task of identifying modern Chinese coins, the distinction between many similar categories (such as different versions of the same year or different years of the same denomination) relies on a comprehensive judgment of local details and global structure. The introduction of the multi-scale fusion mechanism improved the Top-1 accuracy of the whole coin classification network from 94.2% to 96.8%, an increase of 2.6 percentage points. Among them, the accuracy in distinguishing easily confused categories such as "1 Yuan Chrysanthemum Pattern" and "1 Yuan Peony Pattern" increased from 91.5% to 97.2%, an increase of 5.7 percentage points, producing significant and unexpected technical effects. The reason this effect is unexpected is that traditional views hold that deep networks can automatically learn hierarchical features without the need for explicit multi-scale fusion. However, experiments have shown that for fine-grained recognition tasks, the local details preserved by shallow networks will suffer irreversible information loss in deep networks. Explicit multi-scale feature fusion can effectively compensate for this loss, and even small changes in the fusion method (fusion nodes, upsampling ratio, number of dimensionality reduction channels) have a significant impact on the final accuracy. The fusion scheme of this invention is the optimal configuration verified by a large number of experiments.

[0025] As a preferred embodiment, this invention employs a "progressive decoupled training strategy" when training the attribute multi-head classification network. Specifically, the training process is divided into three stages: In the first stage, the parameters of the three classification heads are frozen, and only the shared residual 18-layer convolutional backbone is trained, allowing the backbone network to learn common attribute feature representations; in the second stage, the parameters of the three classification heads are unfrozen, and both the backbone network and the classification heads are trained simultaneously, but with different learning rates (the backbone network learning rate is set to 0.001, and the classification head learning rate is set to 0.01), allowing the classification heads to quickly adapt to their respective tasks; in the third stage, only the last two fully connected layers of the three classification heads are fine-tuned, keeping the backbone network parameters fixed, further refining the classification heads. Compared to traditional end-to-end training methods, this progressive decoupled training strategy effectively avoids gradient conflict problems caused by the large differences in the tasks of the three attribute heads (59 categories for year tasks, 32 categories for denomination tasks, and 9 categories for material tasks). Experimental data shows that the progressive decoupled training strategy improves the joint prediction accuracy of the three attribute heads by 3.8% compared to the traditional end-to-end training method, and increases the training convergence speed by approximately 30%. This effect is unexpected: the traditional view holds that end-to-end training is the best practice for deep learning, and task differences can be naturally absorbed by the network capacity; however, experiments have shown that when there are significant differences in the number of classes and data distribution among multiple tasks, direct end-to-end training leads to gradient dominance (gradients are dominated by the task with more classes). Progressive decoupled training, through phased optimization and differentiated learning rates, effectively balances the gradient contributions among multiple tasks, achieving better convergence results.

[0026] As a preferred embodiment, this invention introduces a "dynamic confidence calibration mechanism" in the result output step. Because the Softmax probabilities output by different categories of currency classification networks exhibit class bias (some categories tend to output high confidence, while others tend to output low confidence), directly using the original Softmax probability as the confidence output may mislead users. This invention calibrates the confidence of each category based on the validation set. Specifically, for each category c, the mean μ_c and standard deviation σ_c of the Softmax probability of all samples predicted as category c in the validation set are calculated, and the calibrated confidence is then calculated. calibrated = max(0, min(1, (Conf raw- μ_c) / σ_c + 0.5)). This calibration mechanism makes the confidence scores comparable across different categories, allowing users to set a uniform judgment threshold (e.g., 0.7) based on the calibrated confidence scores. Experimental results show that after adopting the dynamic confidence score calibration mechanism, when using a calibrated confidence score ≥ 0.7 as the judgment criterion, the overall system misclassification rate decreased from 3.2% to 1.5%, and the uniformity of judgment thresholds across different categories was significantly improved. This effect was unexpected: traditional methods typically directly output the Softmax probability as the confidence score, but those skilled in the art are not easily aware of the systematic probability bias between different categories (this bias stems from the class imbalance of the training data and the anisotropy of the feature space). The dynamic calibration mechanism of this invention introduces post-processing confidence score calibration for the first time in the field of coin recognition, significantly improving the usability and reliability of the confidence score output.

[0027] In summary, this invention, through deep collaboration among the aforementioned modules (including joint training of target localization and attribute localization, progressive decoupling of whole coin classification and attribute classification, organic fusion of multi-scale features, and data augmentation constrained by physical imaging models), produces an overall technical effect far exceeding the simple superposition of individual modules. Specifically, on a test set containing 2470 categories of modern Chinese coins, this invention achieves a Top-1 accuracy of 97.3% for whole coin classification and a joint attribute prediction accuracy of 92.1%. On a test set containing challenging samples with complex backgrounds, strong reflections, and slight occlusion, the whole coin classification accuracy reaches 94.8%. Compared to the best existing solution (based on a single CNN classifier, with an accuracy of approximately 91.2%), this invention improves the whole coin classification accuracy by 6.1 percentage points and achieves a breakthrough in attribute recognition accuracy (which existing technologies typically lack). Furthermore, through the design of lightweight network branches, this invention controls the single recognition inference time on ARM architecture embedded devices to within 85ms, achieving a balance between high precision and high efficiency.

[0028] In summary, compared with the prior art, the present invention has at least one of the following beneficial technical effects: This invention, by setting up a target localization network, accurately separates the main body of the coin from the original photographed image in a complex background, significantly reducing the interference of background texture, packaging label, and barcode area on the coin classification network, thereby improving the recognition stability in complex scenes.

[0029] This invention combines a high-precision 448×448 coin classification network with a lightweight 224×224 coin classification network, enabling the system to simultaneously possess fine-grained recognition capabilities and rapid deployment capabilities. The 448×448 input can retain high-frequency information such as year numbers, denomination text, fine patterns, and partial reliefs, while the 224×224 input is suitable for real-time recognition on resource-constrained terminals.

[0030] This invention expands the recognition results from a single category number to a structured attribute set by setting local detection and multi-head classification links for year, denomination, material, and special attributes, thereby enhancing the interpretability, verifiability, and business adaptability of the recognition results.

[0031] This invention constructs an enhancement system that includes rotation, scaling, cropping, brightness, contrast, hue, saturation, Gaussian noise, and Gaussian blur, making the model more robust to changes in shooting angle, partial occlusion, specular reflection, slight blur, and acquisition noise. This system can meet the practical application needs of modern Chinese coin photo recognition, cropping recognition, and encapsulation recognition.

[0032] This invention effectively solves the core technical challenges in the recognition of coin categories with fine granularity at the thousand-level scale, such as large intra-class differences, small inter-class differences, strong background interference, and missing attribute information, through multi-level, multi-branch network architecture design and refined training strategies. It achieves significant improvements in recognition accuracy, robustness, deployment flexibility, and result interpretability. Attached Figure Description

[0033] Figure 1 This is the overall flowchart of the present invention.

[0034] Figure 2 This is an overall flowchart of the coin recognition method in an embodiment of the present invention.

[0035] Figure 3 This is a structural block diagram of the system of the present invention.

[0036] Figure 4 This is a schematic diagram of the overall structure of the target localization network, the whole coin classification network, and the attribute multi-head classification network in an embodiment of the present invention. Detailed Implementation

[0037] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0038] In the description of this application, it should be noted that the terms "upper," "lower," "inner," "outer," "top / bottom," etc., indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0039] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installed," "equipped with," "sleeved / connected," "connected," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. Example

[0040] This embodiment provides a deep learning-based method for identifying modern Chinese coins, such as... Figure 1 and Figure 2 As shown, the specific steps include:

[0041] S1 Image Acquisition.

[0042] In this embodiment, the input images are divided into two categories: full-size photographed images and cropped images of the coin. Full-size photographed images are used for target localization and are derived from three-channel color images captured by a camera. These images may include the coin body, coin side area, barcode area, grading label, packaging border, and background area. Cropped images of the coin are used for coin category recognition and are derived from a region image obtained after locating the coin body in the full-size photographed image. To ensure that the training samples cover real-world business scenarios, the samples simultaneously include images of the obverse and reverse sides of coins, images of the same denomination from different years, images of different denominations from the same year, images showing differences in material reflectivity, images of slight wear, images of oxidation and patina, and images of grading and packaging. The coin category labels use unique category indexes. The complete coin category space is set to 2470 categories in high-precision mode and 1708 categories in lightweight mode. Attribute labels include 59 categories of year and special attribute combinations, 32 categories of denomination, and 9 categories of material. Missing attributes are uniformly mapped to index 0. The target detection labels include whole coin area, coin side area, barcode area, graded coin area, banknote area, other areas, and background; the attribute detection labels include year area, face value area, special attribute area, material area, and background. In this way, the training data possesses complete supervised information at the category, attribute, and spatial localization levels.

[0043] In a preferred implementation of this embodiment, a "multi-source labeling consistency verification mechanism" is further introduced during the training data construction process. For the same coin, at least three professional appraisers independently label the coin category and attribute tags. When the labeling results of the three appraisers are inconsistent, a senior appraisal expert reviews and determines the final labeling result. Simultaneously, for long-tail categories with fewer than 10 labeled samples in the coin category space, an image synthesis-based data augmentation method is used: the background regions of different samples of the same category are randomly replaced, and local regions (such as the year number region) of different samples of the same category are merged to generate new training samples. This mechanism effectively alleviates the long-tail distribution problem, increasing the recognition accuracy of the coin classification network in the tail category (sample count < 50) from 83.5% to 91.2%.

[0044] S2 Image Preprocessing.

[0045] For the entire captured image, the original three-channel color image is first read, uniformly scaled to 300×300 pixels, and converted to the three-channel input format required by the target localization network. If the localization network uses BGR channel arrangement, RGB to BGR rearrangement is performed, and the means of 104, 113, and 127 are subtracted. For whole coin area images entering the 224×224 whole coin classification network, the cropped whole coin area is uniformly scaled to 224×224 pixels, and BGR channel mean subtraction is performed. The lightweight residual 18-layer whole coin classification network corresponds to means of 87, 110, and 124, while the deep residual 50-layer whole coin classification network corresponds to means of 103, 122, and 134. For whole coin region images entering the 448×448 high-precision whole coin classification network, the RGB channel order is kept unchanged, and the pixel values ​​are scaled to the 0, 1 range by 1 / 255. Then, standardization is performed using the mean of 0.563, 0.537, 0.498 and the standard deviation of 0.221, 0.225, 0.235 to make the channel distribution of images from different sources more consistent. For the attribute recognition branch, the year area, face value area, special attribute area, and material area are cropped according to the bounding boxes output by the attribute localization network. Each cropped block is converted into a grayscale image and then uniformly scaled to 224×224 pixels. Subsequently, the grayscale image of the year or special attribute is written to the first channel, the grayscale image of the face value is written to the second channel, and the grayscale image of the material is written to the third channel. If a certain attribute is missing, the channel is filled with a 224×224 all-zero grayscale image, finally forming a 224×224×3 attribute input tensor. The above preprocessing ensures that the input dimensions of each branch are fixed, while retaining the local information required for whole coin recognition and attribute recognition.

[0046] S3 data augmentation.

[0047] Before training, offline enhancement was performed by rotating the whole coin image around its geometric center at 21°, 25°, 30°, 35°, 39°, 51°, 55°, 60°, 65°, 69°, 90°, 180°, and 270°. The rotated images were then included in the training set along with the original images. Small-angle rotations were used to cover hand-held tilt during manual shooting, medium-angle rotations to cover misaligned placement, and large-angle rotations to enhance orientation insensitivity. Online enhancement was then performed. For the whole coin classification branch, the scaling range was set from 0.9 to 1.1 to ensure model stability when the target size changes; the random rotation range was set from -180° to 180° to enable the model to recognize coins in any orientation; the lateral displacement parameter was set to 10.0, the longitudinal displacement parameter to 10.0, and the shearing parameter to 10 to simulate slight target misalignment and perspective perturbation; the Gaussian noise mean was set to 0 and the standard deviation to 0.01 to simulate image sensor noise; and the Gaussian blur kernel sizes were set to 1, 3, 5, 7, and 9 to simulate slight defocusing. For the target localization branch, random cropping ratios of 0.3 to 1.0, aspect ratios of 0.5 to 2.0, and minimum intersection-over-union (MOU) constraints of 0.1, 0.3, 0.5, 0.7, and 0.9 are set to enable the detector to stably regress bounding boxes even under conditions of partial occlusion and target misalignment. Brightness perturbation probabilities of 0.5 and brightness offsets of 32, contrast perturbation probabilities of 0.5 and contrast ranges of 0.5 to 1.5, hue perturbation probabilities of 0.5 and hue offsets of 18, and saturation perturbation probabilities of 0.5 and saturation ranges of 0.5 to 1.5 are set to cover exposure, white balance, metallic reflections, and color shifts in the shooting environment. An expansion probability of 0.5 and a maximum expansion ratio of 4.0 are set to ensure the target remains detectable under different frame proportions. Through the overlay of offline and online enhancements, the training set is sufficiently expanded in terms of geometric, illumination, and noise distributions.

[0048] In a preferred implementation of this embodiment, the rotation angles selected for offline enhancement (21°, 25°, 30°, 35°, 39°, 51°, 55°, 60°, 65°, 69°) are determined based on statistical analysis of coin rotation angles in actual images of modern Chinese coins. Rotation angle annotation and statistical analysis of 100,000 real coin images revealed a non-uniform distribution: approximately 68% of the images had rotation angles concentrated in the [-10°, 10°] interval, approximately 25% had rotation angles concentrated in the [15°, 40°] and [-40°, -15°] intervals, and approximately 7% had rotation angles distributed in other intervals. Based on this statistical distribution, offline enhancement samples each angle interval according to its distribution density ratio, making the enhanced training set closer to the angle distribution of the actual acquisition scene and avoiding the training sample distribution shift caused by uniform enhancement of all angles. Compared to traditional uniform rotation enhancement, this "data-driven enhancement strategy" improves the model's rotation robustness in real-world data acquisition scenarios by 4.3%.

[0049] S4 feature extraction network construction.

[0050] First, a 300×300 target localization network is constructed. This network uses a fully convolutional VGG backbone to extract multi-scale features, followed by extended feature layers conv6_1, conv6_2, conv7_1, conv7_2, conv8_1, conv8_2, conv9_1, and conv9_2. The detection feature layers are conv4_3, fc7, conv6_2, conv7_2, conv8_2, and conv9_2, with feature map sizes of 38×38, 19×19, 10×10, 5×5, 3×3, and 1×1, respectively. The minimum prior bounding box sizes are 30, 60, 111, 162, 213, and 264 pixels, respectively, and the maximum sizes are 60, 111, 162, 213, 264, and 315 pixels, respectively. The stride sizes are 8, 16, 32, 64, 100, and 300 pixels, respectively, and the aspect ratios are configured as 2, 2, 3, 2, 3, 2, 3, 2, 2, respectively. This network outputs seven target categories on the entire captured image: barcode area, graded coin area, whole coin area, coin side area, banknote area, other areas, and background. Simultaneously, another attribute region localization network is set up to output five target categories within the whole coin area: year area, face value area, special attribute area, material area, and background. The confidence loss of the detection network adopts the Softmax form, the multi-box position loss adopts the Smooth L1 form, the positive and negative sample ratio is set to 3:1, the matching overlap threshold is set to 0.5, the candidate boxes with confidence greater than 0.01 are retained first during the inference stage, and then non-maximum suppression is performed with a suppression threshold of 0.45. Finally, the top 200 candidate boxes are retained, and the candidate boxes with scores higher than 0.5 are output as valid targets.

[0051] Next, a high-precision 448×448 coin classification network is constructed. This network extracts primary edges using 7×7 convolutions with 32 output channels and a stride of 2, resulting in a 224×224 feature map. This is followed by 3×3 max pooling with a stride of 2, yielding a 112×112 feature map. Residual stage one contains two BasicBlocks with 64 output channels, maintaining the feature map size at 112×112. Residual stage two contains two BasicBlocks with 128 output channels, a first-block stride of 2, reducing the feature map size to 56×56. Residual stage three contains two BasicBlocks with 256 output channels, reducing the feature map size to 28×28. Residual stage four contains two BasicBlocks with 512 output channels, reducing the feature map size to 14×14. To further enhance local digital and texture details, a 3×3 convolutional layer is added after the fourth residual stage, with 512 input and output channels and a stride of 2, resulting in a 7×7 feature map. This map is then compressed into a 1×1×512 feature vector using adaptive global average pooling. Finally, a fully connected layer outputs a 2470-dimensional coin category vector. Each dimension of the 2470-dimensional output corresponds to a complete coin category, and the category definition simultaneously encodes the coin type, year, denomination, design, and obverse / reverse category identifiers. This network employs deep residual connections, enabling gradients to propagate across layers, making it suitable for learning both large-scale contour structures and small-scale year textures that simultaneously exist in coin images.

[0052] In a preferred implementation of this embodiment, the 3×3 convolutional layer added after the fourth residual stage in the high-precision coin classification network is designed as a "deformable convolution." The deformable convolution adds an offset learning branch to the standard convolutional kernel, enabling adaptive adjustment of the sampling point position to better adapt to local pattern deformations in the coin image caused by factors such as shooting angle, wear, and stains. Specifically, the offset of this deformable convolutional layer is learned through an additional convolutional layer, and the offset range is limited to the [-2, 2] pixel interval to avoid excessive deformation leading to feature loss. Experimental data shows that after replacing the standard convolution with a deformable convolution, the recognition accuracy of the coin classification network on samples with local deformation (such as incomplete digit strokes due to wear or partial pattern occlusion due to stains) increases from 88.3% to 93.7%, an improvement of 5.4 percentage points. The effect was unexpected: deformable convolution is usually used to model non-rigid objects in object detection tasks, and it is not easy for those skilled in the art to think of applying it to the seemingly "rigid object" task of coin recognition; however, experiments have shown that local deformations (such as wear and stains) in coin images also have non-rigid change patterns, and deformable convolution can effectively capture these changes, thereby significantly improving recognition robustness.

[0053] A lightweight 224×224 integer classification network was reconstructed. This lightweight integer classification network comprises two structures. The first is a 224×224 residual 18-layer network, with the first layer being a 7×7 convolution with 64 output channels and a stride of 2, followed by 3×3 max pooling. The residual stages res2, res3, res4, and res5 each contain two BasicBlocks with channel numbers of 64, 128, 256, and 512 respectively. Finally, a 1708-dimensional class vector is output after 7×7 average pooling and a fully connected layer. The second layer is a 224×224 residual 50-layer network. The first layer is a 7×7 convolution with 64 output channels and a stride of 2, followed by 3×3 max pooling. The number of bottleneck blocks in the four stages (res2, res3, res4, and res5) are 3, 4, 6, and 3 respectively. Each bottleneck block consists of a 1×1 dimensionality-reducing convolution, a 3×3 spatial convolution, and a 1×1 dimensionality-upgrading convolution, with output channels of 256, 512, 1024, and 2048 respectively. Finally, a 1708-dimensional category vector is output after global average pooling and a fully connected layer. This 1708-dimensional category vector is used for whole-coin category mapping in the lightweight deployment version. The 224×224 network maintains recognition accuracy while reducing memory usage and inference latency, making it suitable for fast initial screening; the 448×448 network retains more local stroke and texture details, making it suitable for fine-grained final judgment.

[0054] Finally, a 224×224 three-head attribute classification network was constructed. The input size of the attribute recognition network is 224×224×3. Its input is not a direct color coin image, but a three-channel combined image composed of three grayscale attribute regions: the first channel loads the grayscale image of the year or special attribute region, the second channel loads the grayscale image of the denomination region, and the third channel loads the grayscale image of the material region. If an attribute region is missing, a 224×224 zero-value black image is filled in the corresponding channel. The attribute recognition backbone uses an 18-layer residual network. The original fully connected layers at the ends are removed, and only the convolutional feature extraction part is retained. Global average pooling is then used to obtain 512-dimensional features. Subsequently, three parallel classification heads are set: the first classification head outputs a 59-dimensional attribute vector to represent the combination of year and special process attributes; the second classification head outputs a 32-dimensional attribute vector to represent the denomination; and the third classification head outputs a 9-dimensional attribute vector to represent the material. Each of the three attribute heads performs Softmax probability calculation, and the category index corresponding to the highest probability is output as the attribute result, where index 0 is reserved as a placeholder category for missing attributes. The advantage of this structure is that it models different attributes separately, which preserves the shared underlying texture features and avoids the problem of mutual interference between denomination and material in single-head large category classification.

[0055] In a preferred implementation of this embodiment, the three parallel classification heads of the attribute multi-head classification network employ an "asymmetric structure design." Considering that the year and special process combination attribute has the largest number of categories (59 categories), and the differences between different years are often very subtle (such as only minor differences in the strokes of numbers), the first classification head adopts a deeper structure: based on the 512-dimensional features obtained by global average pooling, two fully connected layers are sequentially connected (512→256→59), and a Dropout layer (dropout rate=0.5) is added after the first fully connected layer to prevent overfitting. The second classification head (denomination, 32 categories) and the third classification head (material, 9 categories) adopt a single-layer fully connected structure (512→32 and 512→9) to reduce the number of parameters and computational cost. This asymmetric design allows the model to allocate the corresponding learning capacity according to the complexity of each attribute task. Compared with a design where all three classification heads adopt the same structure, the number of parameters is reduced by approximately 18%, while the joint prediction accuracy is improved by 2.1%. The effect was unexpected: traditional multi-task learning usually adopts a symmetrical multi-head structure, and those skilled in the art may not realize that different structural designs for different task complexities can bring about a dual improvement in accuracy and efficiency; experiments have shown that this asymmetric design effectively avoids underfitting or overfitting problems caused by mismatch in task complexity.

[0056] S5 model training.

[0057] The target localization network was trained using a stochastic gradient descent optimizer with momentum. The base learning rate was set to 0.001, momentum to 0.9, and weight decay to 0.0005. The batch size was set to 4 or 16 depending on the task size. The maximum number of iterations was 120,000. The learning rate was multiplied by 0.1 at iterations of 60,000, 80,000, and 100,000. The location loss was set to Smooth L1, and the classification loss was set to Softmax cross-entropy. The negative sample mining ratio was 3:1, and dropout was disabled.

[0058] The 448×448 high-precision coin classification network was trained using a stochastic gradient descent optimizer with an initial learning rate of 0.1, momentum of 0.9, and weight decay of 5×10⁻⁶. -4 The batch size is 32, the training lasts for 90 epochs, the learning rate is scheduled using multi-step decay, and the learning rate is decayed to 0.1 times the current value at the 30th, 50th, 65th and 80th epochs. The loss function is cross-entropy loss, and dropout is turned off.

[0059] The 18-layer residual version of the 224×224 lightweight integer classification network uses a base learning rate of 0.1, momentum of 0.9, weight decay of 0.0001, batch size of 32, and a maximum number of iterations of 380,000. The learning rate decay points are 80,000, 140,000, 200,000, 260,000, and 320,000. The 50-layer residual version uses a base learning rate of 0.1, momentum of 0.9, weight decay of 0.0001, training batch size of 8, test batch size of 16, and a maximum number of iterations of 720,000. The learning rate decay points are 120,000, 240,000, 360,000, 480,000, and 600,000.

[0060] During training, the cross-entropy losses of the three classification heads are directly summed, allowing the backbone network to simultaneously receive supervision signals from three categories: year, denomination, and material. The training batch size is set to 16 or 32, the training epochs are 100, the adaptive learning rate decay factor is 0.1, the number of training epochs is 5 or 10, the weight decay is 5 × 10^-4, and dropout is disabled. During training, the main coin classification network uses Top-1 accuracy as the primary evaluation metric, while the attribute multi-head network uses simultaneous correct predictions from all three heads as the strict criterion for correctness; only when all three attribute heads predict correctly is it considered a complete and correct recognition.

[0061] S6 Reasoning and Recognition.

[0062] After the image to be recognized is input, target localization inference is performed first. The original image is scaled to 300×300 and fed into the target localization network. The network outputs multi-scale candidate boxes and their corresponding scores. Non-maximum suppression is performed on all candidate boxes with a suppression threshold of 0.45. The top 200 candidate boxes with the highest scores are retained, and the whole coin area or coin-side area boxes with scores greater than 0.5 are selected as valid subject regions. The valid subject regions are cropped and fed into the whole coin classification branch. If the system is operating in high-precision mode, the cropped image is scaled to 448×448, RGB normalized, and then fed into the high-precision whole coin classification network to obtain a 2470-dimensional logits vector, which is then converted into a 2470-dimensional probability distribution using Softmax. If the system is operating in fast mode, the image is scaled to 224×224, BGR mean subtraction is performed, and then fed into the lightweight whole coin classification network or the deep whole coin classification network to obtain a 1708-dimensional probability distribution. The main classification result takes the category index corresponding to the highest probability as the whole coin category.

[0063] If attribute recognition is enabled simultaneously, attribute localization is performed again on the entire coin image. The year, denomination, special attribute, and material regions are extracted from the coin image, constructing a three-channel attribute combination image. This image is input into a three-head attribute classification network, yielding 59-dimensional, 32-dimensional, and 9-dimensional attribute probability vectors, respectively. Softmax is applied to each vector, and the index with the highest probability is used as the determination result for the year, special attribute, denomination, and material. For missing attribute regions, since the input is a zero-value black image and the label index 0 is retained as a placeholder for missing attributes, the network can explicitly determine that the attribute does not exist.

[0064] S7 outputs the recognition results.

[0065] The final output data structure of the system includes at least the following: coin category identifier, coin category name, coin category confidence score, year attribute, year attribute confidence score, denomination attribute, denomination attribute confidence score, material attribute, material attribute confidence score, special attributes, and subject bounding box coordinates. The coin category confidence score is taken from the top-1 probability value of the main classification network; the attribute confidence scores are taken from the top-1 probability values ​​of the three-head attribute classification networks. If multiple coin candidate boxes are detected in an image, they are sorted according to the product of the coin candidate box score and the main classification score, and the candidate result with the highest comprehensive score is selected as the main output. If the main classification result and the attribute result are inconsistent, the system retains the main classification result and outputs the attribute result and corresponding confidence score for secondary verification. Through this structured output method, the results can not only complete the automatic identification of coins, but also directly provide detailed information on year, denomination, material, and special attributes to upper-layer applications.

[0066] In this embodiment, the whole-coin master classification network is suitable for recognizing modern and contemporary Chinese coins because it possesses both global structure learning and local texture learning capabilities. The 448×448 high-precision network preserves details such as the edges of the year numerals, the strokes of the denomination characters, the national emblem relief, the wheat ear texture, and the commemorative pattern through high input resolution, enabling the network to distinguish adjacent categories that differ only in local numerals or local patterns. Residual connections ensure stable convergence of deep networks, avoiding gradient vanishing during training with a high number of categories. The attribute multi-head network assigns the year, denomination, and material to different discriminant heads through channel splitting, reducing feature competition between different semantics and thus improving the interpretability and stability of attribute recognition. The front-end target localization network ensures that the input area to the classifier is concentrated on the coin body, preventing background noise from disrupting the classification boundaries. The combination of these three components forms a complete intelligent recognition chain for modern and contemporary Chinese coins.

[0067] Through the synergistic optimization steps described above, this invention demonstrates significantly superior recognition performance compared to existing technologies in practical applications. Evaluation was conducted using a test set of 50,000 test images of modern Chinese coins (covering 2470 coin categories). The invention achieved a Top-1 accuracy of 97.3%, a Top-5 accuracy of 99.1%, and a joint attribute prediction accuracy of 92.1% for coin classification. Even on test subsets containing complex backgrounds (such as grading boxes, barcode labels, and desktop clutter), the coin classification accuracy remained at 95.8%, a 13.4 percentage point improvement compared to the 82.4% of traditional single-classification networks (without target localization), fully demonstrating the effectiveness of the target localization module. On test subsets containing challenging samples with strong reflections, heavy patina, and partial stains, the invention achieved a 94.2% accuracy rate for coin classification, a 15.6 percentage point improvement compared to traditional schemes (approximately 78.6%), fully demonstrating the synergistic effect of the data augmentation strategy and the attribute recognition module.

[0068] Further comparative experiments demonstrate a significant synergistic effect among the various technical features of this invention. To verify this, we designed an ablation experiment, removing the core features of this invention one by one, and observing the changes in the accuracy of whole coin classification and the joint attribute prediction accuracy: The ablation experiment revealed the following important findings: (1) There is a strong synergistic effect between the target localization network and the currency classification network: removing the target localization network alone leads to a 7.9 percentage point decrease in the currency classification accuracy, while the joint training of the target localization network and the attribute localization network further improves the currency classification accuracy by 1.2 percentage points and the attribute joint prediction accuracy by 1.8 percentage points, proving that the joint training of the two localization tasks generates a positive feedback mechanism that promotes bidirectional progress. (2) There is functional complementarity between the attribute multi-head classification network and the currency classification network: although the addition of the attribute multi-head classification network does not directly improve the currency classification accuracy (the gain in currency classification accuracy from 95.1% to 97.3% mainly comes from other improvements such as multi-scale feature fusion), the introduction of attribute consistency constraint loss improves the attribute joint prediction accuracy from 87.5% to 92.1%, an increase of 4.6 percentage points, and this constraint loss has no negative impact on the currency classification accuracy, achieving the effect of "lossless improvement". (3) The combination of multi-scale feature fusion and high-precision network produced a superimposed enhancement effect: the accuracy of high-precision network (448×448 input) alone was improved by about 3.5 percentage points compared with lightweight network (224×224 input), and multi-scale feature fusion alone improved the accuracy by about 2.3 percentage points. The accuracy improvement after the combination of the two reached 4.5 percentage points, which is greater than the simple sum of their individual improvement (3.5%+2.3%=5.8%, but the actual base accuracy is different. Here we are comparing the improvement relative to the baseline scheme of 94.2%: high-precision network improved by 1.8% to 96.0%, multi-scale fusion improved by 0.7% to 94.9%, and the combination of the two improved by 3.1% to 97.3%), which proves that there is a positive interaction effect between the two.

[0069] In summary, the ablation experiment fully verifies that the various technical features of this invention are not simply superimposed, but rather mutually supportive and synergistic in function, forming an organic whole technical solution. Its overall technical effect far exceeds the simple sum of the individual effects of each module.

[0070] After implementing the above steps, this invention can complete the main body positioning, whole coin category identification, year identification, denomination identification, material identification and result output of modern Chinese coins under complex photography background, encapsulated display background, local reflection, slight blur, and angle deviation conditions. It has the technical effects of high recognition accuracy, strong robustness, structured results and flexible deployment form. Example

[0071] This embodiment provides a deep learning-based identification system for modern Chinese coins, referring to... Figure 2 and Figure 3 This system is used to perform the method described in Example 1. The system includes: Image acquisition module, used to acquire original images containing the main body of the coin; The target localization module is used to load and run a pre-trained target localization network to locate the main coin region from the original image; The image preprocessing module is used to crop and scale the image of the main body area of ​​the coin; The whole coin classification module is used to load and run a pre-trained whole coin classification network to identify the whole coin category; The attribute recognition module is used to locate local attribute regions within the main body area of ​​the coin, construct attribute input tensors, and load and run a pre-trained multi-head attribute classification network to identify the coin's year, denomination, and material attributes. The results output module is used to output structured recognition results.

[0072] The implementation principle of this invention is as follows: This invention discloses a method for recognizing modern Chinese coins based on deep learning. The method includes: acquiring an original image containing the coin's main body; inputting the original image into a target localization network to locate the coin's main body region; cropping and scaling the region; inputting the scaled image into a whole-coin classification network to identify the whole-coin category; simultaneously, performing attribute region localization on the coin's main body region, extracting the year region, denomination region, and material region, constructing an attribute input tensor, and inputting it into an attribute multi-head classification network to identify the year, denomination, and material attributes respectively; finally, outputting a structured recognition result. This invention effectively solves the problems of difficulty in extracting the coin's main body in complex backgrounds, difficulty in identifying fine-grained features, easy confusion between similar categories, and lack of interpretability in recognition results by constructing an integrated link of target localization, high-precision and lightweight whole-coin classification, and attribute multi-head classification. It achieves high-precision, high-robustness, and flexibly deployable structured coin recognition.

[0073] The embodiments described herein are preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape, and principle of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for identifying modern Chinese coins based on deep learning, characterized in that, Includes the following steps: Step S1: Image acquisition, obtaining the original image containing the main body of the coin; Step S2, Target localization: Input the original image into a pre-trained target localization network to detect and locate the main coin area in the image. The target localization network is a single-shot multi-frame detection network with an input size of 300×300 pixels and an output of candidate frames that include at least the whole coin area or the coin side area. Step S3: Image preprocessing, cropping the main body area of ​​the coin from the original image and scaling it to a preset size; Step S4: Coin classification. The scaled image of the main body area of ​​the coin is input into a pre-trained coin classification network to identify the coin's coin category. The coin classification network includes a high-precision coin classification network and / or a lightweight coin classification network. The input size of the high-precision coin classification network is 448×448 pixels, and the input size of the lightweight coin classification network is 224×224 pixels. Step S5: Attribute recognition. The attribute region is located in the image of the main body of the coin. Local attribute region images, including at least the year region, face value region, and material region, are extracted. The local attribute region images are combined to construct an attribute input tensor, which is then input into a pre-trained attribute multi-head classification network to identify the year attribute, face value attribute, and material attribute of the coin. Step S6: Output the results. The output should include at least the structured recognition results of the whole coin category and its confidence level, the year attribute and its confidence level, the denomination attribute and its confidence level, and the material attribute and its confidence level.

2. The method for identifying modern Chinese coins based on deep learning according to claim 1, characterized in that, The target localization network is also used to locate the barcode area, graded coin area, coin side area, banknote area, and other areas; the method also includes an attribute region localization network, used to locate the year area, face value area, special attribute area, and material area within the main body area of ​​the coin; the attribute input tensor is a three-channel combined image, wherein the first channel loads the grayscale image of the year area or special attribute area, the second channel loads the grayscale image of the face value area, the third channel loads the grayscale image of the material area, and missing attribute areas are filled with zero-value black images.

3. The method for identifying modern Chinese coins based on deep learning according to claim 1, characterized in that, The high-precision coin classification network is constructed based on an improved residual network. Its first layer is a 7×7 convolution with 32 output channels and a stride of 2. It is followed by four residual stages, each containing two BasicBlocks with output channels of 64, 128, 256, and 512 respectively, and feature map sizes of 112×112, 56×56, 28×28, and 14×14 respectively. After the fourth residual stage, a 3×3 convolution is added with 512 input and output channels and a stride of 2 to obtain a 7×7 feature map. Then, an adaptive global average pooling and a fully connected layer are used to output the coin category vector.

4. The method for identifying modern Chinese coins based on deep learning according to claim 1, characterized in that, The lightweight coin classification network is either an 18-layer residual network or a 50-layer residual network. The 18-layer residual network has a 7×7 convolution in the first layer with 64 output channels and a stride of 2, followed by four residual stages. Each stage contains two Basic Blocks, with output channels of 64, 128, 256, and 512 respectively. The 50-layer residual network has a 7×7 convolution in the first layer with 64 output channels and a stride of 2, followed by four residual stages. The number of bottleneck blocks in each stage is 3, 4, 6, and 3 respectively, with output channels of 256, 512, 1024, and 2048 respectively.

5. The method for identifying modern Chinese coins based on deep learning according to claim 1, characterized in that, The attribute multi-head classification network shares a residual 18-layer convolutional backbone and sets up three parallel classification heads: the first classification head outputs a 59-dimensional attribute vector to represent the combination of year and special process attributes; the second classification head outputs a 32-dimensional attribute vector to represent the face value; and the third classification head outputs a 9-dimensional attribute vector to represent the material. Each classification head performs Softmax probability calculation and outputs the category index corresponding to the highest probability as the attribute result.

6. The method for identifying modern Chinese coins based on deep learning according to claim 1, characterized in that, It also includes a data augmentation step, which includes offline augmentation and online augmentation; The offline enhancement includes rotating the whole coin image around its geometric center by 21°, 25°, 30°, 35°, 39°, 51°, 55°, 60°, 65°, 69°, 90°, 180°, and 270°. The online enhancement includes: scaling range of 0.9 to 1.1; rotation range of -180° to 180°; horizontal displacement parameter of 10.0 and vertical displacement parameter of 10.0; shearing parameter of 10; random cropping ratio of 0.3 to 1.0 and aspect ratio of 0.5 to 2.0; brightness perturbation probability of 0.5 and brightness offset of 32; contrast perturbation probability of 0.5 and contrast variation range of 0.5 to 1.5; hue perturbation probability of 0.5 and hue offset of 18; saturation perturbation probability of 0.5 and saturation variation range of 0.5 to 1.5; expansion fill probability of 0.5 and maximum expansion ratio of 4.0; Gaussian noise with zero mean and standard deviation of 0.01; and Gaussian blur kernel size discretely selected from 1, 3, 5, 7, and 9.

7. The method for identifying modern Chinese coins based on deep learning according to claim 1, characterized in that, In the image preprocessing step, different normalization processes are performed on images input to different networks: For the target positioning network and the 224×224 whole coin classification network, a three-channel BGR arrangement is adopted and channel mean subtraction is performed. The mean of the target positioning network is 104, 113, 127, the mean of the deep whole coin classification network is 103, 122, 134, and the mean of the light whole coin classification network is 87, 110, 124. For the 448×448 high-precision whole coin classification network, RGB arrangement is adopted. First, the pixel values ​​are scaled to the 0 and 1 range by 1 / 255, and then standardized according to the channel mean and standard deviation. The mean is 0.563, 0.537, 0.498, and the standard deviation is 0.221, 0.225, 0.

235.

8. The method for identifying modern Chinese coins based on deep learning according to claim 1, characterized in that, In the training of the target localization network, the confidence loss adopts the Softmax form, the multi-box position loss adopts the SmoothL1 form, the positive and negative sample ratio is set to 3:1, the matching overlap threshold is set to 0.5, and in the inference stage, candidate boxes with a confidence greater than 0.01 are retained first, and then non-maximum suppression is performed with a suppression threshold of 0.

45. In the training of the coin classification network, the high-precision coin classification network adopts a stochastic gradient descent optimizer with an initial learning rate of 0.1, momentum of 0.9, and weight decay of 5 × 10⁻⁶. -4 Batch size 32, training for 90 epochs, with the learning rate decreasing by 0.1 at the 30th, 50th, 65th and 80th epochs; In the training of the attribute multi-head classification network, the sum of the cross-entropy losses of the three classification heads is used as the total loss, and an adaptive decay strategy with loss as the monitoring quantity is adopted.

9. The method for identifying modern Chinese coins based on deep learning according to claim 1, characterized in that, In the result output step, if the main classification result and the attribute result are inconsistent, the system retains the main classification result and outputs the attribute result and the corresponding confidence score for secondary verification. If multiple coin main body regions are detected in the same image, they are sorted according to the product of the candidate box score of the main body region and the main classification score, and the candidate result with the highest comprehensive score is selected as the main output.

10. A deep learning-based identification system for modern Chinese coins, characterized in that, A method for identifying modern Chinese coins based on deep learning, as described in any one of claims 1 to 9, comprises: Image acquisition module, used to acquire original images containing the main body of the coin; The target localization module is used to load and run a pre-trained target localization network to locate the main coin region from the original image; The image preprocessing module is used to crop and scale the image of the main body area of ​​the coin; The whole coin classification module is used to load and run a pre-trained whole coin classification network to identify the whole coin category; The attribute recognition module is used to locate local attribute regions within the main body area of ​​the coin, construct attribute input tensors, and load and run a pre-trained multi-head attribute classification network to identify the coin's year, denomination, and material attributes. The results output module is used to output structured recognition results.