Ancient coin multi-type fine identification method and system based on artificial intelligence architecture optimization
By using artificial intelligence architecture optimization methods in the ancient coin recognition system, the ancient coin image data is solved, and the problems of uneven lighting and noise interference are achieved, and the fine recognition and efficient recognition of many types of ancient coin are achieved.
Patent Information
- Application Number
- CN202510387195.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-03-31
AI Technical Summary
The prior art faces problems of uneven lighting, noise interference and difficult to capture texture details in the image processing of ancient coins, resulting in low recognition accuracy of ancient coins and the inability to achieve fine recognition of multiple types of ancient coins.
Using an artificial intelligence architecture optimization method, the original ancient coin image data is collected through multi-spectral imaging equipment, light equalization processing and noise filtering are performed to generate a standardized initial image. Then, texture enhancement processing based on edge-keeping algorithm is performed to generate the target ancient coin image. Finally, the pre-trained target ancient coin recognition model is called for identification, and the historical ancient coin database is retrieved based on the recognition results to construct a fine identification report.
It realizes the fine recognition of many types of ancient coins, improves the accuracy and efficiency of ancient coins, and can better deal with the problems of uneven light and noise interference.
Smart Images

Figure CN119919930A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and system for finely identifying multiple types of ancient coins based on artificial intelligence architecture optimization. Background Art
[0002] Traditional ancient coin identification mainly relies on the experience and expertise of experts, but this method has problems such as low efficiency and strong subjectivity, and the expert resources are limited, which makes it difficult to meet the needs of a large number of ancient coin identification. With the development of artificial intelligence technology, the use of image recognition technology to identify the types of ancient coins has become a research hotspot. However, when processing ancient coin images, existing methods face problems such as uneven lighting, noise interference, and difficulty in capturing texture details, resulting in low recognition accuracy and inability to achieve fine recognition of multiple types of ancient coins. Therefore, there is an urgent need for a multi-type fine recognition method for ancient coins based on artificial intelligence architecture optimization to improve the accuracy and efficiency of ancient coin recognition. Summary of the invention
[0003] The purpose of the present invention is to provide a method and system for finely identifying multiple types of ancient coins based on artificial intelligence architecture optimization.
[0004] In the first aspect, an embodiment of the present invention provides a method for finely identifying multiple types of ancient coins based on artificial intelligence architecture optimization, comprising:
[0005] The original image data of the ancient coins is collected by a multi-spectral imaging device, and the original image data of the ancient coins is subjected to light equalization processing and noise filtering to generate a standardized initial image of the ancient coins;
[0006] Performing enhancement processing on the initial image of the ancient coin to generate a target ancient coin image, wherein the enhancement processing includes texture enhancement processing based on an edge preservation algorithm;
[0007] Calling a pre-trained target ancient coin recognition model to perform ancient coin type recognition on the target ancient coin image to obtain an ancient coin type identifier of the target ancient coin image;
[0008] Based on the ancient coin type identification, a directional search of a preset historical ancient coin database is triggered, the ancient coin related data corresponding to the ancient coin type identification is output, and a detailed identification report of the ancient coin type is constructed based on the ancient coin related data.
[0009] In a second aspect, an embodiment of the present invention provides a server system, including a server, wherein the server is used to execute the method described in the first aspect.
[0010] Compared with the prior art, the beneficial effects provided by the present invention include: using a method and system for fine identification of multiple types of ancient coins based on artificial intelligence architecture optimization disclosed by the present invention, including: firstly, collecting original ancient coin image data through multi-spectral imaging equipment, generating a standardized initial image through light equalization and noise filtering, and then performing enhancement processing including texture enhancement to obtain the target image. Then, calling the pre-trained target ancient coin recognition model to identify the type of ancient coin and obtain the type identification. Finally, according to the identification, the historical ancient coin database is retrieved, the relevant data is output and a fine identification report is constructed to achieve fine identification of multiple types of ancient coins and improve the accuracy and efficiency of identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative work.
[0012] Figure 1 A schematic diagram of the steps of a method for finely identifying multiple types of ancient coins based on artificial intelligence architecture optimization provided by an embodiment of the present invention;
[0013] Figure 2 A schematic block diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0014] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0015] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.
[0016] In order to solve the technical problems in the aforementioned background technology, Figure 1 A flow chart of a method for finely identifying multiple types of ancient coins based on artificial intelligence architecture optimization provided in an embodiment of the present disclosure is provided below. The method for finely identifying multiple types of ancient coins based on artificial intelligence architecture optimization is introduced in detail.
[0017] Step S201, collecting original ancient coin image data by multi-spectral imaging equipment, and performing illumination equalization processing and noise filtering on the original ancient coin image data to generate a standardized initial image of the ancient coin;
[0018] Step S202, performing enhancement processing on the initial image of the ancient coin to generate a target ancient coin image, wherein the enhancement processing includes texture enhancement processing based on an edge preservation algorithm;
[0019] Step S203, calling a pre-trained target ancient coin recognition model to perform ancient coin type recognition on the target ancient coin image to obtain an ancient coin type identifier of the target ancient coin image;
[0020] Step S204, triggering a directional search of a preset historical ancient coin database based on the ancient coin type identifier, outputting ancient coin related data corresponding to the ancient coin type identifier, and constructing a detailed identification report of the ancient coin type based on the ancient coin related data.
[0021] In an embodiment of the present invention, exemplarily, the server controls the multispectral imaging device to collect images of ancient coins. For example, in an ancient coin identification laboratory, the staff places the ancient coins to be identified in the shooting area of the multispectral imaging device. The server sends instructions to the multispectral imaging device, and the device shoots the ancient coins from multiple spectral bands according to preset parameters to obtain the original ancient coin image data. These image data may have problems of uneven illumination and noise interference. For illumination equalization processing, the server analyzes the brightness value of each pixel in the original ancient coin image data. For example, if the left part of the ancient coin image is brighter and the right part is darker, the server will use algorithms such as histogram equalization to adjust the brightness distribution of the image. It will count the number of pixels at each brightness level in the image, and then redistribute the brightness value according to the statistical results, so that the overall brightness of the image is more uniform, just like adding a uniform "lighting" effect to the ancient coin image. In terms of noise filtering, the server will use algorithms such as median filtering or Gaussian filtering. For example, when there is salt and pepper noise (some randomly appearing black and white pixels) in the image, the server uses a median filtering algorithm. For each pixel, it selects the pixel value of the pixel and its neighborhood, and then sorts these values, taking the middle value as the new value of the pixel, thereby removing noise and making the image clearer. After light equalization and noise filtering, the server generates a standardized initial image of the ancient coin, which has uniform brightness and less noise, and is more conducive to subsequent processing. The server enhances the generated initial image of the ancient coin, including texture enhancement based on the edge preservation algorithm. Taking an ancient coin with complex patterns as an example, the server will identify the edge information in the image of the ancient coin, such as the outline of the text and pattern on the ancient coin. It uses edge preservation algorithms such as bilateral filtering to smooth the image while retaining edge information. Bilateral filtering considers the spatial distance of pixels and the similarity of pixel values. It smoothes pixels with close distances and similar pixel values, while retaining the original values of pixels with large differences in pixel values at the edge. In terms of texture enhancement, the server will enhance the details of the texture in the image of the ancient coin. For example, some subtle patterns on the ancient coin may not be obvious in the initial image, and the server will sharpen the image through algorithms such as the Laplace operator. The Laplace operator calculates the second-order derivative of each pixel in the image and enhances the areas with large grayscale changes in the image, thereby highlighting the texture details of the ancient coins and making the text and patterns on the ancient coins more clearly discernible. After these enhancements, the server generates a target ancient coin image with clearer texture and more obvious features. The server calls the pre-trained target ancient coin recognition model to process the target ancient coin image. This target ancient coin recognition model is trained with a large amount of ancient coin image data. For example, the model learns the features of various types of ancient coins, such as shape, size, text, pattern, etc., during the training phase.When the server inputs the target ancient coin image into the target ancient coin recognition model, the model will extract and analyze the features of the image. It will identify the shape of the ancient coin and determine whether it is round, square or other special shapes; analyze the text on the ancient coin to determine the font and content of the text; and observe the patterns on the ancient coin, such as dragons and phoenixes, flowers, etc. Based on these features, the model will match the type of ancient coins it has learned. Suppose the target ancient coin image is an ancient coin with a round square hole and the text "Kaiyuan Tongbao" on it. During the analysis process, the model will compare these features with the features of various types of ancient coins in its knowledge base, and finally determine that the type of the ancient coin is Kaiyuan Tongbao from the Tang Dynasty, and output the corresponding ancient coin type identification, such as "T001" (assuming this is the identification of Kaiyuan Tongbao). The server triggers a directional search of the preset historical ancient coin database based on the obtained ancient coin type identification "T001". The historical ancient coin database stores a large amount of relevant data on different types of ancient coins, including the historical background, casting process, market value, rarity and other information of the ancient coins. The server searches the database for the data related to the ancient coins corresponding to "T001". For example, it will find the historical information of Kaiyuan Tongbao, such as Kaiyuan Tongbao was minted in the fourth year of Wude of Emperor Gaozu of Tang Dynasty, and was the main currency in circulation in the Tang Dynasty; in terms of casting technology, the mold casting method was adopted; the market value will vary according to the appearance and rarity of the ancient coins; in terms of rarity, ordinary Kaiyuan Tongbao is more common, but some special versions of Kaiyuan Tongbao are relatively rare. The server will sort out and analyze the retrieved ancient coin-related data, and build a detailed identification report of ancient coin types based on these data. The report will contain basic information of ancient coins, such as type, age, etc.; detailed historical background and casting process introduction; evaluation of the market value of ancient coins and description of rarity, etc. Finally, the server will output the generated ancient coin type fine identification report to provide comprehensive and detailed ancient coin information for ancient coin appraisers or related researchers.
[0022] In an embodiment of the present invention, the target ancient coin recognition model is trained in the following manner.
[0023] Acquire an ancient coin recognition model and a sample ancient coin image, wherein the ancient coin training image in the sample ancient coin image includes a first ancient coin training image and a second ancient coin training image, wherein the first ancient coin training image is marked with its corresponding ancient coin type identifier, and the second ancient coin training image is an unlabeled ancient coin training image;
[0024] For each ancient coin training image, performing region division processing on the ancient coin training image to obtain a plurality of ancient coin sub-images of the ancient coin training image;
[0025] Through the ancient coin recognition model, feature extraction is performed on the ancient coin training image and each ancient coin sub-image of the ancient coin training image to obtain coarse-grained image features of the ancient coin training image and fine-grained image features corresponding to each ancient coin sub-image;
[0026] According to the ancient coin type identification of the first ancient coin training image, comparative learning is performed on the coarse-grained image features of each ancient coin training image in the sample ancient coin images to obtain the ancient coin type identification corresponding to the second ancient coin training image;
[0027] For each ancient coin sub-image of the ancient coin training image, according to the fine-grained image features corresponding to the ancient coin sub-image and the coarse-grained image features of the ancient coin training image to which the ancient coin sub-image belongs, calculate the multi-granularity feature alignment between the ancient coin sub-image and the ancient coin training image to which the ancient coin sub-image belongs;
[0028] According to the multi-granularity feature alignment and the ancient coin type identification corresponding to the second ancient coin training image, the parameters of the ancient coin recognition model are iteratively optimized to obtain the target ancient coin recognition model.
[0029] In an embodiment of the present invention, illustratively, the server obtains a predefined ancient coin recognition model architecture from a storage device, and this model architecture is like a "framework" waiting to be filled with knowledge. At the same time, the server collects a large number of sample ancient coin images, which come from different channels, such as the museum's ancient coin photo library, the shooting data of the archaeological excavation site, etc. The ancient coin training images in the sample ancient coin images are divided into the first ancient coin training image and the second ancient coin training image. The first ancient coin training image has been annotated with the corresponding ancient coin type identification by professionals, such as an ancient coin image marked as "Qing Dynasty Qianlong Tongbao"; while the second ancient coin training image has not yet been annotated. For each ancient coin training image, the server uses an image segmentation algorithm to perform regional division. Taking a round square hole ancient coin as an example, the server divides it into multiple ancient coin sub-images, such as segmenting the square hole part, the text area, the edge pattern area, etc., to obtain multiple independent ancient coin sub-images. The purpose of this is to analyze the different features of the ancient coins in more detail. The server extracts features from the ancient coin training image and each of its ancient coin sub-images through the ancient coin recognition model. For the ancient coin training images, the server obtains its visual features such as overall shape and size in the visual feature domain, as well as inscription features such as approximate text content in the semantic feature domain. After cross-domain feature integration and gated recurrent unit feature interaction, the coarse-grained image features of the ancient coin training image are obtained, just like grasping the "overall outline" of the ancient coin. For each ancient coin sub-image, the server also obtains its sub-features in the visual and semantic feature domains, and obtains the corresponding fine-grained image features after processing, just like deeply understanding the "detailed texture" of the ancient coin. The server compares and learns the coarse-grained image features of all ancient coin training images based on the ancient coin type identification of the first ancient coin training image. For example, the server sets the ancient coin type template of the category cardinality and calculates the degree of fit between the coarse-grained image features of each ancient coin training image and the features of each template. If the coarse-grained image features of an unlabeled ancient coin training image have a high degree of fit with the features of the ancient coin training image labeled as "Tang Dynasty Kaiyuan Tongbao", the server will add it to the ancient coin type pool corresponding to "Tang Dynasty Kaiyuan Tongbao". Through continuous iteration, the server determines the ancient coin type template that meets the feature fluctuation threshold range, and then obtains the ancient coin type identification corresponding to the second ancient coin training image. For each ancient coin sub-image of the ancient coin training image, the server calculates the multi-granular feature alignment between the two based on its fine-grained image features and the coarse-grained image features of the ancient coin training image to which it belongs. For example, the ancient coin sub-image is the text area on the ancient coin. The server analyzes the degree of matching between the detailed features of the text and the overall features of the ancient coin to determine the multi-granular feature alignment. The server iteratively optimizes the parameters of the ancient coin recognition model based on the multi-granular feature alignment and the ancient coin type identification corresponding to the second ancient coin training image. The server calculates the coarse-grained error parameters and the fine-grained error parameters, and continuously adjusts the parameters of the model based on these error parameters to continuously improve the recognition accuracy of the model.After many iterations, the server obtains the target ancient coin recognition model, which can more accurately identify the type of ancient coins.
[0030] In an embodiment of the present invention, based on the ancient coin type identification of the first ancient coin training image, the coarse-grained image features of each ancient coin training image in the sample ancient coin image are compared and learned to obtain the ancient coin type identification corresponding to the second ancient coin training image. The package can be implemented through the following examples.
[0031] Setting a category cardinality of ancient coin type templates, and calculating the degree of fit between the coarse-grained image features of each ancient coin training image in the sample ancient coin image and the features of each ancient coin type template;
[0032] For each ancient coin training image, according to the feature fit and the ancient coin type identifier of the first ancient coin training image, determine a target ancient coin type template adjacent to the feature of the ancient coin training image from each ancient coin type template, and add the ancient coin training image to the ancient coin type pool corresponding to the target ancient coin type template;
[0033] For each ancient coin type pool corresponding to each ancient coin type template, select the most representative ancient coin training image from the ancient coin type pool as the evolved ancient coin type template;
[0034] Repeat the step of calculating the degree of fit between the coarse-grained image features of each ancient coin training image in the sample ancient coin image and the features of each ancient coin type template until the determined ancient coin type template meets the feature fluctuation threshold range; determine the ancient coin type identifier of the second ancient coin training image in the target ancient coin image set based on the ancient coin type identifier of the first ancient coin training image in the target ancient coin image set corresponding to the ancient coin type template that meets the feature fluctuation threshold range.
[0035] In an embodiment of the present invention, illustratively, the server first sets the ancient coin type template of the category cardinality according to the known ancient coin types. These templates are like standard reference samples, covering the typical features of ancient coins of different dynasties and different shapes. For example, for common ancient coin types such as Wuzhu coins of the Han Dynasty, Kaiyuan Tongbao coins of the Tang Dynasty, and Daguan Tongbao coins of the Song Dynasty, the server extracts representative features from a large number of annotated first ancient coin training images to construct corresponding ancient coin type templates. Then, the server extracts the coarse-grained image features for each ancient coin training image in the sample ancient coin image. The coarse-grained image features contain information such as the overall outline, general shape, and color distribution of the ancient coin. The server determines the similarity between the ancient coin training image and each template by calculating the feature fit between these coarse-grained image features and each ancient coin type template. When calculating the feature fit, the server uses methods such as cosine similarity and Euclidean distance. For example, for an ancient coin training image, the server calculates the cosine similarity between its coarse-grained image feature vector and the feature vector of the Han Dynasty Wuzhu coin template as 0.7, and the cosine similarity with the Tang Dynasty Kaiyuan Tongbao template as 0.3, which indicates that the ancient coin training image has a higher feature fit with the Han Dynasty Wuzhu coin template. For each ancient coin training image, the server determines the target ancient coin type template that is adjacent to the features of the ancient coin training image from all ancient coin type templates based on the calculated feature fit and the ancient coin type identifier of the first ancient coin training image. If a certain ancient coin training image has the highest feature fit with the Han Dynasty Wuzhu coin template, and it is known that the identifier of the Han Dynasty Wuzhu coin in the first ancient coin training image is "Han-Wuzhu", then the server determines the ancient coin training image as being adjacent to the features of the Han Dynasty Wuzhu coin. Subsequently, the server adds the ancient coin training image to the ancient coin type pool corresponding to the target ancient coin type template. For example, for an ancient coin training image determined to be adjacent to the features of the Han Dynasty Wuzhu coin, the server adds it to the ancient coin type pool corresponding to the Han Dynasty Wuzhu coin template. In this way, each ancient coin type pool gradually gathers ancient coin training images with similar characteristics to the ancient coin type. For each ancient coin type pool corresponding to the ancient coin type template, the server needs to select the most representative ancient coin training image from it as the evolved ancient coin type template. The server will comprehensively consider factors such as the feature stability of the ancient coin training image and the similarity with other images. For example, in the ancient coin type pool of the Han Dynasty Wuzhu coins, the server will analyze the coarse-grained image features of each ancient coin training image to find out those images with the most typical features that can represent the general characteristics of the Han Dynasty Wuzhu coins. Assuming that the shape, text, perforation and other features of one of the ancient coin training images are highly consistent with the features of most Han Dynasty Wuzhu coins, and the feature changes are small under different angles and lighting conditions, then the server will use this image as the evolved Han Dynasty Wuzhu coins ancient coin type template. The server repeats the steps of calculating the degree of fit between the coarse-grained image features of each ancient coin training image in the sample ancient coin image and the features of each ancient coin type template.As the ancient coin type template continues to evolve, the server will continue to update the target ancient coin type template and the ancient coin type pool to which each ancient coin training image belongs. This process will continue until the determined ancient coin type template meets the feature fluctuation threshold range. The feature fluctuation threshold range is a standard pre-set by the server to measure the stability of the ancient coin type template. When the feature of the ancient coin type template changes less than the threshold after multiple iterations, it means that the template is relatively stable. Finally, the server determines the ancient coin type identification of the second ancient coin training image in the target ancient coin image set according to the ancient coin type identification of the first ancient coin training image in the target ancient coin image set corresponding to the ancient coin type template that meets the feature fluctuation threshold range. For example, in the target ancient coin image set corresponding to the stable Han Dynasty Wuzhu coin ancient coin type template, it is known that some of the first ancient coin training images are identified as "Han-Wuzhu", so the server also identifies the second ancient coin training image in the image set as "Han-Wuzhu". In this way, the server completes the annotation of the second ancient coin training image, providing richer annotation data for the subsequent training of the ancient coin recognition model.
[0036] In an embodiment of the present invention, based on the ancient coin type identification of the first ancient coin training image, the coarse-grained image features of each ancient coin training image in the sample ancient coin image are compared and learned to obtain the ancient coin type identification corresponding to the second ancient coin training image, which can be implemented through the following examples.
[0037] According to the coarse-grained image features of the ancient coin training images, the sample feature fit between the ancient coin training images is determined;
[0038] According to the sample feature fit, an ancient coin association hypergraph is constructed, wherein the ancient coin association hypergraph represents the association topology between each ancient coin training image;
[0039] According to the ancient coin association hypergraph, type feature propagation processing is performed on the ancient coin type identification of the first ancient coin training image to obtain the ancient coin type identification corresponding to the second ancient coin training image.
[0040] In an embodiment of the present invention, illustratively, the server first obtains the coarse-grained image features of all ancient coin training images in the sample ancient coin image. These coarse-grained image features contain macro information such as the overall shape, approximate size, and color distribution of the ancient coin. The server will compare the coarse-grained image features of the ancient coin training images in detail. For example, among many ancient coin training images, one image is an ancient coin of Kaiyuan Tongbao in the Tang Dynasty, and the other is an ancient coin of Xining Yuanbao in the Song Dynasty. The server will extract the coarse-grained features of the Kaiyuan Tongbao ancient coin training image, such as round square holes, front text layout, rust color distribution, etc.; at the same time, it will extract the corresponding features of the Xining Yuanbao ancient coin training image. Then, the server uses a specific similarity calculation method, such as cosine similarity, Euclidean distance, etc., to determine the sample feature fit between the two ancient coin training images. If the cosine similarity of the two images is calculated to be 0.3, it means that their feature fit is relatively low. The server will perform such calculations on all the training images of ancient coins, thereby obtaining a comprehensive sample feature fit matrix, which records the feature similarity between any two ancient coin training images. The server constructs the ancient coin association hypergraph based on the calculated sample feature fit. The ancient coin association hypergraph is a graphical structure used to represent the complex relationship between ancient coin training images. It consists of feature units and topological connections. Each ancient coin training image corresponds to a feature unit, which contains the coarse-grained image feature information of the ancient coin training image. The topological connection represents the association topology between the two connected feature units, and its weight is determined by the sample feature fit. For example, if the sample feature fit of two ancient coin training images is high, then the weight of the topological connection connecting their feature units is large, which means that the two ancient coins are more similar in features and more closely related; conversely, if the sample feature fit is low, the weight of the topological connection is small. Assuming that the server has 100 ancient coin training images, it will establish corresponding topological connections for these 100 feature units. For the Kaiyuan Tongbao ancient coin training image pairs with high feature fit, the server will use thicker lines (indicating a larger weight) to connect their corresponding feature units; and for the Kaiyuan Tongbao and Xining Yuanbao image pairs with low feature fit, thinner lines will be used to connect their feature units. In this way, the server constructs a complete ancient coin association hypergraph, which clearly shows the association topological relationship between each ancient coin training image. The server uses the constructed ancient coin association hypergraph to perform type feature propagation processing on the ancient coin type identification of the first ancient coin training image, so as to determine the ancient coin type identification corresponding to the second ancient coin training image. In the ancient coin association hypergraph, the server starts from the feature unit of the first ancient coin training image that has been labeled, and propagates the feature information of its ancient coin type identification to other feature units connected to it through the topological connection between the feature units.For example, if there is a first ancient coin training image clearly marked as "Tang Dynasty Kaiyuan Tongbao", the server will pass the feature information of the type identifier "Tang Dynasty Kaiyuan Tongbao" to the adjacent feature unit along the topological connection connected to it. For the adjacent second ancient coin training image feature unit, the server will preliminarily determine its reference ancient coin type identifier based on the received type feature information and the association between the feature unit and other feature units. Then, for each second ancient coin training image, the server will predict and iterate the optimization of the reference ancient coin type identifier based on its adjacent feature units in the ancient coin association hypergraph. This process will be repeated until the result of the feature unit in the ancient coin association hypergraph is stably determined. For example, after multiple iterations, a second ancient coin training image feature unit receives type feature information from multiple "Tang Dynasty Kaiyuan Tongbao" feature units, and its own features are more and more consistent with the features of these "Tang Dynasty Kaiyuan Tongbao" feature units, then the server will eventually determine that the ancient coin type identifier corresponding to the second ancient coin training image is "Tang Dynasty Kaiyuan Tongbao". Through such a type feature propagation and iterative optimization process, the server determines the corresponding ancient coin type identification for all second ancient coin training images.
[0041] In an embodiment of the present invention, the ancient coin association hypergraph includes a feature unit corresponding to each ancient coin training image and a topological connection between the feature units, wherein the topological connection represents the association topology between two connected feature units;
[0042] According to the ancient coin association hypergraph, type feature propagation processing is performed on the ancient coin type identification of the first ancient coin training image to obtain the ancient coin type identification corresponding to the second ancient coin training image, which can be implemented through the following examples.
[0043] Performing type feature propagation processing on the ancient coin type identification of the first ancient coin training image through topological connections between feature units in the ancient coin association hypergraph to determine the reference ancient coin type identification of the second ancient coin training image;
[0044] For each second ancient coin training image, the reference ancient coin type identification of the second ancient coin training image is predicted and iteratively optimized according to the adjacent feature units of the second ancient coin training image in the ancient coin association hypergraph until the results of the feature units in the ancient coin association hypergraph are stably determined, and the ancient coin type identification corresponding to the second ancient coin training image is obtained.
[0045] In an embodiment of the present invention, exemplarily, the server has first constructed an ancient coin association hypergraph including feature units corresponding to each ancient coin training image and topological connections between feature units. The existence of topological connections reflects the association topology between two connected feature units, and the tightness of this association topology is determined by the previously calculated sample feature fit. In this hypergraph, the server starts type feature propagation from the feature unit corresponding to the first ancient coin training image that has been labeled with the ancient coin type identifier. For example, among many ancient coin training images, there is a first ancient coin training image clearly marked as "Han Dynasty Wuzhu Coin", and its corresponding feature unit stores the coarse-grained image features of the ancient coin and the type identifier "Han Dynasty Wuzhu Coin". The server will pass the feature information of the type identifier "Han Dynasty Wuzhu Coin" to the adjacent feature unit along the topological connection connected to the feature unit. Assume that a feature unit adjacent to the "Han Dynasty Wuzhu Coin" feature unit corresponds to an unlabeled second ancient coin training image. After the server passes the type feature information of "Han Dynasty Wuzhu Coin", based on the received information and the coarse-grained image features of the feature unit itself, it preliminarily determines that the reference ancient coin type identification of this second ancient coin training image is "suspected Han Dynasty Wuzhu Coin". The server will perform such type feature propagation operations on the feature units corresponding to all the first ancient coin training images, thereby determining the initial reference ancient coin type identification for all the second ancient coin training images. For each second ancient coin training image, the server will predict and iterate the reference ancient coin type identification based on its neighboring feature units in the ancient coin association hypergraph. Taking the second ancient coin training image that was preliminarily determined to be "suspected Han Dynasty Wuzhu Coin" as an example, the server will check its other neighboring feature units in the ancient coin association hypergraph. If there are multiple neighboring feature units that correspond to the clearly marked "Han Dynasty Wuzhu Coin" first ancient coin training image, and the topological connection weight between these feature units and the feature units of the second ancient coin training image is large (that is, the sample feature fit is high), then the server will increase the credibility of the type identification of "Han Dynasty Wuzhu Coin". On the contrary, if some of the neighboring feature units correspond to other types of ancient coin training images, and there is a certain correlation between these feature units and the feature units of the second ancient coin training image (the topological connection has a certain weight), the server will comprehensively consider this information and adjust the reference ancient coin type identification. For example, it may be adjusted to "Han Dynasty Wuzhu coins or other similar ancient coins to be further confirmed." The server will continue to repeat this process of prediction and iterative optimization. With each iteration, more information from neighboring feature units will be integrated to make more accurate adjustments to the reference ancient coin type identification. In this process, the server will check whether the results of each feature unit in the ancient coin association hypergraph are stable. The so-called result stability judgment means that after multiple iterations, the ancient coin type identification corresponding to each feature unit no longer changes significantly.For example, after multiple iterations, if the reference ancient coin type identifier of the feature unit corresponding to the second ancient coin training image has remained stable as "Han Dynasty Wuzhu Coin", and its association with the surrounding "Han Dynasty Wuzhu Coin" feature units has also remained stable, then the server can determine that the result has stabilized. At this point, the server determines that the ancient coin type identifier corresponding to this second ancient coin training image is "Han Dynasty Wuzhu Coin". The server will perform this iterative optimization process on all second ancient coin training images until the results of all feature units are stably determined, thereby determining the final corresponding ancient coin type identifier for all second ancient coin training images.
[0046] In an embodiment of the present invention, for each ancient coin sub-image of the ancient coin training image, the multi-granularity feature alignment between the ancient coin sub-image and the ancient coin training image to which the ancient coin sub-image belongs is calculated according to the fine-grained image features corresponding to the ancient coin sub-image and the coarse-grained image features of the ancient coin training image to which the ancient coin sub-image belongs, which can be implemented through the following example.
[0047] A coarse-grained feature set is constructed based on the coarse-grained image features of each ancient coin training image, and a fine-grained feature set is constructed based on the fine-grained image features of the ancient coin sub-image of each ancient coin training image;
[0048] For each ancient coin training image, traverse at least one neighboring coarse-grained image feature adjacent to the coarse-grained image feature of the ancient coin training image in the coarse-grained feature set, and determine a category candidate for the ancient coin training image according to the ancient coin type identifier of the ancient coin training image to which the neighboring coarse-grained image feature belongs;
[0049] For each ancient coin sub-image of the ancient coin training image, traverse at least one neighboring fine-grained image feature adjacent to the fine-grained image feature of the ancient coin sub-image in the fine-grained feature set, and determine a category candidate for the ancient coin sub-image according to the ancient coin type identifier of the ancient coin training image to which the neighboring fine-grained image feature belongs;
[0050] According to the category candidates of the ancient coin sub-image and the category candidates of the ancient coin training image to which the ancient coin sub-image belongs, the multi-granularity feature alignment between the ancient coin sub-image and the ancient coin training image to which the ancient coin sub-image belongs is calculated.
[0051] In an embodiment of the present invention, illustratively, the server has obtained the coarse-grained image features of all ancient coin training images and the fine-grained image features of each ancient coin sub-image. For the coarse-grained image features, it contains the macro information such as the overall shape, approximate size, and color distribution of the ancient coin; the fine-grained image features cover the micro information such as the detailed texture, local pattern, and text strokes of the ancient coin sub-image. The server integrates the coarse-grained image features of all ancient coin training images together to construct a coarse-grained feature set. For example, if there are 100 ancient coin training images, the server combines these 100 coarse-grained image features into a set. Similarly, the server integrates the fine-grained image features of all ancient coin sub-images to construct a fine-grained feature set. If these 100 ancient coin training images are divided into 500 ancient coin sub-images, the server will include these 500 fine-grained image features in the fine-grained feature set. For each ancient coin training image, the server traverses the coarse-grained feature set. Taking an ancient coin training image labeled as "Tang Dynasty Kaiyuan Tongbao" as an example, the server calculates the similarity between its coarse-grained image features and other coarse-grained image features in the coarse-grained feature set, and finds at least one neighboring coarse-grained image feature adjacent to the feature. Assume that a neighboring coarse-grained image feature with a high similarity is found, and the ancient coin training image to which it belongs is also labeled as "Tang Dynasty Kaiyuan Tongbao". The server determines that the category candidate of the ancient coin training image is "Tang Dynasty Kaiyuan Tongbao" based on the ancient coin type identification of the ancient coin training image to which these neighboring coarse-grained image features belong. For all ancient coin training images, the server will perform such operations to determine the category candidate for each ancient coin training image. For each ancient coin sub-image of the ancient coin training image, the server traverses the fine-grained feature set. For example, the text area on an ancient coin training image is divided into an ancient coin sub-image. The server calculates the similarity between the fine-grained image feature of the ancient coin sub-image and other fine-grained image features in the fine-grained feature set, and finds at least one neighboring fine-grained image feature. If the ancient coin training image to which this neighbor fine-grained image feature belongs is labeled as "Tang Dynasty Kaiyuan Tongbao", the server determines that the category candidate of the ancient coin sub-image is "Tang Dynasty Kaiyuan Tongbao". The server performs this operation on all ancient coin sub-images of each ancient coin training image to determine their respective category candidates. The server calculates the multi-granular feature alignment based on the category candidates of the ancient coin sub-image and the category candidates of the ancient coin training image to which the ancient coin sub-image belongs. Taking an ancient coin sub-image in the text area of a "Tang Dynasty Kaiyuan Tongbao" ancient coin training image as an example, if the category candidate of the ancient coin sub-image and the category candidate of the ancient coin training image to which it belongs are both "Tang Dynasty Kaiyuan Tongbao", it means that they are highly consistent in category. The server can measure the multi-granular feature alignment by calculating the overlap of the category candidates. If the category candidates are exactly the same and the overlap is 100%, the multi-granular feature alignment is high; if they partially overlap, the server can determine the multi-granular feature alignment based on the overlap ratio.For example, the category candidates of the ancient coin sub-image are "Tang Dynasty Kaiyuan Tongbao" and "Song Dynasty similar ancient coin", and the category candidate of the ancient coin training image to which it belongs is "Tang Dynasty Kaiyuan Tongbao", then the overlap is 50%, and the server can set the multi-granularity feature alignment to 50%. The server performs such calculations on each ancient coin sub-image and its corresponding ancient coin training image to obtain all multi-granularity feature alignments, which reflect the matching degree of the ancient coin sub-image and its corresponding ancient coin training image in different granularity features, providing an important basis for the subsequent optimization of the ancient coin recognition model.
[0052] In an embodiment of the present invention, the multi-granularity feature alignment between the ancient coin sub-image and the ancient coin training image to which the ancient coin sub-image belongs is calculated based on the category candidates of the ancient coin sub-image and the category candidates of the ancient coin training image to which the ancient coin sub-image belongs, which can be implemented through the following example.
[0053] Probability distribution modeling is performed on the ancient coin type identifiers in the category candidates of the ancient coin sub-image to determine the ancient coin type confidence distribution of the ancient coin sub-image;
[0054] Probability distribution modeling is performed on the ancient coin type identifiers in the category candidates of the ancient coin training image to which the ancient coin sub-image belongs, and the ancient coin type confidence distribution of the ancient coin training image to which the ancient coin sub-image belongs is determined;
[0055] According to the ancient coin type confidence distribution of the ancient coin sub-image and the ancient coin type confidence distribution of the ancient coin training image to which the ancient coin sub-image belongs, the multi-granularity feature alignment between the ancient coin sub-image and the ancient coin training image to which the ancient coin sub-image belongs is calculated.
[0056] In an embodiment of the present invention, illustratively, the server first focuses on the category candidates of the ancient coin sub-image. Assume that an ancient coin sub-image is an image of the text area on the ancient coin, and its category candidates include "Kaiyuan Tongbao of the Tang Dynasty", "Xining Yuanbao of the Song Dynasty", and "Wuzhu Money of the Han Dynasty". The server will perform probability distribution modeling on these ancient coin type identifiers. The server will comprehensively consider the matching degree between the fine-grained image features of the ancient coin sub-image and each category candidate. For example, through the analysis of the fine-grained features of the text such as the font, style, and strokes, it is found that the similarity with the text features of "Kaiyuan Tongbao of the Tang Dynasty" is 70%, the similarity with "Xining Yuanbao of the Song Dynasty" is 20%, and the similarity with "Wuzhu Money of the Han Dynasty" is 10%. Based on these similarities, the server constructs a probability distribution and determines that the ancient coin type confidence distribution of the ancient coin sub-image is: the confidence of "Kaiyuan Tongbao of the Tang Dynasty" is 0.7, the confidence of "Xining Yuanbao of the Song Dynasty" is 0.2, and the confidence of "Wuzhu Money of the Han Dynasty" is 0.1. This confidence distribution reflects the possibility that the ancient coin sub-image belongs to each type of ancient coin. Next, the server performs the same operation on the category candidates of the ancient coin training image to which the ancient coin sub-image belongs. Assume that the category candidates of the ancient coin training image are "Tang Dynasty Kaiyuan Tongbao" and "Tang Dynasty Qianyuan Chongbao". The server analyzes the coarse-grained image features of the ancient coin training image, such as the overall shape, size, rust color distribution, etc., and finds that its coarse-grained feature similarity with "Tang Dynasty Kaiyuan Tongbao" is 80%, and its similarity with "Tang Dynasty Qianyuan Chongbao" is 20%. Based on these similarities, the server constructs a probability distribution and determines that the ancient coin type confidence distribution of the ancient coin training image to which the ancient coin sub-image belongs is: the confidence of "Tang Dynasty Kaiyuan Tongbao" is 0.8, and the confidence of "Tang Dynasty Qianyuan Chongbao" is 0.2. This confidence distribution reflects the possibility that the ancient coin training image belongs to each type of ancient coin. After obtaining the ancient coin type confidence distribution of the ancient coin sub-image and the ancient coin type confidence distribution of the ancient coin training image to which it belongs, the server starts to calculate the multi-granular feature alignment. The server uses a specific algorithm to measure the similarity between the two confidence distributions. A common method is to calculate the KL divergence (Kullback-Leibler divergence) between the two distributions. KL divergence can measure the degree of difference between two probability distributions. The smaller the difference, the more similar the two distributions are. For the ancient coin sub-image and the ancient coin training image to which it belongs in the above example, the server calculates the KL divergence between their ancient coin type confidence distributions. Assuming that the calculated KL divergence value is small, this indicates that the two confidence distributions are relatively similar, which means that the ancient coin sub-image and the ancient coin training image to which it belongs are relatively consistent in the possibility of the ancient coin type, and the multi-granular feature alignment is high. If the KL divergence value is large, it means that the two confidence distributions are quite different, there is a large deviation in the possibility of the ancient coin type between the ancient coin sub-image and the ancient coin training image to which it belongs, and the multi-granular feature alignment is low.In this way, the server calculates the multi-granularity feature alignment for each ancient coin sub-image and its corresponding ancient coin training image. These alignment data are critical for the subsequent optimization of the ancient coin recognition model, which can help the model better understand the relationship between the different granularity features of ancient coins and improve the accuracy of ancient coin type recognition.
[0057] In an embodiment of the present invention, the parameters of the ancient coin recognition model are iteratively optimized according to the multi-granularity feature alignment and the ancient coin type identification corresponding to the second ancient coin training image to obtain a target ancient coin recognition model, which can be implemented through the following examples.
[0058] According to the coarse-grained image features of the ancient coin training image, the ancient coin type recognition is performed on the ancient coin training image to obtain the coarse-grained type confidence distribution corresponding to the ancient coin training image;
[0059] According to the fine-grained image features corresponding to the ancient coin sub-image, the ancient coin type is identified on the ancient coin sub-image to obtain the fine-grained type confidence distribution corresponding to the ancient coin sub-image;
[0060] According to the coarse-grained type confidence distribution, the fine-grained type confidence distribution, the multi-granularity feature alignment and the ancient coin type identification corresponding to the second ancient coin training image, the parameters of the ancient coin recognition model are iteratively optimized to obtain a target ancient coin recognition model.
[0061] In an embodiment of the present invention, illustratively, the server first extracts the coarse-grained image features of the ancient coin training image, which include macro information such as the overall shape, approximate size, and color distribution of the ancient coin. Taking an ancient coin training image as an example, its coarse-grained image features show that the ancient coin has a round square hole, a medium overall size, and a rust color that shows a certain sense of age. The server inputs these coarse-grained image features into the ancient coin recognition model to identify the type of ancient coin. The model will judge the type of ancient coin to which the ancient coin training image may belong based on the knowledge it has learned, and give the corresponding confidence. Assume that after model recognition, the coarse-grained type confidence distribution corresponding to the ancient coin training image is: the confidence of "Kaiyuan Tongbao of the Tang Dynasty" is 0.6, the confidence of "Xining Yuanbao of the Song Dynasty" is 0.3, and the confidence of "Wuzhu Money of the Han Dynasty" is 0.1. This distribution reflects the possibility that the ancient coin training image belongs to each type of ancient coin from the perspective of coarse-grained features. For each ancient coin sub-image in the ancient coin training image, the server extracts its fine-grained image features, which contain microscopic information such as detailed texture, local patterns, and text strokes of the ancient coin sub-image. For example, an ancient coin sub-image is a text area on an ancient coin, and its fine-grained image features show details such as the font style and stroke thickness of the text. The server inputs these fine-grained image features into the ancient coin recognition model to identify the type of ancient coin. The model analyzes and judges based on these fine-grained features and gives the fine-grained type confidence distribution corresponding to the ancient coin sub-image. Assume that the fine-grained type confidence distribution corresponding to the ancient coin sub-image is: the confidence of "Kaiyuan Tongbao of the Tang Dynasty" is 0.7, the confidence of "Xining Yuanbao of the Song Dynasty" is 0.2, and the confidence of "Wuzhu Money of the Han Dynasty" is 0.1. This distribution reflects the possibility that the ancient coin sub-image belongs to each type of ancient coin from the perspective of fine-grained features. After obtaining the coarse-grained type confidence distribution, fine-grained type confidence distribution, multi-grained feature alignment, and the ancient coin type identification corresponding to the second ancient coin training image, the server begins to iteratively optimize the parameters of the ancient coin recognition model. First, the server compares the coarse-grained type confidence distribution with the ancient coin type identification corresponding to the second ancient coin training image. If the ancient coin type identification corresponding to the second ancient coin training image is "Tang Dynasty Kaiyuan Tongbao", and the confidence of "Tang Dynasty Kaiyuan Tongbao" in the coarse-grained type confidence distribution is 0.6, there is a certain deviation. According to this deviation, the server will adjust the parameters related to the coarse-grained feature processing in the model, so that the model can more accurately judge the type of ancient coins when it subsequently recognizes ancient coin training images with similar coarse-grained features. Next, the server compares the fine-grained type confidence distribution with the ancient coin type identification corresponding to the second ancient coin training image. If there is a difference between the two, the server will adjust the parameters related to the fine-grained feature processing in the model to improve the model's recognition ability of fine-grained features. Multi-grained feature alignment is also an important basis for optimization. If the multi-granularity feature alignment is low, it means that the ancient coin sub-image and its corresponding ancient coin training image have poor matching in different granularity features.The server will adjust the parameters used to fuse coarse-grained and fine-grained features in the model so that the model can better understand the relationship between features of different granularities and improve the alignment of multi-granularity features. The server will continue to repeat the above iterative optimization process, and each iteration will adjust the model parameters based on new recognition results and known information. After multiple iterations, the parameters of the model gradually converge, and the recognition accuracy of the ancient coin type continues to improve, and finally the target ancient coin recognition model is obtained, which can more accurately identify the type of ancient coins.
[0062] In an embodiment of the present invention, the parameters of the ancient coin recognition model are iteratively optimized according to the coarse-grained type confidence distribution, the fine-grained type confidence distribution, the multi-granularity feature alignment and the ancient coin type identification corresponding to the second ancient coin training image to obtain a target ancient coin recognition model, which can be implemented through the following examples.
[0063] For each ancient coin training image, according to the fine-grained type confidence distribution of each ancient coin sub-image in the ancient coin training image and the multi-granular feature alignment corresponding to each ancient coin sub-image, the ancient coin type identification of the ancient coin training image is calibrated to obtain the calibrated ancient coin type identification of the ancient coin training image;
[0064] According to the coarse-grained type confidence distribution corresponding to each ancient coin training image, the calibrated ancient coin type identification of each ancient coin training image is integrated to obtain the coarse-grained error parameter;
[0065] According to the coarse-grained error parameter, the parameters of the ancient coin recognition model are iteratively optimized to obtain a target ancient coin recognition model.
[0066] In an embodiment of the present invention, exemplarily, the server works for each ancient coin training image. Taking an ancient coin training image marked as "Chongning Tongbao of the Song Dynasty" as an example, the image is divided into multiple ancient coin sub-images such as a text area and an edge pattern area. The server first checks the fine-grained type confidence distribution of each ancient coin sub-image. For example, the ancient coin sub-image in the text area has a fine-grained type confidence distribution of "Chongning Tongbao of the Song Dynasty" with a confidence of 0.8, "Kaiyuan Tongbao of the Tang Dynasty" with a confidence of 0.1, and "Wuzhu Money of the Han Dynasty" with a confidence of 0.1. At the same time, the multi-granular feature alignment corresponding to the ancient coin sub-image in the text area is 0.9, which indicates that it has a high degree of matching with the ancient coin training image to which it belongs in terms of multi-granular features. The server calibrates the ancient coin type identification of the ancient coin training image by combining the fine-grained type confidence distribution and multi-granular feature alignment of all ancient coin sub-images. If the fine-grained type confidence distribution of most ancient coin sub-images points to "Song Dynasty Chongning Tongbao" and the multi-granular feature alignment is high, then the server confirms that the calibrated ancient coin type identification of the ancient coin training image is still "Song Dynasty Chongning Tongbao". However, if the fine-grained type confidence distribution of some ancient coin sub-images is significantly different from the original identification, and the multi-granular feature alignment is also low, the server will re-evaluate and may adjust the calibrated ancient coin type identification to a type that is more consistent with the overall characteristics. The server then integrates the calibrated ancient coin type identification of each ancient coin training image according to the coarse-grained type confidence distribution corresponding to each ancient coin training image. Taking the "Song Dynasty Chongning Tongbao" ancient coin training image as an example, its coarse-grained type confidence distribution is "Song Dynasty Chongning Tongbao" with a confidence of 0.7, "Song Dynasty Daguan Tongbao" with a confidence of 0.2, and "Tang Dynasty Qianyuan Chongbao" with a confidence of 0.1. The server compares this coarse-grained type confidence distribution with the calibrated ancient coin type identification "Song Dynasty Chongning Tongbao". The server calculates the difference between the two, for example, by measuring the difference through a cross-entropy loss function. The cross-entropy loss function can reflect the error between the coarse-grained type confidence distribution predicted by the model and the actual calibrated ancient coin type identification. The server performs such calculations on all ancient coin training images, and then integrates these errors to obtain a coarse-grained error parameter. This parameter reflects the overall error of the model in identifying the type of ancient coins at the coarse-grained level. After the server obtains the coarse-grained error parameter, it begins to iteratively optimize the parameters of the ancient coin recognition model. The server uses optimization algorithms such as the gradient descent algorithm to adjust the parameters of the model according to the coarse-grained error parameter. The gradient descent algorithm calculates the gradient of the error parameter relative to the model parameter, and then updates the model parameters in the opposite direction of the gradient, so that the error parameter gradually decreases. In each iteration, the server applies the new parameters to the model, re-identifies the ancient coin training images, obtains a new coarse-grained type confidence distribution and a fine-grained type confidence distribution, and then repeats the above steps of calibrating the ancient coin type identification and integrating to obtain the coarse-grained error parameter.As the number of iterations increases, the coarse-grained error parameter will become smaller and smaller, and the recognition accuracy of the model will continue to improve. After multiple iterations of optimization, when the coarse-grained error parameter converges to a smaller value, or reaches the preset number of iterations, the server considers that the model has been trained well enough, and the target ancient coin recognition model is obtained, which can more accurately identify the type of ancient coins.
[0067] In the embodiment of the present invention, the parameters of the ancient coin recognition model are iteratively optimized according to the coarse-grained error parameter to obtain a target ancient coin recognition model, which can be implemented through the following example.
[0068] Calculate the fine-grained category error parameter of the ancient coin sub-image according to the fine-grained type confidence distribution of the ancient coin sub-image and the ancient coin type identifier of the ancient coin training image to which the ancient coin sub-image belongs;
[0069] According to the coarse-grained error parameter and the fine-grained category error parameter, the parameters of the ancient coin recognition model are iteratively optimized to obtain a target ancient coin recognition model.
[0070] In an embodiment of the present invention, illustratively, the server takes an ancient coin training image labeled "Kaiyuan Tongbao of the Tang Dynasty" as an example, and the image contains multiple ancient coin sub-images such as a text area and an edge pattern area. For the ancient coin sub-image in the text area, its fine-grained type confidence distribution is "Kaiyuan Tongbao of the Tang Dynasty" with a confidence of 0.7, "Xining Yuanbao of the Song Dynasty" with a confidence of 0.2, and "Wuzhu Money of the Han Dynasty" with a confidence of 0.1. The server calculates the fine-grained category error parameter based on this fine-grained type confidence distribution and the ancient coin type identifier "Kaiyuan Tongbao of the Tang Dynasty" of the ancient coin training image to which the ancient coin sub-image belongs. The server uses a cross-entropy loss function to measure the difference between the two. The cross-entropy loss function considers the degree of matching between the confidence of each ancient coin type in the fine-grained type confidence distribution and the actual identifier. In this example, the actual identifier of "Kaiyuan Tongbao of the Tang Dynasty" corresponds to a confidence of 0.7 in the fine-grained type confidence distribution, and the server calculates the error value of the two through a function. The server performs such calculations on all the ancient coin sub-images of the ancient coin training image to obtain the fine-grained category error parameters of each ancient coin sub-image. The server has obtained the coarse-grained error parameters and the fine-grained category error parameters of each ancient coin sub-image. The server combines these two error parameters to iteratively optimize the parameters of the ancient coin recognition model. The server uses the gradient descent algorithm, which is a commonly used optimization algorithm. The server first calculates the gradient of the coarse-grained error parameters and all fine-grained category error parameters relative to the model parameters. The gradient represents the rate of change of the error parameter as the model parameters change. The server updates the parameters of the model in the opposite direction of the gradient, so that the error parameters gradually decrease. In each iteration, the server applies the new parameters to the model, re-identifies the ancient coin training images and ancient coin sub-images, and obtains new coarse-grained type confidence distribution and fine-grained type confidence distribution. Then, the server calculates the coarse-grained error parameters and fine-grained category error parameters again. As the number of iterations increases, the coarse-grained error parameters and fine-grained category error parameters will continue to decrease. When the error parameter converges to a smaller value or reaches the preset number of iterations, the server considers that the model has been trained well enough. At this point, the server obtains the target ancient coin recognition model, which can comprehensively consider the coarse-grained and fine-grained features of the ancient coins and more accurately identify the types of ancient coins.
[0071] In the embodiment of the present invention, the parameters of the ancient coin recognition model are iteratively optimized according to the coarse-grained error parameter and the fine-grained category error parameter to obtain a target ancient coin recognition model, which can be implemented through the following examples.
[0072] Performing distribution difference calculation processing on the fine-grained type confidence distribution of the ancient coin sub-image and the reference distribution to obtain a feature difference index corresponding to the ancient coin sub-image;
[0073] According to the multi-granularity feature alignment corresponding to the ancient coin sub-image, the fine-grained category error parameter and the feature difference index are integrated to obtain the fine-grained error parameter of the ancient coin sub-image;
[0074] According to the coarse-grained error parameter and the fine-grained error parameter corresponding to each ancient coin sub-image of the ancient coin training image, the parameters of the ancient coin recognition model are iteratively optimized to obtain a target ancient coin recognition model.
[0075] In an embodiment of the present invention, illustratively, the server takes an ancient coin training image labeled "Han Dynasty Wuzhu Coin" as an example, and the image has multiple ancient coin sub-images such as text and contours. For the ancient coin sub-image in the text area, its fine-grained type confidence distribution is "Han Dynasty Wuzhu Coin" with a confidence of 0.6, "Tang Dynasty Kaiyuan Tongbao" with a confidence of 0.3, and "Song Dynasty Yuanfeng Tongbao" with a confidence of 0.1. The server pre-sets a reference distribution, which reflects the feature distribution of the "Han Dynasty Wuzhu Coin" ancient coin sub-image under an ideal state. The server uses methods such as KL divergence (Kullback-Leiblerdivergence) to calculate the distribution difference between the fine-grained type confidence distribution of the ancient coin sub-image in the text area and the reference distribution. Through calculation, the server obtains the feature difference index corresponding to the ancient coin sub-image, which quantifies the degree of difference between the actual feature distribution of the ancient coin sub-image and the ideal distribution. The server knows that the multi-granular feature alignment corresponding to the ancient coin sub-image in the text area is 0.8, as well as the fine-grained category error parameter calculated previously. The server integrates the fine-grained category error parameters and feature difference indicators according to the multi-granular feature alignment. If the multi-granular feature alignment is high, it means that the ancient coin sub-image and the ancient coin training image to which it belongs have a good match in multi-granular features. At this time, the fine-grained category error parameters and feature difference indicators are given relatively large weights when integrated; otherwise, they are given smaller weights. The server integrates the two by weighted summation and other methods to obtain the fine-grained error parameters of the ancient coin sub-image. The server performs this operation on all ancient coin sub-images of the ancient coin training image to obtain the fine-grained error parameters of each ancient coin sub-image. After the server obtains the coarse-grained error parameters and the fine-grained error parameters corresponding to each ancient coin sub-image, it uses optimization algorithms such as gradient descent to iteratively optimize the parameters of the ancient coin recognition model. The server calculates the gradient of these error parameters relative to the model parameters, updates the model parameters in the opposite direction of the gradient, and continuously reduces the error parameters. In each iteration, the server re-evaluates the recognition effect of the model and updates the coarse-grained error parameters and fine-grained error parameters. After multiple iterations, when the error parameter converges to a smaller value or reaches the preset number of iterations, the server considers that the model training is completed and the target ancient coin recognition model is obtained, which can more accurately identify the type of ancient coins.
[0076] In an embodiment of the present invention, the ancient coin recognition model is used to perform feature extraction processing on the ancient coin training image and each ancient coin sub-image of the ancient coin training image, respectively, to obtain coarse-grained image features of the ancient coin training image and fine-grained image features corresponding to each ancient coin sub-image, which can be implemented through the following examples.
[0077] Obtaining a visual feature set in a visual feature domain and an inscription feature set in a semantic feature domain of the ancient coin training image, and obtaining a visual sub-feature set in a visual feature domain and an inscription sub-feature set in a semantic feature domain of each ancient coin sub-image of the ancient coin training image;
[0078] Performing cross-domain feature integration processing on the visual feature set and the inscription feature set of the ancient coin training image to obtain a multidimensional feature set corresponding to the ancient coin training image; performing cross-domain feature integration processing on the visual sub-feature set and the inscription sub-feature set of the ancient coin sub-image to obtain a multidimensional feature set corresponding to the ancient coin sub-image;
[0079] Through the ancient coin recognition model, gated recurrent unit feature interaction is performed on the multidimensional feature set of the ancient coin training image to obtain coarse-grained image features of the ancient coin training image;
[0080] Through the ancient coin recognition model, the multi-dimensional feature set of the ancient coin sub-image is subjected to gated recurrent unit feature interaction to obtain the fine-grained image features of the ancient coin sub-image.
[0081] In an embodiment of the present invention, illustratively, the server first faces an ancient coin training image, which represents an unearthed Tang Dynasty Kaiyuan Tongbao. In terms of the visual feature domain, the server uses image analysis technology to obtain the visual feature set of this ancient coin training image. For example, it can recognize that the ancient coin as a whole is in the shape of a round square hole, measure the diameter of the ancient coin, and analyze the distribution of rust on its surface. These visual features together constitute the visual feature set. In the semantic feature domain, the server extracts the inscription feature set on the ancient coin with the help of optical character recognition (OCR) and other technologies, and recognizes the four characters "Kaiyuan Tongbao" on the front of the ancient coin, including the font, stroke thickness and other information of the text. For each ancient coin sub-image divided from this ancient coin training image, the server also performs feature acquisition. Taking the sub-image of the text area on the ancient coin as an example, in the visual feature domain, the server obtains the visual sub-feature set of the text edge clarity, color contrast and other visual sub-feature sets of the sub-image; in the semantic feature domain, the inscription sub-feature set such as the specific shape and stroke trend of a single text in the sub-image is obtained. The server performs cross-domain feature integration processing on the visual feature set and inscription feature set of the ancient coin training image. It fuses visual features such as the round square hole shape and rust color distribution with the semantic "Kaiyuan Tongbao" inscription information. The server uses methods such as feature splicing to combine visual features and inscription features to form a multidimensional feature set corresponding to the ancient coin training image. This multidimensional feature set combines information from both visual and semantic aspects to more comprehensively describe this Tang Dynasty Kaiyuan Tongbao ancient coin. For the ancient coin sub-image, the server also performs cross-domain feature integration processing on its visual sub-feature set and inscription sub-feature set. Still taking the text area sub-image as an example, the server fuses visual sub-features such as text edge clarity with inscription sub-features such as the stroke trend of a single text to obtain the multidimensional feature set corresponding to the ancient coin sub-image. The server inputs the multidimensional feature set of the ancient coin training image into the gated recurrent unit (GRU) in the ancient coin recognition model for feature interaction. The gated recurrent unit can process sequence data, and it will analyze and interact based on the relationship between each feature element in the multidimensional feature set. When processing the multidimensional feature set of the training image of the ancient coin Kaiyuan Tongbao from the Tang Dynasty, the gated recurrent unit will take into account the association between the visual features and the inscription features. For example, the distribution of rust may affect the recognition clarity of the inscription, and the gated recurrent unit will learn this association and perform feature interaction. After being processed by the gated recurrent unit, the server obtains the coarse-grained image features of the ancient coin training image. This coarse-grained image feature contains the overall macro information of the ancient coin, such as the overall style is more in line with the casting characteristics of the Tang Dynasty, and it is preliminarily judged that it is likely to be a Kaiyuan Tongbao from the Tang Dynasty. The server also performs gated recurrent unit feature interaction on the multidimensional feature set of the ancient coin sub-image. Taking the multidimensional feature set of the text area sub-image as an example, the gated recurrent unit will deeply analyze the relationship between the detailed features of the text.It will consider the mutual influence between the stroke trend, edge clarity and other features of the text, and through continuous feature interaction, it will dig out more detailed feature information. After processing by the gated recurrent unit, the server obtains the fine-grained image features of the ancient coin sub-image. These fine-grained image features can accurately describe the subtle differences in text, such as the starting angle of the word "kai" and the length of the second horizontal stroke of the word "yuan". These detailed information is of great significance for accurately judging the version of ancient coins. Through the above steps, the server completes the feature extraction processing of the ancient coin training image and its various ancient coin sub-images, and obtains coarse-grained image features and fine-grained image features, providing rich and accurate feature data for subsequent ancient coin type recognition and model training.
[0082] The embodiment of the present invention provides a computer device 100, which includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device 100 executes the aforementioned ancient coin multi-type fine identification method based on artificial intelligence architecture optimization. Figure 2 As shown, Figure 2 The block diagram of the computer device 100 provided in the embodiment of the present invention. The computer device 100 includes a memory 111, a processor 112 and a communication unit 113. To achieve data transmission or interaction, the memory 111, the processor 112 and the communication unit 113 are directly or indirectly electrically connected to each other. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0083] For illustrative purposes, the foregoing description is made with reference to specific embodiments. However, the above illustrative discussion is not intended to be exhaustive or to limit the present disclosure to the precise form disclosed. Numerous modifications and variations are possible in accordance with the above teachings. These embodiments are selected and described in order to best illustrate the principles of the present disclosure and its practical application, so that those skilled in the art can best utilize the present disclosure and utilize various embodiments with different modifications to suit the intended specific application.
Claims
1. A multi-type fine identification method for ancient coins based on artificial intelligence architecture optimization, characterized in that: include: The original image data of the ancient coins is collected by a multi-spectral imaging device, and the original image data of the ancient coins is subjected to light equalization processing and noise filtering to generate a standardized initial image of the ancient coins; Performing enhancement processing on the initial image of the ancient coin to generate a target ancient coin image, wherein the enhancement processing includes texture enhancement processing based on an edge preservation algorithm; Calling a pre-trained target ancient coin recognition model to perform ancient coin type recognition on the target ancient coin image to obtain an ancient coin type identifier of the target ancient coin image; Based on the ancient coin type identification, a directional search of a preset historical ancient coin database is triggered, the ancient coin related data corresponding to the ancient coin type identification is output, and a detailed identification report of the ancient coin type is constructed based on the ancient coin related data.
2. The method according to claim 1, characterized in that The target ancient coin recognition model is trained by the following methods, including: Acquire an ancient coin recognition model and a sample ancient coin image, wherein the ancient coin training image in the sample ancient coin image includes a first ancient coin training image and a second ancient coin training image, wherein the first ancient coin training image is marked with its corresponding ancient coin type identifier, and the second ancient coin training image is an unlabeled ancient coin training image; For each ancient coin training image, performing region division processing on the ancient coin training image to obtain a plurality of ancient coin sub-images of the ancient coin training image; Through the ancient coin recognition model, feature extraction is performed on the ancient coin training image and each ancient coin sub-image of the ancient coin training image to obtain coarse-grained image features of the ancient coin training image and fine-grained image features corresponding to each ancient coin sub-image; According to the ancient coin type identification of the first ancient coin training image, comparative learning is performed on the coarse-grained image features of each ancient coin training image in the sample ancient coin images to obtain the ancient coin type identification corresponding to the second ancient coin training image; A coarse-grained feature set is constructed based on the coarse-grained image features of each ancient coin training image, and a fine-grained feature set is constructed based on the fine-grained image features of the ancient coin sub-image of each ancient coin training image; For each ancient coin training image, traverse at least one neighboring coarse-grained image feature adjacent to the coarse-grained image feature of the ancient coin training image in the coarse-grained feature set, and determine a category candidate for the ancient coin training image according to the ancient coin type identifier of the ancient coin training image to which the neighboring coarse-grained image feature belongs; For each ancient coin sub-image of the ancient coin training image, traverse at least one neighboring fine-grained image feature adjacent to the fine-grained image feature of the ancient coin sub-image in the fine-grained feature set, and determine a category candidate for the ancient coin sub-image according to the ancient coin type identifier of the ancient coin training image to which the neighboring fine-grained image feature belongs; Probability distribution modeling is performed on the ancient coin type identifiers in the category candidates of the ancient coin sub-image to determine the ancient coin type confidence distribution of the ancient coin sub-image; Probability distribution modeling is performed on the ancient coin type identifiers in the category candidates of the ancient coin training image to which the ancient coin sub-image belongs, and the ancient coin type confidence distribution of the ancient coin training image to which the ancient coin sub-image belongs is determined; Calculate the multi-granularity feature alignment between the ancient coin sub-image and the ancient coin training image to which the ancient coin sub-image belongs, according to the ancient coin type confidence distribution of the ancient coin sub-image and the ancient coin type confidence distribution of the ancient coin training image to which the ancient coin sub-image belongs; According to the coarse-grained image features of the ancient coin training image, the ancient coin type recognition is performed on the ancient coin training image to obtain the coarse-grained type confidence distribution corresponding to the ancient coin training image; According to the fine-grained image features corresponding to the ancient coin sub-image, the ancient coin type is identified on the ancient coin sub-image to obtain the fine-grained type confidence distribution corresponding to the ancient coin sub-image; According to the coarse-grained type confidence distribution, the fine-grained type confidence distribution, the multi-granularity feature alignment and the ancient coin type identification corresponding to the second ancient coin training image, the parameters of the ancient coin recognition model are iteratively optimized to obtain a target ancient coin recognition model.
3. The method according to claim 2, characterized in that The method of performing comparative learning on the coarse-grained image features of each ancient coin training image in the sample ancient coin images according to the ancient coin type identification of the first ancient coin training image to obtain the ancient coin type identification corresponding to the second ancient coin training image includes: Setting a category cardinality of ancient coin type templates, and calculating the degree of fit between the coarse-grained image features of each ancient coin training image in the sample ancient coin image and the features of each ancient coin type template; For each ancient coin training image, according to the feature fit and the ancient coin type identifier of the first ancient coin training image, determine a target ancient coin type template adjacent to the feature of the ancient coin training image from each ancient coin type template, and add the ancient coin training image to the ancient coin type pool corresponding to the target ancient coin type template; For each ancient coin type pool corresponding to each ancient coin type template, select the most representative ancient coin training image from the ancient coin type pool as the evolved ancient coin type template; Repeat the step of calculating the degree of fit between the coarse-grained image features of each ancient coin training image in the sample ancient coin image and the features of each ancient coin type template until the determined ancient coin type template meets the feature fluctuation threshold range; determine the ancient coin type identifier of the second ancient coin training image in the target ancient coin image set based on the ancient coin type identifier of the first ancient coin training image in the target ancient coin image set corresponding to the ancient coin type template that meets the feature fluctuation threshold range.
4. The method according to claim 2, characterized in that: The method of performing comparative learning on the coarse-grained image features of each ancient coin training image in the sample ancient coin images according to the ancient coin type identification of the first ancient coin training image to obtain the ancient coin type identification corresponding to the second ancient coin training image includes: According to the coarse-grained image features of the ancient coin training images, the sample feature fit between the ancient coin training images is determined; According to the sample feature fit, an ancient coin association hypergraph is constructed, wherein the ancient coin association hypergraph represents the association topology between each ancient coin training image; According to the ancient coin association hypergraph, type feature propagation processing is performed on the ancient coin type identification of the first ancient coin training image to obtain the ancient coin type identification corresponding to the second ancient coin training image.
5. The method according to claim 4, characterized in that The ancient coin association hypergraph includes a feature unit corresponding to each ancient coin training image and a topological connection between the feature units, wherein the topological connection represents the association topology between two connected feature units; The method of performing type feature propagation processing on the ancient coin type identifier of the first ancient coin training image according to the ancient coin association hypergraph to obtain the ancient coin type identifier corresponding to the second ancient coin training image includes: Performing type feature propagation processing on the ancient coin type identification of the first ancient coin training image through topological connections between feature units in the ancient coin association hypergraph to determine the reference ancient coin type identification of the second ancient coin training image; For each second ancient coin training image, the reference ancient coin type identification of the second ancient coin training image is predicted and iteratively optimized according to the adjacent feature units of the second ancient coin training image in the ancient coin association hypergraph until the results of the feature units in the ancient coin association hypergraph are stably determined, and the ancient coin type identification corresponding to the second ancient coin training image is obtained.
6. The method according to claim 2, characterized in that The method iteratively optimizes the parameters of the ancient coin recognition model according to the coarse-grained type confidence distribution, the fine-grained type confidence distribution, the multi-granularity feature alignment and the ancient coin type identification corresponding to the second ancient coin training image to obtain a target ancient coin recognition model, including: For each ancient coin training image, according to the fine-grained type confidence distribution of each ancient coin sub-image in the ancient coin training image and the multi-granular feature alignment corresponding to each ancient coin sub-image, the ancient coin type identification of the ancient coin training image is calibrated to obtain the calibrated ancient coin type identification of the ancient coin training image; According to the coarse-grained type confidence distribution corresponding to each ancient coin training image, the calibrated ancient coin type identification of each ancient coin training image is integrated to obtain the coarse-grained error parameter; According to the coarse-grained error parameter, the parameters of the ancient coin recognition model are iteratively optimized to obtain a target ancient coin recognition model.
7. The method according to claim 6, characterized in that The method of iteratively optimizing the parameters of the ancient coin recognition model according to the coarse-grained error parameter to obtain a target ancient coin recognition model includes: Calculate the fine-grained category error parameter of the ancient coin sub-image according to the fine-grained type confidence distribution of the ancient coin sub-image and the ancient coin type identifier of the ancient coin training image to which the ancient coin sub-image belongs; According to the coarse-grained error parameter and the fine-grained category error parameter, the parameters of the ancient coin recognition model are iteratively optimized to obtain a target ancient coin recognition model.
8. The method according to claim 7, characterized in that The iterative optimization of the parameters of the ancient coin recognition model according to the coarse-grained error parameter and the fine-grained category error parameter to obtain a target ancient coin recognition model includes: Performing distribution difference calculation processing on the fine-grained type confidence distribution of the ancient coin sub-image and the reference distribution to obtain a feature difference index corresponding to the ancient coin sub-image; According to the multi-granularity feature alignment corresponding to the ancient coin sub-image, the fine-grained category error parameter and the feature difference index are integrated to obtain the fine-grained error parameter of the ancient coin sub-image; According to the coarse-grained error parameter and the fine-grained error parameter corresponding to each ancient coin sub-image of the ancient coin training image, the parameters of the ancient coin recognition model are iteratively optimized to obtain a target ancient coin recognition model.
9. The method according to claim 2, characterized in that: The ancient coin recognition model is used to perform feature extraction processing on the ancient coin training image and each ancient coin sub-image of the ancient coin training image to obtain coarse-grained image features of the ancient coin training image and fine-grained image features corresponding to each ancient coin sub-image, including: Obtaining a visual feature set in a visual feature domain and an inscription feature set in a semantic feature domain of the ancient coin training image, and obtaining a visual sub-feature set in a visual feature domain and an inscription sub-feature set in a semantic feature domain of each ancient coin sub-image of the ancient coin training image; Performing cross-domain feature integration processing on the visual feature set and the inscription feature set of the ancient coin training image to obtain a multidimensional feature set corresponding to the ancient coin training image; performing cross-domain feature integration processing on the visual sub-feature set and the inscription sub-feature set of the ancient coin sub-image to obtain a multidimensional feature set corresponding to the ancient coin sub-image; Through the ancient coin recognition model, gated recurrent unit feature interaction is performed on the multidimensional feature set of the ancient coin training image to obtain the coarse-grained image features of the ancient coin training image; Through the ancient coin recognition model, the multi-dimensional feature set of the ancient coin sub-image is subjected to gated recurrent unit feature interaction to obtain the fine-grained image features of the ancient coin sub-image.
10. A server system, characterized in that: The method comprises a server, wherein the server is used to execute the method described in any one of claims 1 to 9.
Citation Information
Patent Citations
Mixed-granularity object recognition model training and recognition method and device and storage medium
CN110458233A
Intelligent identification method for ancient coins
CN117115628A
Expression recognition model training method and device
CN117894051A
Intelligent recognition device for Chinese herbal medicine
CN118781390A
Intelligent evaluation method and system based on ancient coin image
CN119313954A
Cited By
Object recognition method and related device
CN121074530A