System and method for autograding gemstones

The method uses neural networks for standardized gemstone image processing and multi-stage training to achieve objective and efficient gemstone grading with interpretable inclusion segmentation, addressing the limitations of human grading methods.

US12818528B1Active Publication Date: 2026-12-01CHOW SANG SANG JEWELRY CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
US19/660815
Authority / Receiving Office
US · United States
Patent Type
Patents(United States)
Current Assignee / Owner
Filing Date
2026-04-28
Publication Date
2026-12-01
Estimated Expiration
2046-04-28

AI Technical Summary

Technical Problem

Existing gemstone grading methods rely on human graders, which are subjective, time-consuming, and prone to variability due to lighting conditions, optical artifacts, and training differences, and lack consistent pre-processing and interpretable outputs.

Method used

A computer-implemented method using an ensemble of neural networks for clarity, color, and fluorescence grading, involving standardized image capture, preprocessing, and multi-stage training to produce interpretable pixel-level inclusion segmentation masks and grading outputs.

Benefits of technology

Provides objective, efficient, and consistent gemstone grading with pixel-level inclusion segmentation and interpretable results, reducing human subjectivity and enhancing accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US12818528-D00000_ABST
    Figure US12818528-D00000_ABST
Patent Text Reader

Abstract

This invention provides a computer implemented method for autograding gemstones. In one embodiment, said method comprises the steps of: (a) obtaining a set of images of a gemstone, wherein said set of images comprises: (i) a gemstone image optimized to show gemstone features; (ii) an illuminated image optimized for color assessment; and (iii) a fluorescence image optimized to show said gemstone's fluorescent response; (b) inputting said set of images into an ensemble of neural networks, comprising a gemstone structural features encoder network, a gemstone visible and luminescence features encoder network, a gemstone structural features decoder network, a clarity grade classification network, a color grade classification network and a fluorescence grade classification network.
Need to check novelty before this filing date? Find Prior Art

Description

FIELD OF THE INVENTION

[0001] The present invention relates to systems and methods for autograding gemstones.BACKGROUND OF THE INVENTION

[0002] Gemstone grading traditionally relies on trained human graders who evaluate multiple attributes—including clarity, color, and fluorescence—by visually inspecting a stone under prescribed viewing geometries and illuminants. While expert graders provide high value, manual inspection can be time-consuming and subject to inter- and intra-grader variability arising from factors such as lighting conditions, optical artifacts from faceting, fatigue, and differences in training or reference standards. Furthermore, objectivity cannot be guaranteed amongst individual labs and graders. This invention discloses a method utilizing deep learning to perform clarity grading, color grading and fluorescence grading in gemstones.

[0003] Clarity grading is particularly sensitive to detection and interpretation of inclusions and surface features. Measurements are affected by the lighting conditions and point of view of the capturing mechanism, which may affect the following aspects of the observed inclusions in a gemstone: color, contrast, size and location, which are, without limitation, features of clarity grading.

[0004] Fluorescence grading commonly involves excitation with long-wave ultraviolet illumination and consistency across training and inference images. Measurements are affected by ambient light leakage, camera sensitivity, exposure timing differences in training and inference images.

[0005] Color grading accuracy depends on standardized illumination across training and inference images, as well as long-wave ultraviolet illuminated images. Measurements are affected by deviation in illumination conditions between training and inference images, as well as considerations for fluorescence grading mentioned above.

[0006] Across all three attributes, prior solutions tend to address single tasks in isolation (for example, only clarity classification or only color estimation), rely on manual pre-processing, or produce black-box outputs without interpretable evidence such as segmentation masks or salience maps.

[0007] Accordingly, there remains a need for approaches that: (i) accept standardized imagery of cut gemstones—including gemstone image with gemstone features visible and images captured under even illumination and a image under illumination to show fluorescence; (ii) perform consistent pre-processing such as background removal and resizing; (iii) apply trained machine-learning models to predict clarity, color, and fluorescence grades to eliminate human subjectivity in pre-processing and grading; (iv) produce pixel-level inclusion segmentation masks and identify important inclusion regions to enhance interpretability; and (v) output a composite, reviewable grading package suitable for display, storage, and programmatic access.SUMMARY OF THE INVENTION

[0008] This invention provides a computer implemented method for autograding of gemstones. In one embodiment, said method comprises the steps of: (a) obtaining a set of images of a gemstone, wherein said set of images comprises: (i) a gemstone image optimized to show gemstone features; (ii) an illuminated image optimized for color assessment; and (iii) a fluorescence image optimized to show said gemstone's fluorescent response; (b) inputting said set of images into an ensemble of neural networks, comprising a gemstone structural features encoder network, a gemstone visible and luminescence features encoder network, a gemstone structural features decoder network, a clarity grade classification network, a color grade classification network and a fluorescence grade classification network; wherein said gemstone structural features encoder network transforms pixel data of said gemstone image into a first set of latent vectors representing gemstone structural features within a multi-dimensional space; said gemstone visible and luminescence features encoder network transforms pixel data of said gemstone image, said illuminated image, said fluorescence image, said set of processed images and a fused image formed by fusing said illuminated image and said fluorescence image into a second set of latent vectors, a third set of latent vectors, a fourth set of latent vectors, a fifth set of latent vectors respectively to represent contextual information on said gemstone; said gemstone structural features decoder network is adapted to distinguish gemstone inclusions and subsequent reflections from other structural features and constructs a segmentation mask of said gemstone from said first set of latent vectors; said segmentation mask delineates spatial extent, boundaries, and morphology of all detected inclusions and subsequent reflections within said gemstone; said clarity grade classification network provides a clarity grade probability from said first set of latent vectors, said second set of latent vectors and said fourth set of latent vectors; said color grade classification network provides a color grade probability from said fifth set of latent vectors; and said fluorescence grade classification network provides a fluorescence grade probability from said third set of latent vectors.

