Gem and inlay defect detection method and system based on machine vision
By combining multimodal hardware imaging and deep learning algorithms, high-precision and automated detection of gemstone defects and setting process parameters has been achieved, solving the problems of low efficiency, poor consistency and equipment dependence of traditional detection methods, and meeting the needs of rapid non-destructive testing on jewelry production lines.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG MECHANICAL & ELECTRICAL COLLEGE
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies lack sufficient accuracy in detecting minute internal cracks and surface chips in gemstone defect detection, and the detection of setting processes is difficult to quantify. Traditional methods are inefficient and inconsistent, and relying on high-cost equipment cannot meet the requirements for real-time, rapid, and non-destructive testing on production lines.
By employing a multimodal hardware imaging unit combined with deep learning algorithms, and through two-dimensional high-definition imaging, three-dimensional active optical measurement, and multispectral imaging technologies, the system achieves synchronous, automatic, and high-precision detection of internal and external defects of gemstones and inlay process parameters. It also utilizes a precision motion control platform and image registration technology to solve the image mismatch problem caused by changes in position and posture.
It achieves high-precision identification of gemstone defects and accurate quantification of setting process parameters, improving detection efficiency and reliability, meeting the needs of rapid non-destructive testing on the production line, and reducing dependence on high-cost equipment.
Smart Images

