A method, system, terminal device and storage medium for grading yellow pearls
Through the method of image acquisition and artificial intelligence model training, the problems of low color grading accuracy and low degree of automation of yellow pearls are solved, and high-precision and automated yellow pearl grading are achieved.
Patent Information
- Application Number
- CN202310307091.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-27
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2043-03-27
AI Technical Summary
There is a lack of effective yellow pearl color grading methods in the prior art, resulting in low grading accuracy, susceptible to human factors, and automated grading cannot be achieved.
Through image acquisition, ColorImpact software color extraction, point-in-filling in color space, classifying sample images based on parameter range, training and optimizing artificial intelligence machine models, realizing automatic grading of yellow pearls.
The color distinction accuracy of yellow pearls is improved, errors and errors of manual grading are reduced, and the automation and accuracy of color grading of yellow pearls is achieved.
Smart Images

Figure CN116452517B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of detection, and particularly relates to a method, a system, a terminal device and a storage medium for grading yellow pearls. Background Art
[0002] Pearls have a long history of use and cultivation. By 2005, the annual output of freshwater pearls in China reached about 1,500 tons, accounting for more than 95% of the world's pearl output. 400 - 500 tons of freshwater pearls were exported, accounting for more than 90% of the international market trading volume of freshwater pearls. The annual output of seawater pearls reached 20 tons, ranking first in the world. However, relative to such a large pearl output in China, the grading methods currently adopted by the entire industry basically still remain in the stage of manual inspection. Enterprises need to arrange a large number of personnel to classify the grades of pearls by visual observation. This manual inspection method for pearl grading has a large workload and low efficiency due to the small size and large quantity of pearls, is prone to fatigue, and has high requirements for experience. The detection results are easily affected by human factors, which not only greatly increases the production cost of pearl production enterprises, but also is not conducive to implementing accurate, effective and stable quality control. Therefore, improving the efficiency of grading and sorting and realizing the automation of grading and sorting are extremely important for the production and sales of pearls.
[0003] With the introduction of the national grading standard for cultured pearls (GB / T18781 - 2008), the new standard clarifies the definition, classification, quality factors and their grade standards of cultured pearls, making it possible to implement a grading inspection system for export products, and thus putting forward new requirements for each pearl production and processing enterprise. Accurately and quickly grading pearls has become one of the key tasks of pearl production enterprises. Therefore, accurately and quickly grading pearls has become an urgent need for pearl production enterprises.
[0004] However, at present, the color grading of yellow pearls (gold pearls) is blank in the industry. There is no unified grading scheme, and accurate and quantitative results cannot be given for the color. Laboratories evaluate the color in three aspects, namely hue, saturation and lightness, by comparing with standard samples, and thus give a final color result. This method has the following problems: 1. The color range of the standard samples is large and the accuracy is not high; 2. There are large errors in the results of manual comparison; 3. The standard samples are non-renewable and have poor replicability, and it is impossible to guarantee the popularization of the color grading of yellow pearls (gold pearls). Summary of the Invention
[0005] In view of the above problems, the present invention provides a method, a system, a terminal device and a storage medium for grading yellow pearls. By using a grading model to give a grading result for the yellow pearls to be graded, the accuracy of color distinction of yellow pearls can be effectively improved, and the color grading of yellow pearls can be guaranteed.
[0006] The present invention provides a method for grading yellow pearls, comprising: collecting images of a variety of yellow pearls under specific conditions to obtain at least one sample image; extracting color from the sample image using ColorImpact software to obtain target recognition elements; plotting points in a chromaticity space to determine the parameter range of the color level of each target recognition element; classifying the sample images based on the parameter range to obtain a sample image training set; inputting the sample image training set into an artificial intelligence machine model for training, and optimizing the artificial intelligence machine model to enable the artificial intelligence machine to automatically grade and be able to approach the accurate grading result infinitely, and eliminating the errors and inaccuracies of manual grading to obtain a grading model; and giving a grading result for the yellow pearls to be graded through the grading model.
[0007] Preferably, collecting images of a variety of yellow pearls under specific conditions to obtain at least one sample image includes: arranging a shooting scene according to specific conditions; placing the yellow pearls in the shooting scene and taking pictures with a camera; generating an image of the yellow pearls to be graded through image recognition technology, and collecting the images to form a sample image.
[0008] Preferably, arranging a shooting scene according to specific conditions includes: determining a shooting point on a white shooting table, and setting a group of light sources on the left side of the shooting point; setting a black velvet cloth as the background cloth in front of the shooting point; setting a group of soft light papers between the light sources and the shooting point; and setting a group of condenser plates on the right side of the shooting point.
[0009] Preferably, extracting color from the sample image using ColorImpact software to obtain target recognition elements includes: classifying the source color image of the sample image color to indicate the intensity of the color representation in the source color image, and using ColorImpact software to extract image features for determining the intensity; extracting color information from the source color image by clustering the pixels of the source color image according to their corresponding colors and identifying at least one candidate color as the extracted color in response to the pixel clustering; and using image processing to provide the extracted color to define a new image as the target recognition element.
[0010] Preferably, plotting points in a chromaticity space to determine the parameter range of the color level of each target recognition element includes: processing the target recognition elements by a computer configured with a chromaticity space, marking the coordinate positions in the target recognition elements, and marking the plotting positions on the coordinates; and generating, by the computer, a range defining specified parameters and defining multiple parameter values of color and hue for each plotted point.
[0011] Preferably, the sample image training set is input into an artificial intelligence machine model for training, and the artificial intelligence machine model is optimized, including: Pre-training: The sample images are pre-trained on ImageNet first. The classification model for pre-training uses the first 20 convolutional layers, and then an average-pool layer and a fully connected layer are added. After pre-training, 4 randomly initialized convolutional layers and 2 fully connected layers are added on top of the 20 convolutional layers obtained from pre-training. Network prediction: The NMS algorithm is used. First, the confidence marker value is found from all the projection point positions, and then the other marker values are calculated one by one. If its value is greater than a certain threshold, then the projection point position is removed. Then the above process is repeated for the remaining projection point positions until all detections are processed. Analyzing the prediction results of the network: Judging the prediction marker value, and then detecting the accuracy of the prediction results through the NMS algorithm.
[0012] On the other hand, the present invention proposes a yellow pearl grading system, including:
[0013] An image acquisition module for acquiring images of a variety of yellow pearls under specific conditions to obtain at least one sample image;
[0014] A color extraction module for obtaining target recognition elements by extracting the color of the sample image using ColorImpact software;
[0015] A color level classification module for making projections in the chromaticity space to determine the parameter range of the color level of each target recognition element;
[0016] A training set establishment module for classifying the sample images based on the parameter range to obtain a sample image training set;
[0017] A grading model training module for inputting the sample image training set into an artificial intelligence machine model for training, and optimizing the artificial intelligence machine model to enable the artificial intelligence machine to automatically grade and be able to approach the accurate grading result infinitely, and eliminating the errors and inaccuracies of manual grading to obtain a grading model;
[0018] A grading result output module for giving a grading result for the yellow pearls to be graded through the grading model.
[0019] A model optimization module for optimizing the artificial intelligence machine model.
[0020] On the other hand, the present invention provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the yellow pearl grading method as described above.
[0021] On the other hand, the present invention provides a computer-readable storage medium, in which an identification program is stored, and when the identification program is executed by a processor, the yellow pearl grading method as described above is implemented.
[0022] The beneficial effects of the present invention are:
[0023] In the present invention, by collecting sample images of a variety of yellow pearls under specific conditions, extracting the colors of the sample images using ColorImpact software to obtain target recognition elements, plotting points in the chromaticity space to determine the parameter ranges of the color levels of each target recognition element, classifying the sample images based on the parameter ranges to obtain a sample image training set, inputting the sample image training set into an artificial intelligence machine model for training, enabling the artificial intelligence machine to automatically grade, and being able to infinitely approach an accurate grading result, eliminating the errors and inaccuracies of manual grading to obtain a grading model, and giving a grading result for the yellow pearls to be graded through the grading model, which can effectively improve the color discrimination accuracy of yellow pearls and ensure the color grading of yellow pearls. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0025] Figure 1 Shows a schematic structural diagram of the electronic device according to an embodiment of the present invention;
[0026] Figure 2 Shows a flowchart of a yellow pearl grading method according to an embodiment of the present invention;
[0027] Figure 3 Shows a schematic structural diagram of the shooting scene in an embodiment of the present invention;
[0028] Figure 4 Shows a block diagram of a yellow pearl grading system according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0030] The yellow pearl grading method involved in the embodiments of the present invention is mainly applied to an electronic device, which may be a device with display and processing functions such as a PC, a portable computer, a mobile terminal, etc.
[0031] Refer to Figure 1 , Figure 1 shows a schematic structural diagram of the electronic device according to the embodiments of the present invention. In the embodiments of the present invention, the electronic device includes, but is not limited to: a memory 11, a processor 12, a display 13, and a network interface 14. The electronic device connects to a network through the network interface 14 to obtain original data. Among them, the network may be a wireless or wired network such as an enterprise internal network, the Internet, a global mobile communication device, wideband code division multiple access, a 4G network, a 5G network, Bluetooth, Wi-Fi, a call network, etc.
[0032] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disc, etc.
[0033] In some embodiments, the memory 11 may be an internal storage unit of the electronic device, such as the hard disk or memory of the electronic device.
[0034] In other embodiments, the memory 11 may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc. equipped with the electronic device. Of course, the memory 11 may also include both the internal storage unit and the external storage device of the electronic device.
[0035] In this embodiment, the memory 11 is generally used to store an operating device installed in the electronic device and various application software, such as the program code of the recognition program 10. In addition, the memory 11 may also be used to temporarily store various data that have been output or will be output.
[0036] Exemplarily, in some embodiments, the processor 12 may be a central processing unit, a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 12 is generally used to control the overall operation of the electronic device, such as performing control and processing related to data interaction or communication. In this embodiment, the processor 12 is used to run the program code stored in the memory 11 or process data.
[0037] Exemplarily, the display 13 may be referred to as a display screen or a display unit. In some embodiments, the display 13 may be an LED display, a liquid crystal display, a touch liquid crystal display, an organic light emitting diode touch device, etc. The display 13 is used to display the information processed in the electronic device and to display a visual working interface, such as displaying the result of data statistics.
[0038] Exemplarily, the network interface 14 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), and the network interface 14 is generally used to establish a communication connection between the electronic device and other electronic devices.
[0039] It should be noted that Figure 1 Only the electronic device with components 11-14 and the recognition program 10 and the cloud database are shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented.
[0040] Optionally, the electronic device may further include a user interface, and the user interface may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface may further include a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, an organic light emitting diode touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, and is used to display the information processed in the electronic device and to display a visual user interface.
[0041] The electronic device may further include a radio frequency (RF) circuit, sensors, an audio circuit, etc., which will not be elaborated here. The electronic device further includes a camera.
[0042] In the above embodiment, when the processor 12 executes the recognition program 10 stored in the memory 11, the yellow pearl grading method can be implemented.
[0043] This embodiment provides a flowchart of a yellow pearl grading method.
[0044] Please refer to Figure 2 , Figure 2The flowchart of a yellow pearl grading method according to an embodiment of the present invention is shown.
[0045] In this embodiment, the yellow pearl grading method includes the following steps:
[0046] S1. Collect images of multiple yellow pearls under specific conditions to obtain at least one sample image;
[0047] Specifically, arrange the shooting scene according to specific conditions; place the yellow pearls in the shooting scene and take pictures with a camera; generate an image of the yellow pearls to be graded through image recognition technology, and after collecting the images, form a sample image.
[0048] As Figure 3 shown, Figure 3 The structural schematic diagram of the shooting scene in the embodiment of the present invention is shown.
[0049] Exemplarily, arranging the shooting scene according to specific conditions includes: determining a shooting point 302 on a white shooting table 301, and setting a group of light sources 303 on the left side of the shooting point; setting a black velvet cloth 304 as the background cloth in front of the shooting point 302; setting a group of soft light papers 305 between the light source 303 and the shooting point 302; and setting a group of condenser plates 306 on the right side of the shooting point 302. The arrow in the figure indicates the camera shooting position.
[0050] Mainly use the single-light lighting method: generally shoot from a side angle. There is no need to worry about the camera lens causing black shadows at the side angle; so with single-light lighting, the light and shadow will be more three-dimensional and have stronger penetrability.
[0051] In addition, the double-light lighting method can also be used: use two papers and two lights to clamp the light from left and right, and control the change of light and shadow on the surface of the product by adjusting the angle and distance of the lights, and finally achieve the desired effect. For shooting, pay attention to the light ratio between the two lights to make the primary and secondary distinct. The three-light lighting method: completely surround the product from three angles, leaving only the light inlet position for the camera, and shoot the desired effect by adjusting the lighting in three directions around the camera. Specifically, the main light, auxiliary light, and contour light will change with the shooting theme.
[0052] S2. After extracting the color of the sample image using ColorImpact software, obtain the target recognition elements;
[0053] Specifically, classify the source color image of the sample image color to indicate the intensity of the color representation in the source color image. The classification uses ColorImpact software to extract image features for determining the intensity; extract color information from the source color image by clustering the pixels of the source color image according to their corresponding colors and identifying at least one candidate color as the extracted color in response to the pixel clustering; and use image processing to provide the extracted color to define a new image as the target recognition element.
[0054] S3. Perform dotting in the chromaticity space to determine the parameter range of the color level of each of the target recognition elements.
[0055] Specifically, a computer configured with a chromaticity space processes the target recognition element, marks the coordinate position in the target recognition element, and marks the dotting position on the coordinate; the computer generates a value range defining a specified parameter, and defines multiple parameter values of color and hue for each dotting.
[0056] S4. Classify the sample image based on the parameter range to obtain a sample image training set.
[0057] S5. Input the sample image training set into an artificial intelligence machine model for training, and optimize the artificial intelligence machine model so that the automatic grading of the machine can infinitely approach the accurate grading result, and eliminate the errors and inaccuracies of manual grading to obtain a grading model.
[0058] Specifically, for pre-training: the sample image was first pre-trained on ImageNet. The pre-trained classification model uses the first 20 convolutional layers, then adds an average-pool layer and a fully connected layer; after pre-training, add 4 randomly initialized convolutional layers and 2 fully connected layers on top of the 20-layer convolutional layer obtained from pre-training; for network prediction: use the NMS algorithm: first find the confidence marking value from all the dotting positions, then calculate other marking values one by one. If its value is greater than a certain threshold, then eliminate that dotting position; then repeat the above process for the remaining dotting positions until all detections are processed; analyze the prediction result of the network: judge the prediction marking value, and then detect the accuracy of the prediction result through the NMS algorithm.
[0059] Specifically, CRNN (Convolutional Recurrent Neural Network) is a combination of CNN + RNN. The model has both the powerful feature extraction ability of CNN and the same properties as RNN, and can generate a series of serialized labels. The entire CRNN is divided into three parts: the convolutional layer, the recurrent layer, and the transcription layer.
[0060] Among them, the convolutional layer is a CNN network for feature extraction (code input 32*256*1); the recurrent layer uses a deep bidirectional RNN to predict the label (true value) distribution (64*512) of the feature sequence obtained from the convolutional layer; the transcription layer uses CTC for training samples.
[0061] Specifically, the CNRR algorithm inputs the lexicographic image of the normalized height, extracts the feature map based on CNN, and slices the feature map by columns. During the training process, under the guidance of the CTC loss function, an approximate soft alignment between the character positions and the class labels is achieved.
[0062] Specifically, when training, CTC mainly considers maximizing the sum of the probabilities of the paths included in the labels that may be mapped (duplicate removal, blank removal). (CTC assumes that the outputs of each time slice are independent of each other, so the posterior probability of the path is the accumulation of the probabilities of each time slice.) Then, when searching for the path with the maximum probability according to the given input during output, it is more likely to search for the path that can be mapped to the correct result. And the "many-to-one" situation is considered during the search, further increasing the possibility of decoding the correct result.
[0063] In some other embodiments, the training of the artificial intelligence model includes: a training set generation module that processes the training data according to an externally input model requirement to generate a training set; a parameter configuration module that generates training configuration parameters according to an externally input training control instruction; a training module that is connected to the training set generation module and the parameter configuration module, and the training module trains the artificial intelligence model according to the training set and the training configuration parameters, and then outputs the trained artificial intelligence model.
[0064] S6. Give a grading result for the yellow pearls to be graded through the grading model.
[0065] In this embodiment, by collecting sample images of various yellow pearls under specific conditions, using ColorImpact software to extract the colors of the sample images to obtain target recognition elements, projecting points in the chromaticity space, determining the parameter range of the color levels of each target recognition element, classifying the sample images based on the parameter range to obtain a sample image training set, inputting the sample image training set into the artificial intelligence machine model for training, enabling the artificial intelligence machine to automatically grade, and being able to approach the accurate grading result infinitely, and eliminating the errors and inaccuracies of manual grading to obtain a grading model. By giving a grading result for the yellow pearls to be graded through the grading model, the color discrimination accuracy of yellow pearls can be effectively improved, ensuring the color grading of yellow pearls.
[0066] In addition, an embodiment of the present invention also provides a yellow pearl grading system.
[0067] Please refer to Figure 4 , Figure 4 which shows a block diagram of a yellow pearl grading system according to an embodiment of the present invention.
[0068] In this embodiment, a yellow pearl grading system includes an image acquisition module 201, a color extraction module 202, a color level classification module 203, a training set establishment module 204, a grading model training module 205, a grading result output module 206, and a model optimization module 207. Specifically as follows.
[0069] Exemplarily, the image acquisition module 201 is configured to acquire images of various yellow pearls under specific conditions to obtain at least one sample image; arrange a shooting scene according to specific conditions; place the yellow pearls in the shooting scene and take pictures through a camera; generate an image of the yellow pearls to be graded through image recognition technology, and form a sample image after collecting the images.
[0070] Exemplarily, the color extraction module 202 is configured to obtain target recognition elements after extracting the color of the sample image by using ColorImpact software; classify the source color image of the color of the sample image to indicate the intensity represented by the color in the source color image, and classify to extract image features for determining the intensity by using ColorImpact software; extract color information from the source color image by clustering the pixels of the source color image according to the corresponding colors of the pixels and identifying at least one candidate color as the extracted color in response to the clustering of the pixels; and use image processing to provide the extracted color to define a new image as the target recognition element.
[0071] Exemplarily, the color level classification module 203 is configured to project points in the chromaticity space to determine the parameter range of the color level of each of the target recognition elements; process the target recognition elements by a computer configured with a chromaticity space, mark the coordinate positions in the target recognition elements, and mark the projection point positions on the coordinates; generate a range of defined specified parameters by the computer, and define multiple parameter values of color and hue for each projection point.
[0072] Exemplarily, the training set establishment module 204 is configured to classify the sample images based on the parameter range to obtain a sample image training set;
[0073] Exemplarily, the grading model training module 205 is configured to input the sample image training set into an artificial intelligence machine model for training, and optimize the artificial intelligence machine model, so that the automatic grading of the machine can be infinitely close to the accurate grading result, and eliminate the errors and inaccuracies of manual grading, and obtain a grading model;
[0074] Exemplarily, the grading result output module 206 is configured to give a grading result for the yellow pearls to be graded through a grading model.
[0075] Exemplarily, the model optimization module 207 is configured to optimize the artificial intelligence machine model.
[0076] In this embodiment, the yellow pearl grading system further includes: a white shooting table 301, a shooting point 302, a light source 303, a black flannelette 304, a soft light paper 305, and a condenser plate 306.
[0077] Exemplarily, a shooting point 302 is determined on the white shooting table 301, and a set of light sources 303 is arranged on the left side of the shooting point; a black flannelette 304 is used as a background cloth in the front of the shooting point 302; a set of soft light papers 305 is arranged between the light source 303 and the shooting point 302; and a set of condenser plates 306 is arranged on the right side of the shooting point 302. The arrow in the figure indicates the camera shooting position.
[0078] In some other embodiments, the yellow pearl grading system can be input into a grading device for pearl grading to improve the grading efficiency in sequence.
[0079] Exemplarily, the grading device includes an assembly line for automatically detecting and classifying pearls, a monocular multi-view machine vision device for shooting images of the pearls to be inspected, and a microprocessor for performing image processing, detection, recognition, classification on the images of the pearls to be inspected, and coordinating the coordinated actions of each action mechanism on the assembly line.
[0080] The assembly line includes a feeding action mechanism for feeding the pearls to be inspected from the container of the object to be measured, one by one, into the feeding input port, a sample sending action mechanism for lifting the pearls to be inspected into the visual inspection box for visual analysis, a discharging action mechanism for the inspected pearls on the flap of the movable ejector rod of the sample sending action mechanism to fall into the grading input port, a grading action mechanism for controlling the grading output port to rotate above the corresponding pearl grading container according to the grading judgment result for the inspected pearls falling into the grading input port, and a grading execution mechanism for collecting the inspected pearls in the grading output port into the corresponding pearl grading container.
[0081] The microprocessor further includes:
[0082] An image reading module for reading images containing the pearls to be inspected taken from 9 different perspectives from a wide-angle camera;
[0083] An image processing module for segmenting 9 pearl images from different perspectives from one image, segmenting the pearl images from the backgrounds of 9 images from different perspectives, and performing perspective projection conversion processing on the 9 pearl images from different perspectives according to the calibration results of the sensors saved in the knowledge base.
[0084] A sensor calibration module for calibrating a wide-angle camera, correcting the distortion of a fish-eye lens, and performing perspective projection transformation, and storing the internal parameters of the calibrated wide-angle camera and the parameters of the perspective projection transformation in a knowledge base;
[0085] A surface finish recognition module for recognizing the surface finish of the pearl to be inspected according to national standards; A result output module for summarizing the detection results of the defects and surface finish of the pearl to be inspected. On the one hand, an inspection result table is automatically generated according to the national inspection standard. On the other hand, the information of the detection results is sent to the pipeline control module, so that the pipeline control module controls the corresponding grading control module to automatically complete the automatic grading of the pearl to be inspected;
[0086] A human-computer interaction module for setting detection parameters under manual intervention and controlling the output of detection results; A vision detection box; A monocular multi-view stereo vision device composed of 1 wide-angle camera and 8 plane mirrors, which obtains the surface images of the pearl taken from 9 viewpoints through one-time imaging of a wide-angle camera, realizing an all-round vision device centered on the pearl; mainly composed of a wide-angle camera and 2 plane mirror bucket cavities; Each bucket cavity is composed of isosceles trapezoidal plane mirrors with the same size. The upper bucket cavity is smaller at the top and larger at the bottom, and the lower bucket cavity is larger at the top and smaller at the bottom. The large-diameter parts of the upper and lower bucket cavities have the same size. At the large-diameter parts of the upper and lower bucket cavities, the upper and lower bucket cavities are combined into a whole, with the mirror surface facing the inside of the cavity, and the central axis of the cavity coincides with the main optical axis of the camera; The wide-angle lens extends into the cavity from the small end of the upper bucket cavity. The incident light of the lens consists of the direct light from the port of the upper bucket cavity and the reflected light from the mirror surface; The direct light passing through the cavity is projected onto the central area of the camera projection plane. The pearl to be measured is placed in the central area through a movable bracket. The reflected light from the mirror surface is projected onto the peripheral area of the camera projection plane, and the projection areas of the 8 mirrors are different; Therefore, the images taken by this device contain multiple images of the pearl to be measured, and these images come from 9 different perspective projection points; There are 9 different perspective projection points in the vision detection box. The one directly imaged in the camera is the perspective projection point of the real camera, and the viewing angle of the taken image is 0; The other 8 are the perspective projection points of the virtual camera formed by the camera and the reflecting mirror surface, and the taken images come from viewing angles 1 to 8 respectively.
[0087] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which may be any one or any combination of a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disc read-only memory (CD-ROM), a USB memory, and the like. The computer-readable storage medium includes a storage data area and a storage program area. The storage data area stores data created according to the use of the blockchain node, and the storage program area stores an identification program 10.
[0088] The serial numbers of the embodiments of the present invention above are only for description and do not represent the advantages or disadvantages of the embodiments.
[0089] This application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0090] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
[0091] Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for grading yellow pearls, characterized in that, Including: Collecting images of multiple yellow pearls under specific conditions to obtain at least one sample image; After using ColorImpact software to extract the color of the sample image, obtaining target recognition elements, including: Classifying the source color image of the sample image color to indicate the intensity represented by the color in the source color image, and using ColorImpact software to extract image features for determining the intensity during classification; Extracting color information from the source color image by clustering the pixels of the source color image according to their corresponding colors and identifying at least one candidate color as the extracted color in response to the pixel clustering; and Using image processing to provide the extracted color to define a new image as the target recognition element; Performing dotting within the chromaticity space to determine the parameter range of the color level of each target recognition element; Classifying the sample images based on the parameter range to obtain a sample image training set; Inputting the sample image training set into an artificial intelligence machine model for training, and optimizing the artificial intelligence machine model to enable the artificial intelligence machine to automatically classify and be able to approach the accurate classification result infinitely, and eliminating the errors and inaccuracies of manual classification to obtain a classification model; Giving a classification result for the yellow pearls to be classified through the classification model.
2. The yellow pearl grading method according to claim 1, characterized in that Collecting images of multiple yellow pearls under specific conditions to obtain at least one sample image, including: Arranging the shooting scene according to specific conditions; Placing the yellow pearls in the shooting scene and taking pictures through a camera; Generating an image of the yellow pearls to be classified through image recognition technology, and forming a sample image after collecting the images.
3. A method for grading yellow pearls according to claim 2, characterized in that, The arranging the shooting scene according to specific conditions includes: Determining a shooting point on a white shooting table, and setting a group of light sources on the left side of the shooting point; Setting a black velvet cloth as the background cloth in the front of the shooting point; Setting a group of soft light papers between the light source and the shooting point; and Setting a group of condenser plates on the right side of the shooting point.
4. A method for grading yellow pearls according to claim 1, characterized in that, Performing dotting within the chromaticity space to determine the parameter range of the color level of each target recognition element, including: Processing the target recognition element by a computer configured with a chromaticity space, marking the coordinate positions in the target recognition element, and marking the dotting positions on the coordinates; Generating, by the computer, a range defining specified parameters, and defining multiple parameter values of color and hue for each dotting.
5. A method for grading yellow pearls according to claim 1, characterized in that, Inputting the sample image training set into an artificial intelligence machine model for training, and optimizing the artificial intelligence machine model, including: Pre-training: First pre-training the sample images on ImageNet, using the first 20 convolutional layers for its pre-training classification model, and then adding an average-pool layer and a fully connected layer; After pre-training, adding 4 randomly initialized convolutional layers and 2 fully connected layers on top of the 20 convolutional layers obtained from pre-training; Network prediction: Using the NMS algorithm: First find the confidence marking values from all the dotting positions, and then calculate other marking values one by one. If its value is greater than a certain threshold, then eliminate the dotting position; then repeat the above process for the remaining dotting positions until all detections are processed; Analyze the prediction results of the network: Judge the predicted marker value, and then detect the accuracy of the prediction results through the NMS algorithm.
6. A yellow pearl grading system, characterized in that, Including: An image acquisition module for acquiring images of multiple yellow pearls under specific conditions to obtain at least one sample image; A color extraction module for obtaining target recognition elements after color extraction of the sample image using ColorImpact software, including: Classifying the source color image of the sample image color to indicate the intensity represented by the color in the source color image, and using ColorImpact software to extract image features for determining the intensity; Extracting color information from the source color image by clustering the pixels of the source color image according to the corresponding colors of the pixels and identifying at least one candidate color as the extracted color in response to the pixel clustering; and Using image processing to provide the extracted color to define a new image as the target recognition element; A color level classification module for casting points in the chromaticity space to determine the parameter range of the color level of each of the target recognition elements; A training set establishment module for classifying the sample images based on the parameter range to obtain a sample image training set; A grading model training module for inputting the sample image training set into an artificial intelligence machine model for training, optimizing the artificial intelligence machine model, enabling the artificial intelligence machine to automatically grade, and being able to infinitely approach the accurate grading result, and eliminating the errors and inaccuracies of manual grading to obtain a grading model; A grading result output module for giving a grading result for the yellow pearls to be graded through the grading model.
7. A yellow pearl grading system according to claim 6, characterized in that, Further including: A model optimization module for optimizing the artificial intelligence machine model.
8. An electronic device, characterized in that, The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the yellow pearl grading method according to any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that, An identification program in the computer-readable storage medium, when the identification program is executed by a processor, implements the yellow pearl grading method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Device for online automatically classifying pearl color and gloss based on monocular multi-view machine vision
CN102967586A
Ruby image acquisition system and color grading method
CN112330605A