[0009] This invention also provides a system for autograding of gemstones using said computer implemented method of this invention, comprising: (i) An image module comprising devices for capturing said gemstone image, said illuminated image and said fluorescence image from a specific gemstone; (ii) A computer, comprising: (a) a processor; and (b) a memory unit having executable instructions stored thereon, which, when executed, cause said processor to execute steps (a) to (b) of said computer implemented method by retrieving said gemstone image, said illuminated image and said fluorescence image from said image module; and obtain a segmentation mask, a clarity grade probability, a color grade probability and a fluorescence grade probability for said specific gemstone.

[0010] This invention further provides a non-transitory computer-readable medium storing instructions that, when executed by one or more processors, cause the processors to perform the computer implemented method of this invention.BRIEF DESCRIPTION OF THE FIGURES

[0011] FIG. 1 is a flow diagram illustrating the method of automated grading gemstone in the present invention.

[0012] FIG. 2 illustrates the block diagram of the ensemble of neural networks for automatic gemstone grade prediction and inclusion segmentation in the present invention.

[0013] FIG. 3 is a flow diagram illustrating the process of training the ensemble of neural networks for automatic gemstone grade prediction and inclusion segmentation of the present invention, according to an embodied method of multi-stage training.

[0014] FIG. 4 is an illustrative result of the inclusion segmentation and inclusion importance region output based on an exemplary image of an image with gemstone features.

[0015] FIG. 5 is a block diagram of the system in the present invention, comprising of the gemstone image capturing device and computer, to obtain the necessary images, execute and control through an interface the computer implemented method of the present invention.DETAILED DESCRIPTION OF THE INVENTION

[0016] The present invention relates to systems and methods for gemstone automatic grading and inclusion identification. The present invention further relates to systems and methods in multi-stage training for a connected network of ensemble of neural network models.

[0017] In one aspect, a computer-implemented method grades a cut gemstone from imagery. The method receives one or more images of the gemstone including at least an image of the gemstone showing gemstone features including inclusions and facets, an image captured under illumination and a image under illumination to show fluorescence. The images are pre-processed—e.g., background removal and resizing- and one or more trained machine-learning models are applied to predict a clarity grade, a color grade, and a fluorescence grade. The method further generates a pixel-level inclusion segmentation mask and identifies an inclusion regions and associated importance to the clarity grading derived therefrom. A composite grading output is produced that includes the predicted grades and an associated visualization of the inclusion segmentation and may include confidence values or heatmap. The composite output can be displayed via a user interface or provided via an application programming interface and can be stored in a database.

[0018] In another aspect, a system is introduced for multi-stage automated gemstone grading, which however, does not limit the use of the forementioned method in this system only. The system includes: an image-acquisition module configured to capture gemstone images under, white-light, and long-wave ultraviolet excitation illumination; an image pre-processing module; an inference module comprising one or more trained machine-learning models configured to predict clarity, color, and fluorescence grades; a segmentation module configured to produce pixel-level inclusion masks; and a result aggregation and visualization module configured to assemble and present a composite grading output. The system can further include a supervised model-training pipeline utilizing gemstone-specific annotations and may apply data-augmentation techniques to improve robustness, as well as a storage module for persisting results and interfaces for interactive or programmatic access.

[0019] In a further aspect, a non-transitory computer-readable medium storing instructions that, when executed by one or more processors, cause performance of any of the foregoing methods.

[0020] This invention provides a computer-implemented method for grading a cut gemstone. In one embodiment, said computer implemented method, comprises: (a)

[0021] capturing, from an image-acquisition device, one or more digital pixelated images of the gemstone including at least a digital pixelated image showing gemstone features, a digital pixelated image of the gemstone captured under specific lighting; (b) pre-processing the images by performing labelling, background removal and resizing;

[0022] (c) training deep-learning models with pre-processed dataset, specifically a multi-stage segmentation method is used to train an ensemble of neural network models; (d) applying the trained ensemble of neural network models to the pre-processed images to predict (i) a clarity grade and class probabilities, (ii) a color grade and class probabilities, (iii) a fluorescence grade and class probabilities, generating (iv) an inclusion region segmentation mask that delineates inclusion regions within the gemstone at pixel level and (v) an inclusion region importance mask that indicates the importance of the inclusion seen in the image to the clarity grading; and (e) producing a composite grading output comprising the predicted clarity, color, and fluorescence grades and class probabilities together with a visualization of the inclusion segmentation and corresponding importance.

[0023] In one embodiment, digital image showing gemstone features contains visual aspects of gemstone such as facets, inclusions and their associated internal reflections.

[0024] In one embodiment, the lighting for capturing digital image of the gemstone under specific lighting is standardized across different gemstones.

[0025] In one embodiment, fluorescence image of gemstone is taken under standardized source of excitation.

[0026] In one embodiment, the inclusion segmentation mask is a pixel-wise output that highlights visual inclusions and any associated reflections.

[0027] In one embodiment, the ensemble of neural network model comprises of a plurality of sub-networks consisting of input layers, hidden layers and output layers. Each sub-network can consist of output layers corresponding to target inference results.

[0028] In one embodiment, data-augmentation techniques are applied during model training to increase robustness and performance.

[0029] In one embodiment, result refers to inclusion segmentation mask, clarity, color, fluorescence grade prediction and latent representation of images.

[0030] In one embodiment, the networks are trained using multi-stage segmentation method, comprising of 2 stages: (i) Freezing the classification sub-networks weights during first stage training; (ii) Freezing the weights inclusion segmentation encoder, inclusion segmentation decoder and image feature encoder networks during second stage training.

[0031] In one embodiment, clarity, color and fluorescence grading prediction results further comprise of per-grade likelihood.

[0032] In one embodiment, the inclusion region importance is derived from the inclusion segmentation mask using one or more salience metrics.

[0033] In one embodiment, said method further comprises causing the composite grading output and the inclusion segmentation visualization to be displayed via a user interface or served via an application programming interface.

[0034] In one embodiment, said method further comprises storing the set of composite grading and inclusion segmentation mask output in a database.

