Ivory product identification method and system
A deep learning-based ivory identification method using texture images addresses the inefficiencies of existing methods by providing rapid, accurate, and non-destructive classification of ivory, reducing reliance on human expertise and costs.
Patent Information
- Application Number
- CN202211155323.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2042-09-22
AI Technical Summary
Existing ivory identification methods are time-consuming, require personnel expertise, can damage samples, and are inaccurate due to reliance on Schreger angle measurement and DNA analysis, and lack a rapid and reliable method for distinguishing between ivory and its imitations.
An ivory product identification method using deep learning models based on ivory texture images, involving image preprocessing, data enhancement, and a neural network-based recognition model to classify ivory samples without physical sampling.
Provides fast, accurate, and non-destructive identification of ivory products, reducing reliance on human expertise and costs compared to DNA and physical methods, while avoiding sample loss and measurement errors.
Smart Images

Figure CN115546536B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of ivory identification, and in particular relates to an ivory product identification method and system. Background Art
[0002] In recent years, ivory has been highly sought after in the East and West. In order to meet this demand, many living elephants (African and Asian elephants) have been poached and killed. In recent years, an average of 20,000 elephants have been illegally poached each year, and the crazy poaching is accompanied by rampant ivory smuggling. At present, my country has completely banned the ivory trade, not only stopping the commercial processing and sale of ivory, but also prohibiting any trade methods or carrying or mailing ivory and other endangered species and their products into and out of the country, except for those holding certificates allowing import and export.
[0003] At present, the raw materials of ivory products are mainly divided into living ivory and mammoth ivory. Since many animal bone products, even some plant products and industrial synthetic products are similar to ivory, there are also a large number of ivory imitations on the market. Therefore, when customs officers find ivory samples suspected of living ivory or mammoth ivory during entry and exit inspections, they need a rapid ivory detection method to identify the ivory.
[0004] At present, the identification methods of ivory samples can be divided into the following three categories:
[0005] (1) Method based on morphological structure. This method uses the Schreger texture pattern as an important basis for identification and has been used to distinguish ivory products from living elephants and mammoths. The Schreger texture patterns of living elephants and mammoths have large differences in characteristic angle values, which are also called Schreger angles. Generally, the average value of the Schreger angle on the outer edge of mammoths is less than 100 degrees, while the average value of the Schreger angle of living elephants is greater than 115 degrees. Other imitation materials cannot reproduce this naturally formed Schreger angle. This method requires identification personnel to have professional knowledge and long-term experience accumulation. By carefully observing the anatomical structure of ivory products and comparing them with the anatomical structure characteristics of laboratory ivory specimens, they can determine whether the item to be tested is ivory and classify it.
[0006] (2) Physical feature-based methods. This method uses a handheld X-ray fluorescence device to detect the elemental composition of suspected ivory, thereby distinguishing between ivory products from living elephants and mammoths. In addition, a multiple high-resolution melt (M-HRM) method is used to identify ivory products through composite melt spectroscopy.
[0007] (3) Based on molecular biology. This method uses DNA analysis to identify ivory products. For example, DNA sequencing is achieved by polymerase chain reaction (PCR) amplification of three nested groups in the cyclochrome b gene to achieve identification. However, the establishment of a DNA database requires a lot of time and financial resources, and DNA testing also takes a relatively long time.
[0008] Among the above methods, those based on physical characteristics and molecular biology usually require a small amount of sampling of ivory products, which will cause irreversible damage to ivory products. Although the morphological structure-based method can avoid damage to ivory products by directly observing the Schreck angle on the surface of ivory products, the accuracy of such methods is affected by the experience of the identification personnel and different observation methods, resulting in a long time for ivory identification. At the same time, the determination of ivory mainly depends on the technical experience and level of the identification personnel, which also directly affects the accuracy of the identification results. Summary of the invention
[0009] The purpose of the present invention is to address the problems existing in the above-mentioned prior art and to provide an ivory product identification method and system based on ivory texture images and deep learning models, so as to solve the problems in the prior art that ivory products may be irreversibly damaged, rely on accurate Strycher angle measurement results, rely on personnel experience accumulation, and the identification process is complicated and time-consuming, so as to achieve the purpose of quickly and accurately identifying ivory products and their imitations.
[0010] To achieve the purpose of the present invention, the following technical solutions are adopted:
[0011] In a first aspect, the present invention provides a method for identifying ivory products, comprising the following steps:
[0012] Acquire a number of original images of ivory samples of different types, and pre-process the original images of the ivory samples to obtain texture images of the ivory samples;
[0013] Label and classify the ivory sample texture images, establish an ivory texture image dataset, and divide the ivory texture image dataset into a training set and a test set according to a certain ratio;
[0014] Build an ivory recognition model, use the training set data to train the parameters of the ivory recognition model, use the test set data to test the performance of the ivory recognition model, and optimize the ivory recognition model based on the test results;
[0015] Acquire an original image of a suspected ivory product, and pre-process the original image of the suspected ivory product to obtain a suspected ivory texture image;
[0016] The ivory recognition model reads the suspected ivory texture image and outputs the recognition result.
[0017] A further improvement is that the specific method of the pretreatment includes:
[0018] Segment the original image, remove useless image edges, and obtain a sample image;
[0019] Crop the sample image to obtain multiple candidate texture images;
[0020] Screen multiple candidate texture images, delete images with high brightness, non-texture, and background areas that account for too large a proportion, and retain images with clear textures as selected texture images;
[0021] Data enhancement is performed on the selected texture image to obtain the final texture image.
[0022] A further improvement is that the specific method of screening multiple candidate texture images, deleting images with a large proportion of highlight, non-texture and background areas, and retaining images with clear textures as selected texture images includes:
[0023] The candidate texture image is converted into a grayscale image, and pixels whose image pixel grayscale values are higher than a first specified threshold are taken as highlight pixels, the number of highlight pixels is counted and their proportion is calculated. If the proportion of highlight pixels in the candidate texture image is higher than the first given threshold, the image is deleted, otherwise it is retained. Pixels whose image pixel grayscale values are lower than a second specified threshold are taken as background pixels, the number of background pixels is counted and their proportion is calculated. If the proportion of background pixels in the candidate texture image is higher than the second given threshold, the image is deleted, otherwise it is retained; texture features are extracted from the candidate texture image to obtain texture feature distribution. If the texture feature distribution does not meet the given conditions, the candidate texture image is a non-texture image and is deleted, otherwise it is retained.
[0024] A further improvement is that the specific method of performing data enhancement on the selected texture image to obtain the final texture image includes:
[0025] Firstly, the selected texture image is enhanced to improve the saliency of the texture;
[0026] Then the selected texture image is rotated or mirrored at multiple angles, and a new texture image is obtained each time the processing is performed to increase the number of images.
[0027] A further improvement is that the texture feature extraction of the candidate texture image obtains the texture feature distribution. If the texture feature distribution does not meet the given conditions, the candidate texture image is a non-texture image and is deleted. Otherwise, the specific method of retaining the candidate texture image includes:
[0028] Assume that I represents the candidate ivory texture image and J represents the standard ivory texture image. The texture feature distribution P(I) is obtained by extracting the texture features of the candidate ivory texture image I. Meanwhile, the texture feature distribution Q(J) is obtained by extracting the texture features of the standard ivory texture image J. Then, the Kullback-Leibler divergence of the two is calculated as follows:
[0029]
[0030] in, represents the Kullback-Leibler divergence of the texture feature distribution of the candidate ivory texture image I and the standard ivory texture image J. is less than a given threshold θ KL When , the candidate ivory texture image I is determined to be a texture image and retained, that is, If the texture feature distribution of the candidate ivory texture image I does not satisfy , the candidate ivory texture image I is a non-texture image and is deleted.
[0031] A further improvement is that the specific method of obtaining the original images of several different types of ivory samples includes:
[0032] Pre-processing the ivory sample and placing it on the stage of the image acquisition device;
[0033] Adjust the direction of the ivory sample so that the ivory texture faces upward and is fully exposed to the field of view of the industrial camera, and then use a sample holder to fix its position;
[0034] Adjust the height of the industrial camera and magnifying glass, and determine whether to turn on the light source and adjust the brightness of the light source according to the intensity of the ambient light and the brightness of the ivory sample image in the camera screen to ensure that the ivory texture is clearly visible in the camera screen;
[0035] Photograph the ivory samples to obtain original images of the ivory samples, and record the categories and numbers of the ivory samples;
[0036] During the shooting process, the ivory sample is moved and its direction is adjusted to collect original images of the ivory sample in multiple different positions.
[0037] Further improvements are to label and classify the ivory sample texture images, establish an ivory texture image dataset, and divide the ivory texture image dataset into a training set and a test set according to a certain ratio. The specific methods include:
[0038] According to the ivory sample category and number recorded when the ivory sample was photographed, each ivory sample texture image is labeled with an ivory sample category label and ivory sample number;
[0039] Ivory sample categories include living ivory products, mammoth ivory products, and ivory imitations;
[0040] The ivory texture image dataset is divided into a training set and a test set according to a certain ratio, while ensuring that all ivory sample texture images labeled with the same ivory sample number must be divided into the training set or the test set, and cannot be divided into both sets at the same time.
[0041] In a second aspect, the present invention provides an ivory product identification system, comprising:
[0042] An image acquisition device, used to obtain original images of several different types of ivory samples and original images of suspected ivory products;
[0043] An image preprocessing module, used for preprocessing the original image of the ivory sample to obtain the ivory sample texture image and preprocessing the original image of the suspected ivory product to obtain the suspected ivory texture image;
[0044] A data set management module is used to annotate and classify ivory sample texture images, establish an ivory texture image data set, and divide the ivory texture image data set into a training set and a test set according to a certain ratio;
[0045] An ivory recognition model building module is used to build an ivory recognition model, train the parameters of the ivory recognition model using the training set data, perform performance testing on the ivory recognition model using the test set data, and optimize the ivory recognition model according to the test results;
[0046] The ivory recognition model is used to read a suspected ivory texture image and output a recognition result.
[0047] A further improvement is that the image acquisition device includes a liftable bracket, an industrial camera, a light source module, a magnifying glass, a ruler, a sample holder, a stage, an image acquisition switch, a wireless communication module, and a power supply and interface module;
[0048] The industrial camera, light source module, image acquisition switch, wireless communication module, power supply and interface module form a whole and are connected to the liftable bracket to achieve height adjustment;
[0049] The magnifying glass and the ruler form a whole and are connected to a liftable bracket so as to achieve height adjustment;
[0050] The optical axis of the magnifying glass and the industrial camera lens are in the same straight line;
[0051] The sample holder and the stage form a whole and are fixedly connected to the bottom of the liftable support and cannot be moved.
[0052] In a third aspect, the present invention proposes an electronic device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements an ivory product identification method as described in any one of the first aspects of the present invention.
[0053] In a fourth aspect, the present invention proposes a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute an ivory product identification method as described in any one of the first aspects of the present invention.
[0054] Beneficial effects of the present invention:
[0055] The ivory product identification method described in the present invention uses computer vision methods to identify. Compared with physical methods such as ivory slice detection, the present invention can avoid damaging ivory samples. Compared with ivory identification methods that rely on the identification level of technical personnel, the present invention establishes an ivory identification model based on artificial intelligence by collecting a large number of ivory sample texture images, which can provide faster, more stable and accurate identification results. Compared with ivory identification methods based on DNA detection, the present invention can effectively reduce identification costs and the time required for identification, and also avoid ivory sample loss. Compared with ivory identification methods based on Schreiber angle measurement, the present invention can avoid the problem of identification errors caused by inaccurate angle measurement.
[0056] The image acquisition device proposed in this application can fix the image shooting optical path, simplify the ivory sample placement operation, thereby improving the shooting efficiency of ivory images, and can make full use of ambient light to turn on the light source to fill in the light as needed, thereby achieving energy saving. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is a flow chart of the overall steps of an ivory product identification method of the present invention;
[0058] Figure 2 A flowchart of a specific method for pre-processing in an ivory product identification method of the present invention;
[0059] Figure 3 This is an example diagram of the preprocessing process of the original ivory image in the ivory product identification method of the present invention;
[0060] Figure 4 It is a structural schematic diagram of an ivory product identification system of the present invention;
[0061] Figure 5 It is a schematic diagram of the structure of an image acquisition device in an ivory product identification system of the present invention;
[0062] Figure 6 The figure is a schematic diagram of an electronic device according to the present invention. DETAILED DESCRIPTION
[0063] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment 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 creative work should fall within the scope of protection of the present invention.
[0064] It should be noted that the terms "first", "second", etc. in the specification 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 data 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 that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0065] Please refer to the attached Figure 1 -Attached Figure 6 ,like Figure 1 As shown, a first aspect of an embodiment of the present invention provides an ivory product identification method, comprising the following steps:
[0066] Step S1: obtaining original images of several different types of ivory samples;
[0067] Step S2: preprocessing the original image of the ivory sample to obtain a texture image of the ivory sample;
[0068] Step S3: annotating and classifying the ivory sample texture images, establishing an ivory texture image dataset, and dividing the ivory texture image dataset into a training set and a test set according to a certain ratio;
[0069] Step S4: constructing an ivory recognition model using a neural network method; wherein the ivory recognition model input is a texture image, and the output is an ivory recognition result;
[0070] Step S5: training the parameters of the ivory recognition model using the training set data, testing the performance of the ivory recognition model using the test set data, and optimizing the ivory recognition model according to the test results; repeatedly training and testing the ivory recognition model until the recognition accuracy of the ivory recognition model reaches a given threshold;
[0071] Step S6: obtaining an original image of a suspected ivory product, and preprocessing the original image of the suspected ivory product to obtain a suspected ivory texture image;
[0072] Step S7: the ivory recognition model reads the suspected ivory texture image and outputs the recognition result, and the ivory recognition display interface visualizes the ivory recognition result.
[0073] In some embodiments, the ivory identification display interface includes a graphical user interface of software, an LED or LCD independent display of hardware, or a display screen integrated in various personal computers, laptops, tablet computers and other terminal devices.
[0074] In some embodiments, a convolutional neural network architecture can be used to construct an ivory recognition model, and the model architecture should include an input layer, a convolutional layer, a normalized pool, a maximum pooling layer, a global average pooling layer, an output layer, etc.
[0075] Specifically, Figure 2 and Figure 3 As shown, in this embodiment, the specific method of preprocessing in step S2 and step S6 includes:
[0076] Step S21: segmenting the original image using an image segmentation method, removing useless image edges, and obtaining a sample image including the background;
[0077] Step S22: cropping the sample image by an image cropping method to obtain a plurality of candidate texture images;
[0078] Step S23: screening multiple candidate texture images by an image screening method, deleting images with a large proportion of highlight, non-texture and background areas, and retaining images with clear textures as selected texture images;
[0079] Step S24: performing data enhancement on the selected texture image to obtain a final texture image.
[0080] The requirements for the image cropping method in step S22 are:
[0081] The cropping resolution is smaller than the sample image resolution;
[0082] The overlap rate between multiple cropped candidate texture images cannot be higher than a given threshold.
[0083] Among them, the image segmentation method in step S21 is a manual segmentation method or an automatic segmentation method. The manual segmentation method is performed by a staff through image processing software to segment the ivory and its surrounding background area in the original image according to the scale range captured in the original image. The image area obtained after segmentation is a rectangle, and the image does not contain a scale.
[0084] The automatic segmentation method is implemented through computer programming, and the ivory image area within the scale range is automatically segmented and intercepted through the image segmentation algorithm.
[0085] In some embodiments, the image segmentation algorithm may adopt a level set segmentation method, a deep learning segmentation method, or the like.
[0086] Specifically, the image screening method in step S23 includes manual screening and automatic screening.
[0087] Among them, the manual screening method is to observe the candidate ivory texture images with human eyes, retain the images with clear ivory texture, and delete the images with highlights, non-textures and background areas that account for too large a proportion;
[0088] The automatic screening method is implemented through computer programming, and the specific method is as follows:
[0089] First, the candidate texture image is converted into a grayscale image, and pixels whose image pixel grayscale values are higher than a first specified threshold are taken as highlight pixels. The number of highlight pixels is counted and their proportion is calculated. If the proportion of highlight pixels in the candidate texture image is higher than the first given threshold, the image is deleted, otherwise it is retained. Pixels whose image pixel grayscale values are lower than a second specified threshold are taken as background pixels, the number of background pixels is counted and their proportion is calculated. If the proportion of background pixels in the candidate texture image is higher than the second given threshold, the image is deleted, otherwise it is retained.
[0090] The specific method is described in detail below: Pixels whose grayscale values I(x, y) of the image pixels are higher than the first specified threshold α are regarded as highlight pixels, the number of highlight pixels is counted and their proportion ρ is calculated α , ρ α The value range is ρ α ∈[0,1], specifically expressed as follows:
[0091]
[0092] Where I(x,y) represents the grayscale value of pixel (x,y), and x∈[1,W] and y∈[1,H], W and H are the number of horizontal and vertical pixels of the image respectively, the first specified threshold α is 230, and the first given threshold θ is α The value of is 0.05, and σ(·) is a 0-1 value function, as follows:
[0093]
[0094] Where (·) represents a Boolean expression, and the output result of the Boolean expression is "true" or "false". If the proportion of highlight pixels in the candidate ivory texture image is ρ α Above a first given threshold θ α , that is, α >θ α If yes, delete the image, otherwise keep it;
[0095] The pixels whose grayscale values I(x, y) are lower than the second specified threshold β are regarded as background pixels, and the number of background pixels is counted and their proportion ρ is calculated. β , ρ β The value range is ρ β ∈[0,1], as follows:
[0096]
[0097] Among them, the value of the second specified threshold β is 80, and the value of the second given threshold θ β The value of is 0.25. If the background pixel ratio of the candidate ivory texture image is higher than ρ β At the second given threshold θ β , that is, β >θ β , then delete the image, otherwise keep it;
[0098] Texture feature extraction is performed on the candidate texture image to obtain texture feature distribution. If the texture feature distribution does not meet the given conditions, the candidate texture image is a non-texture image and is deleted, otherwise it is retained.
[0099] In some embodiments, the texture feature extraction of the candidate texture image obtains the texture feature distribution. If the texture feature distribution does not meet the given conditions, the candidate texture image is a non-texture image and is deleted. Otherwise, the specific method of retaining the candidate texture image includes:
[0100] Assume that I represents the candidate ivory texture image and J represents the standard ivory texture image. The texture feature distribution P(I) is obtained by extracting the texture features of the candidate ivory texture image I. Meanwhile, the texture feature distribution Q(J) is obtained by extracting the texture features of the standard ivory texture image J. Then, the Kullback-Leibler divergence of the two is calculated as follows:
[0101]
[0102] in, represents the Kullback-Leibler divergence of the texture feature distribution of the candidate ivory texture image I and the standard ivory texture image J. is less than a given threshold θ KL When , the candidate ivory texture image I is determined to be a texture image and retained, that is, If the texture feature distribution of the candidate ivory texture image I does not satisfy , the candidate ivory texture image I is a non-texture image and is deleted.
[0103] In this embodiment, the specific method of performing data enhancement on the selected texture image in step S24 to obtain the final texture image includes:
[0104] Firstly, the selected texture image is enhanced by using image enhancement methods such as histogram equalization and automatic contrast to improve the texture significance.
[0105] The selected texture image is then subjected to multi-angle rotation or mirroring processing, and a new texture image is obtained each time the processing is performed to increase the number of images, wherein the multi-angle rotation processing includes clockwise fixed-angle rotation, such as 45°, 90°, 135°, 180°, 225°, 270°, 315°, and random angle rotation, and the mirroring processing includes vertical mirroring and horizontal mirroring.
[0106] In this embodiment, the specific method of obtaining the original images of several different types of ivory samples in step S1 includes:
[0107] First, the ivory sample is pre-processed, such as cleaning it, and then placed on the stage of the image acquisition device;
[0108] The ivory sample is then oriented so that the ivory texture faces upward and is fully exposed to the field of view of the industrial camera, and then its position is fixed using a sample holder;
[0109] By adjusting the height of the industrial camera and magnifying glass, and depending on the intensity of the ambient light and the brightness of the ivory sample image in the camera screen, it is determined whether to turn on the light source and adjust the brightness of the light source to ensure that the ivory texture is clearly visible in the camera screen;
[0110] Then, the ivory sample is photographed to obtain an original image of the ivory sample, and the category and number of the ivory sample are recorded accordingly;
[0111] During the shooting process, the ivory sample can be moved and its direction can be adjusted to collect original images of the ivory sample in multiple different positions.
[0112] In this embodiment, the specific method of annotating and classifying the ivory sample texture image in step S3, establishing an ivory texture image dataset, and dividing the ivory texture image dataset into a training set and a test set according to a certain ratio includes:
[0113] According to the ivory sample category and number recorded when the ivory sample was photographed, each ivory sample texture image is labeled with an ivory sample category label and ivory sample number;
[0114] Among them, the categories of ivory samples include living ivory products, mammoth ivory products, ivory imitations, etc. Among them, living ivory products can be further subdivided into African ivory products and Asian ivory products according to actual needs, and ivory imitations can also be further subdivided according to actual needs. Those skilled in the art can subdivide the categories according to actual needs.
[0115] The ivory texture image dataset is divided into a training set and a test set in a ratio of 9:1. At the same time, all ivory sample texture images labeled with the same ivory sample number must be divided into either the training set or the test set, and cannot be divided into both sets at the same time.
[0116] The ivory product identification method described in this embodiment uses computer vision methods to identify. Compared with physical methods such as ivory slice detection, this embodiment can avoid damage to ivory samples. Compared with ivory identification methods that rely on the identification level of technical personnel, this embodiment establishes an ivory identification model based on artificial intelligence by collecting a large number of ivory sample texture images, which can provide faster, more stable and accurate identification results. Compared with ivory identification methods based on DNA detection, this embodiment can effectively reduce identification costs and the time required for identification, and also avoid ivory sample loss. Compared with ivory identification methods based on Schreiber angle measurement, this embodiment can avoid the problem of identification errors caused by inaccurate angle measurement.
[0117] A second aspect of an embodiment of the present invention proposes an ivory product identification system, which corresponds to an ivory product identification method provided in the above-mentioned embodiment of the present invention. Since the ivory product identification system provided by the embodiment of the present invention corresponds to the ivory product identification method provided in the above-mentioned embodiment of the present invention, the implementation method of the aforementioned ivory product identification method is also applicable to the ivory product identification system provided in this embodiment.
[0118] Specifically, Figure 4 , Figure 5 As shown, an ivory product identification system in an embodiment of the present invention includes:
[0119] An image acquisition device 20, used to acquire original images of a plurality of different types of ivory samples and to acquire original images of suspected ivory products;
[0120] An image preprocessing module 30 is used to preprocess the original image of the ivory sample to obtain the ivory sample texture image and to preprocess the original image of the suspected ivory product to obtain the suspected ivory texture image;
[0121] The data set management module 40 is used to label and classify the ivory sample texture images, establish an ivory texture image data set, and divide the ivory texture image data set into a training set and a test set according to a certain ratio;
[0122] A storage module 50, used for compressing and storing the original image data of the ivory sample and the ivory texture image data set;
[0123] An ivory recognition model building module 60 is used to build an ivory recognition model, train the parameters of the ivory recognition model using the training set data, perform a performance test on the ivory recognition model using the test set data, and optimize the ivory recognition model according to the test results;
[0124] The ivory recognition model is used to read a suspected ivory texture image and output a recognition result.
[0125] The ivory identification interface module 70 is used to visualize the identification results.
[0126] In this embodiment, the image acquisition device 20 may include an image acquisition device and an acquisition system, wherein the acquisition system is installed in a computer device, the image acquisition device is communicatively connected to the computer device, and the acquisition system is used to set image acquisition parameters of the industrial camera.
[0127] Specifically, Figure 5 As shown, the image acquisition device includes a liftable bracket 201, an industrial camera 202, a light source module 203, a magnifying glass 204, a ruler 205, a sample holder 206, a stage 207, an image acquisition switch 208, a wireless communication module 209, and a power supply and interface module 210.
[0128] The industrial camera 202, the light source module 203, the image acquisition switch 208, the wireless communication module 209, the power supply and interface module 210 form a whole and are connected to the liftable bracket 201 to achieve height adjustment;
[0129] The magnifying glass 204 and the ruler 205 form a whole and are connected to the liftable bracket 201 so as to achieve height adjustment;
[0130] The optical axis of the magnifying glass 204 and the lens of the industrial camera 202 are in the same straight line;
[0131] The sample holder 206 and the stage 207 form a whole and are fixedly connected to the bottom of the liftable support 201 and cannot be moved.
[0132] The light source module 203 has an independent switch and a brightness adjustment knob. The independent switch can control the on and off of the light source, while the brightness adjustment knob can control the increase and decrease of the brightness of the light source.
[0133] In some embodiments, the image capture resolution of the industrial camera 202 should reach 3000×3000 pixels and should not be less than 1000×1000 pixels.
[0134] The image acquisition device proposed in this embodiment can fix the image shooting light path, simplify the ivory sample placement operation, thereby improving the shooting efficiency of ivory images, and can make full use of ambient light to turn on the light source for fill light as needed, thereby achieving energy saving.
[0135] The embodiments of the present invention also provide an electronic device and a computer-readable storage medium.
[0136] like Figure 6 The figure is a schematic diagram of an electronic device provided by an embodiment of the present invention. The electronic device of this embodiment includes: a processor 11, a memory 12, and a computer program stored in the memory 12 and executable on the processor 11. When the processor 11 executes the computer program, the steps in the above-mentioned ivory product identification method embodiment are implemented. Alternatively, when the processor 11 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented.
[0137] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor 11 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.
[0138] The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the schematic diagram is merely an example of an electronic device and does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the diagram, or may combine certain components, or different components, for example, the electronic device may also include an input / output device, a network access device, a bus, etc.
[0139] The processor 11 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.
[0140] The memory 12 can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system 121, an application 122 required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0141] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0142] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0143] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0144] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for identifying ivory products, characterized in that: The following steps are involved: Obtaining original images of several different types of ivory samples, including: pre-processing the ivory samples and placing them on a stage of an image acquisition device; adjusting the direction of the ivory samples so that the ivory texture faces upward and is fully exposed to the field of view of the industrial camera, and then fixing its position with a sample holder; adjusting the height of the industrial camera and the magnifying glass, and judging whether to turn on the light source and adjusting the brightness of the light source according to the intensity of ambient light and the brightness of the ivory sample image in the camera screen to ensure that the ivory texture is clearly visible in the camera screen; photographing the ivory samples to obtain the original images of the ivory samples, and recording the categories and numbers of the ivory samples; during the photographing process, by moving the ivory samples and adjusting their directions, original images of the ivory samples at multiple different positions are collected; The original image of the ivory sample is preprocessed to obtain the texture image of the ivory sample; the specific method of preprocessing includes: segmenting the original image, removing useless image edges, and obtaining a sample image; cropping the sample image to obtain multiple candidate texture images; screening the multiple candidate texture images, deleting images with a large proportion of highlight, non-texture, and background areas, and retaining images with clear textures as selected texture images. The specific method is: taking pixels whose image pixel grayscale values I(x, y) are higher than a first specified threshold α as highlight pixels, counting the number of highlight pixels and calculating their proportion ρ α , ρ α The value range is ρ α ∈[0,1], specifically expressed as follows: Where I(x,y) represents the grayscale value of pixel (x,y), and x∈[1,W] and y∈[1,H], W and H are the number of horizontal and vertical pixels of the image respectively, the first specified threshold α is 230, and the first given threshold θ is α The value of is 0.05, and σ(·) is a 0-1 value function, as follows: Where (·) represents a Boolean expression, and the output result of the Boolean expression is "true" or "false". If the proportion of highlight pixels in the candidate ivory texture image is ρ α Above a first given threshold θ α , that is, α >θ α If yes, delete the image, otherwise keep it; The pixels whose grayscale values I(x, y) are lower than the second specified threshold β are regarded as background pixels, and the number of background pixels is counted and their proportion ρ is calculated. β , ρ β The value range is ρ β ∈[0,1], as follows: Among them, the value of the second specified threshold β is 80, and the value of the second given threshold θ β The value of is 0.
25. If the background pixel ratio of the candidate ivory texture image is ρ β Above the second given threshold θ β , that is, β >θ β , then delete the image, otherwise keep it; Texture feature extraction is performed on the candidate texture image to obtain a texture feature distribution. If the texture feature distribution does not meet the given conditions, the candidate texture image is a non-texture image and is deleted, otherwise it is retained. The specific method includes: assuming that I represents the candidate ivory texture image and J represents the standard ivory texture image, texture feature extraction is performed on the candidate ivory texture image I to obtain a texture feature distribution P(I), and texture feature extraction is performed on the standard ivory texture image J to obtain a texture feature distribution Q(J), and then the Kullback-Leibler divergence of the two is calculated, as follows: in, represents the Kullback-Leibler divergence of the texture feature distribution of the candidate ivory texture image I and the standard ivory texture image J. is less than a given threshold θ KL When , the candidate ivory texture image I is determined to be a texture image and retained, that is, If the texture feature distribution of the candidate ivory texture image I does not satisfy , then the candidate ivory texture image I is a non-texture image and is deleted; Performing data enhancement on the selected texture image to obtain a final texture image, including: firstly, using an image enhancement method to enhance the selected texture image to improve the saliency of the texture; then performing multi-angle rotation or mirroring on the selected texture image, and obtaining a new texture image each time the processing is performed to increase the number of images, wherein the multi-angle rotation processing includes clockwise fixed angle rotation and random angle rotation, and the mirroring processing includes vertical mirroring and horizontal mirroring; Label and classify the ivory sample texture images, establish an ivory texture image dataset, and divide the ivory texture image dataset into a training set and a test set according to a certain ratio; Build an ivory recognition model, use the training set data to train the parameters of the ivory recognition model, use the test set data to test the performance of the ivory recognition model, and optimize the ivory recognition model based on the test results; Acquire an original image of a suspected ivory product, and pre-process the original image of the suspected ivory product to obtain a suspected ivory texture image; The ivory recognition model reads the suspected ivory texture image and outputs the recognition result.
2. The ivory product identification method according to claim 1, characterized in that: The specific method of performing data enhancement on the selected texture image to obtain the final texture image includes: Firstly, the selected texture image is enhanced to improve the saliency of the texture; Then the selected texture image is rotated or mirrored at multiple angles, and a new texture image is obtained each time the processing is performed to increase the number of images.
3. The ivory product identification method according to claim 1, characterized in that: The specific method for labeling and classifying the ivory sample texture images, establishing an ivory texture image dataset, and dividing the ivory texture image dataset into a training set and a test set according to a certain ratio includes: According to the ivory sample category and number recorded when the ivory sample was photographed, each ivory sample texture image is labeled with an ivory sample category label and ivory sample number; Ivory sample categories include living ivory products, mammoth ivory products, and ivory imitations; The ivory texture image dataset is divided into a training set and a test set according to a certain ratio, while ensuring that all ivory sample texture images labeled with the same ivory sample number must be divided into the training set or the test set, and cannot be divided into both sets at the same time.
4. An ivory product identification system, characterized in that: A method for identifying ivory products according to any one of claims 1 to 3, comprising: An image acquisition device, used to obtain original images of several different types of ivory samples and original images of suspected ivory products; An image preprocessing module, used for preprocessing the original image of the ivory sample to obtain the ivory sample texture image and preprocessing the original image of the suspected ivory product to obtain the suspected ivory texture image; A data set management module is used to annotate and classify ivory sample texture images, establish an ivory texture image data set, and divide the ivory texture image data set into a training set and a test set according to a certain ratio; An ivory recognition model building module is used to build an ivory recognition model, train the parameters of the ivory recognition model using the training set data, perform performance testing on the ivory recognition model using the test set data, and optimize the ivory recognition model according to the test results; The ivory recognition model is used to read a suspected ivory texture image and output a recognition result.
5. The ivory product identification system according to claim 4, characterized in that: The image acquisition device includes a liftable bracket, an industrial camera, a light source module, a magnifying glass, a ruler, a sample holder, a stage, an image acquisition switch, a wireless communication module, and a power supply and interface module; The industrial camera, light source module, image acquisition switch, wireless communication module, power supply and interface module form a whole and are connected to the liftable bracket to achieve height adjustment; The magnifying glass and the ruler form a whole and are connected to a liftable bracket so as to achieve height adjustment; The optical axis of the magnifying glass and the industrial camera lens are in the same straight line; The sample holder and the stage form a whole and are fixedly connected to the bottom of the liftable support and cannot be moved.
6. An electronic device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, an ivory product identification method as claimed in any one of claims 1 to 3 is implemented.
