Jade category identification method, device, electronic device and storage medium
By compressing and processing the images collected by the jade collection equipment, the jade area is determined and its category is identified, which solves the problems of low accuracy and low efficiency of jade detection in the existing technology and realizes fast and accurate jade category identification.
Patent Information
- Application Number
- CN202411512856.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2044-10-28
AI Technical Summary
In the existing technology, jade detection solutions have low accuracy and low efficiency, making it difficult to quickly and accurately identify the category and authenticity of jade products.
The system obtains jade images captured by jade collection equipment, compresses them, and then determines the reference jade area in the compressed image and determines whether it is blurred. If it is not blurred, the matching target jade area is determined in the original image, and the jade type is finally identified based on this area.
It can quickly and accurately identify the categories of jade products, improve the accuracy and efficiency of detection, and effectively verify the authenticity of jade products.
Smart Images

Figure CN119296098B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of jade identification, and in particular to a method, device, electronic equipment and storage medium for jade category identification. Background Art
[0002] Jade, a precious gemstone, has long been a favorite. Whether used as a decorative ornament or as an investment, it holds an irreplaceable position. However, as the jade market expands, counterfeit and inferior jade is becoming increasingly common.
[0003] Currently, to ensure the quality of jade products and prevent counterfeiting, many consumers choose to send their jewelry to professional inspection agencies for testing by experienced inspectors. However, inspectors vary in efficiency and experience, which can affect the accuracy and timeliness of test results.
[0004] How to quickly and accurately identify the categories of jade products and verify the authenticity of jade products is the main research issue in the industry. Summary of the Invention
[0005] The present invention provides a jade category identification method, device, electronic device and storage medium to solve the problems of low accuracy and efficiency of jade detection solutions. It can quickly and accurately identify the category of jade products and verify the authenticity of jade products.
[0006] According to one aspect of the present invention, a method for identifying the type of jade is provided, the method comprising:
[0007] Acquire a first jade image of the target jade collected by a jade collection device, and compress the first jade image to obtain a first compressed jade image;
[0008] Determining a reference jade area in the first compressed jade image, and determining whether the reference jade area is a fuzzy area;
[0009] When the target jade area is determined to be a non-fuzzy area, determining a target jade area that matches the reference jade area in the first jade image;
[0010] The category of the target jade is determined according to the target jade area.
[0011] In an optional implementation of this embodiment, the jade collection device includes: a light box, a fill light, and a high-definition camera; the light box is used to unify the lighting conditions; the fill light is used to fill in the light during the shooting process of the high-definition camera to make the shooting environment light uniform; the high-definition camera is used to collect jade images and transmit the collected jade images to the electronic device;
[0012] Correspondingly, the jade acquisition device acquires a first jade image of the target jade, and compresses the first jade image to obtain a first compressed jade image, including:
[0013] In response to a photographing completion instruction of the high-definition camera, a first jade image of the target jade captured by the high-definition camera is acquired;
[0014] The first jade image is compressed to a target size to obtain the first compressed jade image.
[0015] In an optional implementation of this embodiment, determining a reference jade area in the first compressed jade image includes:
[0016] Traversing each pixel in the first compressed jade image, determining the grayscale value of each pixel, and determining each target pixel based on each described grayscale value;
[0017] Determine a target frame based on each of the target pixels, and determine position information of target vertex pixels at each vertex position of the target frame;
[0018] The area to which the target frame belongs is determined as a reference jade area, and the position information of each target vertex pixel is determined as the regional coordinates of the reference jade area;
[0019] or,
[0020] The first compressed jade image is input into a predetermined feature extraction model to obtain the reference jade area and the area coordinates of the reference jade area.
[0021] In an optional implementation of this embodiment, determining whether the reference jade area is a fuzzy area includes:
[0022] Acquire edge information of the reference jade region, and determine a target gradient amplitude of the reference jade region according to the edge information;
[0023] Comparing the target gradient amplitude with a preset gradient threshold, and if it is determined that the target gradient amplitude is less than or equal to the preset gradient threshold, determining that the reference jade area is a fuzzy area;
[0024] If it is determined that the target gradient amplitude is greater than the preset gradient threshold, the reference jade area is determined to be a non-fuzzy area.
[0025] In an optional implementation of this embodiment, when the target jade area is determined to be a non-fuzzy area, determining the target jade area that matches the reference jade area in the first jade image includes:
[0026] Obtaining the regional coordinates of the reference jade area;
[0027] The region coordinates are marked in the first jade image to obtain the target jade region.
[0028] In an optional implementation of this embodiment, determining the category of the target jade according to the target jade area includes:
[0029] Inputting the target jade area into a jade category determination model for identification to obtain the category of the target jade;
[0030] The categories of the target jade include at least one of the following:
[0031] Jadeite, nephrite, agate, chalcedony, turquoise, lapis lazuli, malachite, carnelian, amethyst, citrine, and aventurine.
[0032] In an optional implementation of this embodiment, determining the category of the target jade according to the target jade area further includes:
[0033] Performing key point detection on the target jade area, and determining the quality of the target jade according to the key point detection results;
[0034] The key point detection includes at least one of the following:
[0035] Color uniformity inspection, transparency inspection, texture inspection, and defect inspection.
[0036] According to another aspect of the present invention, a device for identifying jade categories is provided, the device comprising:
[0037] A first compressed jade image determination module is used to obtain a first jade image of the target jade collected by the jade collection device, and compress the first jade image to obtain a first compressed jade image;
[0038] A reference jade region determining module, configured to determine a reference jade region in the first compressed jade image, and determine whether the reference jade region is a fuzzy region;
[0039] a target jade region determining module, configured to determine, in the first jade image, a target jade region that matches the reference jade region when the target jade region is determined to be a non-fuzzy region;
[0040] The jade category determination module is used to determine the category of the target jade according to the target jade area.
[0041] According to another aspect of the present invention, an electronic device is provided, comprising:
[0042] at least one processor; and
[0043] a memory communicatively connected to the at least one processor; wherein,
[0044] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the jade category identification method described in any embodiment of the present invention.
[0045] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the jade category identification method described in any embodiment of the present invention when executed.
[0046] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the jade category identification method described in any embodiment of the present invention.
[0047] The technical solution of the embodiment of the present invention is to obtain a first jade image of a target jade by acquiring a jade acquisition device, and compress the first jade image to obtain a first compressed jade image; determine a reference jade area in the first compressed jade image, and determine whether the reference jade area is a fuzzy area; when it is determined that the target jade area is a non-fuzzy area, determine a target jade area that matches the reference jade area in the first jade image; determine the category of the target jade according to the target jade area, which can solve the problems of low accuracy and efficiency of jade detection solutions, and can quickly and accurately identify the category of jade products and verify the authenticity of jade products.
[0048] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0050] Figure 1 This is a flow chart of a jade category identification method provided according to the first embodiment of the present invention;
[0051] Figure 2 This is a flow chart of a jade category identification method provided according to the second embodiment of the present invention;
[0052] Figure 3 This is a schematic structural diagram of a jade category identification device provided according to a third embodiment of the present invention;
[0053] Figure 4 It is a structural diagram of an electronic device for implementing the jade category identification method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0055] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0056] Example 1
[0057] Figure 1This is a flowchart of a jade category identification method provided according to Example 1 of the present invention. This embodiment is applicable to situations where the category of jade products is to be identified. The method can be executed by a jade category identification device. The jade category identification device can be implemented in the form of hardware and / or software. The jade category identification device can be configured in electronic devices such as computers, servers or tablet computers.
[0058] Specifically, refer to Figure 1 , the method comprising:
[0059] Step 110: Acquire a first jade image of the target jade collected by the jade collection device, and compress the first jade image to obtain a first compressed jade image.
[0060] Understandably, jade's internal color changes significantly under different lighting conditions, directly affecting the algorithm's recognition accuracy. Therefore, ensuring consistent jade photography and capturing high-quality, uniform jade images is crucial for improving subsequent jade recognition accuracy.
[0061] In this embodiment, in order to ensure that high-quality and uniform jade images are obtained, a jade collection device is designed. The jade collection device is a device built in a specific environment and used to collect images of jade products.
[0062] The jade collection equipment involved in this embodiment may include: a light box, a fill light, a high-definition camera and an electronic device; the light box is used to unify the lighting conditions; the fill light is used to fill in the light during the photo shooting process of the high-definition camera to make the shooting environment light uniform; the high-definition camera is used to collect jade images and transmit the collected jade images to the electronic device.
[0063] In an optional implementation of this embodiment, the high-definition camera can be fixed at a fixed height of the light box, for example, it can be fixed inside the light box at 60 cm or 50 cm away from the jade placement plane, etc., which is not limited in this embodiment; at the same time, a fill light can be fixed on the same side or the other side of the high-definition camera to provide fill light during the shooting process of the high-definition camera, thereby improving the quality of the acquired jade image; in this embodiment, after the jade collection device collects the image of the jade product, it can transmit it to the corresponding electronic device, so that the electronic device can perform subsequent identification of the jade product based on the collected image.
[0064] It should be noted that in this embodiment, the jade collection equipment can be built in other ways, and jade images can be collected by other jade collection equipment to ensure that high-definition, high-contrast jade images can be obtained. This is not a limitation of this embodiment.
[0065] In this embodiment, the target jade can be any jade product, such as a bracelet, a pendant, or an ornament, etc., which is not limited in this embodiment.
[0066] In this embodiment, after receiving the category identification instruction for the target jade, the first jade image of the target jade can be collected by the jade collection device. The jade collection device further transmits the collected first jade image to the electronic device. After receiving the first jade image, the electronic device can first compress the first jade image to obtain a first compressed jade image.
[0067] Optionally, in this embodiment, obtaining a first jade image of the target jade captured by the jade acquisition device and compressing the first jade image to obtain a first compressed jade image may include: responding to a photo completion instruction of the high-definition camera, obtaining the first jade image of the target jade captured by the high-definition camera; compressing the first jade image to a target size to obtain the first compressed jade image.
[0068] The target size may be 640*640, 512*512, or 256*256, etc., which is not limited in this embodiment.
[0069] In an optional implementation of this embodiment, after receiving an instruction to identify the category of the target jade, the first jade image of the target jade can be first collected by the high-definition camera in the jade collection device. After the high-definition camera completes the photo-taking instruction, the first jade image of the target jade collected by the high-definition camera can be obtained through the communication link between the high-definition camera and the electronic device; after obtaining the first jade image, the first jade image can be compressed to the target size through a lossless compression method, thereby obtaining a first compressed jade image.
[0070] It is understandable that the size of the first jade image captured by the high-definition camera is large, for example, 8064*6048; directly processing it will result in a long algorithm processing time and low processing efficiency. By losslessly compressing it to obtain a smaller first compressed jade image and subsequently processing it, the jade characteristics can be retained without increasing the algorithm processing time.
[0071] Step 120: Determine a reference jade area in the first compressed jade image, and determine whether the reference jade area is a fuzzy area.
[0072] Optionally, in this embodiment, after obtaining the first compressed jade image, a reference jade area can be further determined in the first compressed jade image, and it can be further determined whether the determined reference jade area is a fuzzy area.
[0073] In an optional implementation of this embodiment, after determining that the first compressed jade image is obtained, the jade features in the first compressed image can be further extracted. For example, the jade features and background features can be determined in the first compressed jade image, and the background features can be separated from the jade features to obtain a reference jade area that only contains jade features.
[0074] In an example of this embodiment, if the target jade is a bracelet, then after obtaining the first compressed jade image of the bracelet, the area containing only the bracelet can be determined in the first compressed image, and the area containing only Zhou Zong can be determined as the reference jade area.
[0075] Optionally, after obtaining the reference jade area, it can be further determined whether the reference jade area is a fuzzy area; illustratively, it can be determined whether the edge of the reference jade area is clear. If it is determined that the edge of the reference jade area is clear, it can be determined that the reference jade area is a non-fuzzy area; if it is determined that the edge of the reference jade area is unclear, it can be determined that the reference jade area is a fuzzy area.
[0076] Step 130: When it is determined that the target jade area is a non-fuzzy area, determine a target jade area that matches the reference jade area in the first jade image.
[0077] In an optional implementation of this embodiment, if the target jade area is determined to be a non-fuzzy area through the above steps, then a target jade area that matches the reference jade area can be further determined in the first jade image.
[0078] Optionally, in this embodiment, the regional coordinates of the reference jade area in the first compressed jade image can be determined based on the regional coordinates of the reference jade area in the first compressed jade image and the proportional relationship between the first jade image and the first compressed jade image; further, the target jade area can be determined based on the regional coordinates in the first jade image.
[0079] It can be understood that the regional coordinates of the reference jade area in the first compressed jade image may include the pixel coordinates of the four vertices of the reference jade area in the first compressed jade image; based on the proportional relationship between the first jade image and the first compressed jade image, for example, if the first image is compressed according to a compression ratio of 1:0.5, then the proportional relationship between the first jade image and the first compressed jade image is 1:0.5; further, based on the pixel coordinates and proportional relationship of the four vertices of the reference jade area in the first compressed jade image, the pixel coordinates of each vertex in the first jade image can be determined, and then the target jade area matching the reference jade area can be obtained in the first jade image.
[0080] In another optional implementation of this embodiment, if the reference jade area is determined to be a fuzzy area, it can be determined that it is difficult to accurately obtain the category of the target jade through the collected first jade image. At this time, a re-photographing instruction can be generated and the re-photographing instruction can be fed back to the jade collection device so that the jade collection device can re-collect the jade image of the target jade.
[0081] The advantage of this setting is that it can quickly determine whether the first jade image meets the requirements. If it does not meet the requirements, it can respond quickly, thereby improving the overall work efficiency of the system.
[0082] Step 140: Determine the category of the target jade according to the target jade area.
[0083] In an optional implementation of this embodiment, after obtaining the target jade area in the first jade image, the category of the target jade can be further determined based on the target jade area.
[0084] Among them, the categories of target jade may include at least one of the following: jadeite, nephrite, agate, chalcedony, turquoise, lapis lazuli, malachite, carnelian, amethyst, citrine and aventurine.
[0085] Optionally, in this embodiment, determining the category of the target jade according to the target jade area may include: inputting the target jade area into a jade category determination model for identification to obtain the category of the target jade.
[0086] The jade category determination model may be a model pre-trained using a large number of jade images and the annotation results of each jade image, and the model may be a classification model.
[0087] The technical solution of the embodiment of the present invention is to obtain a first jade image of a target jade by acquiring a jade acquisition device, and compress the first jade image to obtain a first compressed jade image; determine a reference jade area in the first compressed jade image, and determine whether the reference jade area is a fuzzy area; when it is determined that the target jade area is a non-fuzzy area, determine a target jade area that matches the reference jade area in the first jade image; determine the category of the target jade according to the target jade area, which can solve the problems of low accuracy and efficiency of jade detection solutions, and can quickly and accurately identify the category of jade products and verify the authenticity of jade products.
[0088] Example 2
[0089] Figure 2This is a flow chart of a jade category identification method provided according to the second embodiment of the present invention. This embodiment is a further refinement of the above technical solution. The technical solution in this embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the method includes:
[0090] Step 210: Acquire a first jade image of the target jade collected by the jade collection device, and compress the first jade image to obtain a first compressed jade image.
[0091] Step 220: Determine a reference jade area in the first compressed jade image, and determine whether the reference jade area is a fuzzy area.
[0092] In an optional implementation of this embodiment, after obtaining the first compressed jade image, a reference jade area can be determined in the first compressed jade image. Further, it can be determined whether the reference jade area is a fuzzy area.
[0093] Optionally, in this embodiment, determining the reference jade area in the first compressed jade image may include: traversing each pixel in the first compressed jade image, determining the grayscale value of each pixel, and determining each target pixel based on each grayscale value; determining a target frame based on each target pixel, and determining the position information of the target vertex pixels of each vertex position of the target frame; determining the area to which the target frame belongs as the reference jade area, and determining the position information of each target vertex pixel as the regional coordinates of the reference jade area; or, inputting the first compressed jade image into a predetermined feature extraction model to obtain the reference jade area and the regional coordinates of the reference jade area.
[0094] In an optional implementation of the present embodiment, after obtaining the first compressed jade image, each pixel in the first compressed jade image can be further traversed to determine the grayscale value of each pixel, and the target pixel can be determined based on the grayscale value of each pixel. For example, the grayscale value of each pixel can be compared with a preset grayscale interval, and each pixel with a grayscale value within the grayscale interval can be determined as a target pixel; further, a coherent area composed of each target pixel can be determined, and a target frame of the coherent area can be drawn; after obtaining the target frame, the position information of the pixels of each vertex (referred to as target vertex in this embodiment) of the target frame can be further determined, for example, the pixel coordinates of each vertex; and the position information of these vertex pixels can be determined as the area coordinates of the reference jade area.
[0095] Optionally, in this embodiment, in the process of determining the coherent area by each target pixel, if one or more target pixels deviate from the coherent area, these target pixels are determined as interference pixels and are filtered out.
[0096] In another optional implementation of this embodiment, after obtaining the first compressed jade image, the first compressed jade image can be further input into a predetermined feature extraction model, and the reference jade area in the first compressed jade image and the regional coordinates of the reference jade area can be determined by the feature extraction model.
[0097] In this embodiment, the predetermined feature extraction model can be obtained by inputting a large number of jade images and the annotation results corresponding to each jade image into a target deep convolutional neural network for iterative training; wherein, the target convolutional neural network can be YOLOV8, or other deep convolutional neural networks, which is not limited in this embodiment.
[0098] The advantage of this setting is that the reference jade area in the first compressed jade image can be quickly determined, providing a basis for subsequent determination of the category of the target jade.
[0099] Optionally, in this embodiment, after determining the reference jade area in the first compressed jade image, it can be further determined whether the reference jade area is a blurred area; in this embodiment, determining whether the reference jade area is a blurred area may include: obtaining edge information of the reference jade area, and determining the target gradient amplitude of the reference jade area based on the edge information; comparing the target gradient amplitude with a preset gradient threshold, and if it is determined that the target gradient amplitude is less than or equal to the preset gradient threshold, determining that the reference jade area is a blurred area; if it is determined that the target gradient amplitude is greater than the preset gradient threshold, determining that the reference jade area is a non-blurred area.
[0100] In an optional implementation of this embodiment, after determining the reference jade area in the first compressed jade image, edge information of the reference jade area can be further obtained; illustratively, the edge information of the reference jade area can be obtained through an edge detection operator, and further, the gradient amplitude of each edge pixel can be determined based on the obtained edge information, and further, the gradient amplitudes can be sorted in order from small to large or from large to small, and the minimum gradient amplitude can be determined as the target gradient amplitude.
[0101] Furthermore, the target gradient threshold can be compared with the preset gradient threshold; if it is determined that the target gradient threshold is less than or equal to the preset gradient threshold, the reference jade area can be determined to be a fuzzy area; if it is determined that the target gradient threshold is greater than the preset gradient threshold, the reference jade area can be determined to be a non-fuzzy area.
[0102] The preset gradient threshold can be determined according to the specific needs of the user, and its specific value is not limited in this embodiment.
[0103] Step 230: Acquire the regional coordinates of the reference jade area; mark the regional coordinates in the first jade image to obtain the target jade area.
[0104] In an optional implementation of this embodiment, when the reference jade area is determined to be a non-fuzzy area, the regional coordinates of the reference jade area in the first compressed jade image can be further obtained; further, the coordinates of each area can be calibrated in the first jade image to obtain the target jade area in the first jade image.
[0105] Optionally, the regional coordinates of the reference jade area in the first compressed jade image can be the pixel coordinates of each vertex or key point in the reference jade area; further, the pixel coordinates of each vertex or key point in the first jade image can be determined based on each pixel coordinate and the proportional relationship between the first compressed jade image and the first jade image, and then the target jade area in the first jade image can be determined based on each pixel coordinate in the first jade image.
[0106] Step 240: Input the target jade area into a jade category determination model for identification to obtain the category of the target jade.
[0107] Step 250: perform key point detection on the target jade area, and determine the quality of the target jade according to the key point detection results.
[0108] Among them, key point detection may include at least one of the following: color uniformity detection, transparency detection, texture detection and defect detection.
[0109] In an optional implementation of this embodiment, after obtaining the target jade area in the first jade image, the target jade area can be further subjected to color uniformity detection, transparency detection, texture detection or defect detection to determine whether the color of the target jade is uniform, whether the transparency is high enough, whether the texture is clear, or whether there are defects such as cracks and defects.
[0110] In another optional implementation of this embodiment, after obtaining the target jade area in the first jade image, the target jade area can also be input into a pre-trained key point detection model to predict the quality of the target jade based on the key point detection model.
[0111] It should be noted that, in this embodiment, step 240 is described first and step 250 is described later for ease of description only. In this embodiment, step 240 and step 250 can be executed simultaneously, or step 250 can be executed first and then step 240. This is not a limitation of this embodiment.
[0112] Step 260: Determine the authenticity of the target jade according to the category and / or quality of the target jade.
[0113] In an optional implementation of this embodiment, after determining the category and quality of the target jade, the authenticity of the target jade can be further determined based on the category of the target jade, the quality of the target jade, or the category and quality of the target jade. Optionally, in a specific implementation, the quality of the target jade can be determined based on the category of the target jade in combination with the quality of the target jade.
[0114] The solution of this embodiment, after obtaining the first compressed jade image, can further traverse each pixel in the first compressed jade image, determine the grayscale value of each pixel, and determine each target pixel based on each grayscale value; determine a target frame based on each target pixel, and determine the position information of the target vertex pixel of each vertex position of the target frame; determine the area to which the target frame belongs as the reference jade area, and determine the position information of each target vertex pixel as the regional coordinates of the reference jade area; or, input the first compressed jade image into a predetermined feature extraction model to obtain the reference jade area and the regional coordinates of the reference jade area. Further, when it is determined that the reference jade area is a non-fuzzy area, the regional coordinates can be marked in the first jade image to obtain the target jade area. In this way, the target jade area of the first jade image is indirectly determined through the reference jade area of the first compressed jade image. Compared with directly determining the target jade area in the first jade image, the execution efficiency of the algorithm can be improved and the final jade recognition result will not be affected.
[0115] Example 3
[0116] Figure 3 Schematic diagram of the structure of a jade category identification device provided according to the third embodiment of the present invention. Figure 3As shown, the device includes: a first compressed jade image determination module 310, a reference jade area determination module 320, a target jade area determination module 330 and a jade category determination module 340.
[0117] The first compressed jade image determining module 310 is configured to obtain a first jade image of the target jade collected by the jade collecting device, and compress the first jade image to obtain a first compressed jade image.
[0118] A reference jade region determining module 320 is configured to determine a reference jade region in the first compressed jade image and determine whether the reference jade region is a fuzzy region;
[0119] A target jade region determining module 330 is configured to determine, in the first jade image, a target jade region that matches the reference jade region when the target jade region is determined to be a non-fuzzy region;
[0120] The jade category determination module 340 is configured to determine the category of the target jade according to the target jade area.
[0121] The solution of this embodiment is to obtain a first jade image of a target jade collected by a jade collection device through a first compressed jade image determination module, and compress the first jade image to obtain a first compressed jade image; determine a reference jade area in the first compressed jade image through a reference jade area determination module, and determine whether the reference jade area is a fuzzy area; determine a target jade area that matches the reference jade area in the first jade image when the target jade area is determined to be a non-fuzzy area through a target jade area determination module; determine the category of the target jade according to the target jade area through a jade category determination module, which can solve the problems of low accuracy and efficiency of jade detection solutions, and can quickly and accurately identify the category of jade products and verify the authenticity of jade products.
[0122] In an optional implementation of this embodiment, the jade collection device includes: a light box, a fill light, and a high-definition camera; the light box is used to unify the lighting conditions; the fill light is used to fill in the light during the shooting process of the high-definition camera to make the shooting environment light uniform; the high-definition camera is used to collect jade images and transmit the collected jade images to the electronic device;
[0123] Correspondingly, the first compressed jade image determining module 310 is specifically configured to obtain a first jade image of the target jade captured by the high-definition camera in response to a photographing completion instruction of the high-definition camera;
[0124] The first jade image is compressed to a target size to obtain the first compressed jade image.
[0125] In an optional implementation of the present embodiment, the reference jade area determination module 320 is specifically configured to traverse each pixel in the first compressed jade image, determine the grayscale value of each pixel, and determine each target pixel based on each of the grayscale values;
[0126] Determine a target frame based on each of the target pixels, and determine position information of target vertex pixels at each vertex position of the target frame;
[0127] The area to which the target frame belongs is determined as a reference jade area, and the position information of each target vertex pixel is determined as the regional coordinates of the reference jade area;
[0128] Alternatively, the first compressed jade image is input into a predetermined feature extraction model to obtain the reference jade area and the area coordinates of the reference jade area.
[0129] In an optional implementation of this embodiment, the reference jade region determining module 320 is further specifically configured to obtain edge information of the reference jade region, and determine a target gradient amplitude of the reference jade region according to the edge information;
[0130] Comparing the target gradient amplitude with a preset gradient threshold, and if it is determined that the target gradient amplitude is less than or equal to the preset gradient threshold, determining that the reference jade area is a fuzzy area;
[0131] If it is determined that the target gradient amplitude is greater than the preset gradient threshold, the reference jade area is determined to be a non-fuzzy area.
[0132] In an optional implementation of this embodiment, the target jade area determination module 330 is specifically configured to obtain the area coordinates of the reference jade area;
[0133] The region coordinates are marked in the first jade image to obtain the target jade region.
[0134] In an optional implementation of this embodiment, the jade category determination module 340 is specifically configured to input the target jade area into a jade category determination model for identification, thereby obtaining the category of the target jade;
[0135] The categories of the target jade include at least one of the following:
[0136] Jadeite, nephrite, agate, chalcedony, turquoise, lapis lazuli, malachite, carnelian, amethyst, citrine, and aventurine.
[0137] In an optional implementation of this embodiment, the jade category identification device further includes: a jade quality detection module, configured to perform key point detection on the target jade area and determine the quality of the target jade according to the key point detection result;
[0138] The key point detection includes at least one of the following:
[0139] Color uniformity inspection, transparency inspection, texture inspection, and defect inspection.
[0140] The jade category identification device provided in the embodiment of the present invention can execute the jade category identification method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0141] Example 4
[0142] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0143] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0144] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0145] The processor 11 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a jade category recognition method, which includes: obtaining a first jade image of a target jade collected by a jade collection device, and compressing the first jade image to obtain a first compressed jade image; determining a reference jade area in the first compressed jade image, and determining whether the reference jade area is a fuzzy area; when it is determined that the target jade area is a non-fuzzy area, determining a target jade area that matches the reference jade area in the first jade image; and determining the category of the target jade according to the target jade area.
[0146] In some embodiments, the jade category identification method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the jade category identification method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the jade category identification method by any other appropriate means (for example, by means of firmware).
[0147] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0148] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0149] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0150] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0151] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0152] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0153] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0154] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for identifying jade categories, characterized in that: include: Acquire a first jade image of the target jade collected by a jade collection device, and compress the first jade image to obtain a first compressed jade image; Determining a reference jade area in the first compressed jade image, and determining whether the reference jade area is a fuzzy area; When the target jade area is determined to be a non-fuzzy area, determining a target jade area that matches the reference jade area in the first jade image; Determining the category of the target jade according to the target jade area; The method of determining a reference jade area in the first compressed jade image and determining whether the reference jade area is a fuzzy area comprises: Traversing each pixel in the first compressed jade image, determining the grayscale value of each pixel, and determining each target pixel based on each described grayscale value; Determine a target frame based on each of the target pixels, and determine position information of target vertex pixels at each vertex position of the target frame; The area to which the target frame belongs is determined as a reference jade area, and the position information of each target vertex pixel is determined as the regional coordinates of the reference jade area; Obtain edge information of the reference jade area through an edge detection operator, determine the gradient amplitude of each edge pixel according to the edge information, sort the gradient amplitudes in an ascending order or a descending order, and determine the minimum gradient amplitude as the target gradient amplitude; Comparing the target gradient amplitude with a preset gradient threshold, and if it is determined that the target gradient amplitude is less than or equal to the preset gradient threshold, determining that the reference jade area is a fuzzy area; If it is determined that the target gradient amplitude is greater than the preset gradient threshold, the reference jade area is determined to be a non-fuzzy area.
2. The jade category identification method according to claim 1, wherein The jade collection device includes: a light box, a fill light, and a high-definition camera; the light box is used to unify the lighting conditions; the fill light is used to fill in the light during the shooting process of the high-definition camera to make the shooting environment light uniform; the high-definition camera is used to collect jade images and transmit the collected jade images to the electronic device; Correspondingly, the jade acquisition device acquires a first jade image of the target jade, and compresses the first jade image to obtain a first compressed jade image, including: In response to a photographing completion instruction of the high-definition camera, a first jade image of the target jade captured by the high-definition camera is acquired; The first jade image is compressed to a target size to obtain the first compressed jade image.
3. The jade category identification method according to claim 1, wherein In the case where the target jade region is determined to be a non-fuzzy region, determining a target jade region that matches the reference jade region in the first jade image includes: Obtaining the regional coordinates of the reference jade area; The region coordinates are marked in the first jade image to obtain the target jade region.
4. The jade category identification method according to claim 1, wherein Determining the category of the target jade according to the target jade area includes: Inputting the target jade area into a jade category determination model for identification to obtain the category of the target jade; The categories of the target jade include at least one of the following: Jadeite, nephrite, agate, chalcedony, turquoise, lapis lazuli, malachite, carnelian, amethyst, citrine, and aventurine.
5. The jade category identification method according to claim 1, wherein The step of determining the category of the target jade according to the target jade area further includes: Performing key point detection on the target jade area, and determining the quality of the target jade according to the key point detection results; The key point detection includes at least one of the following: Color uniformity inspection, transparency inspection, texture inspection, and defect inspection.
6. A jade category identification device, characterized in that: include: A first compressed jade image determination module is used to obtain a first jade image of the target jade collected by the jade collection device, and compress the first jade image to obtain a first compressed jade image; A reference jade region determining module, configured to determine a reference jade region in the first compressed jade image, and determine whether the reference jade region is a fuzzy region; a target jade region determining module, configured to determine, in the first jade image, a target jade region that matches the reference jade region when the target jade region is determined to be a non-fuzzy region; A jade category determination module, configured to determine the category of the target jade according to the target jade area; Wherein, the reference jade area determination module is specifically used to: Traversing each pixel in the first compressed jade image, determining the grayscale value of each pixel, and determining each target pixel based on each described grayscale value; Determine a target frame based on each of the target pixels, and determine position information of target vertex pixels at each vertex position of the target frame; The area to which the target frame belongs is determined as a reference jade area, and the position information of each target vertex pixel is determined as the regional coordinates of the reference jade area; Obtain edge information of the reference jade area through an edge detection operator, determine the gradient amplitude of each edge pixel according to the edge information, sort the gradient amplitudes in an ascending order or a descending order, and determine the minimum gradient amplitude as the target gradient amplitude; Comparing the target gradient amplitude with a preset gradient threshold, and if it is determined that the target gradient amplitude is less than or equal to the preset gradient threshold, determining that the reference jade area is a fuzzy area; If it is determined that the target gradient amplitude is greater than the preset gradient threshold, the reference jade area is determined to be a non-fuzzy area.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the jade category identification method described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the jade category identification method according to any one of claims 1 to 5 when executed.
Citation Information
Patent Citations
Picture shooting method, device and terminal
CN104539846A
Finished jade product classification and identification method and system
CN113901943A