[0035] This invention also provides a system for multi-stage automated gemstone grading. In one embodiment, said system comprises: (a) one or more gemstone image capturing device adapted to obtain a source image, each of said one or more devices comprising: (i) gemstone feature illumination system; (ii) specific lighting illumination system; (iii) fluorescence image illumination system; (iv) lens suite; (v) image capturing device; (vi) gemstone holder; (b) a computer connected to said gemstone image capturing devices comprising a processor module, a display, a set of user input devices, and a memory and database module having executable instructions stored thereon, which, when executed, cause the second processor to execute steps (b) to (e) of said computer implemented method;

[0036] In one embodiment, the gemstone image capturing device is configured to capture digital images showing gemstone features, digital images of gemstones captured under standard lighting and digital fluorescence image of gemstones.

[0037] In one embodiment, the processing module in the computer configured to perform data pre-processing and ensemble of models computation.

[0038] In one embodiment, the visualization module displays the clarity grade, the color grade, the fluorescence grade, and the inclusion segmentation mask.

[0039] In one embodiment, the memory and database module to perform storage of the captured images and their associated inference results.

[0040] In one embodiment, the display exhibits a user interface for users to input data, perform image upload, execute inference function and view inference results.

[0041] In one embodiment, user utilizes the set of user input devices to control the computer and perform actions on the user interface

[0042] This invention further provides a non-transitory computer-readable medium storing instructions that, when executed by one or more processors, cause the processors to perform the computer implemented method of this invention.

[0043] This invention provides a computer implemented method for autograding of gemstones. In one embodiment, said method comprises the steps of: (a) obtaining a set of images of a gemstone, wherein said set of images comprises: (i) a gemstone image optimized to show gemstone features; (ii) an illuminated image optimized for color assessment; and (iii) a fluorescence image optimized to show said gemstone's fluorescent response; (b) inputting said set of images into an ensemble of neural networks, comprising a gemstone structural features encoder network, a gemstone visible and luminescence features encoder network, a gemstone structural features decoder network, a clarity grade classification network, a color grade classification network and a fluorescence grade classification network; wherein said gemstone structural features encoder network transforms pixel data of said gemstone image into a first set of latent vectors representing gemstone structural features within a multi-dimensional space; said gemstone visible and luminescence features encoder network transforms pixel data of said gemstone image, said illuminated image, said fluorescence image, said set of processed images and a fused image formed by fusing said illuminated image and said fluorescence image into a second set of latent vectors, a third set of latent vectors, a fourth set of latent vectors, a fifth set of latent vectors respectively to represent contextual information on said gemstone; said gemstone structural features decoder network is adapted to distinguish gemstone inclusions and subsequent reflections from other structural features and constructs a segmentation mask of said gemstone from said first set of latent vectors; said segmentation mask delineates spatial extent, boundaries, and morphology of all detected inclusions and subsequent reflections within said gemstone; said clarity grade classification network provides a clarity grade probability from said first set of latent vectors, said second set of latent vectors and said fourth set of latent vectors; said color grade classification network provides a color grade probability from said fifth set of latent vectors; and said fluorescence grade classification network provides a fluorescence grade probability from said third set of latent vectors.

[0044] In one embodiment, said set of images is obtained from a set of raw images by performing one or more techniques comprising background removal, normalization, resizing, color space conversion or their combination.

[0045] In one embodiment, said computer implemented method further comprises quantifying importance of each pixel to said clarity probability grade on said feature image and mapped onto said feature image.

[0046] In one embodiment, for said illuminated image, said contextual information comprises one or more selected from the group consisting of features pertaining to color saturation, hue, tone, color-related optical properties under standardized viewing conditions.

[0047] In one embodiment, for said fluorescence image, said contextual information comprises one or more selected from the group consisting of features representing the intensity, color, spatial distribution and other fluorescence-related optical properties.

[0048] In one embodiment, said computer implemented method further comprises mapping said refined segmentation mask with an image from said set of raw images or said set of processed images.

[0049] In one embodiment, said ensemble of neural networks is trained by first freezing said clarity grade classification network, said color grade classification network and said fluorescence grade classification network during a first stage training; and freezing said gemstone structural features encoder, said gemstone structural features decoder and said gemstone visible and luminescence features encoder during a second stage training.

[0050] In one embodiment, said gemstone features comprises gemstone external and / or internal features.

[0051] In one embodiment, said gemstone external and / or internal features comprise one or more selected from the group consisting of inclusions, inclusion reflections, surface blemishes, facet arrangements and gemstone geometrical attributes.

[0052] In one embodiment, said illuminated image is an image taken under even illumination.

[0053] In one embodiment, said fluorescence response is an image taken under fluorescence excitation.

[0054] In one embodiment, said computer implemented method further comprises computing an inclusion region importance mask indicating importance of each inclusion in said gemstone image to said clarity grade probability.

[0055] This invention also provides a system for autograding of gemstones using said computer implemented method of this invention, comprising: (i) An image module comprising devices for capturing said gemstone image, said illuminated image and said fluorescence image from a specific gemstone; (ii) A computer, comprising: (a) a processor; and (b) a memory unit having executable instructions stored thereon, which, when executed, cause said processor to execute steps (a) to (b) of said computer implemented method by retrieving said gemstone image, said illuminated image and said fluorescence image from said image module; and obtain a segmentation mask, a clarity grade probability, a color grade probability and a fluorescence grade probability for said specific gemstone.

[0056] In one embodiment, said system further comprises a device for displaying one or more of said segmentation mask, said clarity grade probability, said color grade probability and said fluorescence grade probability.

[0057] This invention further provides a non-transitory computer-readable medium storing instructions that, when executed by one or more processors, cause the processors to perform the computer implemented method of this invention.

[0058] The invention will be better understood by reference to the following examples, but those skilled in the art will readily appreciate that the specific examples detailed are only illustrative, and are not meant to limit the invention as described herein, which is defined by the claims which follow thereafter. Throughout this application, various references or publications are cited. Disclosures of these references or publications in their entireties are hereby incorporated by reference into this application in order to more fully describe the state of the art to which this invention pertains. It is to be noted that the transitional term “comprising”, which is synonymous with “including”, “containing” or “characterized by”, is inclusive or open-ended and does not exclude additional, un-recited elements or method steps.

