A gemstone rough stone tracing method based on a multiple screening mechanism and related device
Patent Information
- Application Number
- CN202611461366.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-20
- Publication Date
- 2026-10-27
AI Technical Summary
[0006]鉴于上述问题,本发明实施例提供了一种基于多重筛选机制的宝玉石原石溯源方法、装置、计算机设备及计算机可读存储介质,用于解决现有技术中存在的宝玉石检测溯源过程中,单一特征识别局限、计算效率低且准确率不足的问题
[0017]本发明实施例通过获取各个待检测样品的样品信息,所述样品信息包括宝石的样品重量及尺寸信息、多个角度的宏观图像及多个角度的微观图像;将所述样品信息输入多模态数据筛查模型中,所述多模态数据筛查模型根据样品参考数据及所述样品信息,对所述样品信息进行筛查,得到筛查结果;所述样品参考数据包括多个参考样品的参考信息,所述参考信息包括参考重量及参考尺寸、多个角度的参考宏观图像及多个角度的参考微观图像;输出所述筛查结果,能够有效融合样品的物理属性(重量+尺寸)和视觉特征(宏观图像、微观图像),充分利用多维度信息进行综合判断。采用"先快速筛选,再精确匹配"的计算策略,避免对全量(千万级数据量)数据库进行高计算成本的图像匹配。通过逐级缩小候选集,将计算复杂度从O(n)降低到O(k),其中k<<n,大幅提高计算效率。
Smart Images

