A gemstone similarity measurement data processing method and related equipment
Through the gem similarity measurement data processing method, the deep learning model is used to calculate the similarity measurement of gem pictures, which solves the problem of subjectivity and low efficiency of gem classification and recommendation in the prior art, and realizes automated and efficient gem processing.
Patent Information
- Application Number
- CN202011032443.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-27
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2040-09-27
AI Technical Summary
The existing e-commerce platforms have problems such as strong subjectivity, low efficiency and difficulty in large-scale promotion in the classification or recommendation of gems such as jade.
The gem similarity metric data processing method is used to obtain and preprocess gem pictures, calculate gem picture vectors using pre-established deep learning models, and calculate the similarity metric data based on cosine distance to automatically classify and recommend gems.
It realizes automated gem classification and recommendation without manual experience, improves efficiency and is suitable for large-scale promotion.
Smart Images

Figure CN112116021B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image processing, and in particular to a gemstone similarity measurement data processing method and related equipment. Background Art
[0002] When existing e-commerce platforms handle the classification or recommendation of jade and other gemstones, they mainly rely on experts to manually classify or recommend them based on their experience. The manual method has the disadvantages of strong subjectivity, low efficiency, and difficulty in large-scale promotion, which is not conducive to the classification or recommendation of jade and other gemstones. Summary of the invention
[0003] In view of this, the embodiment of the present invention provides a gemstone similarity measurement data processing method and related equipment to solve the shortcomings of the existing gemstone classification or recommendation and other related product processing processes, such as strong subjectivity, low efficiency and difficulty in large-scale promotion.
[0004] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0005] A first aspect of an embodiment of the present invention discloses a method for processing gemstone similarity measurement data, the method comprising:
[0006] Acquire a first gemstone picture and a reference gemstone picture and perform preprocessing to obtain a first gemstone picture group and a reference gemstone picture group, wherein the first gemstone picture group includes one or more preprocessed first gemstone pictures, and the reference gemstone picture group includes one or more preprocessed reference gemstone pictures, and the first gemstone on the first gemstone picture and the reference gemstone on the reference gemstone picture are gemstones of the same type;
[0007] Combining the first gemstone picture group and the reference gemstone picture group to obtain a plurality of gemstone picture pairs, each of the gemstone picture pairs comprising at least one preprocessed first gemstone picture and one preprocessed reference gemstone picture;
[0008] Input each gem image pair into a pre-established deep learning model and output the corresponding gem image vector pair;
[0009] Calculate the cosine distance based on the gemstone image vectors in each gemstone image vector pair;
[0010] From all the cosine distances obtained, the largest cosine distance is selected as the similarity measurement data between the first gemstone and the reference gemstone. The similarity measurement data is the basis for product processing of the first gemstone. The higher the similarity measurement data, the higher the similarity between the gemstone to be processed and the reference gemstone.
[0011] Preferably, the obtaining of the first gemstone picture and the reference gemstone picture and preprocessing to obtain the first gemstone picture group and the reference gemstone picture group includes:
[0012] Obtain a first gemstone image and a reference gemstone image;
[0013] Performing a preprocessing operation on the first gemstone image to obtain four preprocessed first gemstone images, which constitute a gemstone image group to be processed;
[0014] The pre-processing operation includes:
[0015] Copy the first gemstone image to obtain a second gemstone image;
[0016] Setting the background of the second gemstone image to white to obtain a first preprocessed first gemstone image;
[0017] Placing the foreground in the first preprocessed first gem picture at the center of the picture, and making the foreground occupy 25% of the area ratio of the first preprocessed first gem picture, to obtain a second preprocessed first gem picture;
[0018] Using the first gemstone image as the third pre-processed first gemstone image;
[0019] Placing the foreground in the third preprocessed first gem picture at the center of the picture, and making the foreground occupy 25% of the area ratio of the third preprocessed first gem picture, to obtain a fourth preprocessed first gem picture;
[0020] The same preprocessing operation is performed on the reference gemstone images to obtain four preprocessed reference gemstone images, which constitute a reference gemstone image group.
[0021] Preferably, the process of pre-establishing a deep learning model includes:
[0022] Obtaining gemstone training pictures, wherein the gemstone training pictures include gemstone pictures taken by users and gemstone pictures evaluated by experts;
[0023] Preprocessing the training images to obtain one or more preprocessed gemstone training images corresponding to each training image;
[0024] Performing data enhancement processing on the preprocessed gemstone training images to generate a data enhanced gemstone training image for each preprocessed training gemstone image;
[0025] The data-enhanced training images are used as the input of the initial deep learning network model, and the initial deep learning model is trained to obtain the final deep learning model.
[0026] Preferably, the data enhancement processing of the pre-processed gemstone training image comprises:
[0027] Generating a first gemstone training picture to be processed for each of the preprocessed gemstone training pictures;
[0028] Randomly rotating the first gemstone training picture to be processed by a preset angle to obtain a second gemstone training picture to be processed;
[0029] Randomly scaling the second gemstone training image to be processed and cropping a preset area to obtain a third gemstone training image to be processed;
[0030] Performing grayscale transformation processing on the third gemstone training picture to be processed to obtain a fourth gemstone training picture to be processed;
[0031] Performing Gaussian processing on the fourth gemstone training image to be processed to obtain a fifth gemstone training image to be processed;
[0032] The fifth gemstone training image to be processed is flipped left-right to obtain a data-enhanced gemstone training image corresponding to the pre-processed gemstone training image.
[0033] A second aspect of an embodiment of the present invention discloses a gemstone similarity measurement data processing system, comprising:
[0034] a preprocessing module, used to obtain a first gemstone picture and a reference gemstone picture and perform preprocessing to obtain a first gemstone picture group and a reference gemstone picture group, wherein the first gemstone picture group includes one or more preprocessed first gemstone pictures, and the reference gemstone picture group includes one or more preprocessed reference gemstone pictures, and the first gemstone on the first gemstone picture and the reference gemstone on the reference gemstone picture are gemstones of the same type;
[0035] A combining module, used for combining the first gemstone picture group and the reference gemstone picture group to obtain a plurality of gemstone picture pairs, each of the gemstone picture pairs at least comprising a preprocessed first gemstone picture and a preprocessed reference gemstone picture;
[0036] A deep learning model is used to perform vector processing on each input gemstone image and output a corresponding gemstone image vector pair;
[0037] A similarity measurement processing module is used to calculate the cosine distance based on the gemstone image vector in each gemstone image vector pair, and select the largest cosine distance from all the cosine distances obtained as the similarity measurement data between the first gemstone and the reference gemstone. The similarity measurement data is the basis for product processing of the first gemstone. The higher the similarity measurement data, the higher the similarity between the first gemstone and the reference gemstone.
[0038] Preferably, the preprocessing module is specifically used to obtain a first gemstone picture and a reference gemstone picture; perform a preprocessing operation on the first gemstone picture to obtain four preprocessed first gemstone pictures to form a first gemstone picture group; perform the same preprocessing operation on the reference gemstone picture to obtain four preprocessed reference gemstone pictures to form a reference gemstone picture group;
[0039] The pre-processing operation includes:
[0040] Copy the first gem picture to obtain a second gem picture; set the background of the second gem picture to white to obtain a first preprocessed first gem picture; place the foreground in the first preprocessed first gem picture at the center of the picture, and make the foreground occupy 25% of the area ratio of the first preprocessed first gem picture, to obtain a second preprocessed first gem picture; use the first gem picture as the third preprocessed first gem picture; place the foreground in the third preprocessed first gem picture at the center of the picture, and make the foreground occupy 25% of the area ratio of the third preprocessed first gem picture, to obtain a fourth preprocessed first gem picture.
[0041] Preferably, it also includes: a pre-established module;
[0042] The pre-built module includes:
[0043] An acquisition unit, used for acquiring gemstone training pictures, wherein the gemstone training pictures include gemstone pictures taken by users and gemstone pictures evaluated by experts;
[0044] A preprocessing unit, used to preprocess the training images to obtain one or more preprocessed gemstone training images corresponding to each training image;
[0045] A data enhancement unit, used to perform data enhancement processing on the preprocessed gemstone training images, and generate a data enhanced gemstone training image for each preprocessed training gemstone image;
[0046] The training unit is used to use the data-enhanced training images as input of the initial deep learning network model, train the initial deep learning model, and obtain a final deep learning model.
[0047] Preferably, the data enhancement unit is specifically used to generate a to-be-processed gemstone training image for each of the preprocessed gemstone training images, and perform any one or a combination of random rotation of a preset angle, random cropping of a preset area, grayscale transformation, Gaussian processing and / or left-right flipping processing to obtain the corresponding data enhanced gemstone training images.
[0048] A third aspect of an embodiment of the present invention discloses an electronic device, comprising a processor and a memory, wherein the memory is used to store processing program code and data for gemstone similarity measurement data, and the processor is used to call program instructions in the memory to execute a gemstone similarity measurement data processing method disclosed in the first aspect of the embodiment of the present invention.
[0049] A fourth aspect of an embodiment of the present invention discloses a storage medium, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the gemstone similarity measurement data processing method disclosed in the first aspect of the embodiment of the present invention.
[0050] As can be seen from the above content, a method for processing gem similarity measurement data and related equipment disclosed in the present application obtain a first gem picture and a reference gem picture and perform preprocessing to obtain a first gem picture group and a reference gem picture group, wherein the first gem picture group includes one or more preprocessed first gem pictures, and the reference gem picture group includes one or more preprocessed reference gem pictures, and the first gem on the first gem picture and the reference gem on the reference gem picture are gems of the same type; the first gem picture group and the reference gem picture group are combined to obtain a plurality of gem picture pairs, each of which includes at least one preprocessed first gem picture and one preprocessed reference gem picture; each gem picture pair is input into a pre-established deep learning model to output a corresponding gem picture vector pair; the cosine distance is calculated based on the gem picture vector in each gem picture vector pair; from all the cosine distances obtained, the largest cosine distance is selected as the similarity measurement data of the first gem and the reference gem, and the similarity measurement data is the basis for product processing of the first gem, and the higher the similarity measurement data, the higher the similarity measurement data indicates that the first gem and the reference gem are similar. In the embodiment of the present invention, two gemstone images are processed in combination with the deep learning model obtained by pre-training to obtain similarity measurement data of the gemstones in the two gemstone images, and then the first gemstone is classified, recommended, and other product processing is performed based on the similarity measurement data and the reference gemstone. This process does not need to rely on manual experience, can be completed automatically, and is efficient and easy to promote on a large scale. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0052] Figure 1A schematic diagram of an application architecture for processing gemstone similarity measurement data provided by an embodiment of the present invention;
[0053] Figure 2 A schematic flow chart of a method for processing gemstone similarity measurement data provided by an embodiment of the present invention;
[0054] Figure 3 A schematic diagram of a process for preprocessing a first gemstone image provided by an embodiment of the present invention;
[0055] Figure 4 A schematic diagram of a process for pre-establishing a deep learning model provided by an embodiment of the present invention;
[0056] Figure 5 A method for gemstone valuation based on gemstone similarity measurement data provided by an embodiment of the present invention;
[0057] Figure 6 A schematic diagram of the structure of a gemstone similarity measurement data processing system provided by an embodiment of the present invention;
[0058] Figure 7 A schematic diagram of the structure of another gemstone similarity measurement data processing system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0061] It can be seen from the background technology that the existing classification or recommendation of gemstones is mainly based on manual classification or recommendation, which has the disadvantages of strong subjectivity, low efficiency and difficulty in large-scale promotion. Therefore, the embodiment of the present invention discloses a method for processing gemstone similarity measurement data, which processes two gemstone pictures by combining a deep learning model obtained by pre-training to obtain similarity measurement data of the gemstones on the two gemstone pictures, and then classifies and recommends the gemstones on the two gemstone pictures based on the similarity measurement data. This process does not need to rely on manual experience, can be completed automatically, and is highly efficient and easy to promote on a large scale.
[0062] like Figure 1 1 is a schematic diagram of an application architecture for processing gemstone similarity measurement data disclosed in an embodiment of the present invention. The application architecture includes: a processor 101 , a memory 102 and a display 103 .
[0063] The memory 102 stores reference gemstone pictures, which include reference gemstone images, reference gemstone valuations, and gemstone 3C2T features, which refer to the color, purity, craftsmanship, transparency, and texture of the gemstone.
[0064] The reference gemstone price on the reference gemstone image is obtained after being appraised by experts.
[0065] Processor 101 obtains a gemstone image uploaded by a user for similarity measurement data processing, and retrieves a reference gemstone image of the same type as the gemstone type on the uploaded gemstone image from a memory; pre-processes the gemstone image and the reference gemstone image to obtain a gemstone image group and a reference gemstone image group, and pairs the images in the gemstone image group and the reference gemstone image group one by one to obtain multiple gemstone image pairs; inputs each gemstone image pair into a pre-established deep learning model, and outputs a corresponding gemstone image vector pair; calculates the cosine distance based on the gemstone image vector in each gemstone image vector pair; and selects the largest cosine distance from all the cosine distances obtained as the similarity measurement data between the gemstone to be processed and the reference gemstone.
[0066] The display 103 displays the similarity measurement data between the gemstone to be processed and the reference gemstone output by the processor 101. The similarity measurement data is the basis for product processing of the gemstone to be processed.
[0067] The similarity measurement data can reflect the similarity between the gemstone to be processed and the reference gemstone in terms of appearance and 3C2T features. The higher the similarity measurement data, the higher the similarity between the gemstone to be processed and the reference gemstone. The user can intuitively see the similarity between the gemstone to be processed and the reference gemstone through the display 103.
[0068] The processor 101 can also perform product processing such as classification, valuation or recommendation on the gemstone to be processed based on the reference gemstone, the similarity measurement data of the reference gemstone and the gemstone to be processed, upon receiving the classification, valuation or recommendation instruction input by the user.
[0069] For example, after receiving the classification instruction input by the user, the processor 101 classifies the gemstones to be processed that have the same similarity measurement data as the reference gemstone or similarity measurement data with the reference gemstone whose difference is within a preset range into one category based on the obtained similarity measurement data of the reference gemstone and the gemstone to be processed.
[0070] For example, after receiving the valuation instruction input by the user, the processor 101 uses the image search method to search for gemstone images with similar gemstone features in the database, uses the gemstone in the gemstone image as a reference gemstone, and estimates the gemstone to be processed based on the reference gemstone with the largest similarity measurement data.
[0071] Alternatively, after receiving the valuation instruction input by the user, the processor 101 may estimate the value of the gemstone to be processed based on the valuation of the reference gemstone having the largest similarity measurement data.
[0072] For example, after the processor 101 receives the recommendation instruction input by the user, in the process of recommending gemstones, based on the obtained similarity measurement data of the reference gemstone and the gemstone to be processed, it simultaneously recommends gemstones with the same similarity measurement data or similarity measurement data with a difference within a preset range.
[0073] Based on the above application architecture for processing gemstone similarity measurement data, assuming that the user inputs a jadeite picture, the display 103 finally displays the similarity measurement data between the jadeite to be processed and the reference jadeite.
[0074] Based on the above-mentioned application architecture for processing gemstone similarity measurement data, assuming that the user inputs a jade picture, after obtaining the similarity measurement data of the jade to be processed and the reference jade, the user enters the classification instruction again to classify the jade to be processed that has the same similarity measurement data as the reference jade or the difference within a preset range into one category.
[0075] Based on the above-mentioned application architecture for processing gemstone similarity measurement data, assuming that the user inputs a jadeite picture, after the user enters the valuation instruction, the database is searched for jadeite pictures with similar jadeite features, and the jadeite in the jadeite picture is used as the reference jadeite. The reference jadeite with the largest similarity measurement data is selected from the reference jadeites to estimate the jadeite to be processed.
[0076] Alternatively, assuming that the user inputs a picture of jadeite, after obtaining the similarity measurement data between the jadeite to be processed and the reference jadeite, the jadeite to be processed is estimated based on the reference jadeite with the largest similarity measurement data.
[0077] Based on the above-mentioned application architecture for processing gemstone similarity measurement data, assuming that the user inputs a jade picture, after obtaining the similarity measurement data of the jade to be processed and the reference jade, the user enters the recommendation instruction again, and jade with the same similarity measurement data or the difference within the preset range can be recommended at the same time.
[0078] Based on the application architecture for product processing of gemstones disclosed in the above-mentioned embodiment of the present invention, the embodiment of the present invention specifically describes in detail the specific process of gemstone similarity measurement data processing through the following embodiments.
[0079] like Figure 2 FIG. 1 is a flow chart of a method for processing gemstone similarity measurement data disclosed in an embodiment of the present invention. The method for processing gemstone similarity measurement data comprises the following steps:
[0080] S201: Acquire a first gemstone picture and a reference gemstone picture and perform preprocessing to obtain a first gemstone picture group and a reference gemstone picture group.
[0081] In S201, the first gemstone on the first gemstone image and the reference gemstone on the reference gemstone image are gemstones of the same type. For example, if the first gemstone is jadeite, the reference gemstone should also be jadeite.
[0082] The first gemstone picture group includes one or more pre-processed first gemstone pictures. The reference gemstone picture group includes one or more pre-processed reference gemstone pictures.
[0083] In the specific process of executing S201, the first gemstone picture is copied to generate a new first gemstone picture, and the background removal operation is performed on the new first gemstone picture to obtain a second gemstone picture. The background-removed second gemstone picture can be used to construct a first gemstone picture group. The first gemstone picture group can also be constructed using the original first gemstone picture and the second gemstone picture.
[0084] Optionally, the same image processing may be continued on the original first gemstone image and the second gemstone image, and then the processed images are combined to construct the first gemstone image group.
[0085] In the specific process of executing S201, the same preprocessing is performed on the first gemstone image and the reference gemstone image to obtain the same number of preprocessed first gemstone images and reference gemstone images.
[0086] S202: Combining the first gemstone picture group and the reference gemstone picture group to obtain a plurality of gemstone picture pairs.
[0087] In S202, each of the gemstone image pairs includes at least a preprocessed first gemstone image and a preprocessed reference gemstone image.
[0088] In the specific implementation of S202, a preprocessed first gem image in the first gem image group is extracted, and a preprocessed reference gem image in the reference gem image group is extracted, and the two are paired to form a gem image pair. The preprocessed first gem image in the first gem image group and the preprocessed reference gem image in the reference gem image group are combined in the above manner in sequence to obtain multiple gem image pairs.
[0089] S203: Input each gem image pair into a pre-established deep learning model, and output the corresponding gem image vector pair.
[0090] In S203, the initial deep learning model is trained based on gemstone training pictures, where the gemstone training pictures include gemstone pictures taken by users and gemstone pictures evaluated by experts.
[0091] The specific training strategy is: take the gem training images as a batch in the deep learning model, perform at least two random data enhancements on each gem training image in the batch, and obtain a batch consisting of gem training images enhanced with random data. In the process of training the initial deep learning model, it is determined whether each gem training image is a random data enhancement image of the same original gem training image, and supervised by the loss function until the loss function value is minimized, and the training is determined to be completed to obtain the final deep learning model.
[0092] Among them, the loss function is composed of the cosine distance calculation formula, softmax function and cross entropy.
[0093] In the specific process of executing S203, a gem picture pair is input into a pre-established deep learning model to obtain a first gem picture vector and a reference gem picture vector.
[0094] S204: Calculate the cosine distance based on the gemstone picture vectors in each gemstone picture vector pair.
[0095] In S204, for each gemstone picture vector pair, the cosine distance between the first gemstone picture vector and the reference gemstone picture vector is calculated.
[0096] Assuming that the first gem image vector is F and the reference gem image vector is E, the specific cosine distance calculation process is:
[0097] F·E=|F||E|COS, |F| is the modulus of the first gem picture vector, |E| is the modulus of the reference gem picture vector, COS is the cosine value of the first gem picture vector and the reference gem picture vector, that is, COS=F·E / |F||E|, and the cosine value is used as the cosine distance between the first gem picture vector and the reference gem picture vector.
[0098] S205: Selecting the largest cosine distance from all the acquired cosine distances as similarity measurement data between the first gemstone and the reference gemstone.
[0099] In S205, the similarity measurement data is the basis for product processing of the first gemstone, and the higher the similarity measurement data is, the higher the similarity between the first gemstone and the reference gemstone is.
[0100] Optionally, all cosine distances may be sorted from large to small, and the cosine distance ranked first may be selected as the similarity measurement data between the first gemstone and the reference gemstone.
[0101] Optionally, the maximum cosine distance may be selected as the similarity measurement data between the first gemstone and the reference gemstone by comparing the sizes.
[0102] In the embodiment of the present invention, two gemstone images are processed in combination with the deep learning model obtained by pre-training to obtain similarity measurement data of the gemstones in the two gemstone images, and then the first gemstone is classified, recommended, and other product processing is performed based on the similarity measurement data and the reference gemstone. This process does not need to rely on manual experience, can be completed automatically, and is efficient and easy to promote on a large scale.
[0103] Based on the above embodiments of the present invention Figure 2 The disclosed gemstone similarity measurement data processing method, S201 obtains a first gemstone image for preprocessing to obtain a preferred implementation of a first gemstone image group, such as Figure 3 As shown, the following steps are included:
[0104] S301: Obtain the first gemstone image.
[0105] S302: Copy the first gemstone image to obtain a second gemstone image.
[0106] S303: Setting the background of the second gemstone image to white to obtain a first pre-processed first gemstone image.
[0107] S304: placing the foreground in the first preprocessed first gem picture at the center of the picture, and making the foreground occupy 25% of the area ratio of the first preprocessed first gem picture, to obtain a second preprocessed first gem picture.
[0108] In S304, 25% is a preferred value, and the proportion of the foreground area to the first pre-processed first gemstone image may be between 20% and 30%.
[0109] S305: Using the first gemstone image as the third pre-processed first gemstone image.
[0110] S306: placing the foreground in the third preprocessed first gem picture at the center of the picture, and making the foreground occupy 25% of the area ratio of the third preprocessed first gem picture, to obtain a fourth preprocessed first gem picture.
[0111] In S306, 25% is a preferred value, and the proportion of the foreground area to the third pre-processed first gemstone image may be between 20% and 30%.
[0112] There is no order in which S303 and S305 are executed, and they can be executed simultaneously or one after another. Figure 3 The process shown is that the first gemstone image and the second gemstone image are subjected to subsequent processing at the same time.
[0113] It should be noted that, by performing the same preprocessing operation on the reference gemstone images, four preprocessed reference gemstone images can be obtained to form a reference gemstone image group.
[0114] Based on the above embodiments of the present invention Figure 2 The disclosed gemstone similarity measurement data processing method, a preferred way to establish the deep learning model involved in S203, such as Figure 4 As shown, the following steps are included:
[0115] S401: Obtain gemstone training images.
[0116] In S401, the gemstone training pictures include gemstone pictures taken by users and gemstone pictures evaluated by experts.
[0117] S402: Preprocessing the gemstone training images to obtain one or more preprocessed gemstone training images corresponding to each gemstone training image.
[0118] In S402, the process of preprocessing the gemstone training image is background removal, and a gemstone training image with background removed can be obtained. The gemstone training image with background removed can be used to construct a gemstone training image group. The gemstone training image group can also be constructed using the original gemstone training image and the gemstone training image with background removed.
[0119] Optionally, the specific execution principle of the preferred implementation method of S402 is the same as Figure 3The publicly disclosed process and principle of preprocessing the first gemstone image are the same and will not be described in detail here.
[0120] S403: Performing data enhancement processing on the preprocessed gemstone training images, and generating a data enhanced gemstone training image for each preprocessed training gemstone image.
[0121] In S403, data enhancement processing can be performed on the pre-processed gemstone training image in a variety of ways, such as random rotation of a preset angle, random scaling and cropping of a preset area, grayscale transformation processing, Gaussian processing and / or left-right flipping processing, any one or a combination of these methods.
[0122] Here, the data enhancement processing of the pre-processed gem training images is described by combining all the above methods.
[0123] Firstly, a first gemstone training image to be processed is generated for each of the pre-processed gemstone training images.
[0124] Then, the following operations are performed in sequence based on the first gemstone training image to be processed:
[0125] 1. Randomly rotate the first gemstone training image to be processed by a preset angle to obtain a second gemstone training image to be processed.
[0126] Optionally, a random rotation is performed with a probability of 0.5 and the rotation angle is -90 to 90.
[0127] 2. Randomly scale the second gemstone training image to be processed and crop a preset area to obtain a third gemstone training image to be processed.
[0128] Optionally, the second gemstone training image to be processed is randomly scaled, and a 224×224 image area is randomly cropped, so that the cropped area accounts for a ratio of 0.2 to 1.0 of the area of the second gemstone training image to be processed.
[0129] 3. Perform grayscale transformation on the third gemstone training picture to be processed to obtain a fourth gemstone training picture to be processed.
[0130] Optionally, the third gemstone training image to be processed is converted into a grayscale image with a probability of 0.2.
[0131] 4. Perform Gaussian processing on the fourth gemstone training image to be processed to obtain the fifth gemstone training image to be processed.
[0132] Optionally, Gaussian processing is performed on the fourth gemstone training image to be processed with a probability of 0.5, and the Gaussian kernel diameter is randomly selected from 0.1 to 2.0.
[0133] 5. Flip the fifth gemstone training image to be processed left and right to obtain a data-enhanced gemstone training image corresponding to the pre-processed gemstone training image.
[0134] Optionally, the fifth gemstone training image to be processed is flipped left to right with a probability of 0.5.
[0135] Finally, the final data-enhanced gemstone training image is obtained.
[0136] S404: Using the obtained data augmentation training image as the input of the initial deep learning network model, training the initial deep learning model, and obtaining the final deep learning model.
[0137] In the specific execution process of S404, supervision is performed based on the loss function, and the initial deep learning network model is trained using data augmentation training images until the loss function is minimized, and the training is determined to be completed to obtain the final deep learning model.
[0138] Here we take a batch processing containing 4 gemstone images a, b, c, and d as an example.
[0139] First, perform two random data augmentations on each image to obtain 8 gemstone images.
[0140] Then, the 8 pictures are input into the initial deep learning network model respectively to obtain 8 gem picture vectors a1, a2, b1, b2, c1, c2, d1, and d2.
[0141] Then, the loss function is used to supervise each gem image vector. When the loss function is not minimum, the weights of the initial deep learning network model are adjusted, and the initial deep learning network model with adjusted weights is continued to be trained. This process is an iterative operation method until the loss function is minimized, the training is determined to be completed, and the final deep learning model is obtained.
[0142] Among them, taking the gem image vector a1 as an example, its corresponding loss function value is:
[0143]
[0144] In the embodiment of the present invention, two gemstone images are processed in combination with the deep learning model obtained by pre-training to obtain similarity measurement data of the gemstones in the two gemstone images, and then the first gemstone is classified, recommended, and other product processing is performed based on the similarity measurement data and the reference gemstone. This process does not need to rely on manual experience, can be completed automatically, and is efficient and easy to promote on a large scale.
[0145] Based on the above embodiments of the present invention Figure 2The disclosed method for processing gemstone similarity measurement data is illustrated here by taking the processing of jadeite similarity measurement data as an example.
[0146] The user uploads a jade image to be processed for similarity measurement data processing. Based on the gem similarity measurement data processing method disclosed in the embodiment of the present invention, first, retrieve a reference jade image of the same type as the jade type on the uploaded jade image; pre-process the jade image and the reference jade image to obtain a jade image group and a reference jade image group, and pair the images in the jade image group and the reference jade image group one by one to obtain multiple jade image pairs; input each jade image pair into a pre-established deep learning model, and output the corresponding jade image vector pair; calculate the cosine distance based on the jade image vector in each jade image vector pair; select the largest cosine distance from all the cosine distances obtained as the similarity measurement data between the jade image to be processed and the reference jade image. That is, the largest cosine distance is used as the similarity measurement data between the jade to be processed and the reference jade.
[0147] The similarity measurement data can be used to classify, evaluate or recommend products for jadeite to be processed.
[0148] Similarly, other gemstones are also applicable to the gemstone similarity measurement data processing method disclosed in the embodiment of the present invention.
[0149] In one embodiment of the present invention, after obtaining the similarity measurement data of the gemstone to be processed and the reference gemstone, the gemstone to be processed is valued based on the valuation of the reference gemstone with the largest similarity measurement data.
[0150] In another embodiment of the present invention, based on the gemstone similarity measurement data processing method disclosed in the above embodiment of the present invention, the embodiment of the present invention also discloses a method for gemstone valuation based on gemstone similarity measurement data, such as Figure 5 As shown, the following steps are included:
[0151] S501: Acquire online a first gemstone image input by a user.
[0152] S502: performing background removal processing on the first gemstone image to obtain a second gemstone image.
[0153] In S502, the background of the first gemstone image uploaded is removed by image segmentation to obtain a second gemstone image after the background is removed. By removing the background, subsequent processing can be free from interference by irrelevant background.
[0154] S503: Input the second gemstone image into a gemstone feature extraction model to perform gemstone feature extraction processing to obtain output gemstone features to be estimated.
[0155] In S503, the gem feature extraction model is obtained by offline training based on a gem dataset, wherein the gem dataset includes a collected reference gem picture, and the reference gem picture includes a gem image, a gem valuation, and a gem 3C2T feature. The gem valuation on the reference gem picture is obtained through valuation by an expert. The gem 3C2T feature refers to the color, purity, craftsmanship, transparency, and texture of the gem.
[0156] In the specific implementation, the process of offline training of gem feature extraction model based on gem dataset is as follows:
[0157] S11: Use the collected M reference gemstone images to establish a gemstone dataset.
[0158] In S11, the reference gemstone picture includes a gemstone image, a gemstone valuation and a gemstone 3C2T feature, and the value of M is a positive integer greater than 1.
[0159] S12: Based on a deep neural network architecture, the gemstone dataset is used as a batch in the deep neural network architecture, and random data enhancement is performed on the M reference gemstone images to obtain 2M reference gemstone images.
[0160] In S12, random data augmentation includes operations such as color perturbation, flipping, and cropping.
[0161] Perform color perturbation, flipping or cropping operations on each of the M reference gemstone images to obtain a corresponding data-enhanced image. That is, each reference gemstone image corresponds to a data-enhanced image.
[0162] All M gem parameters are randomly enhanced to obtain a total of 2M reference gem images.
[0163] S13: Perform iterative operations in the batch processing, select any reference gem image X1 and its corresponding data enhancement image X1′ as a positive sample pair, input the positive sample pair into the initial gem feature extraction model, and obtain feature vectors F1 and F1′ respectively.
[0164] In S13, the reference gemstone image X1 is input into the initial gemstone feature extraction model to obtain a feature vector F1.
[0165] The data augmented image X1′ is input into the initial gem feature extraction model to obtain the feature vector F1′.
[0166] S14: The remaining 2M-2 reference gemstone images are used as negative sample pairs and input into the initial gemstone feature extraction model to obtain feature vectors F2, F2′…F M 、F M ′.
[0167] In S14, the two pictures whose feature vectors have been extracted in S13 are removed, and the remaining reference gemstone pictures are used as negative sample pairs and input into the initial gemstone feature extraction model to obtain feature vectors F2, F2′…F M 、F M ′.
[0168] S15: The feature vector F1 is respectively combined with the feature vectors F1′, F2, F2′…F M 、F M ′The cosine distance calculation is performed until the loss function value is confirmed to be the minimum, and the trained gem feature extraction model is obtained.
[0169] In S15, the specific cosine distance calculation process is described by taking the feature vector F1 and the feature vector F1′ as examples:
[0170] F1·F1′=|F1||F1′|COS, |F1| is the modulus of the eigenvector F1, |F1′| is the modulus of the eigenvector F1′. COS is the cosine value of the eigenvector F1 and the eigenvector F1′, that is, COS=F1·F1′ / |F1||F1′|, and the cosine value is used as the distance between the eigenvector F1 and the eigenvector F1′.
[0171] Similarly, based on the same method, the feature vector F1 is calculated and the feature vectors F1′, F2, F2′…F M 、F M The distance between ′.
[0172] The above process of calculating the cosine distance is actually to train the initial gem feature extraction model by using contrastive learning.
[0173] In the process of executing S13 to S15, the loss function is actually used for supervision, and S13 to S15 are executed in an iterative manner to make the feature vector F1 close to its homologous feature vector F1′ and away from the remaining 2M-2 feature vectors F2, F2′…F M 、F M ′. That is, confirm the loss function value L i Minimum, determine to complete the training of the deep neural network, and obtain the trained gem feature extraction model.
[0174] Among them, the loss function value i refers to the i-th reference gemstone image.
[0175] The purpose of using the loss function for supervision is to The weight with the minimum loss function is found in , so that the deep neural network can achieve the best effect of extracting feature vectors, that is, the gem feature extraction model in the embodiment of the present invention is obtained.
[0176] S504: Based on the gemstone feature to be evaluated and the KNN retrieval method, N reference gemstone features are obtained from a gemstone feature library established offline.
[0177] In S504, each reference gemstone feature corresponds to a reference gemstone picture, and each reference gemstone picture is marked with a gemstone price.
[0178] In the specific implementation of S504, the KNN retrieval method is used to retrieve N reference gemstone features that are similar to the gemstone feature to be estimated in the gemstone feature library established offline.
[0179] The gem feature library here is based on the gem feature extraction model obtained by the above offline training to extract the reference gem features of each reference gem picture in the gem dataset; obtain the high-level semantic embedding vector of each reference gem picture to establish the gem feature library.
[0180] The high-level semantic embedding vector here refers to the last fully connected layer or the last global average pooling layer vector of the gem feature extraction model. After learning objects of a specific category, the gem feature extraction model maps the semantics of the object to a vector in a high-dimensional feature space, which has inter-class discriminability.
[0181] S505: Calculate the Euclidean distance between the gemstone feature to be evaluated and each reference gemstone feature, and obtain a final reference gemstone image corresponding to the reference gemstone feature whose calculated Euclidean distance is within a preset range.
[0182] S506: pre-processing the first gemstone picture and the multiple final reference gemstone pictures to obtain a first gemstone picture group and multiple groups of final reference gemstone picture groups.
[0183] The execution process and principle of S506 are similar to those of the above-mentioned embodiment of the present invention. Figure 2 The execution process and principle of S502 shown in FIG. 5 are the same and will not be described in detail here.
[0184] The process of processing the gemstone similarity measurement data for each final reference gemstone picture group and the first gemstone picture group is shown in S507 to S510:
[0185] S507: Combine the first gemstone picture group and the final reference gemstone picture group to obtain a plurality of gemstone picture pairs.
[0186] S508: Input each gem image pair into a pre-established deep learning model and output the corresponding gem image vector pair.
[0187] S509: Calculate the cosine distance based on the gemstone picture vectors in each gemstone picture vector pair.
[0188] S510: From all the obtained cosine distances, select the largest cosine distance as similarity measurement data between the first gemstone and the reference gemstone.
[0189] The execution process and principle of the above S507 to S510 are similar to the above embodiment of the present invention. Figure 2 The execution process and principle of S202 to S205 shown in FIG. 1 are the same and will not be repeated here.
[0190] S511: Selecting an estimated price of a reference gemstone having the largest similarity measurement data from multiple groups of similarity measurement data of the first gemstone and the reference gemstone, and estimating the price of the first gemstone.
[0191] In the embodiment of the present invention, by obtaining similarity measurement data of the reference gemstones with similar features and the first gemstone, the valuation of the reference gemstone with the largest similarity measurement data is selected to estimate the first gemstone. This process does not need to rely on manual experience, can be completed automatically, and is highly efficient and easy to promote on a large scale. At the same time, after two automatic screenings, the valuation of the first gemstone is more accurate.
[0192] Based on the gemstone similarity measurement data processing method disclosed in the above-mentioned embodiment of the present invention, the embodiment of the present invention also correspondingly discloses a gemstone similarity measurement data processing system.
[0193] like Figure 6 As shown, the gemstone similarity measurement data processing system 600 includes: a preprocessing module 601, a combination module 602, a deep learning model 603 and a similarity measurement processing module 604.
[0194] The preprocessing module 601 is used to obtain a first gemstone picture and a reference gemstone picture and perform preprocessing to obtain a first gemstone picture group and a reference gemstone picture group, wherein the first gemstone picture group includes one or more preprocessed first gemstone pictures, and the reference gemstone picture group includes one or more preprocessed reference gemstone pictures, and the first gemstone on the first gemstone picture and the reference gemstone on the reference gemstone picture are gemstones of the same type.
[0195] The preprocessing module 601 is specifically used to obtain a first gemstone image and a reference gemstone image; perform a preprocessing operation on the first gemstone image to obtain four preprocessed first gemstone images to form a first gemstone image group; perform the same preprocessing operation on the reference gemstone image to obtain four preprocessed reference gemstone images to form a reference gemstone image group.
[0196] The pre-processing operation includes:
[0197] Copy the first gem picture to obtain a second gem picture; set the background of the second gem picture to white to obtain a first preprocessed first gem picture; place the foreground in the first preprocessed first gem picture at the center of the picture, and make the foreground occupy 25% of the area ratio of the first preprocessed first gem picture, to obtain a second preprocessed first gem picture; use the first gem picture as the third preprocessed first gem picture; place the foreground in the third preprocessed first gem picture at the center of the picture, and make the foreground occupy 25% of the area ratio of the third preprocessed first gem picture, to obtain a fourth preprocessed first gem picture.
[0198] The combining module 602 is used to combine the first gemstone picture group and the reference gemstone picture group to obtain a plurality of gemstone picture pairs, each of which includes at least one preprocessed first gemstone picture and one preprocessed reference gemstone picture.
[0199] The deep learning model 603 is used to perform vector processing on each input gemstone image and output a corresponding gemstone image vector pair.
[0200] The similarity measurement processing module 604 is used to calculate the cosine distance based on the gemstone image vector in each gemstone image vector pair, and select the largest cosine distance from all the cosine distances obtained as the similarity measurement data between the first gemstone and the reference gemstone. The similarity measurement data is the basis for product processing of the first gemstone. The higher the similarity measurement data, the higher the similarity between the first gemstone and the reference gemstone.
[0201] like Figure 7 As shown, optional, combined Figure 6 The gemstone similarity measurement data processing system 600 shown further includes: a pre-establishment module 605 .
[0202] The pre-established module 605 includes:
[0203] The acquisition unit is used to acquire gemstone training pictures, wherein the gemstone training pictures include gemstone pictures taken by users and gemstone pictures evaluated by experts.
[0204] The preprocessing unit is used to preprocess the training images to obtain one or more preprocessed gemstone training images corresponding to each training image.
[0205] The data enhancement unit is used to perform data enhancement processing on the preprocessed gemstone training images, and generate a data enhanced gemstone training image for each preprocessed training gemstone image.
[0206] Optionally, the data enhancement unit is specifically used to generate a to-be-processed gemstone training image for each of the preprocessed gemstone training images, and perform any one or combination of random rotation of a preset angle, random cropping of a preset area, grayscale transformation, Gaussian processing and / or left-right flipping processing to obtain the corresponding data enhanced gemstone training images.
[0207] The training unit is used to use the data-enhanced training images as input of the initial deep learning network model, train the initial deep learning model, and obtain a final deep learning model.
[0208] In the embodiment of the present invention, two gemstone images are processed in combination with the deep learning model obtained by pre-training to obtain similarity measurement data of the gemstones in the two gemstone images, and then the first gemstone is classified, recommended, and other product processing is performed based on the similarity measurement data and the reference gemstone. This process does not need to rely on manual experience, can be completed automatically, and is efficient and easy to promote on a large scale.
[0209] Based on the gemstone similarity measurement data processing method and system disclosed in the above-mentioned embodiments of the present invention, the embodiments of the present invention also disclose an electronic device, which includes a processor and a memory, the memory is used to store processing program code and data of gemstone similarity measurement data, and the processor is used to call the program instructions in the memory to execute the gemstone similarity measurement data processing method disclosed in the above-mentioned embodiments of the present invention.
[0210] The embodiment of the present invention further discloses a storage medium, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the gemstone similarity measurement data processing method disclosed in the above embodiment of the present invention.
[0211] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0212] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0213] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for processing gemstone similarity measurement data, It is characterized in that The method comprises: Acquire a first gemstone picture and a reference gemstone picture and perform preprocessing to obtain a first gemstone picture group and a reference gemstone picture group, wherein the first gemstone picture group includes one or more preprocessed first gemstone pictures, and the reference gemstone picture group includes one or more preprocessed reference gemstone pictures, and the first gemstone on the first gemstone picture and the reference gemstone on the reference gemstone picture are gemstones of the same type; Combining the first gemstone picture group and the reference gemstone picture group to obtain a plurality of gemstone picture pairs, each of the gemstone picture pairs comprising at least one preprocessed first gemstone picture and one preprocessed reference gemstone picture; Input each gem image pair into a pre-established deep learning model and output the corresponding gem image vector pair; For each gemstone picture vector pair, calculating the cosine distance between the first gemstone picture vector and the reference gemstone picture vector; From all the cosine distances obtained, the largest cosine distance is selected as the similarity measurement data between the first gemstone and the reference gemstone, the similarity measurement data is the basis for product processing of the first gemstone, and the higher the similarity measurement data is, the higher the similarity between the gemstone to be processed and the reference gemstone is; The step of obtaining the first gemstone picture and the reference gemstone picture and performing preprocessing to obtain the first gemstone picture group and the reference gemstone picture group includes: Obtain a first gemstone image and a reference gemstone image; Performing a preprocessing operation on the first gemstone image to obtain four preprocessed first gemstone images, which constitute a gemstone image group to be processed; The pre-processing operation includes: Copy the first gemstone image to obtain a second gemstone image; Setting the background of the second gemstone image to white to obtain a first preprocessed first gemstone image; Placing the foreground in the first preprocessed first gem picture at the center of the picture, and making the foreground occupy 25% of the area ratio of the first preprocessed first gem picture, to obtain a second preprocessed first gem picture; Using the first gemstone image as the third pre-processed first gemstone image; Placing the foreground in the third preprocessed first gem picture at the center of the picture, and making the foreground occupy 25% of the area ratio of the third preprocessed first gem picture, to obtain a fourth preprocessed first gem picture; The same preprocessing operation is performed on the reference gemstone images to obtain four preprocessed reference gemstone images, which constitute a reference gemstone image group.
2. The method according to claim 1, It is characterized in that The process of pre-establishing a deep learning model includes: Obtaining gemstone training pictures, wherein the gemstone training pictures include gemstone pictures taken by users and gemstone pictures evaluated by experts; Preprocessing the training images to obtain one or more preprocessed gemstone training images corresponding to each training image; Performing data enhancement processing on the preprocessed gemstone training images to generate a data enhanced gemstone training image for each preprocessed training gemstone image; The data-enhanced training images are used as the input of the initial deep learning network model, and the initial deep learning model is trained to obtain the final deep learning model.
3. The method according to claim 2, It is characterized in that The step of performing data enhancement processing on the pre-processed gemstone training image comprises: Generating a first gemstone training picture to be processed for each of the preprocessed gemstone training pictures; Randomly rotating the first gemstone training picture to be processed by a preset angle to obtain a second gemstone training picture to be processed; Randomly scaling the second gemstone training image to be processed and cropping a preset area to obtain a third gemstone training image to be processed; Performing grayscale transformation processing on the third gemstone training picture to be processed to obtain a fourth gemstone training picture to be processed; Performing Gaussian processing on the fourth gemstone training image to be processed to obtain a fifth gemstone training image to be processed; The fifth gemstone training image to be processed is flipped left-right to obtain a data-enhanced gemstone training image corresponding to the pre-processed gemstone training image.
4. A gemstone similarity measurement data processing system, It is characterized in that include: a preprocessing module, used to obtain a first gemstone picture and a reference gemstone picture and perform preprocessing to obtain a first gemstone picture group and a reference gemstone picture group, wherein the first gemstone picture group includes one or more preprocessed first gemstone pictures, and the reference gemstone picture group includes one or more preprocessed reference gemstone pictures, and the first gemstone on the first gemstone picture and the reference gemstone on the reference gemstone picture are gemstones of the same type; A combining module, used for combining the first gemstone picture group and the reference gemstone picture group to obtain a plurality of gemstone picture pairs, each of the gemstone picture pairs at least comprising a preprocessed first gemstone picture and a preprocessed reference gemstone picture; A deep learning model is used to perform vector processing on each input gemstone image and output a corresponding gemstone image vector pair; A similarity measurement processing module is used to calculate the cosine distance between the first gemstone image vector and the reference gemstone image vector for each gemstone image vector pair, and select the largest cosine distance from all the cosine distances obtained as the similarity measurement data between the first gemstone and the reference gemstone, wherein the similarity measurement data is the basis for product processing of the first gemstone, and the higher the similarity measurement data, the higher the similarity between the first gemstone and the reference gemstone; The preprocessing module is specifically used to obtain a first gemstone picture and a reference gemstone picture; perform a preprocessing operation on the first gemstone picture to obtain four preprocessed first gemstone pictures to form a first gemstone picture group; Performing the same preprocessing operation on the reference gemstone images to obtain four preprocessed reference gemstone images to form a reference gemstone image group; The pre-processing operation includes: Copy the first gem picture to obtain the second gem picture; set the background of the second gem picture to white to obtain the first preprocessed first gem picture; place the foreground in the first preprocessed first gem picture at the center of the picture, and make the foreground occupy 25% of the area ratio of the first preprocessed first gem picture, to obtain the second preprocessed first gem picture; use the first gem picture as the third preprocessed first gem picture; place the foreground in the third preprocessed first gem picture at the center of the picture, and make the foreground occupy 25% of the area ratio of the third preprocessed first gem picture, to obtain the fourth preprocessed first gem picture.
5. The system according to claim 4, It is characterized in that Also includes: Pre-built modules; The pre-built module includes: An acquisition unit, used for acquiring gemstone training pictures, wherein the gemstone training pictures include gemstone pictures taken by users and gemstone pictures evaluated by experts; A preprocessing unit, used to preprocess the training images to obtain one or more preprocessed gemstone training images corresponding to each training image; A data enhancement unit, used to perform data enhancement processing on the preprocessed gemstone training images, and generate a data enhanced gemstone training image for each preprocessed training gemstone image; The training unit is used to use the data-enhanced training images as input of the initial deep learning network model, train the initial deep learning model, and obtain a final deep learning model.
6. The system according to claim 5, It is characterized in that The data enhancement unit is specifically used to generate a to-be-processed gemstone training image for each of the pre-processed gemstone training images, and perform any one or combination of random rotation of a preset angle, random cropping of a preset area, grayscale transformation, Gaussian processing and / or left-right flipping processing to obtain the corresponding data enhanced gemstone training images.
7. An electronic device, It is characterized in that The electronic device includes a processor and a memory, wherein the memory is used to store processing program code and data for gemstone similarity measurement data, and the processor is used to call program instructions in the memory to execute a gemstone similarity measurement data processing method as described in any one of claims 1 to 3.
8. A storage medium, It is characterized in that The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the gemstone similarity measurement data processing method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Face verification method and device based on Triplet Loss, computer device and storage medium
CN108009528A