[0059] The present invention relates to systems and methods for automated grading and inclusion segmentation visualization of gemstones from images. More specifically, the present invention provides a method and system for utilizing multiple images of a gemstone, to automatically determine the associated clarity grade, color grade, fluorescence grade, probabilities of each grade classes, inclusion region segmentation map and the importance of the inclusion region for determining the clarity grade (herein this set of results is generally referred to as ‘Grading and Segmentation Results’). In further embodiment, the present invention discloses a method to implement an ensemble of neural networks and the specific method to train the ensemble in order to achieve automatic grading and inclusion segmentation. In another embodiment, the present invention discloses a system to capture gemstone images, execute computer implemented functions of said method and host a user-interface to allow user operations. Accordingly, the present invention has special utility in the field of automated gemstone grading and inclusion segmentation, as well as the application of neural networks in said field.

[0060] In certain embodiments, the disclosed subject matter provides details of a method and system which achieves automated gemstone grading. An embodiment of the method is the training workflow of the ensemble of neural network models providing automatic grading and inclusion segmentation capabilities. Another embodiment of the method is the implementation pipeline including the ensemble of neural network models to process a target set of gemstone images into corresponding output of gemstone clarity grade, color grade, fluorescence grade, inclusion segmentation, per-grade likelihood and inclusion importance regions. Further embodiments of the present invention includes a system to receive one or more gemstone images, including (i) at least an image of the gemstone showing gemstone features including inclusions and facets, (ii) an illuminated image under standard lighting of the gemstone for color assessment, and (iii) a fluorescence image captured under illumination to show fluorescence, to train and for inference an ensemble of neural networks, wherein training is separated into a multi-stage process with sequential freezing of network portions. This process first freezes the classification and segmentation heads to train the encoders, then freezes the encoders to train the classification and segmentation heads, which outputs a composite grading output comprising clarity, color, and fluorescence grades together with pixel-level inclusion segmentation and visualized area of pixel-level segmentation, and additionally, the pixel-level quantification of importance of the region on the image of gemstone described in (i) to the predicted clarity grade.

[0061] In an embodiment of the method of gemstone automatic grading and inclusion segmentation, the automated inference pipeline in said method is illustrated in FIG. 1, operates to analyze a subject gemstone and produces a comprehensive set of Grading and Segmentation Results. The fully automated and computer implemented process 100 commences with the acquisition of multiple raw image modalities of the gemstones. These input modalities include a gemstone image 101a with gemstone features, which is optimized for capturing gemstone features such as inclusions, inclusion reflections, surface blemishes and facet arrangements; an illuminated image 101b under standard lighting, configured for accurate color assessment and captured under an even and calibrated lighting environment; and an fluorescence image 101c under fluorescence excitation, captured under illumination conditions designed to excite and record the gemstone's fluorescent response.

[0062] Subsequently, these raw images are processed through a standardized preprocessing sequence to ensure consistency. First, an Image Background Removal step 102 is applied to isolate the gemstone from its background, creating a clean silhouette. The images then undergo an Image Pre-Processing step 103, which may include operations such as normalization, resizing, and color space conversion, to prepare them for analysis by the neural network. These preprocessing yields three corresponding processed images, specifically, a processed gemstone image 104a with gemstone features, a processed illuminated image 104b under standard lighting, and a processed fluorescence image 104c with fluorescence excitation.

[0063] These processed images 104a, 104b, and 104c are then fed concurrently into a trained ensemble of neural networks for gemstone grading and inclusion segmentation 105. This ensemble of neural networks, having been previously trained on a labeled dataset of gemstone images of the same modality of the processed images of 104, processes the input images to perform gemstone inclusion segmentation, color, clarity and fluorescence grading in parallel.

[0064] The initial output from the ensemble pertaining to inclusions is an inclusion segmentation mask, which is then refined through post-processing step 106. An illustrative example of post processing involves morphological filtering to suppress noises in the pixel-level segmentation. The filtered mask is then scaled and transformed, in order to map with the original input photo. After the mapping operation, anti-aliasing is applied to the image, thereby smoothing out jagged edges which are artifacts of scaling during mapping, to output the final output inclusion segmentation result, allowing the generation of a precise, pixel-wise segmentation mask overlayed on the original input image for the inclusion region visualization 107.

[0065] In an embodiment of the inclusion region visualization 107, the visualization is a map of pixel-wise data structure that classifies each pixel element of the processed gemstone image 104a as either belonging to an inclusion or not. An exemplary method disclosed in the present invention, the Inclusion Region Visualization is generated by overlaying an inclusion segmentation mask predicted by the trained ensemble of neural networks 105 onto the gemstone image 101a with gemstone features.

[0066] In an embodiment of the Inclusion Region Importance Visualization 108, the visualization provides a quantitative heatmap indicating the relative contribution of each segmented inclusion region towards the final clarity grade prediction. This is achieved by analyzing the interaction between the inclusion segmentation map and the clarity classification pathway within the trained ensemble of neural networks 105. An exemplary method for generating the visualization applies Grad-CAM (Gradient-weighted Class Activation Mapping), which computes the gradients of the predicted clarity grade flowing back to the chosen convolutional layers, thereby highlighting which spatial locations, and by extension which inclusion regions, were most pivotal for the classification decision. For instance, a large inclusion with high relief located in the table region would be assigned a high importance value and appear red in the heatmap, whereas a small, peripheral inclusion might be assigned a lower value, appearing green on the heatmap. A pixel-wise region with or without inclusion can be assigned no importance, or zero importance computationally, indicating that the region contributes no importance to clarity grading. A pixel-wise region assigned with no importance will appear as background, and colored so, in the heatmap.

[0067] In further embodiment of the present invention, the system and method of automatic gemstone grading and inclusion segmentation generate output Grading & Segmentation Results. Referring to FIG. 1, in addition to the described inclusion segmentation related output in 107 and 108, the claimed method additionally generates the clarity grade probability 109, color grade probability 110, fluorescence grade probability 111 of said gemstone from inferencing on the input set of images.

