Coin price evaluation method and system, and readable storage medium
By identifying the specific classification information and attribute information in the coin image and determining the price of the reference coin, the problem of insufficient accuracy in the evaluation of coin prices in the prior art is solved, and more accurate and reliable evaluation results are achieved.
Patent Information
- Application Number
- PCT/CN2024/102227
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-19
- Filing Date
- 2024-06-28
- Publication Date
- 2025-01-09
AI Technical Summary
The prior art has problems such as data differences and lack of evaluation accuracy in coin price evaluation, resulting in insufficient accuracy and reliability of coin price evaluation.
By obtaining the coin images provided by the user, using the pre-trained fixed-type model and coin attribute identification model, identifying the fixed-type classification information and attribute information of the coin, and determining the price of the reference coin based on this information, thereby providing a target estimation. This method includes data alignment processing and auditing processes to ensure the accuracy and consistency of information.
Improves the accuracy and reliability of coin price evaluation, reduces the subjectivity of manual evaluation, reduces the cost of evaluation, and provides an automated evaluation solution.
Smart Images

Figure CN2024102227_09012025_PF_FP_ABST
Abstract
Description
Coin price evaluation method, system and readable storage medium Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a coin price evaluation method, system and readable storage medium. Background Art
[0002] Coins contain a wealth of text and symbols, some of which are directly relevant to the coin's attribute analysis and value assessment, such as the year, mint mark, and face value. This information is typically inscribed on the coin at a specific angle, and users can capture images at any angle. Rotated coin images can be difficult to read and can also introduce ambiguity. Therefore, rotating the coin upright is essential for analyzing its surface content.
[0003] Furthermore, with the increasing enrichment of cultural life, various objects such as coins, badges, tickets, and banknotes are increasingly being circulated or collected. This circulation or collection process often necessitates an assessment of the prices of these objects. In some cases, this can be performed by specialized institutions or professionals, but this approach often requires significant and potentially high costs and is subject to subjectivity. In other cases, computer models can be used to automatically assess the value of these objects. However, current data used to construct computer models presents challenges. For example, raw data for coin prices must be obtained from various sources. However, the coin names, attribute classifications, grade classifications, prices, descriptions, evaluation information, and images from these sources may differ. These differences in raw data can lead to deficiencies in the accuracy and reliability of existing computer models. Therefore, there is a need to improve the evaluation methods for these objects.
[0004] Summary of the Invention
[0005] The present invention provides a coin price evaluation method, which comprises:
[0006] Obtain the image of the coin to be appraised provided by the user;
[0007] Identify the image of the coin to be evaluated based on a pre-trained classification model to obtain classification information of the coin to be evaluated;
[0008] Identify the image of the coin to be evaluated based on a pre-trained coin attribute recognition model to obtain attribute information of the coin to be evaluated;
[0009] Determining a reference coin for the coin to be evaluated based on the classification information and attribute information of the coin to be evaluated, and obtaining price information of the reference coin;
[0010] Based on the price information of the reference coin, a target valuation of the coin to be evaluated is determined and the target valuation information of the coin to be evaluated is fed back to the user.
[0011] In some embodiments, the attribute information of the coin to be valued includes: one or more of the coin's year information, minting identification information, grade classification information, description information, and reference price information.
[0012] In some embodiments, the pre-trained coin attribute recognition model is established through sample training using a plurality of pre-labeled reference coin samples in a coin sample database.
[0013] In some embodiments, the plurality of pre-labeled reference coin samples in the coin sample database undergoes a data alignment process, wherein the data alignment process comprises:
[0014] Obtaining the designated classification names of the plurality of reference coin samples, and storing reference coin samples having different designated classification names but belonging to the same designated classification according to a preset unified designated classification name as their designated classification information; for the remaining reference coin samples that cannot be classified and stored, calling a pre-trained designated classification model to perform recognition processing, and classifying and storing them according to the designated classification recognition results;
[0015] Obtain the grade classification names of multiple reference coin samples with the same fixed classification information, and store the reference coin samples with different grade classification names but belonging to the same grade classification according to the preset unified grade classification name as their grade classification information; for the remaining reference coin samples that cannot be classified and stored, call the pre-trained coin attribute recognition model for recognition processing, and classify and store them according to the grade classification recognition results.
[0016] In some embodiments, in the data alignment processing step: when the called pre-trained classification model is unable to identify and process the classification information of a reference coin sample, the corresponding review process is entered to identify and obtain the classification information of the reference coin sample; and when the called pre-trained coin attribute recognition model is unable to identify and process the grade classification information of a reference coin sample, the corresponding review process is entered to identify and obtain the grade classification information of the reference coin sample.
[0017] In some embodiments, the data alignment process further includes: obtaining year information and minting identification information of the plurality of reference coin samples, converting them uniformly according to a preset format, and storing them in a classified manner;
[0018] Reference price information of the plurality of reference coin samples is obtained, and is uniformly converted and stored in accordance with a preset currency unit.
[0019] In some embodiments, when any attribute information is missing in each pre-labeled reference coin sample in the coin sample database, a pre-trained coin attribute recognition model is called to identify and process the pre-labeled reference coin sample to obtain the corresponding attribute information. When any of the missing attribute information cannot be obtained through the corresponding pre-trained coin attribute recognition model, the corresponding review process is entered to identify and obtain the attribute information.
[0020] In some embodiments, the pre-trained coin attribute recognition model includes multiple different sub-attribute recognition models corresponding to the multiple attribute information: a coin year information recognition model, a coin casting identification information recognition model, a coin grade classification information recognition model, a coin description information recognition model and a coin reference price information recognition model. The multiple different sub-attribute recognition models are established after sample training through multiple pre-labeled reference coin samples in a coin sample database.
[0021] In some embodiments, the coin description information recognition model is trained and established in the following manner:
[0022] Using the reference coin sample image set to train the original visual encoder to obtain a trained visual encoder; wherein the visual encoder is used to obtain and output the visual features of each reference coin sample in the reference coin sample image set;
[0023] Training an original text encoder using text sets corresponding to the reference coin sample images included in the reference coin sample image set to obtain a trained text encoder; wherein the text encoder is used to obtain and output text features of the reference coin sample images, and the reference coin sample text sets include original description information and evaluation information of the reference coins;
[0024] Based on the visual features and the text features, coin description information features of each reference coin sample are determined.
[0025] In some embodiments, determining the coin description information characteristics of each reference coin sample includes:
[0026] Determining a description text of the reference coin sample based on the classification information of each reference coin sample and the visual features, in combination with a preset description template and a text set of the reference coin sample;
[0027] Input the description text as an input parameter into a trained text encoder, and the text encoder outputs the text features of the reference coin sample;
[0028] Based on the visual features and the text features, coin description information features of the reference coin sample are determined.
[0029] In some embodiments, the coin description information features of the reference coin samples acquired by the coin description information recognition model are input as input information into the pre-trained classification model and the other sub-attribute recognition model to assist in identifying and determining the classification information and other attribute information of the reference coin samples.
[0030] In some embodiments, the coin description information features of the reference coin samples obtained by the coin description information recognition model are combined with the price information of the reference coin samples to train and obtain the coin reference price information recognition model, which is used to identify and process the reference coin samples whose price information is missing in the reference coin samples to obtain the corresponding reference price information.
[0031] In some embodiments, determining a target valuation of the coin to be evaluated based on the price information of the reference coin and feeding back the target valuation information of the coin to be evaluated to the user includes:
[0032] When there is only one reference coin corresponding to the image of the coin to be evaluated, obtaining price information of the reference coin and outputting it as target valuation information of the image of the coin to be evaluated;
[0033] When there are multiple reference coins corresponding to the image of the coin to be evaluated, price information of the multiple reference coins is obtained and sorted, and the sorted price information range is output as the target valuation information of the image of the coin to be evaluated.
[0034] In some embodiments, identifying the image of the coin to be valued according to a pre-trained coin attribute recognition model to obtain attribute information of the coin to be valued includes:
[0035] In combination with the classification information of the coin to be valued, the attribute information of the coin to be valued is adjusted, wherein the adjustment process includes:
[0036] The coin issuance data corresponding to the classification information of the coin to be evaluated is obtained, the attribute information of the coin to be evaluated is compared with the coin issuance data, and the attribute information that does not match is adjusted.
[0037] In some embodiments, the adjustment process includes:
[0038] Comparing the year information of the coin to be evaluated with the coin issuance data, and when the year information in the coin issuance data contains only one issuance year information, discarding the year information identification result of the coin to be evaluated and using the issuance year information as its year information;
[0039] The casting identification information of the coin to be valued is compared with the coin issuance data. When the casting identification information in the coin issuance data only has one issuance casting identification information, the casting identification information identification result of the coin to be valued is discarded, and the issuance casting identification information is used as its casting identification information.
[0040] In some embodiments, the adjustment process includes:
[0041] Comparing the year information of the coin to be evaluated with the coin issuance data; when the year information in the coin issuance data includes multiple issuance year information, if the identification result of the year information with the first confidence ranking of the coin to be evaluated does not belong to the multiple issuance year information, using the identification result of the year information with the second confidence ranking as its year information; if the identification result of the year information with the second confidence ranking also does not belong to the multiple issuance year information, using the identification result of the year information with the third confidence ranking as its year information;
[0042] The casting identification information of the coin to be valued is compared with the coin issuance data. When the casting identification information in the coin issuance data has multiple issued casting identification information, if the identification result of the casting identification information with the first confidence ranking of the coin to be valued does not belong to the multiple issued casting identification information, the identification result of the casting identification information with the second confidence ranking is used as its casting identification information; if the identification result of the casting identification information with the second confidence ranking also does not belong to the multiple issued casting identification information, the identification result of the casting identification information with the third confidence ranking is used as its casting identification information.
[0043] In some embodiments, the method also includes providing an interactive interface for manual adjustment by the user, for adjusting the type classification information and attribute information of the coin to be evaluated, and determining the reference coin of the coin to be evaluated based on the adjusted type classification information and attribute information of the coin to be evaluated, and obtaining the price information of the reference coin.
[0044] In some embodiments, if the corresponding reference coin is not obtained under the current grade classification information, a reference coin of a lower grade classification information level is obtained, and the price information of the reference coin is obtained, and the target valuation information of the coin to be evaluated is determined to be greater than the price information of the reference coin.
[0045] According to another aspect of the present disclosure, a coin price evaluation system is proposed, including a processor and a memory, wherein the memory stores a program, and when the program is executed by the processor, the coin price evaluation method described above is implemented.
[0046] According to another aspect of the present disclosure, a readable storage medium is provided, on which a program is stored. When the program is executed, the coin price evaluation method described above is implemented.
[0047] The present invention provides a method for rectifying a coin, the method comprising:
[0048] Obtaining a coin image to be corrected provided by a user, and determining a coin surface area of the coin image to be corrected;
[0049] Expanding the coin surface area to obtain a first rectangular image;
[0050] Determine a corresponding standard image based on the coin surface area features, and scale the standard image to the same size as the coin surface area of the coin image to be corrected;
[0051] Expanding the processed standard image according to the same method to obtain a second rectangular image;
[0052] Splicing the two second rectangular images end to end in a horizontal direction to obtain a standard template matching image;
[0053] Determine a matching area in the standard template matching image according to the first rectangular image, and calculate a translation distance of the matching area relative to a starting point of the standard template matching image;
[0054] Calculating the rotation angle of the coin image to be corrected relative to the standard image according to the translation distance;
[0055] The coin image to be turned right is rotated counterclockwise according to the rotation angle, thereby obtaining a righted coin image.
[0056] In some embodiments, the coin surface area of the coin image to be corrected is obtained after the coin image to be corrected is identified by a pre-trained coin area recognition model.
[0057] In some embodiments, the coin surface area of the coin image to be corrected is obtained after the edge of the coin surface area in the coin image to be corrected is determined by an edge detection algorithm.
[0058] In some embodiments, the expansion process of the coin face area and the standard image is performed by coordinate transformation, and the coordinate transformation is performed based on the following formula:
[0059] x1=r1cosθ1,
[0060] y1=r1sinθ1,
[0061] x1 2+y1 2 =r1 2 ,
[0062] Wherein, (r1, θ1) is the polar coordinate of any point A on the image to be processed before coordinate conversion, and (x1, y1) is the rectangular coordinate of point A' corresponding to point A on the expanded rectangular image after coordinate conversion.
[0063] In some embodiments, determining the corresponding standard image according to the coin surface area feature includes:
[0064] Identify the coin surface area according to the pre-trained classification model to obtain classification information and coin surface attribute information of the coin to be corrected;
[0065] According to the classification information and coin surface attribute information of the coin to be corrected, a corresponding standard image is obtained from a preset reference image set.
[0066] In some embodiments, determining the corresponding standard image according to the coin surface area feature includes:
[0067] Calculating the similarity between the coin surface area feature and the feature of all standard images in a preset reference image set according to a similarity algorithm;
[0068] The standard image with the highest similarity is determined as the standard image corresponding to the coin to be corrected.
[0069] In some embodiments, determining a matching area in the standard template matching image according to the first rectangular image includes:
[0070] A template matching algorithm is used to determine a matching area in the standard template matching image based on the first rectangular image, where the template matching algorithm is:
[0071] Wherein, R represents the matching value, T(x′, y′) represents each pixel on the first rectangular image, and I(x, y) represents each pixel on the corresponding standard template matching image.
[0072] In some embodiments, calculating the rotation angle of the coin image to be corrected relative to the standard image based on the translation distance includes using the following formula:
[0073] Among them, L offset represents the translation distance, and L represents the length of the second rectangular image.
[0074] According to another aspect of the present disclosure, a coin straightening processing system is proposed, including a processor and a memory, wherein the memory stores a program, and when the program is executed by the processor, the coin straightening processing method described above is implemented.
[0075] According to another aspect of the present disclosure, a readable storage medium is provided, on which a program is stored. When the program is executed, the coin turning method described above is implemented.
[0076] Other features and advantages of the present disclosure will become more apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0078] FIG1 is a schematic flow chart of a coin rectilinear processing method according to an embodiment of the present invention.
[0079] FIG2 is a schematic diagram showing a coin image expansion process according to an embodiment of the present invention.
[0080] FIG3 is a schematic diagram showing a method of calculating a translation distance of a matching area relative to a starting point of a standard template matching image according to an embodiment of the present invention.
[0081] FIG4 is a schematic diagram showing a method of performing counterclockwise rotation processing on a coin image to be straightened according to a rotation angle according to an embodiment of the present invention.
[0082] FIG5 is a schematic diagram showing the structure of a coin recognizing processing system or a coin price evaluation system provided by an embodiment of the present invention.
[0083] FIG6 is a flow chart showing a method for evaluating coin prices according to an embodiment of the present invention.
[0084] FIG. 7 is a schematic diagram showing the valuation result of a coin to be valued according to a preferred embodiment of the present invention.
[0085] FIG8 is a schematic diagram showing the valuation results of another coin to be valued according to a preferred embodiment of the present invention.
[0086] FIG9 is a schematic diagram showing the valuation result of a coin to be valued before the year information is manually adjusted according to a preferred embodiment of the present invention.
[0087] FIG10 is a schematic diagram showing the valuation result of a coin to be valued after the year information is manually adjusted according to a preferred embodiment of the present invention.
[0088] Note that in the embodiments described below, the same reference numerals are sometimes used in common across different drawings to denote the same parts or parts having the same functions, and their repeated descriptions are omitted. In some cases, similar reference numerals and letters are used to denote similar items, so once an item is defined in one drawing, it need not be further discussed in subsequent drawings.
[0089] For ease of understanding, the positions, sizes, and ranges of various structures shown in the drawings and the like may not represent actual positions, sizes, and ranges, etc. Therefore, the present disclosure is not limited to the positions, sizes, and ranges disclosed in the drawings and the like. DETAILED DESCRIPTION
[0090] Various exemplary embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure.
[0091] The following description of at least one exemplary embodiment is merely illustrative and is not intended to limit the present disclosure, its application, or use. That is, the structures and methods herein are presented by way of example only to illustrate various embodiments of the structures and methods of the present disclosure. However, those skilled in the art will appreciate that these are merely illustrative of exemplary embodiments of the present disclosure that may be implemented, and are not intended to be exhaustive. Furthermore, the drawings are not necessarily drawn to scale; some features may be exaggerated to illustrate details of specific components.
[0092] Technologies, methods and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, such technologies, methods and equipment should be considered part of the authorization specification.
[0093] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0094] Please refer to FIG6 , which is a flow chart of a coin price evaluation method according to an embodiment of the present invention.
[0095] The present invention provides a coin price evaluation method, which comprises:
[0096] Step S100: Obtaining the image of the coin to be evaluated provided by the user;
[0097] Step S200: identifying the image of the coin to be evaluated according to the pre-trained classification model to obtain classification information of the coin to be evaluated;
[0098] Step S300: identifying the image of the coin to be evaluated according to the pre-trained coin attribute recognition model to obtain attribute information of the coin to be evaluated;
[0099] Step S400: determining a reference coin for the coin to be evaluated based on the classification information and attribute information of the coin to be evaluated, and obtaining price information of the reference coin;
[0100] Step S500: Based on the price information of the reference coin, a target valuation of the coin to be valued is determined and the target valuation information of the coin to be valued is fed back to the user.
[0101] In some embodiments, the attribute information of the coin to be valued includes: one or more of the coin's year information, minting identification information, grade classification information, description information, and reference price information.
[0102] The year information of the coin refers to the year of issuance of the coin, which is generally printed on the denomination side or non-denomination side of the coin. In addition, some coins do not have the issuance year information printed on them. The year information may be printed in different formats in different regions.
[0103] The mint mark is a small additional mark that indicates which mint the coin came from. Most of these marks are letters, but there are also symbols. Mint mark information is very important for coin enthusiasts and collectors, and it may even directly affect the collection value of the coin. The mint mark information does not necessarily appear on any side of the coin. It may appear on the denomination side, the non-denomination side, or even the side. The mint mark categories of coins from different countries may be different, and the mint marks of the same coin in the same country may also be different. For example, the mint marks of the same mint in the same country may also change at different times. Taking US coins as an example, common mint marks include P, D, CC, S, W, O, etc. Some coins do not have mint marks engraved.
[0104] Grade classification information refers to the grade classification system that arises from the need to evaluate the appearance of coins during their circulation or collection process. There are currently a variety of coin grade classification systems on the market, including descriptive grading methods and numerical grading methods. For example, the Professional Coin Grading Service (PCGS) evaluation system divides coins of different appearances into multiple different grade categories. In addition, there are certain differences between different coin grade classification evaluation systems, and the number and description of the grade categories they divide are not exactly the same.
[0105] Descriptive information refers to the descriptive text information of the coin, which includes the descriptive title or detailed content introduction of the current coin and the corresponding evaluation and comment information. It generally does not have a standard or unified format, and the information is relatively complex and arbitrary. Some coins may lack this information.
[0106] The reference price information refers to the estimated price or actual transaction price of the coin, which represents the reference value of the current coin. It can be the price information estimated by referring to the grade classification and historical transaction records of the reference coin, or it can be the actual transaction price information of the current coin.
[0107] In some embodiments, the pre-trained coin attribute recognition model is established after sample training with multiple pre-labeled reference coin samples in a coin sample database. In order to establish a coin attribute recognition model, it is necessary to train the computer model based on a pre-collected training set. In some cases, the accuracy and reliability of the computer model can also be tested based on a pre-collected test set. To this end, for each coin type, at least a training set marked with different types of attribute information of the reference coin sample needs to be prepared, and a training set formed by multiple reference coin sample images is stored in the coin sample database. For example, the training set can be obtained from an external coin website, etc., to collect reference coin images with corresponding attribute information or further manually annotate the corresponding attribute information for use in training the coin attribute recognition model.
[0108] However, there are certain problems with the training data that can be collected at present. The reference coin samples currently collected from external coin websites are relatively messy and have not been effectively classified and organized. For example, some coin samples are classified according to several major categories such as circulation coins, collectible coins, commemorative coins, and investment coins, and some are further classified according to different regions such as countries and regions. Some reference coin samples are missing one or more corresponding attribute information, the year information format of different reference coin samples may be inconsistent, the format and marking method of the casting identification information may also be different, and the grade classification information of the same type of reference coin samples may use different coin grade classification evaluation systems. At the same time, the description information of the reference coin samples is relatively messy and has no unified format and standard. The price unit of the corresponding reference price information needs to be unified. Therefore, it is necessary to organize and classify the attribute information of these reference coin sample data and align the data.
[0109] In some embodiments, the plurality of pre-labeled reference coin samples in the coin sample database undergoes a data alignment process, wherein the data alignment process comprises:
[0110] Obtain the designated classification names of the multiple reference coin samples. For reference coin samples with different designated classification names but belonging to the same designated classification, store them according to a preset unified designated classification name as their designated classification information. For the remaining reference coin samples that cannot be classified and stored, call a pre-trained designated classification model for recognition processing and classify and store them according to the designated classification recognition results. The same reference coin sample may have different designated classification names (i.e., different common names) or non-standard naming methods for different users or different regions, but in fact they belong to the same designated classification. Therefore, they need to be unified and can be adjusted to the preset unified designated classification name for storage. By setting corresponding preset classification rules or setting corresponding key character determination rules, multiple reference coin samples that essentially belong to the same designated classification can be unified and stored using the unified designated classification name as their designated classification information for subsequent use. After traversing all the reference coin sample data in the coin sample database and performing alignment processing on the fixed classification information, there may still be some reference coin samples that cannot be classified into fixed classification information according to the preset rules. At this time, the pre-trained fixed classification model can be called to identify these reference coin samples in order to obtain their fixed classification identification results, and then perform corresponding classification storage.
[0111] The grade classification names of multiple reference coin samples with the same fixed classification information are obtained. For reference coin samples with different grade classification names but belonging to the same grade classification, the reference coin samples are stored according to a preset unified grade classification name as their grade classification information. For the remaining reference coin samples that cannot be classified and stored, a pre-trained coin attribute recognition model is called to perform recognition processing, and the samples are classified and stored according to the grade classification recognition results. The same reference coin sample may have its grade classification information determined under different coin grade classification evaluation systems, or its grade classification naming may be less than standardized, resulting in the same reference coin sample belonging to the same grade classification having different grade classification information. Therefore, a unified setting is required. Therefore, the grade classification information can be determined using the preset unified coin grade classification evaluation system. In actual processing, the grade classification information in different coin grade classification evaluation systems can be converted to the corresponding grade classification information under the preset unified coin grade classification evaluation system by using the preset unified grade classification information naming rules or setting corresponding key character determination rules. After traversing all the reference coin sample data in the coin sample database and performing grade classification information alignment processing, there may still be some reference coin samples that cannot be classified into grade classification information according to the preset rules. At this time, the pre-trained coin attribute recognition model can be called to perform recognition processing on these reference coin samples in order to obtain their grade classification recognition results, and then perform corresponding classification storage.
[0112] In some embodiments, during the data alignment process, when the pre-trained seed classification model invoked is unable to identify and process the seed classification information of a reference coin sample, the corresponding audit process is entered to identify and obtain the seed classification information of the reference coin sample; and when the pre-trained coin attribute recognition model invoked is unable to identify and process the grade classification information of a reference coin sample, the corresponding audit process is entered to identify and obtain the grade classification information of the reference coin sample. In the actual processing process, there may be some reference coin samples for which the seed classification information cannot be obtained through the pre-trained seed classification model, or whose grade classification information cannot be obtained through the pre-trained coin attribute recognition model. In this case, it is necessary to enter the corresponding audit process for identification processing, for example, the sample can be fed into a dedicated audit model or a manual audit client for sample identification and labeling of the corresponding attribute information.
[0113] In some embodiments, the data alignment process also includes: obtaining the year information and casting identification information of the multiple reference coin samples, and uniformly converting and categorizing them according to a preset format; the formats of the year information and casting identification information of different countries and regions may not be consistent, and reference coin images from different sources may also have different annotation methods. For example, some coins may use the local language to print the year information and casting identification information, and some coins may additionally print the issuance month information, and the front and back positions of the year and month may also be inconsistent. At the same time, some reference coin images may be annotated in different ways to conform to the language expression and annotation habits of the annotators involved in their sources, or the display information format of the source website. This leads to the diversity of samples, so a unified conversion process is required to uniformly convert them according to the preset format and categorize them for storage.
[0114] Reference price information for the multiple reference coin samples is obtained, uniformly converted according to a preset currency unit, and categorized and stored. The price calculation units of the multiple reference coin samples vary across countries and regions, such as US dollars, euros, Japanese yen, and RMB. Therefore, uniform conversion and categorized storage are required. For example, the price information can be uniformly converted and stored according to US dollars.
[0115] In some embodiments, when any attribute information is missing from each pre-annotated reference coin sample in the coin sample database, a pre-trained coin attribute recognition model is invoked to perform recognition processing on the pre-annotated reference coin sample to obtain the corresponding attribute information. When any missing attribute information cannot be obtained through the corresponding pre-trained coin attribute recognition model, the corresponding review process is entered to identify and obtain the attribute information. Because the reference coin samples in the coin sample database come from different sources, one or more attribute information including year information, minting identification information, grade classification information, description information, and reference price information may be missing from some reference coin samples. Therefore, the pre-trained coin attribute recognition model can be invoked to identify and obtain the missing attribute information. In actual processing, some reference coin samples may not have attribute information obtained through the pre-trained coin attribute recognition model. In this case, the corresponding review process needs to be entered for recognition processing, such as by a dedicated review model or a manual review client to perform sample recognition and annotate the corresponding attribute information.
[0116] In some embodiments, the pre-trained coin attribute recognition model includes multiple different sub-attribute recognition models corresponding to the multiple attribute information: a coin year information recognition model, a coin minting identification information recognition model, a coin grade classification information recognition model, a coin description information recognition model, and a coin reference price information recognition model. The multiple different sub-attribute recognition models are established through sample training using multiple pre-labeled reference coin samples from a coin sample database. That is, the pre-trained coin attribute recognition model can be a unified recognition model for recognizing different attribute information, or it can include multiple different sub-attribute recognition models, each used to recognize different attribute information. Independent sub-attribute recognition models can improve recognition accuracy and speed and reduce resource usage.
[0117] In some embodiments, the coin description information recognition model is trained and established in the following manner:
[0118] Using the reference coin sample image set to train the original visual encoder to obtain a trained visual encoder; wherein the visual encoder is used to obtain and output the visual features of each reference coin sample in the reference coin sample image set;
[0119] The original text encoder is trained using the text sets corresponding to the reference coin sample images included in the reference coin sample image set to obtain a trained text encoder; wherein the text encoder is used to obtain and output the text features of the reference coin samples, and the reference coin sample text set includes the original description information and evaluation information of the reference coins; based on the visual features and the text features, the coin description information features of the reference coin samples are determined.
[0120] Taking supervised learning as an example, the original visual encoder can be trained using a set of labeled reference coin sample images until its loss function converges. During the training process, the visual encoder outputs the visual features of the sample reference coins in the image. For example, the visual encoder can output visual features with a dimension of [1×1024].
[0121] The reference coin sample text set is not structured, making it difficult to process model data. To effectively utilize the original descriptive and evaluation information of the reference coins in the reference coin sample text set, a text encoder capable of text feature extraction can be introduced during the training process. This encoder can extract text features from each reference coin sample and express them as fixed-dimensional fuzzy labels using a structured language. The text encoder can accurately extract key information from the original descriptive and evaluation information of the reference coins, such as one or more attributes of the reference coins' year, minting identification, grade classification, description, and reference price, and express the corresponding text features as fixed-dimensional fuzzy labels using a structured language.
[0122] Specifically, a pre-trained open source text encoder can be used to extract text features from the reference coin sample text set. For example, a pre-trained natural language processing model such as Transformer can be used to obtain text features of each reference coin sample. For example, the text encoder can output text features with a dimension of [1×1024].
[0123] Then, the coin description information features of each reference coin sample can be obtained by splicing the visual features and the text features. For example, by fusing the visual features and the text features, a coin description information feature with a dimension of [1×2048] can be obtained.
[0124] In some embodiments, determining the coin description information characteristics of each reference coin sample includes:
[0125] Determining a description text of the reference coin sample based on the classification information of each reference coin sample and the visual features, in combination with a preset description template and a text set of the reference coin sample;
[0126] Input the description text as an input parameter into a trained text encoder, and the text encoder outputs text features of the reference coin sample;
[0127] Based on the visual features and the text features, coin description information features of the reference coin sample are determined.
[0128] Specifically, based on the foregoing, the trained visual encoder can output the visual features of the coin object in the reference coin sample image, and combine it with the previously determined fixed classification information to which it belongs, and then combine it with the preset description template corresponding to the target fixed classification. The template can be filled in based on the visual features to obtain the description text of the coin object. For example, it can be identified that the type of coin object is USA 1 dollar, and the corresponding description text obtained by filling in the template is {This is, The photo of a} {Very Fine, shiny, detail clear, light wear} USA 1 dollar.
[0129] By inputting the description text as an input parameter into the trained text encoder, the text features of the coin object can be obtained. Finally, the coin description information features of the coin object can be determined by splicing the visual features and the text features.
[0130] In some embodiments, the coin description information features of the reference coin samples acquired by the coin description information recognition model are input as input information into the pre-trained classification model and the other sub-attribute recognition model to assist in identifying and determining the classification information and other attribute information of the reference coin samples.
[0131] Furthermore, the coin description information features can be processed through a convolutional neural network, expressed as coin description information features of dimension [1×512] via the convolutional layer. These coin description information features of dimension [1×512] are then input into the pre-trained coin identification model and the other sub-attribute recognition model to assist in identifying the coin classification information and other attribute information of the reference coin sample. Using the acquired coin description information features as supplementary information to assist the coin identification model and the sub-attribute recognition model can improve the recognition accuracy of the corresponding models, thereby obtaining more accurate recognition results.
[0132] In some embodiments, the coin description information features of each reference coin sample obtained by the coin description information recognition model are combined with the price information of the reference coin sample to train and obtain the coin reference price information recognition model, which is used to identify and process the reference coin sample whose price information is missing in the reference coin sample to obtain the corresponding reference price information. Combining the coin description information features with the price information of the reference coin sample can more accurately reflect the image features and text features corresponding to the current price information of the reference coin sample. The coin reference price information recognition model trained in this way can perform price estimation processing on the reference coin sample that lacks price information to obtain its reference price information. Subsequently, when estimating the target valuation information of the coin to be valued, the coin reference price information recognition model can also be directly used to perform recognition processing and obtain it, and after comparison with the other valuation method mentioned below, a comprehensive judgment is made to determine the final target valuation information.
[0133] In some embodiments, determining a target valuation of the coin to be evaluated based on the price information of the reference coin and feeding back the target valuation information of the coin to be evaluated to the user includes:
[0134] When there is only one reference coin corresponding to the image of the coin to be evaluated, obtaining price information of the reference coin and outputting it as target valuation information of the image of the coin to be evaluated;
[0135] When there are multiple reference coins corresponding to the image of the coin to be evaluated, price information of the multiple reference coins is obtained and sorted, and the sorted price information range is output as the target valuation information of the image of the coin to be evaluated.
[0136] Please refer to Figure 7, which shows a schematic diagram of the valuation results for a coin to be evaluated according to a preferred embodiment of the present invention. The coin's genus classification information is identified as "USA 1 dollar, Morgan Dollar," mintage identification information is missing, and year information is identified as "1892." Its grade classification information is also identified as "VF (Very Fine)." Based on the genus classification information and the aforementioned multiple attribute information, the reference coin for the coin to be evaluated is determined to be a VF (Very Fine) grade "USA 1 dollar, Morgan Dollar 1892." A corresponding reference coin is then searched in a coin sample database, revealing that only one reference coin exists. The price information obtained for the reference coin is $45. Therefore, $45 is set as the target valuation price for the coin to be evaluated, and the target valuation information "Reference Price" of $45 is displayed to the user.
[0137] Referring again to FIG8 , FIG8 is a schematic diagram illustrating the valuation results of another coin to be valued according to a preferred embodiment of the present invention. The coin's type classification information is identified as "USA 1 dollar, President of the USA - Thomas Jefferson (1801-1809)", its mintage identification information is identified as "D", its year information is identified as "2007", and its grade classification information is identified as "MS (Mint State) 65". A corresponding reference coin is then found in a coin sample database, and multiple corresponding reference coins with the same grade classification are found. Price information for the multiple reference coins is obtained and sorted from low to high. The lowest price value of $1.5 and the highest price value of $23 are selected as a price information range. This sorted price information range is then output as the target valuation information for the image of the coin to be valued, and the target valuation information "Reference price" of the coin to be valued is displayed to the user as "$1.5-$23".
[0138] In some embodiments, the price information of the corresponding reference coins in the coin sample database can also be stored separately according to the auction price and the ordinary transaction price, and when the target valuation information of the coin to be valued is subsequently fed back to the user, the corresponding price or price range information is also displayed according to the different groupings of auction price and ordinary transaction price.
[0139] In some embodiments, the image of the coin to be evaluated is identified according to a pre-trained coin attribute recognition model, and obtaining the attribute information of the coin to be evaluated includes: adjusting the attribute information of the coin to be evaluated in combination with the type and classification information of the coin to be evaluated, wherein the adjustment processing includes: obtaining the coin issuance data corresponding to the type and classification information of the coin to be evaluated, comparing the attribute information of the coin to be evaluated with the coin issuance data, and adjusting the attribute information that does not match.
[0140] In some embodiments, the adjustment process includes:
[0141] The year information of the coin to be evaluated is compared with the coin issuance data. When the year information in the coin issuance data only contains one issuance year information, the year information identification result of the coin to be evaluated is discarded, and the issuance year information is used as its year information. For example, the year information of a certain coin to be evaluated is identified as "1932", but in fact, according to the classification information of the current coin to be evaluated, its actual issuance year information is only "1982". Since the number "8" is partially worn and is identified as "3", the year information identification result "1932" will be discarded, and the issuance year information "1982" will be directly used as the year information of the current coin to be evaluated.
[0142] The mintage identification information of the coin to be evaluated is compared with the coin issuance data. If the mintage identification information in the coin issuance data only contains the issuance mintage identification information, the mintage identification information identification result of the coin to be evaluated is discarded, and the issuance mintage identification information is used as the mintage identification information of the coin to be evaluated. For example, if the mintage identification information of a coin to be evaluated is identified as "D", but according to the classification information of the coin to be evaluated, the actual issuance mintage identification information is only "B", and it is identified as "D" due to partial wear, the mintage identification information identification result "D" is discarded, and the issuance mintage identification information "B" is directly used as the mintage identification information of the coin to be evaluated.
[0143] In some embodiments, the adjustment process includes:
[0144] The year information of the coin to be valued is compared with the coin issuance data. When the year information in the coin issuance data has multiple issuance year information, if the year information identification result with the first confidence ranking of the coin to be valued does not belong to the multiple issuance year information, the year information identification result with the second confidence ranking is used as its year information; if the year information identification result with the second confidence ranking also does not belong to the multiple issuance year information, the year information identification result with the third confidence ranking is used as its year information; in actual processing, if the year information identification result of the current coin to be valued has multiple years, but the top1 of the identification result is not within the year information range in the coin issuance data, the top2 year identification result is taken; if the top2 result is also not within the range, the top3 year identification result is taken, and so on, until the year information is obtained. If all identification results are not within the range, they are processed as missing and the user manually fills in the relevant information.
[0145] The minting identification information of the coin to be valued is compared with the coin issuance data. When the minting identification information in the coin issuance data contains multiple issued minting identification information, if the minting identification information identification result with the highest confidence ranking of the coin to be valued does not fall within the multiple issued minting identification information, the minting identification information identification result with the second highest confidence ranking is used as the minting identification information. If the minting identification information identification result with the second highest confidence ranking also does not fall within the multiple issued minting identification information, the minting identification information identification result with the third highest confidence ranking is used as the minting identification information. In actual processing, if the minting identification information identification result of the current coin to be valued has multiple minting identifications, but the top 1 identification result is not within the range of minting identification information in the coin issuance data, the top 2 minting identification identification result is used. If the top 2 result is also not within the range, the top 3 minting identification identification result is used, and so on, until the minting identification information is obtained. If all identification results are not within the range, it is treated as missing and the user manually fills in the relevant information.
[0146] In some embodiments, the method further includes providing a user-manually adjustable interface for adjusting the type classification and attribute information of the coin to be appraised, and determining a reference coin for the coin to be appraised based on the adjusted type classification and attribute information of the coin to be appraised, and obtaining price information for the reference coin. Please refer to Figures 9 and 10, which are schematic diagrams of the valuation results of a coin to be appraised before and after manual adjustment of the year information, respectively, according to a preferred embodiment of the present invention. In Figure 9, the year information of the coin to be appraised is missing, and a user-manually adjustable interface is provided. At this time, the target price information "Reference price" of the coin to be appraised, "USA 1 / 2 dollar, Columbian Exposition", is "$14-$67." In Figure 10, the user manually enters "1892" as the year information of the coin to be appraised. Based on the new year information, the target price information "Reference price" of the coin to be appraised, "USA 1 / 2 dollar, Columbian Exposition 1892", is adjusted to "$14-$33" for display.
[0147] In some embodiments, the final confirmation result of the year information of the coin to be appraised can also in turn affect the categorization information (i.e., the lowest-level categorization information in the coin type attribute) in the identification result of the coin to be appraised. For example, if the coin to be appraised has only one categorization under the current year information, it will be directly displayed, such as "USA 1 dollar, Morgan Dollar 1892". If there are multiple categorizations, the year information and mintage identification information are combined to select the corresponding categorization information for display. For example, if there is only one categorization under the year information and mintage identification combination, it will be directly displayed, such as "USA 1 dollar, President of the USA - Thomas Jefferson (1801-1809) 2007-D". If there are multiple categorization information and the model cannot accurately identify the coin, the user can be provided with the option to select a different common name or the shortest common name can be automatically selected. Coins with different year information, mintage identification information, and categorization information all have different target price information. Therefore, after obtaining the above attribute information, the corresponding price range will be selected and displayed as the target valuation information.
[0148] In some embodiments, if no corresponding reference coin is obtained under the current grade classification information, a reference coin with a grade classification information level lower than the current one is obtained, and the price information of the reference coin is obtained, and the target valuation information of the coin to be evaluated is determined to be greater than the price information of the reference coin. For example, if a coin to be evaluated does not have the price information of a corresponding reference coin under grade classification information MS69, but has the price information of a corresponding reference coin under grade classification information MS68 of $450 or the highest price range of $450, then when the current grade classification information of the coin to be evaluated is MS69, the target valuation information will be displayed as greater than the reference price of grade classification information MS68, for example, as ">$450".
[0149] The coin price evaluation method also includes:
[0150] Before obtaining the image of the coin to be evaluated provided by the user, the coin image is straightened.
[0151] Please refer to FIG1 , which is a flow chart of a method for rectifying a coin according to an embodiment of the present invention.
[0152] The present invention provides a method for rectifying a coin, the method comprising:
[0153] Step SS100: obtaining a coin image to be corrected provided by a user, and determining a coin surface area of the coin image to be corrected;
[0154] Step SS200: Expanding the coin surface area to obtain a first rectangular image;
[0155] Step SS300: determining a corresponding standard image based on the features of the coin surface area, and scaling the standard image to the same size as the coin surface area of the coin image to be corrected;
[0156] Step SS400: Expanding the processed standard image in the same manner to obtain a second rectangular image;
[0157] Step SS500: performing end-to-end splicing processing on the two second rectangular images in the horizontal direction to obtain a standard template matching image;
[0158] Step SS600: determining a matching area in the standard template matching image according to the first rectangular image, and calculating a translation distance of the matching area relative to a starting point of the standard template matching image.
[0159] Step SS700: Calculating the rotation angle of the coin image to be straightened relative to the standard image based on the translation distance;
[0160] Step SS800: rotating the coin image to be upright counterclockwise according to the rotation angle, thereby obtaining an upright coin image.
[0161] In some embodiments, the coin surface area of the coin image to be corrected is obtained by identifying the coin image to be corrected using a pre-trained coin area recognition model. The pre-trained coin area recognition model is established after sample training using a plurality of pre-labeled reference coin samples in a sample training set, wherein the plurality of pre-labeled reference coin samples are labeled with corresponding coin areas. In some cases, the accuracy and reliability of the coin area recognition model can also be tested based on a pre-collected test set. The training set or test set can be obtained from different sources such as external coin websites to collect reference coin images and further label the corresponding coin area ranges for use in training the coin area recognition model.
[0162] In some embodiments, the coin surface area of the coin image to be corrected is obtained after determining the edge of the coin surface area in the coin image to be corrected using an edge detection algorithm. For example, the coin edge in the image can be determined using an OpenCV-based edge detection algorithm to determine the coin surface area of the coin image to be corrected.
[0163] In some embodiments, the expansion process of the coin face area and the standard image is performed by coordinate transformation, and the coordinate transformation is performed based on the following formula:
[0164] x1=r1cosθ1,
[0165] y1=r1sinθ1,
[0166] x1 2 +y1 2 =r1 2 ,
[0167] Among them, (r1, θ1) are the polar coordinates of any point A on the image to be processed before the coordinate conversion, and (x1, y1) are the rectangular coordinates of the point A' corresponding to point A on the expanded rectangular image after the coordinate conversion. The coin expansion diagram obtained by the above coin image expansion process is shown in Figure 2. The outer contour of the coin expansion diagram is rectangular to facilitate further processing. The coin image expansion process is converted from the polar coordinate system to the rectangular coordinate system, which is equivalent to taking the center of the coin as the center of the circle and expanding from the dotted line in the direction of the arrow to obtain the rectangular image shown on the right side of Figure 2, and the length is recorded as L. In some embodiments, the coin face area of the coin image to be corrected is expanded to obtain a first rectangular image with a length of L.
[0168] In some embodiments, determining the corresponding standard image based on the coin surface area features includes: identifying the coin surface area based on a pre-trained classification model to obtain the classification information and surface attribute information of the coin to be rectified; and obtaining the corresponding standard image from a preset reference image set based on the classification information and surface attribute information of the coin to be rectified.
[0169] The pre-trained seeding model can be a classifier model derived from neural network training. For example, it can be trained based on a deep convolutional neural network using a cross-entropy loss function and a stochastic gradient descent algorithm. It is understood that other loss functions or algorithms can also be used to train the classifier model. During the training process, the classifier model is typically trained using a training set until a preset accuracy rate is achieved. In some cases, the accuracy of the trained classifier model can also be tested using a test set as needed. If the accuracy rate does not meet the required accuracy, the number of samples in the training set can be increased, and the classifier model can be retrained using the updated training set until the trained classifier model's accuracy rate meets the required accuracy rate. The trained classifier model can be deployed to a server for coin identification and seeding. In some embodiments, the pre-trained seeding model can also be used to determine coin surface attribute information of the coin to be corrected, as represented by an image of the coin surface area. For example, determining whether the image of the coin to be corrected represents the obverse or reverse side of the coin can be used to determine the accuracy of the coin.
[0170] The preset reference image set includes a plurality of standard images of coins of different classifications, and each standard image of a coin of a different classification includes an image of the front and back sides. The classification information of the coin to be corrected is used to determine which category the coin belongs to, and then the coin face attribute information is used to determine whether the coin is the front or back side. Thus, the corresponding standard image is obtained from the preset reference image set based on the classification information and the coin face attribute information of the coin to be corrected. For example, if the classification information of a coin to be corrected is identified as "USA 1 dollar, President of the USA - Thomas Jefferson (1801-1809) 2007-D" and the coin face attribute information is identified as the front side, then a standard image of the front side coin with the classification information "USA 1 dollar, President of the USA - Thomas Jefferson (1801-1809) 2007-D" is found in the preset reference image set for subsequent processing.
[0171] In some embodiments, determining a corresponding standard image based on the coin face region features includes: calculating feature similarities between the coin face region features and all standard images in a preset reference image set using a similarity algorithm; and determining the standard image with the highest similarity as the standard image corresponding to the coin to be corrected. For example, if the similarity algorithm calculates that the front-facing coin image in the preset reference image set with the classification information "USA 1 dollar, President of the USA - Thomas Jefferson (1801-1809) 2007-D" has the highest feature similarity with the coin to be corrected, then this image will be used as the standard image for subsequent processing.
[0172] After obtaining the standard image corresponding to the coin image to be corrected, the standard image needs to be scaled to the same size as the coin image to be corrected, so that subsequent comparison and processing can be performed under the same size standard. The standard image is then expanded using the same processing method to obtain a second rectangular image, also of length L. The two second rectangular images are then spliced end to end horizontally to obtain a standard template matching image. The length of the spliced standard template matching image is 2L, as shown in Figure 3. The standard template matching image is represented by I, and the first rectangular image obtained from the coin image to be corrected is represented by T.
[0173] In some embodiments, determining a matching area in the standard template matching image according to the first rectangular image includes:
[0174] A template matching algorithm is used to determine a matching area in the standard template matching image based on the first rectangular image, where the template matching algorithm is:
[0175] Where R represents the matching value, T(x′, y′) represents each pixel on the first rectangular image, and I(x, y) represents each pixel on the corresponding standard template matching image. The higher the R value, the higher the matching degree. In this way, the coordinates of the matching area can be obtained, that is, the dotted area in Figure 3, and then the translation distance L of the matching area relative to the starting point can be obtained. offset .
[0176] In actual processing, the template matching algorithm is used to perform matching processing by traversing each area as large as the first rectangular image T on the standard template matching image I. The matching degree of each area is calculated according to the formula of the template matching algorithm above. The area with the highest matching degree is the matching result.
[0177] On the standard template matching image I, we traverse each region of the same size as the first rectangular image T. Assuming the first rectangular image T is a w*h region, with x' traversing values from [0, w] and y' traversing values from [0, h], then on the standard template matching image I, the corresponding position (x, y) needs to be an area of the same size as the first rectangular image T. That is, the x coordinate takes the value of traversing [x, x+w], and the y coordinate takes the value of traversing [y, y+h]. Through one-to-one matching calculations, the actual value of the x coordinate on the standard template matching image I corresponds to the first rectangular image T, which should be x+x'. That is, we traverse (x, y) on the standard template matching image I, taking the [x, x+w]*[y, y+h] region. For each position on the first rectangular image T, we correspond to the corresponding position (x, y) on the standard template matching image I to calculate the matching degree.
[0178] In some embodiments, calculating the rotation angle of the coin image to be corrected relative to the standard image based on the translation distance includes using the following formula:
[0179] Among them, L offset represents the translation distance, and L represents the length of the second rectangular image. Finally, the coin image to be straightened is rotated counterclockwise according to the rotation angle to obtain a straightened coin image, as shown in FIG4 .
[0180] Based on the same inventive concept, the present invention also provides a coin price evaluation system. Please refer to Figure 5, which is a structural diagram of a coin price evaluation system provided by an embodiment of the present invention. As shown in Figure 5, the coin price evaluation system includes a processor 301, a communication interface 302, a memory 303 and a communication bus 304.
[0181] The processor 301 , the communication interface 302 , and the memory 303 communicate with each other via the communication bus 304 .
[0182] The memory 303 is used to store computer programs.
[0183] The processor 301 is configured to execute the program stored in the memory 303 to implement the following steps:
[0184] Obtain the image of the coin to be appraised provided by the user;
[0185] Identify the image of the coin to be evaluated based on a pre-trained classification model to obtain classification information of the coin to be evaluated;
[0186] Identify the image of the coin to be evaluated based on a pre-trained coin attribute recognition model to obtain attribute information of the coin to be evaluated;
[0187] Determining a reference coin for the coin to be evaluated based on the classification information and attribute information of the coin to be evaluated, and obtaining price information of the reference coin;
[0188] Based on the price information of the reference coin, a target valuation of the coin to be evaluated is determined and the target valuation information of the coin to be evaluated is fed back to the user.
[0189] For the specific implementation of each step of the method and related explanations, please refer to the method implementation shown in Figure 1 above, which will not be repeated here.
[0190] In addition, other implementations of the coin price evaluation method implemented by the processor 301 executing the program stored in the memory 303 are the same as the implementations mentioned in the aforementioned method implementation section and will not be repeated here.
[0191] Based on the same inventive concept, the present invention also provides a coin straightening processing system. Please refer to Figure 5, which is a structural schematic diagram of the coin straightening processing system provided by an embodiment of the present invention. As shown in Figure 5, the coin straightening processing system includes a processor 301, a communication interface 302, a memory 303 and a communication bus 304.
[0192] The processor 301 , the communication interface 302 , and the memory 303 communicate with each other via the communication bus 304 .
[0193] The memory 303 is used to store computer programs.
[0194] The processor 301 is configured to execute the program stored in the memory 303 to implement the following steps:
[0195] Obtaining a coin image to be corrected provided by a user, and determining a coin surface area of the coin image to be corrected;
[0196] Expanding the coin surface area to obtain a first rectangular image;
[0197] Determine a corresponding standard image based on the coin surface area features, and scale the standard image to the same size as the coin surface area of the coin image to be corrected;
[0198] Expanding the processed standard image according to the same method to obtain a second rectangular image;
[0199] Splicing the two second rectangular images end to end in a horizontal direction to obtain a standard template matching image;
[0200] Determine a matching area in the standard template matching image according to the first rectangular image, and calculate a translation distance of the matching area relative to a starting point of the standard template matching image;
[0201] Calculating the rotation angle of the coin image to be corrected relative to the standard image according to the translation distance;
[0202] The coin image to be turned right is rotated counterclockwise according to the rotation angle, thereby obtaining a righted coin image.
[0203] For the specific implementation of each step of the method and related explanations, please refer to the method implementation shown in Figure 1 above, which will not be repeated here.
[0204] In addition, other implementations of the coin turning method implemented by the processor 301 executing the program stored in the memory 303 are the same as the implementations mentioned in the aforementioned method implementation section and will not be repeated here.
[0205] The communication bus 304 mentioned in the electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 304 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the figure shows only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0206] The communication interface 302 is used for communication between the electronic device and other devices.
[0207] The processor 301 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor. The processor 301 is the control center of the electronic device, connecting various parts of the entire electronic device using various interfaces and lines.
[0208] The memory 303 may be used to store the computer program. The processor 301 implements various functions of the electronic device by running or executing the computer program stored in the memory 303 and calling the data stored in the memory 303.
[0209] The memory 303 may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM).
[0210] The present invention also provides a readable storage medium having a program stored thereon, which can implement the following steps when the program is executed:
[0211] Obtain the image of the coin to be appraised provided by the user;
[0212] Identify the image of the coin to be evaluated based on a pre-trained classification model to obtain classification information of the coin to be evaluated;
[0213] Identify the image of the coin to be evaluated based on a pre-trained coin attribute recognition model to obtain attribute information of the coin to be evaluated;
[0214] Determining a reference coin for the coin to be evaluated based on the classification information and attribute information of the coin to be evaluated, and obtaining price information of the reference coin;
[0215] Based on the price information of the reference coin, a target valuation of the coin to be evaluated is determined and the target valuation information of the coin to be evaluated is fed back to the user.
[0216] The present invention also provides a readable storage medium having a program stored thereon, which can implement the following steps when the program is executed:
[0217] Obtaining a coin image to be corrected provided by a user, and determining a coin surface area of the coin image to be corrected;
[0218] Expanding the coin surface area to obtain a first rectangular image;
[0219] Determine a corresponding standard image based on the coin surface area features, and scale the standard image to the same size as the coin surface area of the coin image to be corrected;
[0220] Expanding the processed standard image according to the same method to obtain a second rectangular image;
[0221] Splicing the two second rectangular images end to end in a horizontal direction to obtain a standard template matching image;
[0222] Determine a matching area in the standard template matching image according to the first rectangular image, and calculate a translation distance of the matching area relative to a starting point of the standard template matching image;
[0223] Calculating the rotation angle of the coin image to be corrected relative to the standard image according to the translation distance;
[0224] The coin image to be turned right is rotated counterclockwise according to the rotation angle, thereby obtaining a righted coin image.
[0225] The computer-readable storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer hard disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this article, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0226] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0227] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0228] It should be noted that the devices and methods disclosed in the embodiments of this document may also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of the devices, methods, and computer program products according to the various embodiments of this document. In this regard, each box in the flowchart or block diagram may represent a module, program, or portion of code, wherein the module, program segment, or portion of code contains one or more executable instructions for implementing a specified logical function, and the module, program segment, or portion of code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes may also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes may actually be executed substantially in parallel, or they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified function or action, or may be implemented by a combination of dedicated hardware and computer instructions.
[0229] In addition, the functional modules in the various embodiments of this document may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0230] The above description is only a description of the preferred embodiment of the present invention and does not limit the scope of the present invention. Any changes and modifications made by ordinary technicians in the field of the present invention based on the above disclosure are within the scope of protection of the claims.
Claims
1. A method for evaluating coin prices, characterized in that: The method comprises: Obtain the image of the coin to be appraised provided by the user; Recognize the image of the coin to be evaluated according to the pre-trained classification model to obtain classification information of the coin to be evaluated; Identify the image of the coin to be evaluated according to a pre-trained coin attribute recognition model to obtain attribute information of the coin to be evaluated; Determining a reference coin for the coin to be evaluated based on the classification information and attribute information of the coin to be evaluated, and obtaining price information of the reference coin; Based on the price information of the reference coin, a target valuation of the coin to be evaluated is determined and the target valuation information of the coin to be evaluated is fed back to the user.
2. The coin price evaluation method according to claim 1, characterized in that: The attribute information of the coin to be evaluated includes: one or more of the year information, casting identification information, grade classification information, description information and reference price information of the coin.
3. The coin price evaluation method according to claim 2, characterized in that: The pre-trained coin attribute recognition model is established through sample training with a plurality of pre-labeled reference coin samples in a coin sample database.
4. The coin price evaluation method according to claim 3, characterized in that: The plurality of pre-labeled reference coin samples in the coin sample database are subjected to data alignment processing, wherein the data alignment processing comprises: The classification names of the reference coin samples are obtained, and the reference coin samples with different classification names but belonging to the same classification are stored according to the preset unified classification name as their classification information; for the remaining reference coin samples that cannot be classified and stored, the pre-trained classification model is called for recognition processing, and the classification is stored according to the classification recognition results. Storage; Obtain grade classification names of multiple reference coin samples with the same fixed classification information, and store the reference coin samples with different grade classification names but belonging to the same grade classification according to the preset unified grade classification name as their grade classification information; for the remaining reference coin samples that cannot be classified and stored, call the pre-trained coin attribute recognition model to perform recognition processing, and classify and store them according to the grade classification recognition results.
5. The coin price evaluation method according to claim 4, characterized in that: In the data alignment processing step: when the called pre-trained seeding model is unable to identify and process the seeding classification information of a reference coin sample, the corresponding review process is entered to identify and obtain the seeding classification information of the reference coin sample; and when the called pre-trained coin attribute recognition model is unable to identify and process the grade classification information of a reference coin sample, the corresponding review process is entered to identify and obtain the grade classification information of the reference coin sample.
6. The coin price evaluation method according to claim 4, characterized in that: The data alignment process further includes: acquiring year information and casting identification information of the plurality of reference coin samples, converting them uniformly according to a preset format and storing them by category; The reference price information of the plurality of reference coin samples is obtained, and is uniformly converted and classified and stored according to a preset currency unit.
7. The coin price evaluation method according to claim 3, characterized in that: When any attribute information is missing in each pre-labeled reference coin sample in the coin sample database, the pre-trained coin attribute recognition model is called to identify the pre-labeled reference coin sample to obtain the corresponding attribute information. When any missing attribute information cannot be obtained through the corresponding pre-trained coin attribute recognition model, the corresponding review process is entered to identify and obtain the attribute information.
8. The coin price evaluation method according to claim 3, characterized in that: The pre-trained coin attribute recognition model includes multiple different sub-attribute recognition models corresponding to the multiple attribute information: a coin year information recognition model, a coin casting identification information recognition model, a coin grade classification information recognition model, a coin description information recognition model and a coin reference price information recognition model. The multiple different sub-attribute recognition models are established after sample training with multiple pre-labeled reference coin samples in a coin sample database.
9. The coin price evaluation method according to claim 8, characterized in that: The coin description information recognition model is trained and established in the following way: Using the reference coin sample image set to train the original visual encoder to obtain a trained visual encoder; wherein the visual encoder is used to obtain and output the visual features of each reference coin sample in the reference coin sample image set; The original text encoder is trained using the reference coin sample text sets corresponding to the reference coin sample image sets to obtain a trained text encoder; wherein the text encoder is used to obtain and output the text features of the reference coin samples, and the reference coin sample text sets include the original description information and evaluation information of the reference coins; Based on the visual features and the text features, the coin description information features of each reference coin sample are determined.
10. The coin price evaluation method according to claim 9, characterized in that: Determining the coin description information features of each reference coin sample includes: Determine the description text of the reference coin sample based on the classification information of each reference coin sample and the visual features, combined with a preset description template and the text set of the reference coin sample; Input the description text as an input parameter into a trained text encoder, and the text encoder outputs the text features of the reference coin sample; Based on the visual features and the text features, coin description information features of the reference coin sample are determined.
11. The coin price evaluation method according to claim 9, characterized in that: The coin description information features of the reference coin samples acquired by the coin description information recognition model are input into the pre-trained classification model and the other sub-attribute recognition model as input information to assist in identifying and determining the classification information and other attribute information of the reference coin samples.
12. The coin price evaluation method according to claim 9, characterized in that: The coin description information features of the reference coin samples acquired by the coin description information recognition model are combined with the price information of the reference coin samples to train and obtain the coin reference price information recognition model, which is used to identify and process the reference coin samples whose price information is missing in the reference coin samples to obtain the corresponding reference price information.
13. The coin price evaluation method according to claim 1, characterized in that: Determining the target valuation of the coin to be evaluated based on the price information of the reference coin and feeding back the target valuation information of the coin to be evaluated to the user includes: When there is only one reference coin corresponding to the image of the coin to be evaluated, obtaining price information of the reference coin as target valuation information output for the image of the coin to be evaluated; When there are multiple reference coins corresponding to the coin image to be evaluated, the price information of the multiple reference coins is obtained and sorted, and the sorted price information range is output as the target valuation information of the coin image to be evaluated.
14. The coin price evaluation method according to claim 2, characterized in that: Identifying the image of the coin to be evaluated according to the pre-trained coin attribute recognition model, and obtaining attribute information of the coin to be evaluated includes: In combination with the classification information of the coin to be evaluated, the attribute information of the coin to be evaluated is adjusted, wherein the adjustment process includes: The coin issuance data corresponding to the type classification information of the coin to be evaluated is obtained, the attribute information of the coin to be evaluated is compared with the coin issuance data, and the attribute information that does not match is adjusted.
15. The coin price evaluation method according to claim 14, characterized in that: The adjustment process includes: The year information of the coin to be appraised is compared with the coin issuance data. When there is only one year of issuance information in the coin issuance data, the year information identification result of the coin to be evaluated is discarded, and the year of issuance information is used as its year information; The casting identification information of the coin to be valued is compared with the coin issuance data. When the casting identification information in the coin issuance data only has one issued casting identification information, the identification result of the casting identification information of the coin to be valued is discarded, and the issued casting identification information is used as its casting identification information.
16. The coin price evaluation method according to claim 14, characterized in that: The adjustment process includes: The year information of the coin to be evaluated is compared with the coin issuance data. When the year information in the coin issuance data has multiple issuance year information, if the identification result of the year information with the first confidence ranking of the coin to be evaluated does not belong to the multiple issuance year information, the identification result of the year information with the second confidence ranking is used as its year information. If the identification result of the year information with the second confidence ranking also does not belong to the multiple issuance year information, the identification result of the year information with the third confidence ranking is used as its year information. The casting identification information of the coin to be valued is compared with the coin issuance data. When the casting identification information in the coin issuance data has multiple issued casting identification information, if the identification result of the casting identification information with the first confidence ranking of the coin to be valued does not belong to the multiple issued casting identification information, the identification result of the casting identification information with the second confidence ranking is used as its casting identification information; if the identification result of the casting identification information with the second confidence ranking does not belong to the multiple issued casting identification information, the identification result of the casting identification information with the third confidence ranking is used as its casting identification information.
17. The coin price evaluation method according to claim 2, characterized in that: The method also includes providing an interactive interface for manual adjustment by the user, which is used to adjust the classification information and attribute information of the coin to be evaluated, and determine the reference coin of the coin to be evaluated based on the adjusted classification information and attribute information of the coin to be evaluated, and obtain the price information of the reference coin.
18. The coin price evaluation method according to claim 2, characterized in that: If no corresponding reference coin is obtained under the current grade classification information, a reference coin of a lower grade classification information level is obtained, and the price information of the reference coin is obtained, and the target valuation information of the coin to be evaluated is determined to be greater than the price information of the reference coin.
19. The coin price evaluation method according to any one of claims 1 to 18, characterized in that: The method further comprises: Before obtaining the image of the coin to be evaluated provided by the user, the coin image is transformed into a positive shape.
20. The coin price evaluation method according to claim 19, characterized in that: The regularization process includes: Obtaining a coin image to be corrected provided by a user, and determining a coin surface area of the coin image to be corrected; Expanding the coin surface area to obtain a first rectangular image; Determine a corresponding standard image according to the coin surface area features, and scale the standard image to the same size as the coin surface area of the coin image to be corrected; Expanding the processed standard image in the same way to obtain a second rectangular image; Splicing the two second rectangular images end to end in a horizontal direction to obtain a standard template matching image; Determine a matching area in the standard template matching image according to the first rectangular image, and calculate a translation distance of the matching area relative to a starting point of the standard template matching image according to the matching area; Calculating the rotation angle of the coin image to be corrected relative to the standard image according to the translation distance; The coin image to be turned right is rotated counterclockwise according to the rotation angle, so as to obtain a turned coin image.
21. The coin price evaluation method according to claim 20, characterized in that: The coin surface area of the coin image to be corrected is obtained after the coin image to be corrected is recognized by a pre-trained coin area recognition model.
22. The coin price evaluation method according to claim 20, characterized in that: The coin surface area of the coin image to be corrected is obtained after the edge of the coin surface area in the coin image to be corrected is determined by an edge detection algorithm.
23. The coin price evaluation method according to claim 20, characterized in that: The expansion process of the coin face area and the standard image is performed by coordinate transformation, and the coordinate transformation is performed based on the following formula: x1 = r1cosθ1, y1 = r1sinθ1, x1 2 +y1 2 =r1 2 , Wherein, (r1, θ1) is the polar coordinate of any point A on the image to be processed before coordinate transformation, and (x1, y1) is the rectangular coordinate of point A' corresponding to point A on the expanded rectangular image after coordinate transformation.
24. The coin price evaluation method according to claim 20, characterized in that: Determining the corresponding standard image according to the coin surface area features includes: Identify the coin surface area according to the pre-trained identification model to obtain the identification classification information and coin surface attribute information of the coin to be corrected; According to the classification information and coin surface attribute information of the coin to be corrected, a corresponding standard image is obtained from a preset reference image set.
25. The coin price evaluation method according to claim 20, characterized in that: Determining the corresponding standard image according to the coin surface area features includes: Calculating the similarity between the coin surface area feature and the feature similarity of all standard images in a preset reference image set according to a similarity algorithm; The standard image with the highest similarity is determined as the standard image corresponding to the coin to be corrected.
26. The coin price evaluation method according to claim 20, characterized in that: Determining a matching area in the standard template matching image according to the first rectangular image comprises: A template matching algorithm is used to determine a matching area in the standard template matching image according to the first rectangular image, and the template matching algorithm is: Wherein, R represents the matching value, T(x′, y′) represents each pixel on the first rectangular image, and I(x, y) represents each pixel on the corresponding standard template matching image.
27. The coin price evaluation method according to claim 20, characterized in that: Calculating the rotation angle of the coin image to be corrected relative to the standard image according to the translation distance includes using the following formula: Among them, L offset represents the translation distance, and L represents the length of the second rectangular image.
28. A coin price evaluation system, characterized in that: The invention comprises a processor and a memory, wherein a program is stored in the memory, and when the program is executed by the processor, the coin price evaluation method according to any one of claims 1 to 27 is implemented.
29. A readable storage medium having a program stored thereon, characterized in that: When the program is executed, the coin price evaluation method according to any one of claims 1 to 27 is implemented.
Citation Information
Patent Citations
Image based coin detection-identification method and system and storage medium
CN110415425A
Intelligent evaluation method and system based on ancient coin image
CN111046883A
Object evaluation method and object evaluation apparatus
CN116206310A
Coin correction processing method and system and readable storage medium
CN116883243A
Coin price evaluation method and system and readable storage medium
CN116993423A