Figure CN122048903A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and intelligent manufacturing technology, specifically to a method and system for detecting defects in gemstones and inlays based on machine vision. Background Technology
[0002] The quality of jewelry depends on the quality of the gemstones themselves and the sophistication of the setting craftsmanship. Currently, the industry's testing mainly relies on trained gemologists using tools such as magnifying glasses and microscopes for visual inspection. This method is highly dependent on personal experience and suffers from problems such as low efficiency, poor consistency, high cost, and susceptibility to fatigue.
[0003] In gemstone defect detection, common defects include "dullness" (a dark surface), "pinholes" (internal pinholes), "black spots" (black impurities), "internal cracks" (internal fissures), and "stone chipping" (surface chipping). Current technologies have attempted to utilize machine vision for gemstone grading, such as using an area array camera and specific light sources to capture "authentic images" in a "black box," then combining this with artificial intelligence for evaluation. However, these methods primarily focus on macroscopic grading of gemstones, such as color and clarity, and lack sufficient accuracy and robustness in detecting complex defects such as minute, angled internal cracks (internal fissures) and surface chipping (stone chipping).
[0004] In terms of inlay technique inspection, the quality requirements are extremely stringent. Taking the classic prong setting as an example, the quality standards include: the prong angle must be 70-80 degrees; the prongs must retain 50%-60% of their original thickness to provide sufficient strength; the gemstone must be horizontally inserted into a precisely fitting setting without any gaps; the prong height should be 75%-85% of the gemstone's table height; and the contact area between the prong and the gemstone's crown must reach 33%-50% of the crown's length. Traditional inspection methods struggle to quantify these microscopic geometric parameters. While digital inlay inspection technology can analyze parameters such as layer thickness, porosity, and bonding strength, it typically relies on high-cost offline inspection equipment such as SEM (scanning electron microscope) and microfocus CT, which cannot meet the real-time, rapid, and non-destructive inspection needs of production lines.
[0005] Furthermore, in industrial visual inspection, positional shifts of the object under test due to installation errors or mechanical vibrations are a common problem, easily leading to image mismatches and resulting in false positives or false negatives. In gem-setting scenarios, even minute changes in the jewelry's posture pose a significant challenge to traditional image comparison methods based on fixed thresholds.
[0006] Therefore, the industry urgently needs an intelligent inspection system that can integrate the dual inspection requirements of the gemstone itself and the setting process, achieving automation, high precision, high reliability, and adaptability to production line rhythm. Summary of the Invention
[0007] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a machine vision-based gemstone and setting defect detection system. This system integrates two-dimensional high-definition imaging, three-dimensional active optical measurement, and multispectral imaging technologies, combined with advanced image processing and deep learning algorithms, to achieve synchronous, automatic, and high-precision detection of internal and external defects in gemstones and parameters of precious metal setting processes, thereby improving detection efficiency, objectivity, and reliability.
[0008] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0009] On one hand, embodiments of the present invention provide a machine vision-based method for detecting defects in gemstones and their settings, the method comprising the following steps:
[0010] S100 adjusts the jewelry to be tested to a predetermined detection position through a precision motion control platform, and acquires multi-dimensional image data of the jewelry to be tested through a multi-modal hardware imaging unit; the multi-dimensional image data includes two-dimensional color images, three-dimensional point cloud data and multispectral images.
[0011] S200, the core processing unit performs registration and alignment on the multi-dimensional image data to obtain registered two-dimensional and multispectral images;
[0012] S300, based on the registered two-dimensional and multispectral images, uses a deep learning model to identify gemstone defects and obtain gemstone defect identification results;
[0013] S400, based on the registered 3D point cloud data, quantitatively analyzes the key geometric parameters of the mosaicking process and obtains the analysis results of the mosaicking process parameters.
[0014] S500 assesses quality and generates an inspection report by combining the results of gemstone defect identification with the analysis of setting process parameters.
[0015] Optionally, in S100, the step of adjusting the jewelry to be tested to a predetermined detection pose via a precision motion control platform and acquiring multi-dimensional image data of the jewelry to be tested via a multi-modal hardware imaging unit; the multi-dimensional image data includes two-dimensional color images, three-dimensional point cloud data, and multispectral images, including:
[0016] The surface texture and color images of the jewelry under test are acquired using a two-dimensional high-resolution color imaging module.
[0017] The three-dimensional point cloud data of the jewelry under test is acquired by a three-dimensional structured light scanning module;
[0018] The multispectral microscopy imaging module is used to acquire characteristic images of the jewelry under test under specific spectral excitation.
[0019] Optionally, in S110, the two-dimensional high-resolution color imaging module includes an annular diffuse light source and a coaxial light source. The annular diffuse light source and the coaxial light source acquire images under different lighting modes to suppress reflections and highlight surface and subsurface features.
[0020] Optionally, in S120, the three-dimensional structured light scanning module is based on phase measurement profilometry. The three-dimensional structured light scanning module includes a digital stripe projector and a synchronously triggered industrial camera. The digital stripe projector projects an coded grating pattern onto the jewelry to be measured, and the industrial camera captures the deformed stripes and calculates the three-dimensional point cloud data.
[0021] Optionally, in S200, the step of registering and aligning the multi-dimensional image data through the core processing unit to obtain registered two-dimensional and multispectral images includes:
[0022] S210 employs a matching algorithm based on feature points or deep learning to perform feature matching between real-time acquired images and standard template images;
[0023] S220 calculates the transformation matrix based on the matching results, aligns the real-time acquired image with the standard template image, and eliminates image offset caused by changes in the position and posture of the jewelry under test.
[0024] Optionally, in S300, the deep learning model uses a visual base model combined with self-supervised learning for domain knowledge transfer, and the training of the deep learning model includes:
[0025] S310 uses a model pre-trained on a large-scale general image dataset as the backbone network;
[0026] S320 utilizes unlabeled gem images for domain adaptation through self-supervised learning;
[0027] S330, using a dataset labeled with defect categories for supervised fine-tuning, enables the model to identify and locate internal and surface defects in gemstones, including internal cracks, chipping, black spots, pinholes, and blemishes.
[0028] Optionally, in S400, the step of quantitatively analyzing the key geometric parameters of the mosaicking process based on the registered 3D point cloud data to obtain the mosaicking process parameter analysis results includes:
[0029] S410 automatically segments and identifies the gemstone table, girdle, and each prong by processing three-dimensional point cloud data;
[0030] S420 measures the prong angle, thickness, height, contact area with the gemstone, and gemstone-setting gap by calculating the normal vector, curvature, and spatial geometric relationship of the point cloud.
[0031] S430 compares the measured process parameters with the preset process standards to determine whether the inlay process is qualified.
[0032] Optionally, the precision motion control platform is a multi-axis electric rotary table, which automatically adjusts the pitch and rotation angles of the jewelry under test according to a preset program or visual feedback to ensure that the imaging unit can capture images comprehensively.
[0033] On the other hand, embodiments of the present invention provide a machine vision-based gemstone and setting defect detection system, including: a multimodal hardware imaging unit, a core processing unit, a result output unit, and a precision motion control platform;
[0034] The multimodal hardware imaging unit is used to acquire multidimensional image data of the jewelry to be tested. It includes at least a two-dimensional high-resolution color imaging module for acquiring surface texture and color, a structured light scanning module for acquiring three-dimensional geometric shape, and a multispectral microscopic imaging module for acquiring specific spectral features.
[0035] The core processing unit is communicatively connected to the imaging unit and is used to process and analyze the received multi-dimensional image data. It includes at least an image registration and alignment submodule, a gemstone defect intelligent identification submodule, and a setting process parameter quantitative analysis submodule.
[0036] The result output unit is used to output the quality judgment result and the test report;
[0037] The precision motion control platform is used to support and adjust the spatial pose of the jewelry to be tested, so as to ensure that the imaging unit can capture a full image.
[0038] On the other hand, embodiments of the present invention provide a system for detecting abnormal behavior in a secure room based on multi-channel feature fusion, comprising:
[0039] At least one processor;
[0040] At least one memory for storing at least one program;
[0041] When the at least one program is executed by the at least one processor, the at least one processor performs the method described above.
[0042] On the other hand, embodiments of the present invention provide a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to perform the above-described method.
[0043] The beneficial effects of this invention are:
[0044] This invention utilizes a multimodal hardware imaging unit to acquire multi-dimensional data on the surface texture, color, three-dimensional geometry, and specific spectral characteristics of gemstones. Combined with image registration and alignment technology in the core processing unit, it effectively solves the image mismatch problem caused by changes in the position and posture of the jewelry. The deep learning model, through domain knowledge transfer, significantly improves the accuracy and robustness in identifying complex and minute defects such as internal cracks and chipping in gemstones. Quantitative analysis of setting process parameters based on three-dimensional point cloud data enables precise measurement and qualification determination of key geometric parameters such as prong angles, thickness, and gemstone-setting gap. This system integrates gemstone defect detection with setting process inspection, achieving automated, high-precision, and highly reliable real-time detection. It effectively overcomes the drawbacks of traditional manual inspection, such as low efficiency, poor consistency, high cost, and reliance on experience. It also avoids the dependence on high-cost offline inspection equipment found in existing technologies, meeting the needs of rapid and non-destructive testing on jewelry production lines. This is of great significance for improving the quality control level of jewelry. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a flowchart illustrating the steps of a machine vision-based method for detecting defects in gemstones and their settings, as provided in an embodiment of the present invention.
[0047] Figure 2 This is a schematic diagram of the overall hardware configuration and connection of the system of the present invention.
[0048] Figure 3 This is a flowchart of the software algorithm processing of the core processing unit of the present invention.
[0049] Figure 4 A schematic diagram illustrating the principle of measuring the angle and height of the claw inlay using a 3D structured light scanning module.
[0050] Figure 5 This is a framework diagram for the training and application of the deep learning model in the intelligent gem defect recognition submodule. Detailed Implementation
[0051] The following will provide a clear and complete description of the concept, specific structure, and technical effects of the present invention in conjunction with embodiments and accompanying drawings, so as to fully understand the purpose, solution, and effects of the present invention. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0052] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of this invention; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this invention as detailed in the appended claims.
[0053] It is understood that the terms "first," "second," etc., used in this invention may be used to describe various concepts, but unless specifically stated otherwise, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of embodiments of this invention, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words "if" or "when" as used herein may be interpreted as "when," "in response to determination," or "in the event of a determination."
[0054] The terms “at least one,” “multiple,” “each,” “any,” etc., used in this invention, “at least one” includes one, two, or more than two; “multiple” includes two or more than two; “each” refers to each of the corresponding multiple; and “any” refers to any one of the multiple.
[0055] Unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this invention is for descriptive purposes only and is not intended to limit the invention.
[0056] refer to Figure 1 and Figure 2 This invention provides a machine vision-based method for detecting defects in gemstones and their settings, the method comprising the following steps:
[0057] S100 adjusts the jewelry to be tested to a predetermined detection position through a precision motion control platform, and acquires multi-dimensional image data of the jewelry to be tested through a multi-modal hardware imaging unit; the multi-dimensional image data includes two-dimensional color images, three-dimensional point cloud data and multispectral images.
[0058] S200, the core processing unit performs registration and alignment on the multi-dimensional image data to obtain registered two-dimensional and multispectral images;
[0059] S300, based on the registered two-dimensional and multispectral images, uses a deep learning model to identify gemstone defects and obtain gemstone defect identification results;
[0060] S400, based on the registered 3D point cloud data, quantitatively analyzes the key geometric parameters of the mosaicking process and obtains the analysis results of the mosaicking process parameters.
[0061] S500 assesses quality and generates an inspection report by combining the results of gemstone defect identification with the analysis of setting process parameters.
[0062] In steps S100 to S500 of this invention, the acquisition of multi-dimensional image data in step S100 is the foundation for subsequent analysis. Two-dimensional color images can clearly present the texture details and color characteristics of the gemstone surface, providing an intuitive basis for identifying surface defects such as chipping and black spots. Three-dimensional point cloud data accurately restores the three-dimensional structure of the jewelry, which is key to achieving micron-level measurements of setting parameters such as prong angles and contact areas. Multispectral images, through their characteristic responses under specific spectra, help to discover defects such as minute internal cracks or haze that are difficult to detect under conventional light. The registration and alignment processing in step S200 effectively solves the image misalignment problem caused by jewelry posture shifts, providing a unified spatial coordinate benchmark for subsequent defect identification and parameter measurement, ensuring accurate and reliable spatial correspondence between different modal data. In step S300, the deep learning model, by integrating general visual knowledge with gemstone characteristics, can accurately identify various defect types such as internal cracks and pinholes. Taking pinhole defects as an example, the model can automatically locate and classify tiny pinholes by analyzing the light absorption characteristics at specific wavelengths in the multispectral image and combining them with morphological features in the two-dimensional image. Step S400, the quantitative analysis of setting process parameters, transforms process parameters that are difficult to measure accurately by traditional methods into quantifiable numerical indicators through in-depth mining of 3D point cloud data. Step S500, the comprehensive quality assessment, does not simply superimpose gemstone defect results with setting process parameter results. Instead, it establishes a multi-dimensional evaluation model that comprehensively considers factors such as defect type, defect size, and the degree of deviation in process parameters to classify the overall quality of the jewelry. This provides data support for subsequent quality traceability and process improvement.
[0063] In some embodiments, S100, adjusting the jewelry to be tested to a predetermined detection pose via a precision motion control platform and acquiring multi-dimensional image data of the jewelry to be tested via a multimodal hardware imaging unit includes:
[0064] The surface texture and color images of the jewelry under test are acquired using a two-dimensional high-resolution color imaging module.
[0065] The three-dimensional point cloud data of the jewelry under test is acquired by a three-dimensional structured light scanning module;
[0066] The multispectral microscopy imaging module is used to acquire characteristic images of the jewelry under test under specific spectral excitation.
[0067] This embodiment decomposes the multimodal hardware imaging unit into a two-dimensional high-resolution color imaging module, a three-dimensional structured light scanning module, and a multispectral microscopic imaging module, and executes steps S110, S120, and S130 respectively, thereby achieving targeted and high-precision data acquisition of gemstone surface texture and color features, jewelry three-dimensional geometric morphology, and gemstone internal material composition and structural features, thus constructing a multi-dimensional image data foundation that comprehensively describes the physical properties of the jewelry under test.
[0068] In some embodiments, in S110, the two-dimensional high-resolution color imaging module includes an annular diffuse light source and a coaxial light source. The annular diffuse light source and the coaxial light source acquire images under different lighting modes to suppress reflections and highlight surface and subsurface features.
[0069] This embodiment acquires images under different lighting modes using a ring diffuse light source and a coaxial light source, effectively suppressing strong reflections on jewelry surfaces (especially precious metals and gemstones), while highlighting the surface texture, color distribution, and subtle surface defects of the gemstones.
[0070] In some embodiments, in S120, the three-dimensional structured light scanning module is based on phase measurement profilometry. The three-dimensional structured light scanning module includes a digital stripe projector and a synchronously triggered industrial camera. The digital stripe projector projects an coded grating pattern onto the jewelry to be measured, and the industrial camera captures deformed stripes and calculates three-dimensional point cloud data.
[0071] This embodiment achieves accurate acquisition of jewelry 3D point cloud data based on phase measurement profilometry by projecting coded grating patterns with a digital stripe projector and capturing and solving deformed stripes with a synchronously triggered industrial camera, providing a geometric basis for the quantitative analysis of subsequent setting process parameters.
[0072] refer to Figure 3 In some embodiments, in S200, the registration and alignment of the multi-dimensional image data by the core processing unit to obtain registered two-dimensional and multispectral images includes:
[0073] S210 employs a matching algorithm based on feature points or deep learning to perform feature matching between real-time acquired images and standard template images;
[0074] S220 calculates the transformation matrix based on the matching results, aligns the real-time acquired image with the standard template image, and eliminates image offset caused by changes in the position and posture of the jewelry under test.
[0075] This embodiment achieves image alignment by using a feature-point-based or deep learning-based matching algorithm for feature matching and calculating the transformation matrix. This effectively eliminates image offset caused by changes in the position and posture of the jewelry under test, ensuring the accuracy of subsequent defect identification and parameter analysis in a unified spatial coordinate system.
[0076] refer to Figure 4 In some embodiments, in S300, the deep learning model uses a visual base model combined with self-supervised learning for domain knowledge transfer, and the training of the deep learning model includes:
[0077] S310 uses a model pre-trained on a large-scale general image dataset as the backbone network;
[0078] S320 utilizes unlabeled gem images for domain adaptation through self-supervised learning;
[0079] S330, using a dataset labeled with defect categories for supervised fine-tuning, enables the model to identify and locate internal and surface defects in gemstones, including internal cracks, chipping, black spots, pinholes, and blemishes.
[0080] This embodiment uses a model pre-trained on a large-scale general image dataset as the backbone network, and utilizes unlabeled gemstone images for domain adaptation through self-supervised learning. Finally, it uses a dataset labeled with defect categories for supervised fine-tuning, thereby achieving accurate identification and localization of internal and surface defects (including internal cracks, stone chips, black spots, pinholes, and stone haze) of gemstones by deep learning models.
[0081] The training and application process of the deep learning model in the intelligent gem defect recognition submodule is as follows:
[0082] First, a pre-trained visual foundation model (such as ViT or ResNet series) is used as the initial backbone network, based on a large-scale general image dataset (such as ImageNet). This network already possesses powerful general image feature extraction capabilities. Then, considering the characteristics of gemstone data, a large number of unlabeled gemstone images (covering samples from different categories, cutting methods, and lighting conditions) are collected. The pre-trained model is then trained using domain-adaptive methods through self-supervised learning tasks (such as contrastive learning and masked image modeling). Specifically, after random cropping, rotation, and color jittering of the gemstone images for data augmentation, the model learns the unique features of gemstones, including texture, luster, and internal structure. This allows the model parameters to migrate from the general image domain to the gemstone image domain, reducing reliance on labeled data. Next, a labeled dataset containing defect categories such as internal cracks, chipping, black spots, pinholes, and haze is constructed. Each image is labeled with pixel-level defects by professional gemologists. Supervised fine-tuning of the domain-adapted model was performed using this labeled dataset. The model parameters were optimized using a cross-entropy loss function, with a focus on improving the model's ability to distinguish between minute defects (such as micron-sized pinholes) and easily confused defects (such as stone haze and surface stains). In the model application phase, registered and aligned 2D and multispectral images were input into the trained deep learning model. The model extracted local detail features and global contextual information from the images through convolutional layers and attention mechanisms. The fully connected layers then output a defect category probability map and bounding box coordinates, enabling accurate localization and classification of internal and surface defects in gemstones. Multispectral image data effectively enhanced the sensitivity to identifying internal inclusions (such as black spots) and structural defects (such as internal cracks), further improving the accuracy of defect detection.
[0083] refer to Figure 5 In some embodiments, in S400, the step of quantitatively analyzing the key geometric parameters of the mosaicking process based on the registered 3D point cloud data to obtain the mosaicking process parameter analysis results includes:
[0084] S410 automatically segments and identifies the gemstone table, girdle, and each prong by processing three-dimensional point cloud data;
[0085] S420 measures the prong angle, thickness, height, contact area with the gemstone, and gemstone-setting gap by calculating the normal vector, curvature, and spatial geometric relationship of the point cloud.
[0086] S430 compares the measured process parameters with the preset process standards to determine whether the inlay process is qualified.
[0087] This embodiment processes three-dimensional point cloud data to automatically segment and identify the gemstone table, girdle, and each prong. By calculating the normal vector, curvature, and spatial geometric relationship of the point cloud, it measures the prong angle, thickness, height, contact area with the gemstone, and gemstone-setting gap. Finally, it compares the measured process parameters with preset process standards, thereby achieving quantitative analysis and qualification judgment of key geometric parameters of the setting process.
[0088] In some embodiments, the precision motion control platform is a multi-axis electric rotary table, which automatically adjusts the pitch and rotation angles of the jewelry under test according to a preset program or visual feedback to ensure that the imaging unit can capture images comprehensively.
[0089] This embodiment uses a multi-axis electric rotary table to automatically adjust the pitch and rotation angles of the jewelry under test according to a preset program or visual feedback, thereby achieving comprehensive, blind-angle-free imaging of all surfaces and details of the jewelry by the imaging unit.
[0090] refer to Figure 2 On the other hand, embodiments of the present invention provide a machine vision-based gemstone and setting defect detection system, including: a multimodal hardware imaging unit, a core processing unit, a result output unit, and a precision motion control platform;
[0091] The multimodal hardware imaging unit is used to acquire multidimensional image data of the jewelry to be tested. It includes at least a two-dimensional high-resolution color imaging module for acquiring surface texture and color, a structured light scanning module for acquiring three-dimensional geometric shape, and a multispectral microscopic imaging module for acquiring specific spectral features.
[0092] The core processing unit is communicatively connected to the imaging unit and is used to process and analyze the received multi-dimensional image data. It includes at least an image registration and alignment submodule, a gemstone defect intelligent identification submodule, and a setting process parameter quantitative analysis submodule.
[0093] The result output unit is used to output the quality judgment result and the test report;
[0094] The precision motion control platform is used to support and adjust the spatial pose of the jewelry to be tested, so as to ensure that the imaging unit can capture a full image.
[0095] This embodiment achieves automated, high-precision, multi-dimensional detection and quality assessment of gemstones and inlay defects by setting up a multimodal hardware imaging unit, a core processing unit, a result output unit, and a precision motion control platform.
[0096] The content of the above method embodiments is applicable to this embodiment. The specific functions implemented in this embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments. Therefore, they will not be repeated here.
[0097] The following are specific embodiments provided by the present invention:
[0098] Example 1:
[0099] Inspecting a platinum prong-set diamond ring. The ring is mounted on a fixture on a precision electronically controlled rotating stage and placed in an optical darkroom.
[0100] First, the 2D color imaging module is activated, and the rotating platform rotates the ring 360 degrees. The camera captures clear images of the diamond and prongs from multiple angles, including top and side views, under diffused ring lighting. The images are transmitted to the processing unit, registered and aligned, and then input into a pre-trained defect recognition model. This model is based on a ResNet architecture pre-trained on ImageNet, using tens of thousands of diamond images for domain adaptation through contrastive learning. Finally, it is fine-tuned using thousands of precisely annotated defect images, outputting recognition results for "feathering" (a type of internal crack) and "scratches."
[0101] Next, the 3D structured light scanning module is activated, the projector projects a phase-shifted sinusoidal grating, and the camera simultaneously acquires images. Through multi-frequency heterodyne phase calculation and 3D reconstruction algorithms, a dense point cloud containing the diamond and its six prongs is generated. The software automatically segments the point cloud, fits it to the diamond's table plane, and calculates the angle between the central axis of each prong and the table normal. If the measured angle of a prong is 68 degrees, which is lower than the preset lower limit of 70 degrees, the parameter is marked as unacceptable.
[0102] Finally, the system makes a comprehensive judgment: if there are no major gemstone defects and only one prong angle is slightly out of tolerance, it may be judged as "acceptable" or "requires repair"; if a visible "black spot" is found on the diamond and the setting parameters are not up to standard, it is judged as "unacceptable". The report is automatically generated and stored.
[0103] Example 2:
[0104] This system is integrated into an automated production line for mixed-set necklaces (main stones are gemstones, side stones are diamonds). To address the challenges of continuous movement on the production line, the system employs a high frame rate global shutter camera and incorporates real-time visual servo feedback into the motion platform to ensure stable image capture during pauses or synchronization. The core processing software is deployed on edge computing devices, utilizing model services from the Huawei Cloud ModelArts platform for online inference, achieving a combination of cloud-based updates to the detection algorithm and efficient local execution.
[0105] The system described in this invention is not only applicable to common prong and bezel settings for rings, but also, by changing the fixtures and adjusting the parameter templates in the software, to detecting various setting techniques such as pavement and channel settings for complex jewelry such as pendants and earrings, as well as various faceted or cabochon gemstones such as emeralds and rubies, thus having broad industrial applicability.
[0106] Compared with related technologies, the present invention has the following improvements:
[0107] Integrated testing: For the first time, non-destructive and automated comprehensive testing of gemstone defects (clarity) and setting defects (geometric precision) has been achieved on the same platform, covering the entire chain of jewelry quality assessment.
[0108] High detection accuracy and quantifiability: Three-dimensional structured light technology is used to achieve micron-level three-dimensional size measurement, transforming subjective process evaluation into objective quantitative data; deep learning models have high accuracy in identifying complex defects, reducing missed detections.
[0109] Intelligent and highly adaptable: By adopting advanced image registration and domain-adaptive deep learning technologies, it can effectively overcome interference such as location fluctuations and sample differences in the production environment, and the system is highly robust.
[0110] Significantly improved efficiency: The fully automated process can complete a comprehensive inspection of a single piece of jewelry in tens of seconds, replacing manual inspection that takes tens of minutes, significantly increasing the throughput of quality inspection on the production line, and reducing reliance on senior technicians and labor costs.
[0111] This invention also provides a machine vision-based gemstone and setting defect detection system, comprising: at least one processor; at least one memory for storing at least one program; and when the at least one program is executed by the at least one processor, causing the at least one processor to implement the method as described in any of the preceding embodiments.
[0112] The processor may be a central processing unit (CPU), a graphics processing unit (GPU), or other processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the system to perform desired functions. The memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor may execute the program instructions to implement the methods described in the embodiments of the present invention. Various application programs and various data may also be stored in the computer-readable storage medium.
[0113] The content of the above method embodiments is applicable to this embodiment. The specific functions implemented in this embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments. Therefore, they will not be repeated here.
[0114] This invention also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described above. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0115] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0116] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0117] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0118] This invention also provides a computer program product, including a computer program or computer instructions, which are stored in a memory. A processor of a computer device reads the computer program or computer instructions from the memory and executes the computer program or computer instructions, causing the computer device to perform the above-described method.
[0119] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0120] The embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
Claims
1. A machine vision-based method for detecting defects in gemstones and their settings, characterized in that, The method includes the following steps: S100 adjusts the jewelry to be tested to a predetermined detection position through a precision motion control platform, and acquires multi-dimensional image data of the jewelry to be tested through a multi-modal hardware imaging unit; the multi-dimensional image data includes two-dimensional color images, three-dimensional point cloud data and multispectral images. S200, the core processing unit performs registration and alignment on the multi-dimensional image data to obtain registered two-dimensional and multispectral images; S300, based on the registered two-dimensional and multispectral images, uses a deep learning model to identify gemstone defects and obtain gemstone defect identification results; S400, based on the registered 3D point cloud data, quantitatively analyzes the key geometric parameters of the mosaicking process and obtains the analysis results of the mosaicking process parameters. S500 assesses quality and generates an inspection report by combining the results of gemstone defect identification with the analysis of setting process parameters.
2. The method according to claim 1, characterized in that, In S100, the step of adjusting the jewelry to be tested to a predetermined detection pose via a precision motion control platform and acquiring multi-dimensional image data of the jewelry to be tested via a multimodal hardware imaging unit includes: The surface texture and color images of the jewelry under test are acquired using a two-dimensional high-resolution color imaging module. The three-dimensional point cloud data of the jewelry under test is acquired by a three-dimensional structured light scanning module; The multispectral microscopy imaging module is used to acquire characteristic images of the jewelry under test under specific spectral excitation.
3. The method according to claim 2, characterized in that, In S110, the two-dimensional high-resolution color imaging module includes an annular diffuse light source and a coaxial light source. The annular diffuse light source and the coaxial light source acquire images under different lighting modes to suppress reflections and highlight surface and subsurface features.
4. The method according to claim 2, characterized in that, In S120, the three-dimensional structured light scanning module is based on phase measurement profilometry. The three-dimensional structured light scanning module includes a digital stripe projector and a synchronously triggered industrial camera. The digital stripe projector projects an coded grating pattern onto the jewelry to be measured, and the industrial camera captures the deformed stripes and calculates the three-dimensional point cloud data.
5. The method according to claim 1, characterized in that, In S200, the process of registering and aligning the multi-dimensional image data through the core processing unit to obtain registered two-dimensional and multispectral images includes: S210 employs a matching algorithm based on feature points or deep learning to perform feature matching between real-time acquired images and standard template images; S220 calculates the transformation matrix based on the matching results, aligns the real-time acquired image with the standard template image, and eliminates image offset caused by changes in the position and posture of the jewelry under test.
6. The method according to claim 1, characterized in that, In S300, the deep learning model uses a visual base model combined with self-supervised learning for domain knowledge transfer. The training of the deep learning model includes: S310 uses a model pre-trained on a large-scale general image dataset as the backbone network; S320 utilizes unlabeled gem images for domain adaptation through self-supervised learning; S330, using a dataset labeled with defect categories for supervised fine-tuning, enables the model to identify and locate internal and surface defects in gemstones, including internal cracks, chipping, black spots, pinholes, and blemishes.
7. The method according to claim 1, characterized in that, In S400, based on the registered 3D point cloud data, the key geometric parameters of the mosaicking process are quantitatively analyzed to obtain the mosaicking process parameter analysis results, including: S410 automatically segments and identifies the gemstone table, girdle, and each prong by processing three-dimensional point cloud data; S420 measures the prong angle, thickness, height, contact area with the gemstone, and gemstone-setting gap by calculating the normal vector, curvature, and spatial geometric relationship of the point cloud. S430 compares the measured process parameters with the preset process standards to determine whether the inlay process is qualified.
8. A machine vision-based gemstone and setting defect detection system, characterized in that, include: Multimodal hardware imaging unit, core processing unit, result output unit, and precision motion control platform; The multimodal hardware imaging unit is used to acquire multidimensional image data of the jewelry to be tested. It includes at least a two-dimensional high-resolution color imaging module for acquiring surface texture and color, a structured light scanning module for acquiring three-dimensional geometric shape, and a multispectral microscopic imaging module for acquiring specific spectral features. The core processing unit is communicatively connected to the imaging unit and is used to process and analyze the received multi-dimensional image data. It includes at least an image registration and alignment submodule, a gemstone defect intelligent identification submodule, and a setting process parameter quantitative analysis submodule. The result output unit is used to output the quality judgment result and the test report; The precision motion control platform is used to support and adjust the spatial pose of the jewelry to be tested, so as to ensure that the imaging unit can capture a full image.
9. A machine vision-based gemstone and setting defect detection system, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor performs the method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 8.