[0068] In an embodiment of generating the clarity grade probability 109, the output is a categorical grade and associated probability values over all possible clarity grades. The trained ensemble of neural networks 105 comprise a clarity classification head which terminates in a soft-max output layer. The output layer produces a set of probabilities, each corresponding to a standard clarity grade, typically VVS1, VVS2, VS1, VS2, SI1, or SI2. The final clarity grade prediction is assigned as the grade with the highest probability, while the class probabilities provide a measure of confidence and can indicate if the gemstone was borderline between two adjacent grades.

[0069] In an embodiment of the color grade probability 110, the system outputs a categorical color grade and the class probabilities, similarly to 109. This result is generated by a color classification head within the ensemble of neural networks 105. The classifier similarly terminates in a soft-max output layer to generate a probability for each color grade in a standardized scale, for example, grades D through K. The grade with the maximum probability is selected as the final color grade prediction.

[0070] In an embodiment of the fluorescence grade probability 111, the result is generated by a fluorescence classification head within the trained ensemble of neural networks 105 for gemstone grading and inclusion segmentation. Similar to the other predictions 109 and 110, a soft-max output layer produces a set of class probabilities for standard fluorescence intensities, such as None, Faint, Medium, and Strong. The final fluorescence grade prediction is determined by selecting the class with the highest probability.

[0071] In one or more embodiments of the claimed ensemble of neural networks, FIG. 2 illustrates a gemstone grading and inclusion segmentation system built around an ensemble of neural networks 201. Any skilled practitioner will recognize the figurative description of the model structures is to illustrate the idea only and does not pertain to the particular design of the described networks. This ensemble is designed to receive and analyze multiple specialized image inputs, including a processed gemstone image 104a highlighting inherent features, a processed illuminated image 104b under standardized lighting conditions, and a processed fluorescence image 104c captured under fluorescence excitation. The system performs a fully automated, multi-parameter gemstone analysis through a sequence of interconnected processing stages that reflect established gemological principles.

[0072] In an embodiment, the gemstone structural features encoder network 202 processes the gemstone image 104a, transforming its pixel data into a dedicated set of latent vectors. These latent vectors represent a hierarchical encoding of the gemstone's internal architecture within a multi-dimensional space, specifically capturing fine-grained patterns that correspond to the presence, optical properties and structural characteristics of inclusions, surface blemishes, facets and reflections. In particular, inclusions referred to are undesirable formation visual to observer, for those skilled in the art of gemology, inclusions referred to in the present invention can be but not limited to, crystals, feathers, clouds and their reflections. optical properties refer to gemstone inclusions' relief which describes how stand out the inclusion is from the background gemstone, and additionally but not limiting, general optical properties of the inclusion such as contrast, color, occlusions. Structural characteristics of the inclusions describe the location and cross-sectional size with respect to a particular viewing angle.

[0073] In a subsequent processing step 208, the latent vectors produced by the gemstone structural features encoder network 202 are utilized for two parallel analytical tasks. A first stream of these vectors is passed to the gemstone structural features decoder network 203, which processes them through a series of up-sampling and convolutional layers to construct a precise, pixel-level segmentation mask. This output mask delineates the spatial extent, boundaries, and morphology of all detected inclusions, blemishes and their subsequent reflections within the gemstone.

[0074] In another embodiment, the gemstone visible and luminescence features encoder network 204 serves as a multi-modal feature extraction backbone, designed to process and synthesize information from the plurality of processed image types from 104a, 104b and 104c. For each input type, the network generates a specialized set of latent vectors: from processed gemstone image 104a, it attempts to extract structural and textural features that provide contextual information about the gemstone appearance, structural and optical features pertaining to the facets, virtual facets and internal reflections. The extracted features from 104a also include information encoded from the gemstone visible inclusion, surface blemishes and their reflections; from processed illuminated image 104b, the network attempts to encode features pertaining to color saturation, hue, tone and color-related optical properties under standardized viewing conditions; and from processed fluorescence image 104c, it attempts to derive features representing the intensity, color, spatial distribution and other fluorescence-related optical properties. For each individual or combination of input images, the network will attempt to output a unified latent vector from the multitude of input images.

[0075] In step 209, a second pathway of the unified latent vectors originating exclusively from the processed gemstone image 104a processed by gemstone visible and luminescence features encoder network 204 is passed to the clarity grade classification network 205. Combined with the latent vectors from gemstone structural features encoder network 202, the clarity grade classification network 205 attempts to infer the class probabilities for each clarity grades for the processed gemstone image 104a. An exemplary network of 205 comprises of fully connected layers, pooling layers and terminates in a soft-max output layer. The network attempts to infer the class probabilities by taking into account useful information from the inclusion segmentation latent features and the encoded feature vector generated by gemstone visible and luminescence features encoder network 204. The soft-max layer processes the input features to generate probability values across a predefined set of clarity grade classes, for instance SI2, SI1, VS2, VS1, VVS2 and VVS1, thereby outputting a set of class probabilities that quantifies the likelihood of the gemstone belonging to each clarity grade. The class with the highest probability value is selected as the final predicted clarity grade.

[0076] In a separate pathway, step 210 involves passing the unified latent vectors extracted and fused from the processed illuminated image 104b and the processed fluorescence image 104c to the color grade classification network 206. This network is configured to analyze the fused color and spectral information to assign a color grade. A skilled practitioner in gemology will appreciate a gemstone's fluorescence have an effect on the color grade, the unified latent vectors allow the color grade classification network 206 to take into consideration both fluorescence and color information to make a color grade prediction. An exemplary network 206, similar to 205, comprises of fully connected layers, pooling layers and terminates in a soft-max output layer. Said exemplary network 206 processes the input features to generate probability values across a predefined set of color grade classes, for instance D, E, F, G, H, I, J, K, the class with the highest probability value is selected as the final predicted color grade.