Figure CN122986107A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to gemstone testing technology, artificial intelligence and information technology, specifically to a method, device, computer equipment and computer-readable storage medium for tracing the origin of gemstone rough based on a multi-screening mechanism. Background Technology
[0002] In the field of sample management and quality control, sample traceability is an important and challenging problem. Traditional sample traceability methods mainly include: (1) traceability methods based on a single feature. Such as traceability based on weight / size. Traceability based on weight / size: only compare sample weight, length, width and height, and images to determine whether they are duplicates. This method is simple and direct, but the accuracy and efficiency are extremely low, because different samples may have the same or similar weight. It is not a big problem for dozens to hundreds of samples, but it is extremely time-consuming and ineffective for millions of samples. Traceability based on images: for faceted gemstones, measure the table area, measure the ratio of the maximum and minimum length of the table. This method will result in gemstones with similar shapes having the same proportional parameters. Only image matching is used to determine whether they are duplicates. This method has a relatively high accuracy, but the computational cost is high and it is easily affected by factors such as lighting, angle, and occlusion, and cannot achieve high-precision matching of a single image. (2) Simple combination method based on multiple features: such as simple weighted combination of multiple features (such as weight, images, etc.), but lacks a systematic screening mechanism. It does not consider the differences in computational cost and screening efficiency of different features, making it difficult to apply to real-world scenarios with high precision requirements. (3) End-to-end method based on deep learning: It uses deep learning models to directly learn the similarity of samples, but requires a large amount of labeled data and has poor model interpretability. This makes it difficult to deploy in resource-constrained environments due to the large demand for computing resources.
[0003] The existing technology has the following main drawbacks and shortcomings: (1) Limitations of single feature recognition: Relying solely on a single feature (such as weight / size or image) for source tracing is prone to false positives. Different samples may have the same or similar weight / size, leading to a high false positive rate for weight-based source tracing methods. Relying solely on image matching is computationally intensive and can be affected by factors such as lighting, angle, and partial occlusion, resulting in either missed or false positives.
[0004] (2) Low computational efficiency: When the sample database is large (e.g., tens of thousands of samples), performing full image matching calculations on all samples is computationally expensive and time-consuming. Image matching algorithms (single models such as SIFT and SURF) have high computational complexity, making full matching difficult to meet the time requirements of practical applications. Furthermore, there is a lack of effective filtering mechanisms to reduce unnecessary computation.
[0005] (3) Insufficient accuracy: Single-feature matching is susceptible to interference from measurement errors and environmental factors, resulting in low traceability accuracy. Alternatively, even after screening a large amount of data, significant manpower is required for further screening. In actual testing, such subsequent manual screening takes at least 4-5 hours to complete the screening of a single sample. The false positive rate and false negative rate are high, impacting practical application effectiveness. Furthermore, a multi-layered verification mechanism is lacking to improve traceability reliability. Summary of the Invention
[0006] In view of the above problems, embodiments of the present invention provide a method, apparatus, computer equipment and computer-readable storage medium for tracing the origin of gemstones based on a multi-screening mechanism, which is used to solve the problems of single feature recognition limitations, low computational efficiency and insufficient accuracy in the gemstone detection and tracing process in the prior art.
[0007] According to one aspect of the present invention, a method for tracing the origin of gemstone rough based on a multiple screening mechanism is provided, the method comprising: Acquire sample information for each sample to be tested, including the sample weight and size information of the gemstone, macroscopic images from multiple angles, and microscopic images from multiple angles. The sample information is input into a multimodal data screening model. The multimodal data screening model screens the sample information based on the sample reference data and the sample information to obtain screening results. The sample reference data includes reference information of multiple reference samples, including reference weight and reference size, reference macroscopic images from multiple angles, and reference microscopic images from multiple angles. Output the screening results; the screening results include information on duplicate samples to be tested.
[0008] In one optional approach, inputting the sample information into a multimodal data screening model, wherein the multimodal data screening model screens the sample information based on sample reference data and the sample information, includes: The multimodal data screening model performs preliminary screening on each sample to be tested based on the reference weight and reference size of each reference sample, as well as the sample weight and size information, to obtain a preliminary screening sample set. The multimodal data screening model filters the macroscopic images of each sample in the initial screening sample set based on reference macroscopic images of each reference sample from multiple angles, thus obtaining a macroscopic screening sample set. The multimodal data screening model performs screening based on reference microscopic images of each reference sample from multiple angles, as well as microscopic images of each sample in the microscopic screening sample set, to obtain screening results.
[0009] In one optional approach, the multimodal data screening model performs preliminary screening on each sample to be tested based on the reference weight and reference size of each reference sample, as well as the sample weight and size information, to obtain a preliminary screening sample set, further comprising: Calculate the first absolute error between the sample weight of each test sample and the reference weight of each reference sample, and the second absolute error between the maximum size of each test sample and the reference maximum size of each reference sample. If the first absolute error corresponding to the first target sample to be tested is less than the preset weight tolerance threshold and the second absolute error is less than the preset size tolerance threshold, the first target sample to be tested is added to the initial screening sample set; the first target sample to be tested is one of the various samples to be tested.
[0010] In one optional approach, the multimodal data screening model filters the macroscopic images of each sample in the initial screening sample set based on reference macroscopic images of each reference sample from multiple angles, to obtain a macroscopic screening sample set, including: The number of first basic in-situ points between each reference macroscopic image and each macroscopic image of the second target sample to be detected in the initial screening sample set is calculated using an image matching algorithm. Based on the first distribution uniformity coefficient and the first consistency coefficient, the number of points within each of the first basic points is corrected to obtain the number of points within each of the first corrected points. The first matching score of the matching pair is calculated based on the first weighted matching score and the first confidence factor; the first matching score is determined based on the first maximum number of inner points, the first average number of inner points, and the number of first valid matching pairs corresponding to each first corrected inner point number. The first internal point threshold is dynamically adjusted based on the first basic internal point threshold and the first absolute error and / or second absolute error in the initial screening sample set. If the first matching score is greater than the first internal point threshold, then the second target sample to be tested is determined to be added to the macroscopic screening sample set; the second target sample to be tested is one of the multiple samples to be tested in the initial screening sample set.
[0011] In one optional approach, the multimodal data screening model performs screening based on reference microscopic images of each reference sample from multiple angles, and microscopic images of each sample in the microscopic screening sample set, to obtain screening results, including: The number of second basic in-situ points between each reference microscopic image and each microscopic image of the third target sample to be detected in the macroscopic screening sample set is calculated using an image matching algorithm. Based on the second distribution uniformity coefficient and the second consistency coefficient, the number of points within each of the second basic values is corrected to obtain the number of points within each of the second corrected values. The second matching score of the matching pair is calculated based on the second weighted matching score and the second confidence factor; the second matching score is determined based on the second maximum number of inner points, the second average number of inner points, and the number of second valid matching pairs corresponding to each second modified inner point number. The second internal point threshold is dynamically adjusted based on the second basic internal point threshold, the first basic internal point threshold, and the first absolute error and / or the second absolute error in the initial screening sample set. If the second matching score is greater than the second internal point threshold, then the third target sample to be tested is determined to be added to the microscopic screening sample set; the third target sample to be tested is one of the multiple samples to be tested in the initial screening sample set.
[0012] In an alternative approach, the method further includes: summarizing the screening results from each stage and generating a traceability report based on the screening results.
[0013] According to another aspect of the present invention, a gemstone traceability device based on a multiple screening mechanism is provided, comprising: The acquisition module is used to acquire sample information of each sample to be tested, including the sample weight and size information of the gemstone, macroscopic images from multiple angles and microscopic images from multiple angles. The screening module is used to input the sample information into a multimodal data screening model. The multimodal data screening model screens the sample information based on the sample reference data and the sample information to obtain screening results. The sample reference data includes reference information of multiple reference samples, including reference weight and reference size, reference macroscopic images from multiple angles, and reference microscopic images from multiple angles. An output module is used to output the screening results; the screening results include information on duplicate samples to be tested.
[0014] In one optional approach, inputting the sample information into a multimodal data screening model, wherein the multimodal data screening model screens the sample information based on sample reference data and the sample information, includes: The multimodal data screening model performs preliminary screening on each sample to be tested based on the reference weight and reference size of each reference sample, as well as the sample weight and size information, to obtain a preliminary screening sample set. The multi-modal data screening model screens the macroscopic image of each sample in the primary screening sample set according to the reference macroscopic images of multiple angles of each reference sample, to obtain a macroscopic screening sample set; The multi-modal data screening model performs screening according to the reference microscopic images of multiple angles of each reference sample and the microscopic image of each sample in the microscopic screening sample set, to obtain a screening result.
[0015] According to another aspect of the embodiments of the present invention, there is provided a computer device, comprising a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus; The memory is configured to store at least one executable instruction, and the executable instruction causes the processor to execute the operations of the above-mentioned multi-screening mechanism-based gemstone rough stone tracing method.
[0016] According to yet another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, wherein at least one executable instruction is stored in the storage medium, and when the executable instruction runs on a computer device, the computer device is caused to execute the operations of the above-mentioned multi-screening mechanism-based gemstone rough stone tracing method.
[0017] In the embodiments of the present invention, sample information of each sample to be detected is acquired, wherein the sample information includes sample weight and size information of the gemstone, macroscopic images of multiple angles and microscopic images of multiple angles; the sample information is input into a multi-modal data screening model, and the multi-modal data screening model screens the sample information according to sample reference data and the sample information to obtain a screening result; the sample reference data includes reference information of a plurality of reference samples, and the reference information includes reference weight and reference size, reference macroscopic images of multiple angles and reference microscopic images of multiple angles; the screening result is output, which can effectively integrate the physical attributes (weight + size) and visual features (macroscopic image, microscopic image) of the sample, and make full use of multi-dimensional information for comprehensive judgment. The calculation strategy of "first rapid screening, then precise matching" is adopted to avoid image matching with high calculation cost for the full-volume (data volume of ten million levels) database. By narrowing the candidate set step by step, the calculation complexity is reduced from O(n) to O(k), where k<<n, which greatly improves the calculation efficiency.
[0018] Furthermore, in the second and third rounds of screening, each image of the reference sample is paired with each image of the candidate sample. The maximum number of interior points in all matching pairs is recorded as the matching degree index for that candidate sample, ensuring that no best match is missed. The maximum number of interior points is based on 100% correctness in the blind sample validation set, considering both duplicate and non-duplicate samples (for example, the blind sample dataset is divided into two categories: duplicates are in the database, and non-duplicates are not in the database; 100 items in the database contain 1000 macroscopic and microscopic images). The model requires that 100% of the data in the database be considered duplicates, and 100% of the data not in the database be considered non-duplicates. Key parameters such as weight tolerance, macroscopic image interior point threshold, and microscopic image interior point threshold can be flexibly configured according to the application scenario. Parameter adjustment is supported under different accuracy requirements and computational resource constraints, improving the system's adaptability and practicality. In any screening stage, if the candidate set is empty, the process is immediately terminated to avoid unnecessary calculations. Optimized utilization of computational resources is achieved through conditional judgment.
[0019] Furthermore, in this embodiment of the invention, the threshold for the number of interior points in the second and third rounds of screening is dynamically adjusted based on the absolute weight error in the first round of screening. The smaller the weight error, the more similar the samples are, and the image matching threshold can be appropriately reduced. This forms a collaborative mechanism between weight and image matching, further improving screening accuracy and efficiency.
[0020] In the matching and screening of macroscopic and microscopic images, not only is the number of interior points counted, but the matching quality is also evaluated: the spatial distribution uniformity of matching points and the geometric consistency of matching point pairs are calculated; based on the quality evaluation results, the number of interior points is corrected, which effectively improves the accuracy and robustness of the judgment and avoids misjudgment caused by relying solely on the number of interior points.
[0021] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0022] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating the gemstone tracing method based on a multiple screening mechanism provided in this embodiment of the invention is shown. Figure 2 This diagram illustrates the structure of a gemstone tracing device based on a multiple screening mechanism provided in an embodiment of the present invention. Figure 3A schematic diagram of the structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation
[0023] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0024] Figure 1 The flowchart illustrates a gemstone tracing method based on a multiple screening mechanism provided in an embodiment of the present invention. This method is executed by a computer device. This computer device can be a desktop computer, tablet computer, jewelry testing equipment, smart terminal, distributed device, etc., and the embodiments of the present invention do not impose specific limitations. Figure 1 As shown, the method includes the following steps: Step 110: Obtain sample information for each sample to be tested.
[0025] In this embodiment of the invention, each sample to be tested is a large number of gemstone rough samples, such as Hetian jade pebbles or gemstone rough samples whose appearance and weight are not altered during submission. In the testing field, testing a massive number of samples requires multiple stages, including receiving, registering, pre-processing, testing, and reporting. Errors in sample information entry and verification can easily occur during the handover between these stages. Traceability can verify key information such as sample number, origin, and testing items, promptly identifying mismatches and avoiding situations where some samples are missed or processed repeatedly. Therefore, high-precision and high-efficiency identification and traceability of the samples to be tested are necessary.
[0026] The sample information in this embodiment of the invention includes the sample weight and size information of the gemstone, macroscopic images from multiple angles, and microscopic images from multiple angles. The sample weight is obtained by weighing using a high-precision electronic balance. The size information is obtained by capturing images using a smart terminal or camera with a camera at a preset distance and with the same shooting parameters such as focal length. The macroscopic image is an image of the overall appearance captured by a smart terminal or camera with a camera. The microscopic features are image features magnified to a preset magnification (e.g., 20-50 times). Since the same Hetian jade looks different from different angles, macroscopic and microscopic images are captured from different angles according to a preset shooting process to avoid low accuracy due to different placement each time. For example, a sample number is assigned to the sample to be tested, which is a unique identifier. More than 5 images are captured from different angles for each sample to be tested, resulting in more than 5 macroscopic images and more than 5 microscopic images for each sample. Weight value: The weight of the sample, in grams (g), accurate to three decimal places; the macroscopic image set of the sample to be tested includes multiple macroscopic images; the microscopic image set of the sample to be tested includes multiple microscopic images.
[0027] Step 120: Input the sample information into the multimodal data screening model. The multimodal data screening model screens the sample information based on the sample reference data and the sample information to obtain the screening results.
[0028] In this embodiment of the invention, the sample reference data includes reference information for multiple reference samples. This reference information includes reference weight and dimensions, reference macroscopic images from multiple angles, and reference microscopic images from multiple angles. A database containing known reference samples is pre-constructed, storing information about each sample. Each reference sample includes the following information: Sample number: a unique identifier, such as "NEPZY001", "sample_1", etc. Each sample is captured by more than 5 images from different angles, with more than 5 macroscopic images and more than 5 microscopic images per sample; Weight value of the reference sample: the weight of the sample in grams (g), accurate to three decimal places; Set of macroscopic images of the reference sample: multiple macroscopic images stored in the "macroimg" folder; Set of microscopic images of the reference sample: multiple microscopic images stored in the "microimg" folder. The data for the reference samples can be read from an Excel file for weight information, and macroscopic and microscopic images are automatically identified from the folder structure. Supported image formats include: JPG, JPEG, PNG, BMP, and TIFF. The samples to be tested are obtained using the same method. The sample reference data and sample information of the samples to be tested are stored in the database. The sample folder stores macroscopic and microscopic images, and the Excel file stores weight and size data as well as sample numbers.
[0029] The screening of the sample information is specifically carried out through the following steps: Step 1201: The multimodal data screening model performs preliminary screening on each sample to be tested based on the reference weight and reference size of each reference sample, as well as the sample weight and size information, to obtain a preliminary screening sample set.
[0030] The first stage of screening is weight and size screening: a rapid initial screening is performed based on sample weight and maximum length attributes. By comparing the calculated absolute error with a preset weight tolerance and the calculated absolute error with a preset maximum length tolerance, the candidate range is quickly narrowed down. This is the basic screening layer of this invention, with extremely low computational cost, which can significantly reduce the amount of subsequent calculations.
[0031] This includes calculating a first absolute error between the sample weight of each test sample and the reference weight of each reference sample, and a second absolute error between the maximum size of each test sample and the reference maximum size of each reference sample. If the first absolute error corresponding to the first target test sample is less than a preset weight tolerance threshold, and the second absolute error is less than a preset size tolerance threshold, then the first target test sample is added to the initial screening sample set. The first target test sample is one of the test samples.
[0032] In one implementation, the specific process is as follows: 1) Obtain the weight of the sample to be tested. ; 2) Iterate through each reference sample in the database and calculate the first absolute error: absolute error ; in, The weight value is the reference sample value in the database.
[0033] 3) Screening criteria: First absolute error ≤ weight tolerance ; in, The preset weight tolerance is 0.05g, which can be adjusted within the range of 0.01g to 0.1g depending on the actual application scenario.
[0034] 4) Add the samples that meet the criteria to the initial screening sample set C1; 5) If C1 is empty, it is directly determined as non-duplicate and the process ends; otherwise, it proceeds to the second level of filtering.
[0035] Example: Assume the reference sample (the reference sample in the database) weighs 10.05g, with a weight tolerance of 0.05g. The weights of the samples to be tested in the database are 10.00g, 10.08g, 10.15g, and 9.95g, respectively. Then: Sample 1: |10.00-10.05| = 0.05≤0.05, passed; Sample 2: |10.08-10.05| = 0.03 ≤ 0.05, passed; Sample 3: |10.15-10.05| = 0.10 > 0.05, fails; Sample 4: |9.95-10.05| = 0.10 > 0.05, fails.
[0036] Therefore, the initial screening sample set C1 contains sample 1 and sample 2. Maximum size screening, consistent with weight, is performed by setting a first absolute error.
[0037] Step 1202: The multimodal data screening model filters the macroscopic images of each sample in the initial screening sample set based on reference macroscopic images of each reference sample from multiple angles, thereby obtaining a macroscopic screening sample set.
[0038] The candidate samples selected after the first round of screening undergo a second round of screening by performing pairwise matching of all macroscopic images. In this embodiment of the invention, an image matching algorithm is used to calculate the number of interior points between the reference macroscopic images of each reference sample from multiple angles and the macroscopic images of each sample in the initial screening sample set, and the screening is performed by using a preset threshold for the number of interior points in the macroscopic images. This is the intermediate verification layer of this embodiment of the invention, which combines visual features for verification.
[0039] Specifically, it includes the following steps: 1) Use an image matching algorithm to calculate the number of first basic in-points between each reference macroscopic image and each macroscopic image of the second target sample to be detected in the initial screening sample set.
[0040] Obtain a set of macroscopic images of the reference sample. For each sample to be tested in the initial screening sample set C1 : Acquire a set of macroscopic images of the sample to be tested {J1, J2, ..., Jn}. Calculate the first fundamental interior points between Ik and Jl using an image matching algorithm (such as ROMA). In one embodiment, the image matching algorithm can be ROMA (Robust Dense Feature Matching) + ELOFTR algorithm or a deep learning image matching algorithm. The ROMA algorithm or a deep learning-based image matching algorithm is used. The image matching algorithm outputs the matched keypoint pairs as the first basic inlier count. The first basic inlier count reflects the similarity between images; the more inliers, the more similar the images.
[0041] 2) Based on the first distribution uniformity coefficient and the first consistency coefficient, correct the number of points in each of the first basic internal points to obtain the number of points in each of the first corrected internal points.
[0042] The image matching algorithm outputs matching key point pairs, and filters out inliers through geometric consistency tests (such as RANSAC). The number of inliers reflects the degree of similarity between images; the more inliers, the more similar the images are.
[0043] Among them, image matching and quality correction: for reference samples Each image Ik and candidate sample in For each image J1 in the dataset, the image with the largest matching point value is ultimately selected, and quality-perceived inlier count correction is performed, including: Calculate the spatial distribution uniformity of matching points: Divide the image into an N×N grid, statistically analyze the distribution of matching points in each grid, and calculate the uniformity coefficient (between 0 and 1). ; in, ε represents the number of matching points in each grid cell, std is the standard deviation, mean is the mean, ε is the minimum value to prevent division by zero, and the uniformity coefficient ranges from 0 to 1. The larger the value, the more uniform the distribution.
[0044] Calculate the spatial distance between all matching point pairs: .in, and For the first i A number of matching point pairs.
[0045] Calculate the geometric consistency of matching point pairs: Calculate the distances of all matching point pairs, evaluate the concentration of the distance distribution, and obtain the consistency coefficient (between 0 and 1). Calculate the concentration of the distance distribution and evaluate the geometric consistency coefficient: .
[0046] Based on the uniformity of distribution and geometric consistency, the number of points within the base is corrected to obtain the first corrected number of points: .
[0047] Wherein, α and β are correction coefficients, preferably α=0.2 and β=0.1.
[0048] The revised number of interior points can more accurately reflect the quality of image matching, rather than just the quantity.
[0049] 3) Calculate the first matching score of the matching pair based on the first weighted matching score and the first confidence factor. The first matching score is determined based on the first maximum number of inner points, the first average number of inner points, and the number of first valid matching pairs corresponding to each first corrected inner point number.
[0050] The weighted matching score is calculated as follows: Collect the modified in-point counts of all matching pairs to obtain the set. ; Calculate the first maximum number of interior points ; Calculate the first average number of interior points ; Calculate the number of first valid matching pairs (The number of matching pairs with an interior point count greater than 0); Calculate the first confidence factor ; Calculate the first weighted matching score: ; Here, θ and θ' are weighting coefficients, which can be set according to the specific scenario. In one embodiment, θ can be 0.7 and θ' can be 0.3.
[0051] Final match score: .
[0052] 4) Dynamically adjust the first internal point count threshold based on the first basic internal point count threshold and the first absolute error and / or second absolute error in the initial screening sample set. Specifically, a first adjustment coefficient is calculated based on the first absolute error and / or second absolute error, and the first internal point count threshold is adjusted based on the first adjustment coefficient and the first basic internal point count threshold.
[0053] Among them, according to the sample to be tested Absolute weight error in the first screening (That is, the first absolute error), adaptively adjusts, dynamically adjusting the first inner point threshold of the macroscopic image. The specific process is calculated using the following formula: First normalization error .
[0054] First adjustment factor = 1.0 - 0.2 × (1 - normalization error); First interior point threshold First adjustment factor.
[0055] Among them, the smaller the absolute weight error, the greater the adjustment range of the first inner point threshold, with a minimum not lower than ×0.8.
[0056] The initial threshold for the number of inliers can be adjusted based on the specific application scenario: for scenarios with high accuracy requirements, the weight tolerance can be reduced and the threshold for the number of inliers can be increased. For scenarios with limited computing resources, the threshold for the number of inliers can be appropriately increased to reduce computational load. For scenarios with high accuracy requirements, the threshold for the number of inliers can be appropriately decreased to improve recall.
[0057] 5) If the first matching score is greater than the first internal point threshold, then the second target sample to be tested is determined to be added to the macroscopic screening sample set; the second target sample to be tested is one of the multiple samples to be tested in the initial screening sample set.
[0058] if If the first interior point number threshold is greater than or equal to the first interior point number threshold, then... Add macroscopic screening sample set C2.
[0059] If the macroscopic screening sample set C2 is empty, it is determined to be non-repeating, and the process ends; otherwise, it proceeds to the third screening stage.
[0060] Example: There are 3 macroscopic images of the reference sample and 2 macroscopic images of the candidate sample to be tested. The weight error of the candidate sample in the first screening based on weight and size is 0.02g (normalized error = 0.4). The first basic threshold for macroscopic image screening in the second screening is... This threshold is obtained through iteration of the blinded validation set by the maximum number of inliers, based on the 100% correctness of the screening of duplicate and non-duplicate samples (for example, the blinded sample dataset is divided into two categories: duplicates are in the database, and non-duplicates are not in the database; 100 data items in the database contain 1000 macro and micro images).
[0061] Dynamic threshold adjustment: First adjustment coefficient = 1.0 - 0.2 × (1 - 0.4) = 0.88, first inner point threshold = 500 × 0.88 = 440.
[0062] As shown in Table 1, after pairwise matching and quality correction, the corrected inner point matrix is obtained: Table 1: Reference image 1 480 350 Reference image 2 410 560 Reference image 3 310 440 Weighted matching score calculate: , , ; Weighted matching score: .
[0063] ; Since 585.64 ≥ 440, the sample to be tested passes the second screening.
[0064] This invention enables adaptive threshold adjustment through this setup: the image matching threshold is dynamically adjusted based on the weight plus the maximum size error of the first screening, forming a collaborative mechanism between weight and image matching. A smaller weight error indicates more similar samples, allowing for a more appropriate reduction in the image matching threshold and improved screening efficiency. Quality-aware inlier count correction: Not only is the inlier count counted, but matching quality (spatial distribution uniformity, geometric consistency) is also evaluated to correct the matching results and improve accuracy. Weighted matching score calculation: The matching score is calculated using a weighted method, comprehensively considering the maximum inlier count, average inlier count, and the number of matching pairs. This fully utilizes information from multiple matching pairs and avoids misjudgments caused by a single matching pair.
[0065] Step 1203: The multimodal data screening model performs screening based on reference microscopic images of each reference sample from multiple angles, as well as microscopic images of each sample in the microscopic screening sample set, to obtain screening results.
[0066] Among them, microscopic images have higher resolution and richer detail features compared to macroscopic images; the second inner point threshold for microscopic image matching. Typically greater than the second inner point threshold for macroscopic image matching. This allows for more stringent screening. Since the candidate set is already small after the first two screenings, microscopic image matching employs stricter quality evaluation criteria. Therefore, a third screening is performed using microscopic image screening.
[0067] In this embodiment of the invention, an image matching algorithm is used to calculate the number of second basic in-points between each reference microscopic image and each microscopic image of the third target sample to be detected in the macroscopic screening sample set; the number of second basic in-points is corrected according to the second distribution uniformity coefficient and the second consistency coefficient to obtain the number of second corrected in-points; the second matching score of the matching pair is calculated according to the second weighted matching score and the second confidence factor; the second matching score is determined according to the second maximum in-point number, the second average in-point number and the second effective matching pair number corresponding to each second corrected in-point number; the second in-point number threshold is dynamically adjusted according to the second basic in-point number threshold, the first basic in-point number threshold and the first absolute error and / or the second absolute error in the initial screening sample set; if the second matching score is greater than the second in-point number threshold, the third target sample to be detected is determined to be added to the microscopic screening sample set; the third target sample to be detected is one of the multiple samples to be detected in the initial screening sample set.
[0068] The specific process for precise matching based on microscopic images is as follows: 1) Obtain a set of microscopic images of the reference sample. ; 2) For each candidate sample to be tested in the macroscopic screening sample set C2 ; Obtain a collection of microscopic images of candidate samples. ; Perform adaptive threshold adjustment: based on Absolute weight error in the first screening (First absolute error), dynamically adjust the second inner point threshold of the microscopic image: Second normalization error ; Second adjustment factor = 1.0 - 0.2 × (1 - normalization error) Second dynamic threshold = In the adjustment coefficient, the smaller the weight error, the larger the threshold adjustment range, with a minimum not lower than [missing value]. .
[0069] Image matching and quality correction: For Each image in Kr and Each image Ls in: The second fundamental interior point number between Kr and Ls is calculated using an image matching algorithm. ; Quality-perceived interior point count correction (same method as macroscopic image matching): Calculate the uniformity of the second spatial distribution of the matching points. Calculate the second geometric consistency' of the matching point pairs; Second correction of interior points: .
[0070] Weighted matching score calculation (same method as macroscopic image matching): Collect the second modified inner point count of all matching pairs, and calculate the second maximum inner point count, the second average inner point count, and the second effective matching pair count; Calculate the second weighted matching score: ; Calculate the final matching score: .
[0071] if If the number of points is greater than or equal to the second threshold, then... Add the third candidate set C3 to obtain the final matching result.
[0072] in, The preset threshold for the number of points within a microscopic image is based on the minimum recognition value obtained through iteration from tens of thousands of existing samples in the database. The preferred value is 1000, which can be adjusted within the range of 1000 to 2000 according to the actual application scenario. This threshold is obtained through iteration of the maximum number of points within a blind sample validation set, based on the 100% correctness of the screening of duplicate and non-duplicate samples (for example, the blind sample dataset is divided into two categories: duplicates are in the database, and non-duplicates are not in the database. 100 data items in the database have 1000 macroscopic and microscopic images). 3) If C3 is not empty, it is determined to be a duplicate, and the numbers of all samples in C3 are output; otherwise, it is determined to be a non-duplicate.
[0073] Step 130: Output the screening results.
[0074] The screening results include information on duplicate samples to be tested, and through prior verification, these screening results are considered unique.
[0075] Specifically, the screening results include the following information: : A Boolean value indicating whether a duplicate is detected. : The number of candidate samples after the first round of screening. : The number of candidate samples after the second round of screening. : The number of candidate samples after the third round of screening (the final matching quantity). : The list of sample numbers of the final matched samples. : Result description information.
[0076] In the embodiment of the present invention, the method further includes: summarizing the screening results of each stage, and generating a traceability report according to the screening results. The model requires 100% of samples in the library to be judged as having duplicates, and 100% of samples not in the library to be judged as having no duplicates.
[0077] In the embodiment of the present invention, by acquiring the sample information of each sample to be detected, the sample information including the sample weight and size information of the gem, macro images of multiple angles and micro images of multiple angles; inputting the sample information into a multi-modal data screening model, the multi-modal data screening model screens the sample information according to the sample reference data and the sample information to obtain a screening result; the sample reference data includes reference information of a plurality of reference samples, and the reference information includes reference weight and reference size, reference macro images of multiple angles and reference micro images of multiple angles; outputting the screening result, which can effectively integrate the physical attributes (weight + size) and visual features (macro images, micro images) of the sample, and make full use of multi-dimensional information for comprehensive judgment. The calculation strategy of "first quick screening, then precise matching" is adopted to avoid image matching with high calculation cost for the full-volume (tens of millions of data volume) database. By gradually reducing the candidate set, the calculation complexity is reduced from O(n) to O(k), where k<<n, which greatly improves the calculation efficiency.
[0078] Further, in the second and third rounds of screening, each image of the reference sample and each image of the candidate sample are subjected to full-volume pairwise matching. The maximum number of inner points in all matching pairs is recorded as the matching index of the candidate sample, so as to ensure that the best match is not missed. Key parameters such as weight tolerance, macro image inner point number threshold, and micro image inner point number threshold can be flexibly configured according to application scenarios. It supports parameter adjustment under different precision requirements and computing resource constraints, and improves the adaptability and practicability of the system. Wherein, in any screening stage, if the candidate set is empty, the process is terminated immediately to avoid unnecessary calculation. The optimized utilization of computing resources is realized through conditional judgment.
[0079] Furthermore, in this embodiment of the invention, the threshold for the number of interior points in the second and third rounds of screening is dynamically adjusted based on the absolute weight error in the first round of screening. The smaller the weight error, the more similar the samples are, and the image matching threshold can be appropriately reduced. This forms a collaborative mechanism between weight and image matching, further improving screening accuracy and efficiency.
[0080] In the matching and screening of macroscopic and microscopic images, not only is the number of interior points counted, but the matching quality is also evaluated: the spatial distribution uniformity of matching points and the geometric consistency of matching point pairs are calculated; based on the quality evaluation results, the number of interior points is corrected, which effectively improves the accuracy and robustness of the judgment and avoids misjudgment caused by relying solely on the number of interior points.
[0081] Figure 2 A schematic diagram of the structure of a gemstone traceability device based on a multiple screening mechanism provided in an embodiment of the present invention is shown. Figure 2 As shown, the device 300 includes: The acquisition module 310 is used to acquire sample information of each sample to be tested, including the sample weight and size information of the gemstone, macroscopic images from multiple angles and microscopic images from multiple angles. The screening module 320 is used to input the sample information into a multimodal data screening model. The multimodal data screening model screens the sample information based on the sample reference data and the sample information to obtain screening results. The sample reference data includes reference information of multiple reference samples, including reference weight and reference size, reference macroscopic images from multiple angles, and reference microscopic images from multiple angles. The output module 330 is used to output the screening results; the screening results include information on duplicate samples to be tested.
[0082] In one optional approach, the step of inputting the sample information into a multimodal data screening model, wherein the multimodal data screening model screens the sample information based on sample reference data and the sample information, includes: The multimodal data screening model performs preliminary screening on each sample to be tested based on the reference weight and reference size of each reference sample, as well as the sample weight and size information, to obtain a preliminary screening sample set. The multimodal data screening model filters the macroscopic images of each sample in the initial screening sample set based on reference macroscopic images of each reference sample from multiple angles, thus obtaining a macroscopic screening sample set. The multimodal data screening model performs screening based on reference microscopic images of each reference sample from multiple angles, as well as microscopic images of each sample in the microscopic screening sample set, to obtain screening results.
[0083] In one optional approach, the multimodal data screening model performs preliminary screening on each sample to be tested based on the reference weight and reference size of each reference sample, as well as the sample weight and size information, to obtain a preliminary screening sample set, further comprising: Calculate the first absolute error between the sample weight of each test sample and the reference weight of each reference sample, and the second absolute error between the maximum size of each test sample and the reference maximum size of each reference sample. If the first absolute error corresponding to the first target sample to be tested is less than the preset weight tolerance threshold and the second absolute error is less than the preset size tolerance threshold, the first target sample to be tested is added to the initial screening sample set; the first target sample to be tested is one of the various samples to be tested.
[0084] In one optional approach, the multimodal data screening model filters the macroscopic images of each sample in the initial screening sample set based on reference macroscopic images of each reference sample from multiple angles, to obtain a macroscopic screening sample set, including: The number of first basic in-situ points between each reference macroscopic image and each macroscopic image of the second target sample to be detected in the initial screening sample set is calculated using an image matching algorithm. Based on the first distribution uniformity coefficient and the first consistency coefficient, the number of points within each of the first basic points is corrected to obtain the number of points within each of the first corrected points. The first matching score of the matching pair is calculated based on the first weighted matching score and the first confidence factor; the first matching score is determined based on the first maximum number of inner points, the first average number of inner points, and the number of first valid matching pairs corresponding to each first corrected inner point number. The first internal point threshold is dynamically adjusted based on the first basic internal point threshold and the first absolute error and / or second absolute error in the initial screening sample set. If the first matching score is greater than the first internal point threshold, then the second target sample to be tested is determined to be added to the macroscopic screening sample set; the second target sample to be tested is one of the multiple samples to be tested in the initial screening sample set.
[0085] In one optional approach, the multimodal data screening model performs screening based on reference microscopic images of each reference sample from multiple angles, and microscopic images of each sample in the microscopic screening sample set, to obtain screening results, including: The number of second basic in-situ points between each reference microscopic image and each microscopic image of the third target sample to be detected in the macroscopic screening sample set is calculated using an image matching algorithm. Based on the second distribution uniformity coefficient and the second consistency coefficient, the number of points within each of the second basic values is corrected to obtain the number of points within each of the second corrected values. Calculate a second matching score of the matching pair according to the second weighted matching score and the second confidence factor; the second matching score is determined according to the second maximum number of inliers, the second average number of inliers and the second number of valid matching pairs corresponding to each second corrected number of inliers; Dynamically adjust the first inlier count threshold according to the second base inlier count threshold, the first base inlier count threshold, and the first absolute error and / or the second absolute error in the preliminary screening sample set; If the second matching score is greater than the second inlier count threshold, it is determined that a third target sample to be tested is added to the microscopic screening sample set; the third target sample to be tested is one of the multiple samples to be tested in the preliminary screening sample set.
[0086] The specific working process of the gemstone rough stone traceability device based on the multiple screening mechanism in the embodiment of the present invention is substantially consistent with the specific implementation steps of the foregoing method embodiment, and will not be repeated here.
[0087] In the embodiment of the present invention, sample information of each sample to be tested is acquired, where the sample information includes the sample weight and size information of the gemstone, macro images of multiple angles and micro images of multiple angles; the sample information is input into a multi-modal data screening model, and the multi-modal data screening model screens the sample information according to sample reference data and the sample information to obtain a screening result; the sample reference data includes reference information of a plurality of reference samples, and the reference information includes reference weight and reference size, reference macro images of multiple angles and reference micro images of multiple angles; the screening result is output, which can effectively integrate the physical properties (weight + size) and visual features (macro images, micro images) of the sample, and make full use of multi-dimensional information for comprehensive judgment. The calculation strategy of "rapid screening first, then precise matching" is adopted to avoid image matching with high calculation cost on the full-volume (tens of millions of data volume) database. By narrowing the candidate set step by step, the computational complexity is reduced from O(n) to O(k), where k<<n, which greatly improves the computational efficiency.
[0088] Further, in the second and third rounds of screening, each image of the reference sample and each image of the candidate sample are subjected to full-volume pairwise matching. The maximum number of inliers in all matching pairs is recorded as the matching index of the candidate sample, so as to ensure that the best match is not missed. Key parameters such as weight tolerance, macro image inlier count threshold, and micro image inlier count threshold can be flexibly configured according to application scenarios. It supports parameter adjustment under different precision requirements and computing resource constraints, and improves the adaptability and practicability of the system. Wherein, in any screening stage, if the candidate set is empty, the process is terminated immediately to avoid unnecessary calculation. The optimized utilization of computing resources is realized through conditional judgment.
[0089] Furthermore, in this embodiment of the invention, the threshold for the number of interior points in the second and third rounds of screening is dynamically adjusted based on the absolute weight error in the first round of screening. The smaller the weight error, the more similar the samples are, and the image matching threshold can be appropriately reduced. This forms a collaborative mechanism between weight and image matching, further improving screening accuracy and efficiency.
[0090] In the matching and screening of macroscopic and microscopic images, not only is the number of interior points counted, but the matching quality is also evaluated: the spatial distribution uniformity of matching points and the geometric consistency of matching point pairs are calculated; based on the quality evaluation results, the number of interior points is corrected, which effectively improves the accuracy and robustness of the judgment and avoids misjudgment caused by relying solely on the number of interior points.
[0091] Figure 3 The diagram shows a structural schematic of a computer device provided in an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computer device.
[0092] like Figure 3 As shown, the computer device may include: a processor 402, a communications interface 404, a memory 406, and a communications bus 408.
[0093] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other network elements such as clients or other servers. The processor 402 executes program 410, specifically performing the relevant steps described in the embodiment of the gemstone tracing method based on a multi-screening mechanism.
[0094] Specifically, program 410 may include program code, which includes computer-executable instructions.
[0095] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The computer device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0096] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0097] Specifically, program 410 can be called by processor 402 to cause the computer device to perform the following operations: Acquire sample information for each sample to be tested, including the sample weight and size information of the gemstone, macroscopic images from multiple angles, and microscopic images from multiple angles. The sample information is input into a multimodal data screening model. The multimodal data screening model screens the sample information based on the sample reference data and the sample information to obtain screening results. The sample reference data includes reference information of multiple reference samples, including reference weight and reference size, reference macroscopic images from multiple angles, and reference microscopic images from multiple angles. Output the screening results; the screening results include information on duplicate samples to be tested.
[0098] In one optional approach, inputting the sample information into a multimodal data screening model, wherein the multimodal data screening model screens the sample information based on sample reference data and the sample information, includes: The multimodal data screening model performs preliminary screening on each sample to be tested based on the reference weight and reference size of each reference sample, as well as the sample weight and size information, to obtain a preliminary screening sample set. The multimodal data screening model filters the macroscopic images of each sample in the initial screening sample set based on reference macroscopic images of each reference sample from multiple angles, thus obtaining a macroscopic screening sample set. The multimodal data screening model performs screening based on reference microscopic images of each reference sample from multiple angles, as well as microscopic images of each sample in the microscopic screening sample set, to obtain screening results.
[0099] In one optional approach, the multimodal data screening model performs preliminary screening on each sample to be tested based on the reference weight and reference size of each reference sample, as well as the sample weight and size information, to obtain a preliminary screening sample set, further comprising: Calculate the first absolute error between the sample weight of each test sample and the reference weight of each reference sample, and the second absolute error between the maximum size of each test sample and the reference maximum size of each reference sample. If the first absolute error corresponding to the first target sample to be tested is less than the preset weight tolerance threshold and the second absolute error is less than the preset size tolerance threshold, the first target sample to be tested is added to the initial screening sample set; the first target sample to be tested is one of the various samples to be tested.
[0100] In one optional approach, the multimodal data screening model filters the macroscopic images of each sample in the initial screening sample set based on reference macroscopic images of each reference sample from multiple angles, to obtain a macroscopic screening sample set, including: The number of first basic in-situ points between each reference macroscopic image and each macroscopic image of the second target sample to be detected in the initial screening sample set is calculated using an image matching algorithm. Based on the first distribution uniformity coefficient and the first consistency coefficient, the number of points within each of the first basic points is corrected to obtain the number of points within each of the first corrected points. The first matching score of the matching pair is calculated based on the first weighted matching score and the first confidence factor; the first matching score is determined based on the first maximum number of inner points, the first average number of inner points, and the number of first valid matching pairs corresponding to each first corrected inner point number. The first internal point threshold is dynamically adjusted based on the first basic internal point threshold and the first absolute error and / or second absolute error in the initial screening sample set. If the first matching score is greater than the first internal point threshold, then the second target sample to be tested is determined to be added to the macroscopic screening sample set; the second target sample to be tested is one of the multiple samples to be tested in the initial screening sample set.
[0101] In one optional approach, the multimodal data screening model performs screening based on reference microscopic images of each reference sample from multiple angles, and microscopic images of each sample in the microscopic screening sample set, to obtain screening results, including: The number of second basic in-situ points between each reference microscopic image and each microscopic image of the third target sample to be detected in the macroscopic screening sample set is calculated using an image matching algorithm. Based on the second distribution uniformity coefficient and the second consistency coefficient, the number of points within each of the second basic values is corrected to obtain the number of points within each of the second corrected values. The second matching score of the matching pair is calculated based on the second weighted matching score and the second confidence factor; the second matching score is determined based on the second maximum number of inner points, the second average number of inner points, and the number of second valid matching pairs corresponding to each second modified inner point number. The first internal point threshold is dynamically adjusted based on the second basic internal point threshold, the first basic internal point threshold, and the first absolute error and / or the second absolute error in the initial screening sample set. If the second matching score is greater than the second internal point threshold, then the third target sample to be tested is determined to be added to the microscopic screening sample set; the third target sample to be tested is one of the multiple samples to be tested in the initial screening sample set.
[0102] In the embodiments of the present invention, sample information of each sample to be detected is acquired, where the sample information includes the sample weight and size information of the gem, macro images from multiple angles and micro images from multiple angles; the sample information is input into a multimodal data screening model, and the multimodal data screening model screens the sample information according to sample reference data and the sample information to obtain a screening result; the sample reference data includes reference information of a plurality of reference samples, and the reference information includes reference weight and reference size, reference macro images from multiple angles and reference micro images from multiple angles; the screening result is output, which can effectively integrate the physical attributes (weight + size) and visual features (macro image, micro image) of the sample, and make full use of multi-dimensional information for comprehensive judgment. The calculation strategy of "fast screening first, then precise matching" is adopted to avoid image matching with high calculation cost on the full-volume database (with data volume of ten million levels). By narrowing the candidate set step by step, the computational complexity is reduced from O(n) to O(k), where k<<n, which greatly improves the computational efficiency.
[0103] Further, in the second and third rounds of screening, each image of the reference sample and each image of the candidate sample are subjected to full-volume pairwise matching. The maximum number of inner points among all matching pairs is recorded as the matching index of the candidate sample, so as to ensure that the best match is not missed. Key parameters such as weight tolerance, the threshold of the number of inner points of macro images, and the threshold of the number of inner points of micro images can be flexibly configured according to application scenarios. It supports parameter adjustment under different precision requirements and computing resource constraints, and improves the adaptability and practicability of the system. Wherein, in any screening stage, if the candidate set is empty, the process is immediately terminated to avoid unnecessary calculation. The optimized utilization of computing resources is realized through conditional judgment.
[0104] Further, the embodiments of the present invention dynamically adjust the thresholds of the number of inner points for the second and third rounds of screening according to the absolute weight error in the first round of screening; the smaller the weight error, the more similar the samples are, and the image matching threshold can be appropriately reduced. A coordination mechanism of weight and image matching is formed, which further improves the screening accuracy and efficiency.
[0105] In the matching screening of macro images and micro images, not only the number of inner points is counted, but also the matching quality is evaluated: the spatial distribution uniformity of matching points and the geometric consistency of matching point pairs are calculated; based on the quality evaluation result, the number of inner points is corrected, which can effectively improve the accuracy and robustness of judgment, and avoid misjudgment caused by only relying on the number of inner points.
[0106] The embodiments of the present invention provide a computer-readable storage medium, where the storage medium stores at least one executable instruction, and when the executable instruction runs on a computer device, the computer device is caused to execute the gem rough stone traceability method based on a multi-screening mechanism in any of the above method embodiments.
[0107] Executable instructions can be used to cause computer devices to perform the following operations: Acquire sample information for each sample to be tested, including the sample weight and size information of the gemstone, macroscopic images from multiple angles, and microscopic images from multiple angles. The sample information is input into a multimodal data screening model. The multimodal data screening model screens the sample information based on the sample reference data and the sample information to obtain screening results. The sample reference data includes reference information of multiple reference samples, including reference weight and reference size, reference macroscopic images from multiple angles, and reference microscopic images from multiple angles. Output the screening results; the screening results include information on duplicate samples to be tested.
[0108] In one optional approach, inputting the sample information into a multimodal data screening model, wherein the multimodal data screening model screens the sample information based on sample reference data and the sample information, includes: The multimodal data screening model performs preliminary screening on each sample to be tested based on the reference weight and reference size of each reference sample, as well as the sample weight and size information, to obtain a preliminary screening sample set. The multimodal data screening model filters the macroscopic images of each sample in the initial screening sample set based on reference macroscopic images of each reference sample from multiple angles, thus obtaining a macroscopic screening sample set. The multimodal data screening model performs screening based on reference microscopic images of each reference sample from multiple angles, as well as microscopic images of each sample in the microscopic screening sample set, to obtain screening results.
[0109] In one optional approach, the multimodal data screening model performs preliminary screening on each sample to be tested based on the reference weight and reference size of each reference sample, as well as the sample weight and size information, to obtain a preliminary screening sample set, further comprising: Calculate the first absolute error between the sample weight of each test sample and the reference weight of each reference sample, and the second absolute error between the maximum size of each test sample and the reference maximum size of each reference sample. If the first absolute error corresponding to the first target sample to be tested is less than the preset weight tolerance threshold and the second absolute error is less than the preset size tolerance threshold, the first target sample to be tested is added to the initial screening sample set; the first target sample to be tested is one of the various samples to be tested.
[0110] In one optional approach, the multimodal data screening model filters the macroscopic images of each sample in the initial screening sample set based on reference macroscopic images of each reference sample from multiple angles, to obtain a macroscopic screening sample set, including: The number of first basic in-situ points between each reference macroscopic image and each macroscopic image of the second target sample to be detected in the initial screening sample set is calculated using an image matching algorithm. Based on the first distribution uniformity coefficient and the first consistency coefficient, the number of points within each of the first basic points is corrected to obtain the number of points within each of the first corrected points. The first matching score of the matching pair is calculated based on the first weighted matching score and the first confidence factor; the first matching score is determined based on the first maximum number of inner points, the first average number of inner points, and the number of first valid matching pairs corresponding to each first corrected inner point number. The first internal point threshold is dynamically adjusted based on the first basic internal point threshold and the first absolute error and / or second absolute error in the initial screening sample set. If the first matching score is greater than the first internal point threshold, then the second target sample to be tested is determined to be added to the macroscopic screening sample set; the second target sample to be tested is one of the multiple samples to be tested in the initial screening sample set.
[0111] In one optional approach, the multimodal data screening model performs screening based on reference microscopic images of each reference sample from multiple angles, and microscopic images of each sample in the microscopic screening sample set, to obtain screening results, including: The number of second basic in-situ points between each reference microscopic image and each microscopic image of the third target sample to be detected in the macroscopic screening sample set is calculated using an image matching algorithm. Based on the second distribution uniformity coefficient and the second consistency coefficient, the number of points within each of the second basic values is corrected to obtain the number of points within each of the second corrected values. The second matching score of the matching pair is calculated based on the second weighted matching score and the second confidence factor; the second matching score is determined based on the second maximum number of inner points, the second average number of inner points, and the number of second valid matching pairs corresponding to each second modified inner point number. The first internal point threshold is dynamically adjusted based on the second basic internal point threshold, the first basic internal point threshold, and the first absolute error and / or the second absolute error in the initial screening sample set. If the second matching score is greater than the second internal point threshold, then the third target sample to be tested is determined to be added to the microscopic screening sample set; the third target sample to be tested is one of the multiple samples to be tested in the initial screening sample set.
[0112] In the embodiments of the present invention, sample information of each sample to be detected is acquired, where the sample information includes the sample weight and size information of the gem, macroscopic images of multiple angles, and microscopic images of multiple angles; the sample information is input into a multi-modal data screening model, and the multi-modal data screening model performs screening on the sample information according to sample reference data and the sample information to obtain a screening result; the sample reference data includes reference information of a plurality of reference samples, and the reference information includes reference weight and reference size, reference macroscopic images of multiple angles, and reference microscopic images of multiple angles; the screening result is output, which can effectively integrate the physical properties (weight + size) and visual features (macroscopic images, microscopic images) of the sample, and make full use of multi-dimensional information for comprehensive judgment. The calculation strategy of "fast screening first, then precise matching" is adopted to avoid high-computational-cost image matching for the full-volume database (with a data volume of tens of millions). By narrowing the candidate set step by step, the computational complexity is reduced from O(n) to O(k), where k<<n, which greatly improves the computational efficiency.
[0113] Further, in the second and third rounds of screening, each image of the reference sample and each image of the candidate sample are subjected to full-volume pairwise matching. The maximum number of inner points among all matching pairs is recorded as the matching index of the candidate sample, so as to ensure that the best match is not missed. Key parameters such as weight tolerance, the inner point number threshold of macroscopic images, and the inner point number threshold of microscopic images can be flexibly configured according to application scenarios. It supports parameter adjustment under different precision requirements and computing resource constraints, and improves the adaptability and practicability of the system. Wherein, in any screening stage, if the candidate set is empty, the process is terminated immediately to avoid unnecessary calculation. The optimized utilization of computing resources is realized through conditional judgment.
[0114] Further, in the embodiments of the present invention, the inner point number thresholds for the second and third rounds of screening are dynamically adjusted according to the absolute weight error in the first round of screening; the smaller the weight error is, the more similar the samples are, and the image matching threshold can be appropriately reduced. A coordination mechanism of weight and image matching is formed, which further improves the screening accuracy and efficiency.
[0115] In the matching and screening of macroscopic images and microscopic images, not only the number of inner points is counted, but also the matching quality is evaluated: the spatial distribution uniformity of matching points and the geometric consistency of matching point pairs are calculated; based on the quality evaluation result, the number of inner points is corrected, which can effectively improve the accuracy and robustness of judgment, and avoid misjudgment caused by only relying on the number of inner points.
[0116] An embodiment of the present invention provides a gem rough stone traceability device based on a multi-stage screening mechanism, configured to execute the above-mentioned gem rough stone traceability method based on a multi-stage screening mechanism.
[0117] This invention provides a computer program that can be called by a processor to enable a computer device to execute the gemstone tracing method based on a multiple screening mechanism in any of the above method embodiments.
[0118] This invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions, which, when executed on a computer, cause the computer to perform the gemstone tracing method based on a multiple screening mechanism described in any of the above method embodiments.
[0119] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0120] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0121] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.
[0122] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0123] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A method for tracing the origin of gemstone rough based on a multiple screening mechanism, characterized in that, The method includes: Obtain sample information for each sample to be tested, including the sample weight and size information of the gemstone rough, macroscopic images from multiple angles, and microscopic images from multiple angles. The sample information is input into a multimodal data screening model. The multimodal data screening model screens the sample information based on the sample reference data and the sample information to obtain screening results. The sample reference data includes reference information of multiple reference samples, including reference weight and reference size, reference macroscopic images from multiple angles, and reference microscopic images from multiple angles. Output the screening results; the screening results include information on duplicate samples to be tested.
2. The method according to claim 1, characterized in that, The step of inputting the sample information into the multimodal data screening model, wherein the multimodal data screening model screens the sample information based on sample reference data and the sample information, includes: The multimodal data screening model performs preliminary screening on each sample to be tested based on the reference weight and reference size of each reference sample, as well as the sample weight and size information, to obtain a preliminary screening sample set. The multimodal data screening model filters the macroscopic images of each sample in the initial screening sample set based on reference macroscopic images of each reference sample from multiple angles, thus obtaining a macroscopic screening sample set. The multimodal data screening model performs screening based on reference microscopic images of each reference sample from multiple angles, as well as microscopic images of each sample in the microscopic screening sample set, to obtain the screening results.
3. The method according to claim 2, characterized in that, The multimodal data screening model performs preliminary screening on each sample to be tested based on the reference weight and reference size of each reference sample, as well as the sample weight and size information, to obtain a preliminary screening sample set, which further includes: Calculate the first absolute error between the sample weight of each test sample and the reference weight of each reference sample, and the second absolute error between the maximum size of each test sample and the reference maximum size of each reference sample. If the first absolute error corresponding to the first target sample to be tested is less than the preset weight tolerance threshold and the second absolute error is less than the preset size tolerance threshold, the first target sample to be tested is added to the initial screening sample set; the first target sample to be tested is one of the various samples to be tested.
4. The method according to claim 3, characterized in that, The multimodal data screening model filters the macroscopic images of each sample in the initial screening sample set based on reference macroscopic images of each reference sample from multiple angles, resulting in a macroscopic screening sample set, including: The number of first basic in-situ points between each reference macroscopic image and each macroscopic image of the second target sample to be detected in the initial screening sample set is calculated using an image matching algorithm. Based on the first distribution uniformity coefficient and the first consistency coefficient, the number of points within each of the first basic points is corrected to obtain the number of points within each of the first corrected points. The first matching score of the matching pair is calculated based on the first weighted matching score and the first confidence factor; the first matching score is determined based on the first maximum number of inner points, the first average number of inner points, and the number of first valid matching pairs corresponding to each first corrected inner point number. The first internal point threshold is dynamically adjusted based on the first basic internal point threshold and the first absolute error and / or second absolute error in the initial screening sample set. If the first matching score is greater than the first internal point threshold, then the second target sample to be tested is determined to be added to the macroscopic screening sample set; the second target sample to be tested is one of the multiple samples to be tested in the initial screening sample set.
5. The method according to claim 3, characterized in that, The multimodal data screening model performs screening based on reference microscopic images of each reference sample from multiple angles, as well as microscopic images of each sample in the microscopic screening sample set, to obtain screening results, including: The number of second basic in-situ points between each reference microscopic image and each microscopic image of the third target sample to be detected in the macroscopic screening sample set is calculated using an image matching algorithm. Based on the second distribution uniformity coefficient and the second consistency coefficient, the number of points within each of the second basic values is corrected to obtain the number of points within each of the second corrected values. The second matching score of the matching pair is calculated based on the second weighted matching score and the second confidence factor; the second matching score is determined based on the second maximum number of inner points, the second average number of inner points, and the number of second valid matching pairs corresponding to each second modified inner point number. The second internal point threshold is dynamically adjusted based on the second basic internal point threshold, the first basic internal point threshold, and the first absolute error and / or the second absolute error in the initial screening sample set. If the second matching score is greater than the second internal point threshold, then the third target sample to be tested is determined to be added to the microscopic screening sample set; the third target sample to be tested is one of the multiple samples to be tested in the initial screening sample set.
6. The method according to any one of claims 1-3, characterized in that, The method also includes: summarizing the screening results at each stage and generating a traceability report based on the screening results.
7. A gemstone traceability device based on a multiple screening mechanism, characterized in that, The device includes: The acquisition module is used to acquire sample information of each sample to be tested, including the sample weight and size information of the gemstone, macroscopic images from multiple angles and microscopic images from multiple angles. The screening module is used to input the sample information into a multimodal data screening model. The multimodal data screening model screens the sample information based on the sample reference data and the sample information to obtain screening results. The sample reference data includes reference information of multiple reference samples, including reference weight and reference size, reference macroscopic images from multiple angles, and reference microscopic images from multiple angles. An output module is used to output the screening results; the screening results include information on duplicate samples to be tested.
8. The apparatus according to claim 7, characterized in that, The step of inputting the sample information into the multimodal data screening model, wherein the multimodal data screening model screens the sample information based on sample reference data and the sample information, includes: The multimodal data screening model performs preliminary screening on each sample to be tested based on the reference weight and reference size of each reference sample, as well as the sample weight and size information, to obtain a preliminary screening sample set. The multimodal data screening model filters the macroscopic images of each sample in the initial screening sample set based on reference macroscopic images of each reference sample from multiple angles, thus obtaining a macroscopic screening sample set. The multimodal data screening model performs screening based on reference microscopic images of each reference sample from multiple angles, as well as microscopic images of each sample in the microscopic screening sample set, to obtain screening results.
9. A computer device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation of the gemstone tracing method based on a multi-screening mechanism as described in any one of claims 1-6.
10. A computer-readable storage medium, characterized in that, The storage medium stores at least one executable instruction, which, when executed on a computer device, causes the computer device to perform the operation of the gemstone tracing method based on a multi-screening mechanism as described in any one of claims 1-6.