[0077] Following this, step 211 involves passing only the latent vectors specifically extracted from the processed fluorescence image 104c to the fluorescence grade classification network 207, which specializes in evaluating the gemstone fluorescence excitation to determine a fluorescence grade. An exemplary network 207, similar to 205 and 206, comprises of fully connected layers, pooling layers and terminates in a soft-max output layer. Said network 206 processes the input features to generate probability values across a predefined set of fluorescence grade classes, for instance None, Faint, Medium, Strong, the class with the highest probability value is selected as the final predicted fluorescence grade.

[0078] The disclosed architecture thereby establishes an integrated analytical pipeline where latent features from different imaging modalities are strategically processed and routed to specialized networks. This enables the synergistic generation of a definitive inclusion segmentation mask and multiple expert-grade quality classifications, culminating in a holistic and objective gemological assessment.

[0079] The present invention provides a comprehensive technical solution to the longstanding and complex problems of subjective assessment, inconsistent evaluation standards, and computational inefficiency inherent in conventional automated gemstone grading systems. FIG. 3 discloses an innovative multi-stage training workflow 300 for an ensemble of neural networks, specifically engineered and optimized to achieve real-time, concurrent, and objectively consistent automated gemstone grading that meets international gemological standards. Said training workflow constitutes a fully computer-implemented, supervised learning procedure utilizing advanced deep learning architectures, wherein the process begins with the systematic provisioning and validation of a comprehensively labeled gemstone grading dataset 302, wherein said dataset comprises a statistically significant plurality of multi-modal image triplets captured under rigorously controlled laboratory conditions. Each complete data triplet specifically includes: a high-resolution gemstone image 301a with gemstone features captured using photographic or video equipment with sufficient depth of field to reveal internal characteristics of a gemstone; a standardized illuminated image 301b captured under calibrated daylight-equivalent lighting conditions using balanced illumination sources for accurate color assessment; and a specialized fluorescence image 301c captured with specific light source, filter configurations to excite and accurately record fluorescence phenomena of the target gemstone, all of which are collectively associated with ground-truth labels verified by multiple certified gemologists.

[0080] An embodiment of the technical advancement of the present invention over conventional approaches lies particularly in its multi-stage training regimen, which employs strategic selective network weight freezing at specific training intervals to enable segmentation between different grading regimes and their required image inputs, while offering performance advantages over completely unconnected networks for grading, where resources for training and inference is greatly increased. The workflow is systematically initiated with the comprehensive acquisition and sophisticated preprocessing of a multi-modal gemstone image dataset of substantial scale and diversity. The raw images first undergo an Image Background Removal step 303 utilizing segmentation algorithms, an example that includes but not limited to pre-trained U-Net based architectures, to isolate the gemstone from its environmental context and eliminate extraneous visual variables that could potentially confound subsequent analysis.

[0081] Following background removal, image pre-processing step 304 is executed, which encompasses data augmentation strategies specifically tailored to each image modality to maximize model robustness and generalization capability. For the gemstone image 301a with gemstone features, exemplary augmentations include controlled affine transformations such as rotation to simulate varying observational angles, scaling between 80-120% to account for size perception differences, and flipping. Additionally, image-wise linear RGB intensity transformations are applied to simulate variations in imaging light intensity, while addictive RGB masks are applied to the original image to simulate changes in the light source color tone. For the illuminated image 301b under standard lighting, augmentations focus on preserving color for accurate color grading, while introducing variations in other unrelated features, some augmentations applied includes, but not limited to, spatial augmentations to train the model to be spatially agnostic, random localized Gaussian noise to train the model to be robust to noises, target localized shading, to allow the model to be robust to shadows cast by various shapes and sizes of gemstones, and finally, random masking to simulate occlusion effects. The fluorescence image 301c under fluorescence undergoes specialized augmentations including random localized Gaussian noise, target shading, random masking and random background illumination variations to simulate environmental light pollution effects, this augmentation introduces variations in the images which the model should be robust to, while preserving the spectral characteristics essential for accurate fluorescence grading. These modality-specific augmentations are complemented by universal preprocessing operations including histogram normalization across all color channels, algorithmic resizing to standardized dimensions while maintaining critical aspect ratios through intelligent interpolation methods, and batch normalization to ensure consistent input distributions, thereby yielding standardized processed datasets 305a, 305b, 305c specifically optimized for stable neural network training convergence across all gemological assessment tasks. Consequently, to prepare for training, step 304 also includes assigning the label to each of the original images to the augmented images.

[0082] In another embodiment of training the ensemble of neural networks 201, the present invention discloses the training stage described in 307. the invention specifically addresses the persistent problem of learning unstable, narrowly task-specific features by combining general-purpose latent representations with reference to how gemological assessment is performed by human gemologists. This foundational learning phase is achieved through the strategic freezing of the weights corresponding to the classification and segmentation portions of the ensemble of neural networks 306, thereby rendering these specific components non-trainable and fixed during this initial phase. The complete neural network ensemble is then trained exclusively on the processed datasets 305a, 305b, 305c using selected loss functions, with examples further disclosed, specifically selected for each network component and backpropagation algorithms. For the gemstone visible and luminescence features encoder network 204 serving as the backbone feature extractor, can be a trained or pre-trained model, an exemplary loss function the system employ for a trained model is a weighted composite reconstruction loss function combining mean squared error (MSE) and structural similarity index (SSIM) loss, wherein the encoder learns to generate latent representations that can accurately reconstruct the original input images through a corresponding decoder pathway, thereby forcing the network to preserve semantically meaningful information about gemstone characteristics while discarding irrelevant noise. Simultaneously, for the gemstone structural features encoder-decoder network 202-203, the training utilizes a hybrid segmentation loss function comprising of Dice loss, which optimizes for overlap between predicted and ground truth inclusion regions. Upon completion of training, the encoder portion or the pre-trained gemstone visible and luminescence features encoder network 204 is extracted to use in the ensemble, while the entirety of the network 202-203 is preserved. This deliberately constrained configuration fundamentally forces the optimization algorithm to adjust only the weights of the encoder networks while the classification and segmentation components remain static, thereby compelling the encoders to learn fundamental, maximally discriminative feature representations of essential gemological characteristics during the feature extraction process 308 learned from the processed images, without being prematurely biased by the specific demands of the final grading tasks.

[0083] Upon satisfactory convergence of the first stage, a distinct second training stage is initiated to specialize the network architecture for classification tasks. Herein, the present invention discloses a methodology to optimize the ensemble of neural networks 201. Wherein the image feature encoder network weights are completely frozen to preserve the comprehensively learned multi-modal feature representations, while the inclusion segmentation encoder-decoder network undergoes regularization-based fine-tuning rather than complete freezing. The critical step of Regularization Training of Encoder and Decoder Networks Weights 309 specifically applies L2 regularization and gradient penalty constraints to the network 202-203 parameters, allowing only controlled, minimal adjustments to refine inclusion detection capabilities without compromising the fundamental feature representations learned during the first stage, while allowing feedback from the clarity classification network 205 to refine the segmentation capabilities. This regularization approach is particularly crucial for gemological applications where inclusion characteristics may exhibit subtle variations that require specialized refinement while maintaining overall model stability. Advantageously, another emergent feature this network is able to discern inclusions previously missed by gemologists and correct mislabeling. Simultaneously, the gemstone visible and luminescence features encoder network 204 weights remain entirely frozen as stable feature providers, ensuring consistent color and fluorescence representations essential for accurate grading. Subsequently, the complete ensemble undergoes training to Classify Color Grades, Clarity Grades, Fluorescence Grades, or Segment Inclusions 310 using classification loss functions, such as cross-entropy loss or similar variations of such loss function. In this phase, the previously frozen classification heads are unfrozen and become the primary trainable components while the segmentation network operates under regularization constraints and the image encoder remains fixed. This allows the ensemble of neural networks 200 to learn based on comprehensive data and infer the target grading task through retaining learned relevant features only, thereby significantly reduced over-fitting tendencies through regularization constraints, and enhanced assessment accuracy and inclusion segmentation.

[0084] An illustrative result of the inclusion segmentation and inclusion importance region output based on an exemplary image of an image with gemstone features is shown in FIG. 4. The image 401 denotes an image of a gemstone showing gemstone features. The system of the current invention takes the image and through the trained ensemble of neural networks 200, wherein the inference results from the neural network in displayed in 402, highlighting the detected inclusion areas. These inferred inclusion areas are overlayed on the original picture or a line diagram for viewing purposes, as shown in 403. A further color-coded heatmap, is generated by the ensemble of neural networks 201 and processed through the Inclusion Region Importance Visualization 108. Said color-coded heatmap help visualize the importance of the inclusion region to the predicted Clarity grade of the gemstone.

[0085] The present invention further discloses a comprehensive computer-implemented system for autograding of gemstones and inclusion segmentation that implements the trained ensemble of neural networks. The system comprises a user interface (UI) that provides an intuitive workflow for submitting gemstone images and receiving comprehensive quality assessments. The UI accepts relevant metadata, including certificate numbers and batch identifiers, which is persistently associated with the grading results.

[0086] Upon execution, the system processes the uploaded images through the trained neural network ensemble and presents the results. These include the clarity grade classification, the color grade determination, and the fluorescence classification, each displayed alongside detailed probability distributions to provide transparency into the grading certainty. The UI combines these results to present a comprehensive quality assessment.

[0087] The system further comprises a dedicated visualization module that enables comprehensive analysis of inclusion segmentation results through a comparative display interface. Following the inference execution, users can access a specialized folder or viewing panel that presents three synchronized visualizations for detailed gemological examination. A first display element presents the original, unprocessed gemstone image 101a with gemstone features, serving as a reference baseline for the subsequent analytical visualizations.

[0088] A second display element renders the inference inclusion mask generated through the Inclusion Segmentation Result Post-Processing 106 and specifically represented as the inclusion region visualization 107. This visualization presents a precise pixel-level segmentation mask where detected inclusions are distinctly highlighted against a transparent or neutral background, clearly delineating the boundaries, extent, and spatial distribution of all identified imperfections including feathers, crystals, and clouds within the gemstone structure.

[0089] A third display element presents an advanced composite visualization comprising the original gemstone image 101a overlay with a color-coded importance heatmap generated by the ensemble of neural networks 201 and processed through the Inclusion Region Importance Visualization 108. This visualization employs a chromatic scale (typically progressing from cool to warm colors) to represent the relative significance of different inclusion regions in determining the final clarity grade, wherein areas with greater impact on the grading decision are rendered with higher visual prominence and distinct coloration, an exemplary sample shown in the figure, red is more important, green is less so, if the color of the pixel is of purplish-blue in color, as encompassing the majority of the image, the region of pixels bear no importance to the clarity grading. Thereby, this heatmap visualization provides gemological transparency by revealing which specific inclusion characteristics-including size, location, contrast, and type-most substantially influenced the clarity grade probability 109, thereby offering users valuable insights into the models decision-making process and aids verification of grading rationale according to established gemological standards.

[0090] The present invention further encompasses a comprehensive hardware system 500 specifically configured to implement the autograding of gemstones and inclusion segmentation methodology. An embodiment is shown in FIG. 5. The system comprises an integrated image acquisition apparatus 501 featuring multiple specialized illumination subsystems coordinated for optimal gemstone imaging. A gemstone feature illumination system 502 provides controlled directional lighting optimized for revealing internal characteristics and inclusions. A standard lighting illumination system 503 generates calibrated daylight-equivalent illumination for accurate color grading assessment. A fluorescence image illumination system 504 incorporates precisely tuned illumination sources for fluorescence excitation, to activate and capture fluorescence phenomena.

[0091] The image acquisition apparatus 501 further incorporates an optical capture module comprising a lens suite 505 with adjustable magnification capabilities and a high-resolution image capturing device 506, typically but not limited to, a scientific-grade CMOS or CCD sensor with optimized spectral response characteristics. The system includes a gemstone holder 507 with precision adjustment mechanisms rotational and translational positioning to achieve optimal orientation for capturing gemstone image, especially for visualizing gemstone features in gemstone image 101a. The holder incorporates soft-tipped securing elements to prevent surface damage while maintaining stable positioning during image capture sequences.

[0092] The hardware system 500 integrates with a computer processing unit 508 housing computational modules including a processing module 509 configured to execute the trained gemstone grading and inclusion segmentation ensemble of neural networks 200 and a memory and database module 510 for storing image data, processing parameters, and grading results. The system further comprises a display unit 511 for presenting user interfaces, real-time imaging feedback, and comprehensive grading results, coupled with user input devices 512 including but not limited to touchscreen interfaces, keyboards, and specialized control panels for system operation and parameter adjustment.

[0093] During operational deployment, the system executes a coordinated image acquisition sequence wherein the gemstone holder 507 maintains the specimen in fixed orientation while the illumination subsystems 502, 503, 504 activate sequentially to capture the respective image modalities 101a, 101b, 101c under optimized lighting conditions. The captured images are automatically processed through the stages of background removal step 102 and image pre-processing step 103 before being analyzed by the ensemble of neural networks 105 to generate comprehensive grading assessments including inclusion segmentation results from the inclusion region visualization 107, clarity grade probability 109, color grade probability 110, and fluorescence grade probability 111. The integrated hardware-software architecture ensures consistent, reproducible imaging conditions and analysis parameters, thereby enabling standardized gemstone grading according to established gemological protocols. As shown above, the system enabled the capturing of the required images and inference of gemstone clarity grades through the images under human execution of the automated process.

Claims

1. A computer implemented method for autograding gemstones, comprising the steps of:a) obtaining a set of images of a gemstone, wherein said set of images comprises:i. a gemstone image optimized to show gemstone features;ii. an illuminated image optimized for color assessment; andiii. a fluorescence image optimized to show said gemstone's fluorescent response;b) inputting said set of images into an ensemble of neural networks, comprising a gemstone structural features encoder network, a gemstone visible and luminescence features encoder network, a gemstone structural features decoder network, a clarity grade classification network, a color grade classification network and a fluorescence grade classification network; whereinsaid gemstone structural features encoder network transforms pixel data of said gemstone image into a first set of latent vectors representing gemstone structural features within a multi-dimensional space;said gemstone visible and luminescence features encoder network transforms pixel data of said gemstone image, said illuminated image, said fluorescence image, said set of processed images and a fused image formed by fusing said illuminated image and said fluorescence image into a second set of latent vectors, a third set of latent vectors, a fourth set of latent vectors, a fifth set of latent vectors respectively to represent contextual information on said gemstone;said gemstone structural features decoder network is adapted to distinguish gemstone inclusions and subsequent reflections from other structural features and constructs a segmentation mask of said gemstone from said first set of latent vectors; said segmentation mask delineates spatial extent, boundaries, and morphology of all detected inclusions and subsequent reflections within said gemstone;said clarity grade classification network provides a clarity grade probability from said first set of latent vectors, said second set of latent vectors and said fourth set of latent vectors;said color grade classification network provides a color grade probability from said fifth set of latent vectors; andsaid fluorescence grade classification network provides a fluorescence grade probability from said third set of latent vectors.

2. The computer implemented method of claim 1, wherein said set of images is obtained from a set of raw images by performing one or more techniques comprising background removal, normalization, resizing, color space conversion or their combination.

3. The computer implemented method of claim 1, further comprising quantifying importance of each pixel to said clarity grade probability on said feature image and mapped onto said feature image.

4. The computer implemented method of claim 1, wherein, for said illuminated image, said contextual information comprises one or more selected from the group consisting of features pertaining to color saturation, hue, tone, color-related optical properties under standardized viewing conditions.

5. The computer implemented method of claim 1, wherein, for said fluorescence image, said contextual information comprises one or more selected from the group consisting of features representing the intensity, color, spatial distribution and other fluorescence-related optical properties.

6. The computer implemented method of claim 1, further comprises mapping said refined segmentation mask with an image from said set of raw images or said set of processed images.

7. The computer implemented method of claim 1, wherein said ensemble of neural networks is trained by first freezing said clarity grade classification network, said color grade classification network and said fluorescence grade classification network during a first stage training; and freezing said gemstone structural features encoder network, said gemstone structural features decoder network and said gemstone visible and luminescence features encoder network during a second stage training.

8. The computer implemented method of claim 1, wherein said gemstone features comprises gemstone external and / or internal features.

9. The computer implemented method of claim 8, wherein said gemstone external and / or internal features comprise one or more selected from the group consisting of inclusions, inclusion reflections, surface blemishes, facet arrangements and gemstone geometrical attributes.

10. The computer implemented method of claim 1, wherein said illuminated image is an image taken under even illumination.

11. The computer implemented method of claim 1, wherein said fluorescence response is an image taken under fluorescence excitation.

12. The computer implemented method of claim 1, further comprises computing an inclusion region importance mask indicating importance of each inclusion in said gemstone image to said clarity grade probability.

13. A system for autograding gemstones using said computer implemented method of claim 1, comprising:i. An image module comprising devices for capturing said gemstone image, said illuminated image and said fluorescence image from a specific gemstone;ii. A computer, comprising:a. a processor; andb. a memory unit having executable instructions stored thereon, which, when executed, cause said processor to execute steps (a) to (b) of said computer implemented method by retrieving said gemstone image, said illuminated image and said fluorescence image from said image module; and obtain a segmentation mask, a clarity grade probability, a color grade probability and a fluorescence grade probability for said specific gemstone.

14. The system of claim 13, further comprises a device for displaying one or more of said segmentation mask, said clarity grade probability, said color grade probability and said fluorescence grade probability.

15. A non-transitory computer-readable medium storing instructions that, when executed by one or more processors, cause the processors to perform the computer implemented method of claim 1.

Citation Information

Patent Citations

  • Jewel grade identification method and system

    CN115112658A

  • Classification method and system for grading diamonds

    CN117036766A

  • Systems and methods for gemstone identification

    CN118518666B

  • Process and system for colour grading for diamonds

    US11326952B2

  • Automated system and method for clarity measurements and clarity grading

    US11915407B2