Method for identifying natural garlic oil adulterated with synthetic garlic oil

By analyzing multispectral images of garlic oil using machine vision and artificial intelligence technologies, multi-scale global latent features were extracted and optimized, solving the problem of identifying adulterated synthetic garlic oil and ensuring the safety of garlic oil in food.

CN115909325BActive Publication Date: 2025-12-19江苏福多美生物科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211445830.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-18
Publication Date
2025-12-19
Estimated Expiration
2042-11-18

AI Technical Summary

Technical Problem

Current technology makes it difficult to accurately identify whether natural garlic oil is adulterated with synthetic garlic oil, leading to potential food safety risks.

Method used

Artificial intelligence detection technology based on machine vision is adopted. Multispectral images of garlic oil and natural garlic oil to be detected are analyzed by deep convolutional neural networks and nonlocal neural networks to extract multi-scale global latent features. Then, the differential feature map is optimized for class-bounded closed domain distribution transfer. Finally, the identification is performed by a classifier.

Benefits of technology

This technology enables accurate detection of adulterated synthetic garlic oil in natural garlic oil, thus improving the safety of garlic oil for food consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115909325B_ABST
    Figure CN115909325B_ABST
Patent Text Reader

Abstract

Disclosed is a detection method for identifying adulteration of natural garlic oil with synthetic garlic oil, which adopts machine vision-based artificial intelligence detection technology, takes a detection multispectral image of garlic oil to be detected and a reference multispectral image of natural garlic oil as input data, extracts differences between multi-scale global implicit features of the two in a high-dimensional feature space, and identifies whether the garlic oil to be detected contains adulterated synthetic garlic oil. In this way, artificial intelligence technology and spectral imaging technology are combined to construct a detection scheme for identifying adulteration of natural garlic oil with synthetic garlic oil, so as to accurately detect whether natural garlic oil in food garlic oil is adulterated with synthetic garlic oil.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of food detection, and more particularly, to a detection method for identifying natural garlic oil adulterated with synthetic garlic oil. BACKGROUND

[0002] Natural garlic oil is a product obtained by washing, tissue crushing, extraction filtering and distillation of garlic. Because garlic oil contains a large amount of organosulfur components with medicinal value, as well as a small amount of carbohydrates and nearly 20 kinds of amino acids, iron, selenium and other ingredients beneficial to human health, it is widely used in medical health, health care and food industry. However, the production cost of garlic converted into garlic oil is very high, and the conversion rate is less than 1%. Therefore, synthetic garlic oil can be used as a supplement and replacement for high-value natural garlic oil in some fields, but due to the presence of a small amount of chemical residues in synthetic garlic oil, it is not suitable for use in the food field. Unscrupulous businessmen use synthetic garlic oil or mix synthetic garlic oil with natural garlic oil to pass off as natural garlic oil for profit.

[0003] Therefore, a detection scheme for identifying natural garlic oil adulterated with synthetic garlic oil is expected. SUMMARY

[0004] In order to solve the above technical problems, the present application is proposed. The embodiments of the present application provide a detection method for identifying natural garlic oil adulterated with synthetic garlic oil, which uses machine vision-based artificial intelligence detection technology to take the detection multispectral image of the garlic oil to be detected and the reference multispectral image of natural garlic oil as input data, so as to extract the difference between the multi-scale global implicit features of the two in the high-dimensional feature space, and to identify whether the garlic oil to be detected contains synthetic garlic oil. In this way, artificial intelligence technology and spectral imaging technology are combined to construct a detection scheme for identifying natural garlic oil adulterated with synthetic garlic oil, so as to accurately detect whether the natural garlic oil in the food garlic oil is adulterated with synthetic garlic oil.

[0005] According to an aspect of the present application, a detection method for identifying natural garlic oil adulterated with synthetic garlic oil is provided, which comprises: obtaining a detection multispectral image of the garlic oil to be detected and a reference multispectral image of natural garlic oil; inputting the detection multispectral image and the reference multispectral image into a deep convolutional neural network model comprising a plurality of mixed convolutional layers to obtain a detection feature map and a reference feature map, respectively; inputting the detection feature map and the reference feature map into a non-local neural network to obtain an enhanced detection feature map and an enhanced reference feature map, respectively; calculating a difference feature map between the enhanced detection feature map and the enhanced reference feature map; performing distribution transfer optimization for the difference feature map in a class-bounded closed domain to obtain an optimized difference feature map; and inputting the optimized difference feature map into a classifier to obtain a classification result, which is used to indicate whether the garlic oil to be detected contains adulterated synthetic garlic oil.

[0006] In the above detection method for identifying natural garlic oil adulterated with synthetic garlic oil, the inputting the detection multispectral image and the reference multispectral image into the deep convolutional neural network model comprising a plurality of mixed convolutional layers to obtain a detection feature map and a reference feature map, respectively, comprises: using the deep convolutional neural network model comprising a plurality of mixed convolutional layers as a feature extractor to perform multi-scale deep convolutional coding on the detection multispectral image to obtain the detection feature map; and using the deep convolutional neural network model comprising a plurality of mixed convolutional layers as a feature extractor to perform multi-scale deep convolutional coding on the reference multispectral image to obtain the reference feature map.

[0007] In the above detection method for identifying natural garlic oil adulterated with synthetic garlic oil, the using the deep convolutional neural network model comprising a plurality of mixed convolutional layers as a feature extractor to perform multi-scale deep convolutional coding on the detection multispectral image to obtain the detection feature map comprises: using each mixed convolutional layer of the deep convolutional neural network model to perform multi-scale convolution processing, pooling processing and nonlinear activation processing on input data in the forward transmission of the layer to output the detection feature map from the last mixed convolutional layer of the deep convolutional neural network model, wherein the input of the first mixed convolutional layer of the deep convolutional neural network model is the detection multispectral image.

[0008] In the detection method for identifying natural garlic oil adulterated with synthetic garlic oil, the use of the deep convolutional neural network model comprising a plurality of mixed convolutional layers as a feature extractor for multi-scale deep convolutional coding of the reference multispectral image to obtain the reference feature map comprises: using each mixed convolutional layer of the deep convolutional neural network model to perform multi-scale convolution processing, pooling processing and nonlinear activation processing on the input data in the forward transmission of the layer to output the reference feature map from the last mixed convolutional layer of the deep convolutional neural network model, wherein the input of the first mixed convolutional layer of the deep convolutional neural network model is the reference multispectral image.

[0009] In the detection method for identifying natural garlic oil adulterated with synthetic garlic oil, each mixed convolutional layer of the deep convolutional neural network model comprises a first convolutional branch structure, a second convolutional branch structure, a third convolutional branch structure and a fourth convolutional branch structure in parallel, and a multi-scale fusion structure connected with the first to fourth convolutional branch structures, wherein the first convolutional branch uses a first convolutional kernel with a first size, the second convolutional branch uses a second convolutional kernel with a first size and a first hole rate, the third convolutional branch uses a third convolutional kernel with a first size and a second hole rate, and the fourth convolutional branch uses a fourth convolutional kernel with a first size and a fourth hole rate.

[0010] In the detection method for identifying natural garlic oil adulterated with synthetic garlic oil, the input of the detection feature map and the reference feature map into the non-local neural network to obtain an enhanced detection feature map and an enhanced reference feature map comprises: inputting the detection feature map into a first point convolutional layer, a second point convolutional layer and a third point convolutional layer of the non-local neural network to obtain a first feature map, a second feature map and a third feature map; calculating the position-wise weighted sum of the first feature map and the second feature map to obtain an intermediate fusion feature map; inputting the intermediate fusion feature map into a Softmax function to normalize the feature values of each position in the intermediate fusion feature map to obtain a normalized intermediate fusion feature map; calculating the position-wise weighted sum of the normalized intermediate fusion feature map and the third feature map to obtain a re-fusion feature map; passing the re-fusion feature map through an embedded Gaussian similarity function to calculate the similarity between the feature values of each position in the re-fusion feature map to obtain a global perception feature map; passing the global perception feature map through a fourth point convolutional layer of the non-local neural network to obtain a channel-adjusted global perception feature map; and calculating the position-wise weighted sum of the channel-adjusted global perception feature map and the detection feature map to obtain the enhanced detection feature map.

[0011] In the detection method for identifying natural garlic oil adulterated with synthetic garlic oil, the detection feature map and the reference feature map are respectively input into a first point convolution layer, a second point convolution layer and a third point convolution layer of the non-local neural network to obtain a first feature map, a second feature map and a third feature map; a position-wise weighted sum of the first feature map and the second feature map is calculated to obtain an intermediate fusion feature map; the intermediate fusion feature map is input into a Softmax function to normalize the feature values of each position in the intermediate fusion feature map to obtain a normalized intermediate fusion feature map; a position-wise weighted sum of the normalized intermediate fusion feature map and the third feature map is calculated to obtain a re-fusion feature map; the re-fusion feature map is input into a fourth point convolution layer of the non-local neural network to obtain a channel-adjusted global perception feature map; and a position-wise weighted sum of the channel-adjusted global perception feature map and the reference feature map is calculated to obtain the enhanced reference feature map.

[0012] In the detection method for identifying natural garlic oil adulterated with synthetic garlic oil, the calculation of the difference feature map between the enhanced detection feature map and the enhanced reference feature map comprises: calculating the difference feature map between the enhanced detection feature map and the enhanced reference feature map according to the following formula: wherein F'1 represents the enhanced detection feature map, F'2 represents the enhanced reference feature map, F c represents the difference feature map, represents a position-wise difference.

[0013] In the detection method for identifying natural garlic oil adulterated with synthetic garlic oil, the calculation of the difference feature map between the enhanced detection feature map and the enhanced reference feature map comprises: calculating the difference feature map between the enhanced detection feature map and the enhanced reference feature map according to the following formula:

[0014]

[0015] wherein f i,j,k is the feature value of the (i,j) position of the difference feature map, W, H and C are the width, height and channel number of the difference feature map, and log represents the logarithmic function value with base 2, f' i,j,k is the feature value of the (i,j,k) position of the optimized difference feature map.

[0016] In the detection method for identifying natural garlic oil adulterated with synthetic garlic oil, the optimized difference feature map is input into a classifier to obtain a classification result, and the classification result is used to indicate whether the garlic oil to be detected contains adulterated synthetic garlic oil, which comprises: the individual optimized difference feature matrix in the optimized difference feature map is expanded into a one-dimensional feature vector according to a row vector or a column vector, and then concatenated to obtain a classification feature vector; the full connection layer of the classifier is used to perform full connection coding on the classification feature vector to obtain an encoded classification feature vector; and the encoded classification feature vector is input into the Softmax classification function of the classifier to obtain the classification result.

[0017] According to another aspect of the present application, a detection system for identifying natural garlic oil adulterated with synthetic garlic oil is provided, comprising: an image acquisition module for acquiring a detection multispectral image of garlic oil to be detected and a reference multispectral image of natural garlic oil; a hybrid coding module for inputting the detection multispectral image and the reference multispectral image into a deep convolutional neural network model comprising a plurality of hybrid convolutional layers to obtain a detection feature map and a reference feature map; a global coding module for inputting the detection feature map and the reference feature map into a non-local neural network to obtain an enhanced detection feature map and an enhanced reference feature map; a difference module for calculating a difference feature map between the enhanced detection feature map and the enhanced reference feature map; a distribution transfer optimization module for performing distribution transfer optimization of the difference feature map towards a class-bounded closed domain to obtain an optimized difference feature map; and a detection result generation module for inputting the optimized difference feature map into a classifier to obtain a classification result, and the classification result is used to indicate whether the garlic oil to be detected contains adulterated synthetic garlic oil.

[0018] In the detection system for identifying natural garlic oil adulterated with synthetic garlic oil, the hybrid coding module is further used for: using the deep convolutional neural network model comprising a plurality of hybrid convolutional layers as a feature extractor to perform multi-scale deep convolutional coding on the detection multispectral image to obtain the detection feature map; and using the deep convolutional neural network model comprising a plurality of hybrid convolutional layers as a feature extractor to perform multi-scale deep convolutional coding on the reference multispectral image to obtain the reference feature map.

[0019] In the detection system for identifying natural garlic oil adulterated with synthetic garlic oil, each mixed convolutional layer of the deep convolutional neural network model comprises a first convolutional branch structure, a second convolutional branch structure, a third convolutional branch structure and a fourth convolutional branch structure in parallel, and a multi-scale fusion structure connected with the first to fourth convolutional branch structures, wherein the first convolutional branch uses a first convolutional kernel with a first size, the second convolutional branch uses a second convolutional kernel with the first size and a first hole rate, the third convolutional branch uses a third convolutional kernel with the first size and a second hole rate, and the fourth convolutional branch uses a fourth convolutional kernel with the first size and a fourth hole rate.

[0020] In the detection system for identifying natural garlic oil adulterated with synthetic garlic oil, the global encoding module is further configured to: input the detection feature map into a first point convolutional layer, a second point convolutional layer and a third point convolutional layer of the non-local neural network respectively to obtain a first feature map, a second feature map and a third feature map; calculate a position-wise weighted sum of the first feature map and the second feature map to obtain an intermediate fusion feature map; input the intermediate fusion feature map into a Softmax function to normalize the feature values of each position in the intermediate fusion feature map to obtain a normalized intermediate fusion feature map; calculate a position-wise weighted sum of the normalized intermediate fusion feature map and the third feature map to obtain a re-fusion feature map; pass the re-fusion feature map through an embedding Gaussian similarity function to calculate the similarity between the feature values of each position in the re-fusion feature map to obtain a global perception feature map; pass the global perception feature map through a fourth point convolutional layer of the non-local neural network to obtain a channel-adjusted global perception feature map; and calculate a position-wise weighted sum of the channel-adjusted global perception feature map and the detection feature map to obtain the enhanced detection feature map.

[0021] In the detection system for identifying natural garlic oil adulterated with synthetic garlic oil, the global coding module is further configured to: input the reference feature map into first, second, and third point convolution layers of the non-local neural network to obtain first, second, and third feature maps, respectively; calculate a position-wise sum of the first and second feature maps to obtain an intermediate fusion feature map; input the intermediate fusion feature map into a Softmax function to normalize feature values of each position in the intermediate fusion feature map to obtain a normalized intermediate fusion feature map; calculate a position-wise sum of the normalized intermediate fusion feature map and the third feature map to obtain a re-fusion feature map; pass the re-fusion feature map through an embedded Gaussian similarity function to calculate similarities between feature values of each position in the re-fusion feature map to obtain a global perception feature map; pass the global perception feature map through a fourth point convolution layer of the non-local neural network to obtain a channel-adjusted global perception feature map; and calculate a position-wise sum of the channel-adjusted global perception feature map and the reference feature map to obtain the enhanced reference feature map.

[0022] In the detection system for identifying natural garlic oil adulterated with synthetic garlic oil, the difference module is further configured to: calculate a difference feature map between the enhanced detection feature map and the enhanced reference feature map according to the following formula: wherein F'1 represents the enhanced detection feature map, F'2 represents the enhanced reference feature map, F c represents the difference feature map, represents a position-wise difference.

[0023] In the detection system for identifying natural garlic oil adulterated with synthetic garlic oil, the distribution transfer optimization module is further configured to: perform class-bounded closed domain-oriented distribution transfer optimization on the difference feature map according to the following formula to obtain the optimized difference feature map:

[0024]

[0025] wherein f i,j,k is a feature value of an (i, j, k) position of the difference feature map, W, H, and C are width, height, and channel number of the difference feature map, and log represents a logarithm function value with 2 as a base, f" i,j,k is a feature value of an (i, j, k) position of the optimized difference feature map.

[0026] In the detection system for identifying natural garlic oil mixed with synthetic garlic oil, the detection result generation module is further configured to: expand each optimized differential feature matrix in the optimized differential feature map into a one-dimensional feature vector according to a row vector or a column vector, and then concatenate the one-dimensional feature vectors to obtain a classification feature vector; perform full connection coding on the classification feature vector using a full connection layer of the classifier to obtain a coded classification feature vector; and input the coded classification feature vector into a Softmax classification function of the classifier to obtain the classification result.

[0027] Compared with the prior art, the detection method for identifying natural garlic oil mixed with synthetic garlic oil provided by the present application adopts machine vision-based artificial intelligence detection technology, takes a detection multispectral image of garlic oil to be detected and a reference multispectral image of natural garlic oil as input data, extracts the difference between the multi-scale global implicit features of the two in a high-dimensional feature space, and identifies whether the garlic oil to be detected contains mixed synthetic garlic oil. In this way, artificial intelligence technology and spectral imaging technology are combined to construct a detection scheme for identifying natural garlic oil mixed with synthetic garlic oil, so as to accurately detect whether natural garlic oil in food garlic oil is mixed with synthetic garlic oil. BRIEF DESCRIPTION OF DRAWINGS

[0028] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description of embodiments of the present application, taken in conjunction with the accompanying drawings. The drawings provided in the specification and the embodiments of the present application together serve to provide a further understanding that enables others skilled in the art to make or use the present application. The drawings provided are for illustrative purposes and are not intended to limit the present application. In the drawings, the same reference numerals generally refer to the same components or steps throughout the drawings.

[0029] Figure 1 A flowchart of the detection method for identifying natural garlic oil mixed with synthetic garlic oil according to an embodiment of the present application.

[0030] Figure 2 An architecture diagram of the detection method for identifying natural garlic oil mixed with synthetic garlic oil according to an embodiment of the present application.

[0031] Figure 3 A flowchart of the detection method for identifying natural garlic oil mixed with synthetic garlic oil according to an embodiment of the present application, in which the detection feature map is passed through a non-local neural network to obtain an enhanced detection feature map.

[0032] Figure 4 A flowchart of the detection method for identifying natural garlic oil mixed with synthetic garlic oil according to an embodiment of the present application, in which the reference feature map is passed through a non-local neural network to obtain an enhanced reference feature map.

[0033] Figure 5 A block diagram of a detection system for identifying natural garlic oil adulterated with synthetic garlic oil according to an embodiment of the present application. DETAILED DESCRIPTION

[0034] Hereinafter, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part of embodiments of the present application, and thus are not to be used to limit the present application, and it is to be understood that the present application is not limited to the described example embodiments.

[0035] SUMMARY

[0036] As described in the above background, natural garlic oil is a product obtained by washing, tissue crushing, extraction and filtration, distillation and other processes of garlic. Because garlic oil contains a large amount of organosulfur components with medicinal value, and also contains a small amount of carbohydrates and nearly 20 kinds of amino acids, iron, selenium and other ingredients beneficial to human health, it is widely used in medical and health care and food industry. However, the production cost of garlic converted into garlic oil is very high, and the conversion rate is less than 1%. Therefore, synthetic garlic oil can be used as a supplement and replacement for high-value natural garlic oil in some fields, but due to the presence of a small amount of chemical residues in synthetic garlic oil, it is not suitable for use in the food field. Unscrupulous businessmen use synthetic garlic oil or mix synthetic garlic oil with natural garlic oil to pass off as natural garlic oil in order to make profits. Therefore, a detection scheme for identifying natural garlic oil adulterated with synthetic garlic oil is expected.

[0037] At present, deep learning and neural networks have been widely used in computer vision, natural language processing, text signal processing and other fields. In addition, deep learning and neural networks have also shown a level close to or even surpassing that of humans in image classification, object detection, semantic segmentation, text translation and other fields.

[0038] Deep learning and neural networks provide new solutions and schemes for the construction of intelligent detection of natural garlic oil adulterated with synthetic garlic oil.

[0039] Correspondingly, considering the actual detection process of natural garlic oil adulterated with synthetic garlic oil, the adulteration can be identified according to the comparison of the information of the actual detection image and the reference image. However, because the amount of information in the two images is large, and the image features in the detection image and the reference image are difficult to effectively distinguish in the actual identification process. At present, spectral analysis is an important means of natural science analysis, and is often used to detect the physical structure, chemical composition and other indicators of an object. Image spectral measurement combines spectral technology and imaging technology, combines spectral resolution and image resolution, and creates spatial dimension surface spectral analysis, that is, the current multispectral imaging and hyperspectral imaging technology.

[0040] Based on this, in the technical scheme of the present application, the artificial intelligence detection technology based on machine vision is adopted, the detection multispectral image of the to-be-detected garlic oil and the reference multispectral image of the natural garlic oil are taken as input data to extract the difference features between the multi-scale global implicit features of the two in the high-dimensional feature space, and to identify whether the to-be-detected garlic oil contains adulterated synthetic garlic oil. That is, the artificial intelligence technology is combined with the spectral imaging technology to construct a detection scheme for identifying natural garlic oil adulterated with synthetic garlic oil. In this way, it can accurately detect whether the natural garlic oil in the food garlic oil is adulterated with synthetic garlic oil, thereby ensuring the edible safety of the food garlic oil.

[0041] Specifically, in the technical scheme of the present application, first, the detection multispectral image of the to-be-detected garlic oil and the reference multispectral image of the natural garlic oil are obtained. Then, the detection multispectral image and the reference multispectral image are respectively processed through a deep convolutional neural network model comprising a plurality of mixed convolutional layers to respectively extract multi-scale implicit correlation features of the detection multispectral image and the reference multispectral image, thereby obtaining a detection feature map and a reference feature map. Accordingly, in one specific example of the present application, the mixed convolutional layer of the deep convolutional neural network model includes four branches in parallel, which are composed of one ordinary convolutional layer with a convolution kernel size of 3x3 and three dilated convolutional layers with a convolution kernel size of 3x3, and are respectively operated on the detection multispectral image and the reference multispectral image. The expansion rates of the three dilated convolution branches are set to 2, 3, and 4, respectively. By setting different expansion rates, image information with different receptive fields can be obtained, i.e. feature maps with different scales can be obtained, which expands the receptive field while avoiding information loss due to downsampling. Then, the four branch feature maps are fused to make the sampling more dense, which has high-level features without increasing additional parameter quantity.

[0042] It should be understood that, considering that the convolution is a typical local operation, and for the detection feature map and the reference feature map, each local feature distribution information in the detection feature map and the reference feature map is not isolated, the relevance between each local feature distribution information in the detection feature map and the reference feature map generates the foreground target. Therefore, in the technical solution of the present application, in order to improve the accurate detection of whether the to-be-detected garlic oil contains adulterated synthetic garlic oil, a non-local neural network is used for further feature extraction of the image. That is, the detection feature map and the reference feature map are respectively passed through the non-local neural network to obtain an enhanced detection feature map and an enhanced reference feature map. In particular, here, the non-local neural network captures hidden dependency information by calculating the similarity between each local feature distribution in the detection feature map and the reference feature map, and further models the context features, so that the network focuses on the overall feature correlation content of the detection multispectral image of the to-be-detected garlic oil and the reference multispectral image of the natural garlic oil, and further improves the backbone network feature extraction capability in the classification and detection task.

[0043] Further, a difference feature map between the enhanced detection feature map and the enhanced reference feature map is calculated, so as to represent the difference feature distribution information of the multi-scale global correlation features of the detection multispectral image of the to-be-detected garlic oil and the reference multispectral image of the natural garlic oil in the high-dimensional feature space, and to perform identification and detection of whether there is adulterated synthetic garlic oil in the to-be-detected garlic oil. That is, the difference feature map is further classified by a classifier to obtain a classification result for representing whether the to-be-detected garlic oil contains adulterated synthetic garlic oil. In this way, intelligent detection can be performed on whether the natural garlic oil in the food garlic oil is adulterated with synthetic garlic oil, thereby ensuring the edible safety of the food garlic oil.

[0044] In particular, in the technical solution of the present application, considering that there is an image semantic difference between the detection multispectral image and the reference multispectral image of the natural garlic oil, when passing through the deep convolutional neural network model containing multiple mixed convolutional layers and the non-local neural network, the image semantic difference of the source domain may cause the enhanced detection feature map and the enhanced reference feature map to express features in different feature domains in the feature space, so that when the difference feature map between the enhanced detection feature map and the enhanced reference feature map is calculated, the difference feature map causes induction divergence when classified by the classifier, thereby affecting the convergence when classified by the classifier and affecting the accuracy of the classification result.

[0045] Therefore, before being classified by the classifier, the difference feature map is first subjected to a class-bounded closed domain-oriented distribution transfer optimization, represented as:

[0046]

[0047] f i,j,k is the feature value of the (ij, k) position of the difference feature map, W, H and C are the width, height and channel number of the difference feature map, and log represents the logarithm with base 2.

[0048] That is, the class-bounded closed domain-oriented distribution transfer optimization aims at the possible inductive divergence of the high-dimensional feature distribution represented by the difference feature map when transferred to the target domain of the classification problem, and converges the feature distribution to the bounded closed domain of the feature set through the structured information constraint based on the conditional classification, so that the feature distribution of the difference feature map is transferred to the range with stable structured boundary in the target domain, improves the stability of the inductive iteration of the classification solution, that is, improves the convergence when the difference feature map is classified by the classifier, thereby improving the accuracy of the classification result. In this way, it can accurately detect whether the natural garlic oil in the food garlic oil is adulterated with synthetic garlic oil, thereby ensuring the food safety of the food garlic oil.

[0049] Based on this, the present application provides a detection method for identifying natural garlic oil adulterated with synthetic garlic oil, which comprises: obtaining a detection multispectral image of the garlic oil to be detected and a reference multispectral image of natural garlic oil; passing the detection multispectral image and the reference multispectral image through a deep convolutional neural network model comprising a plurality of mixed convolutional layers respectively to obtain a detection feature map and a reference feature map; passing the detection feature map and the reference feature map through a non-local neural network respectively to obtain an enhanced detection feature map and an enhanced reference feature map; calculating a difference feature map between the enhanced detection feature map and the enhanced reference feature map; performing class-bounded closed domain-oriented distribution transfer optimization on the difference feature map to obtain an optimized difference feature map; and passing the optimized difference feature map through a classifier to obtain a classification result, wherein the classification result is used to represent whether the garlic oil to be detected contains adulterated synthetic garlic oil.

[0050] After introducing the basic principles of the present application, various non-limiting embodiments of the present application will be specifically introduced with reference to the accompanying drawings.

[0051] Exemplary method

[0052] Figure 1 The flowchart of the detection method for identifying natural garlic oil adulterated with synthetic garlic oil according to the embodiments of the present application is shown in FIG. 1. As shown in FIG. 1, the detection method comprises the following steps: Figure 1As shown, according to the detection method for identifying natural garlic oil adulterated with synthetic garlic oil, the method comprises: S110, acquiring a detection multispectral image of the garlic oil to be detected and a reference multispectral image of natural garlic oil; S120, passing the detection multispectral image and the reference multispectral image through a deep convolutional neural network model comprising a plurality of mixed convolutional layers to obtain a detection feature map and a reference feature map; S130, passing the detection feature map and the reference feature map through a non-local neural network to obtain an enhanced detection feature map and an enhanced reference feature map; S140, calculating a difference feature map between the enhanced detection feature map and the enhanced reference feature map; S150, performing class-bounded closed domain-oriented distribution transfer optimization on the difference feature map to obtain an optimized difference feature map; and S160, passing the optimized difference feature map through a classifier to obtain a classification result, which is used to indicate whether the garlic oil to be detected contains adulterated synthetic garlic oil.

[0053] Figure 2 The architecture diagram of the detection method for identifying natural garlic oil adulterated with synthetic garlic oil according to the embodiments of the present application is shown. As shown in the architecture, Figure 2 In the architecture, first, a detection multispectral image of the garlic oil to be detected and a reference multispectral image of natural garlic oil are acquired. Then, the detection multispectral image and the reference multispectral image are passed through a deep convolutional neural network model comprising a plurality of mixed convolutional layers to obtain a detection feature map and a reference feature map. Then, the detection feature map and the reference feature map are passed through a non-local neural network to obtain an enhanced detection feature map and an enhanced reference feature map. Further, a difference feature map between the enhanced detection feature map and the enhanced reference feature map is calculated. Then, class-bounded closed domain-oriented distribution transfer optimization is performed on the difference feature map to obtain an optimized difference feature map. Then, the optimized difference feature map is passed through a classifier to obtain a classification result, which is used to indicate whether the garlic oil to be detected contains adulterated synthetic garlic oil.

[0054] In step S110, a detection multispectral image of the garlic oil to be detected and a reference multispectral image of natural garlic oil are acquired. As described in the background section above, natural garlic oil is a product obtained by washing, tissue crushing, extraction and filtration, distillation and other processes from garlic. Because garlic oil contains a large amount of organic sulfide components with medicinal value, and also contains a small amount of carbohydrates and nearly 20 kinds of amino acids, iron, selenium and other ingredients beneficial to human health, it is widely used in medical and health care and food industry. However, the conversion rate of garlic to garlic oil is less than 1%, and the production cost is very high. Therefore, synthetic garlic oil can be used as a supplement and replacement for high-value natural garlic oil in some fields, but it is not suitable for use in the food industry due to the presence of small amounts of chemical residues. Unscrupulous businessmen use synthetic garlic oil or mix synthetic garlic oil with natural garlic oil to pass off as natural garlic oil. Therefore, a detection scheme for identifying natural garlic oil adulterated with synthetic garlic oil is expected.

[0055] Correspondingly, considering the actual detection process of natural garlic oil adulterated with synthetic garlic oil, the adulteration can be identified by comparing the information of the actual detection image and the reference image. However, because the amount of information in the two images is large, and the image features in the detection image and the reference image are difficult to effectively distinguish in the actual identification process. At present, spectral analysis is an important means of natural science analysis, and is often used to detect the physical structure, chemical composition and other indicators of an object. Image spectral measurement combines spectral technology and imaging technology, combines spectral resolution and image resolution, and creates surface spectral analysis in spatial dimension, that is, the current multispectral imaging and hyperspectral imaging technology.

[0056] Based on this, in the technical scheme of the present application, an artificial intelligence detection technology based on machine vision is used, taking the detection multispectral image of the garlic oil to be detected and the reference multispectral image of natural garlic oil as input data, to extract the difference between the multi-scale global implicit features of the two in the high-dimensional feature space, and to identify whether the garlic oil to be detected contains adulterated synthetic garlic oil. That is, artificial intelligence technology and spectral imaging technology are combined to construct a detection scheme for identifying natural garlic oil adulterated with synthetic garlic oil. In this way, the natural garlic oil in food garlic oil can be accurately detected whether it is adulterated with synthetic garlic oil, thereby ensuring the safety of food garlic oil. Specifically, in the technical scheme of the present application, first, the multispectral imaging technology is used to acquire the detection multispectral image of the garlic oil to be detected and the reference multispectral image of natural garlic oil.

[0057] In step S120, the detection multispectral image and the reference multispectral image are respectively processed by a deep convolutional neural network model comprising a plurality of mixed convolutional layers to obtain a detection feature map and a reference feature map. That is, the detection multispectral image and the reference multispectral image are respectively processed by the deep convolutional neural network model comprising a plurality of mixed convolutional layers to extract multiscale hidden correlation features of the detection multispectral image and the reference multispectral image, respectively, thereby obtaining the detection feature map and the reference feature map. Accordingly, in one specific example of the present application, the mixed convolutional layer of the deep convolutional neural network model includes four branches in parallel, which are composed of one ordinary convolutional layer with a convolution kernel size of 3x3 and three dilated convolutional layers with a convolution kernel size of 3x3, and are respectively operated on the detection multispectral image and the reference multispectral image. The expansion rates of the three dilated convolution branches are set to 2, 3, and 4, respectively. By setting different expansion rates, image information of different receptive fields can be obtained, i.e., feature maps of different scales can be obtained, which can expand the receptive field while avoiding the loss of information caused by downsampling. That is, each mixed convolutional layer of the deep convolutional neural network model includes a first convolutional branch structure, a second convolutional branch structure, a third convolutional branch structure, and a fourth convolutional branch structure in parallel, and a multiscale fusion structure connected with the first to fourth convolutional branch structures, wherein the first convolutional branch uses a first convolution kernel with a first size, the second convolutional branch uses a second convolution kernel with the first size and a first dilated rate, the third convolutional branch uses a third convolution kernel with the first size and a second dilated rate, and the fourth convolutional branch uses a fourth convolution kernel with the first size and a fourth dilated rate. Then, the four branch feature maps are fused to make the sampling more dense, which has high-level features without increasing additional parameter quantity.

[0058] Specifically, in the detection method for identifying natural garlic oil mixed with synthetic garlic oil, the detection multispectral image and the reference multispectral image are respectively processed by a deep convolutional neural network model comprising a plurality of mixed convolutional layers to obtain a detection feature map and a reference feature map, which includes: using the deep convolutional neural network model comprising a plurality of mixed convolutional layers as a feature extractor to perform multiscale deep convolutional coding on the detection multispectral image to obtain the detection feature map; and using the deep convolutional neural network model comprising a plurality of mixed convolutional layers as a feature extractor to perform multiscale deep convolutional coding on the reference multispectral image to obtain the reference feature map.

[0059] Specifically, in the detection method for identifying natural garlic oil adulterated with synthetic garlic oil, the use of the deep convolutional neural network model comprising a plurality of mixed convolutional layers as a feature extractor for multi-scale deep convolutional coding of the detection multispectral image to obtain the detection feature map comprises: using each mixed convolutional layer of the deep convolutional neural network model to perform multi-scale convolution processing, pooling processing and nonlinear activation processing on input data in the forward transmission of the layer to output the detection feature map from the last mixed convolutional layer of the deep convolutional neural network model, wherein the input of the first mixed convolutional layer of the deep convolutional neural network model is the detection multispectral image.

[0060] Specifically, in the detection method for identifying natural garlic oil adulterated with synthetic garlic oil, the use of the deep convolutional neural network model comprising a plurality of mixed convolutional layers as a feature extractor for multi-scale deep convolutional coding of the reference multispectral image to obtain the reference feature map comprises: using each mixed convolutional layer of the deep convolutional neural network model to perform multi-scale convolution processing, pooling processing and nonlinear activation processing on input data in the forward transmission of the layer to output the reference feature map from the last mixed convolutional layer of the deep convolutional neural network model, wherein the input of the first mixed convolutional layer of the deep convolutional neural network model is the reference multispectral image.

[0061] In step S130, the detection feature map and the reference feature map are respectively passed through a non-local neural network to obtain an enhanced detection feature map and an enhanced reference feature map. It should be understood that, considering that convolution is a typical local operation, and for the detection feature map and the reference feature map, each local feature distribution information in the detection feature map and the reference feature map is not isolated, the correlation between each local feature distribution information in the detection feature map and the reference feature map produces a foreground target. Therefore, in the technical solution of the present application, in order to improve the accuracy of detecting whether the to-be-detected garlic oil contains adulterated synthetic garlic oil, a non-local neural network is used for further feature extraction of the image. That is, the detection feature map and the reference feature map are respectively passed through a non-local neural network to obtain an enhanced detection feature map and an enhanced reference feature map. In particular, here, the non-local neural network captures hidden dependency information by calculating the similarity between each local feature distribution in the detection feature map and the reference feature map, and further models contextual features, so that the network focuses on the overall feature correlation content of the detection multispectral image of the to-be-detected garlic oil and the reference multispectral image of the natural garlic oil, and further improves the backbone network feature extraction capability in the classification and detection task.

[0062] Figure 3A flowchart of a process of passing the detection feature map through a non-local neural network to obtain an enhanced detection feature map in a detection method for identifying natural garlic oil adulterated with synthetic garlic oil according to an embodiment of the present application. As shown in Figure 3 the process of passing the detection feature map through a non-local neural network to obtain an enhanced detection feature map, comprises: S210, inputting the detection feature map into a first point convolution layer, a second point convolution layer and a third point convolution layer of the non-local neural network respectively to obtain a first feature map, a second feature map and a third feature map; S220, calculating a position-wise weighted sum of the first feature map and the second feature map to obtain an intermediate fusion feature map; S230, inputting the intermediate fusion feature map into a Softmax function to normalize the feature values of each position in the intermediate fusion feature map to obtain a normalized intermediate fusion feature map; S240, calculating a position-wise weighted sum of the normalized intermediate fusion feature map and the third feature map to obtain a re-fusion feature map; S250, passing the re-fusion feature map through an embedded Gaussian similarity function to calculate the similarity between the feature values of each position in the re-fusion feature map to obtain a global perception feature map; S260, passing the global perception feature map through a fourth point convolution layer of the non-local neural network to obtain a channel-adjusted global perception feature map; and S270, calculating a position-wise weighted sum of the channel-adjusted global perception feature map and the detection feature map to obtain the enhanced detection feature map.

[0063] Figure 4 A flowchart of a process of passing the reference feature map through a non-local neural network to obtain an enhanced reference feature map in a detection method for identifying natural garlic oil adulterated with synthetic garlic oil according to an embodiment of the present application. As shown in Figure 4As shown, the process of passing the reference feature map through the non-local neural network to obtain an enhanced reference feature map includes: S310, inputting the reference feature map into a first point convolution layer, a second point convolution layer and a third point convolution layer of the non-local neural network respectively to obtain a first feature map, a second feature map and a third feature map; S320, calculating the position-wise sum of the first feature map and the second feature map to obtain an intermediate fusion feature map; S330, inputting the intermediate fusion feature map into a Softmax function to normalize the feature values of each position in the intermediate fusion feature map to obtain a normalized intermediate fusion feature map; S340, calculating the position-wise sum of the normalized intermediate fusion feature map and the third feature map to obtain a re-fusion feature map; S350, passing the re-fusion feature map through an embedded Gaussian similarity function to calculate the similarity between the feature values of each position in the re-fusion feature map to obtain a global perception feature map; S360, passing the global perception feature map through a fourth point convolution layer of the non-local neural network to obtain a channel-adjusted global perception feature map; and S370, calculating the position-wise sum of the channel-adjusted global perception feature map and the reference feature map to obtain the enhanced reference feature map.

[0064] In step S140, a difference feature map between the enhanced detection feature map and the enhanced reference feature map is calculated. That is, the difference feature map between the enhanced detection feature map and the enhanced reference feature map is calculated to represent the difference feature distribution information of the multiscale global correlation features of the detection multispectral image of the garlic oil to be detected and the reference multispectral image of the natural garlic oil in the high-dimensional feature space.

[0065] Specifically, in the above-mentioned detection method for identifying natural garlic oil adulterated with synthetic garlic oil, the calculation of the difference feature map between the enhanced detection feature map and the enhanced reference feature map includes: calculating the difference feature map between the enhanced detection feature map and the enhanced reference feature map according to the following formula; wherein the formula is: wherein F'1 represents the enhanced detection feature map, F'2 represents the enhanced reference feature map, F c represents the difference feature map, represents the position-wise difference.

[0066] In step S150, the difference feature map is subjected to class-bounded closed domain-oriented distribution transfer optimization to obtain an optimized difference feature map. In particular, in the technical solution of the present application, considering the image semantic difference between the detected multi-spectral image and the reference multi-spectral image of the natural garlic oil, when passing through the deep convolutional neural network model and the non-local neural network containing multiple mixed convolutional layers, the image semantic difference of the source domain may cause the enhanced detection feature map and the enhanced reference feature map to express features in different feature domains in the feature space, so that when the difference feature map between the enhanced detection feature map and the enhanced reference feature map is calculated, the difference feature map causes inductive divergence when classified by the classifier, thereby affecting the convergence when classified by the classifier and affecting the accuracy of the classification result. Therefore, before being classified by the classifier, the difference feature map is first subjected to class-bounded closed domain-oriented distribution transfer optimization.

[0067] Specifically, in the above-mentioned detection method for identifying natural garlic oil adulterated with synthetic garlic oil, the class-bounded closed domain-oriented distribution transfer optimization of the difference feature map to obtain an optimized difference feature map comprises: subjecting the difference feature map to class-bounded closed domain-oriented distribution transfer optimization to obtain the optimized difference feature map according to the following formula: wherein the formula is:

[0068]

[0069] wherein f i,j,k is the feature value of the (i,j) position of the difference feature map, W, H and C are the width, height and channel number of the difference feature map, and log represents the logarithmic function value with 2 as the base, f′ i,j,k is the feature value of the (i,j,k) position of the optimized difference feature map.

[0070] That is, the class-bounded closed domain-oriented distribution transfer optimization aims at the inductive divergence that may exist when the high-dimensional feature distribution represented by the difference feature map is transferred to the target domain of the classification problem, and converges the feature distribution to the bounded closed domain of the feature set through the structured information constraint based on conditional classification, so that the feature distribution of the difference feature map is transferred to the range with stable structured boundary under the target domain, improving the stability of inductive iteration of the classification solution, i.e. improving the convergence when the difference feature map is classified by the classifier, thereby improving the accuracy of the classification result. In this way, the natural garlic oil in the food garlic oil can be accurately detected whether it is adulterated with synthetic garlic oil, thereby ensuring the edible safety of the food garlic oil.

[0071] In step S160, the optimized differential feature map is passed through a classifier to obtain a classification result, which is used to represent whether the garlic oil to be detected contains adulterated synthetic garlic oil. Here, the high-dimensional data manifold of the optimized differential feature map is classified by the classifier to obtain a classification result representing whether the garlic oil to be detected contains adulterated synthetic garlic oil. In this way, intelligent detection can be performed on whether the natural garlic oil in the food garlic oil is adulterated with synthetic garlic oil, thereby ensuring the safety of the food garlic oil.

[0072] Specifically, in the detection method for identifying whether the natural garlic oil is adulterated with synthetic garlic oil, the passing of the optimized differential feature map through the classifier to obtain a classification result representing whether the garlic oil to be detected contains adulterated synthetic garlic oil comprises: expanding each optimized differential feature matrix in the optimized differential feature map into a one-dimensional feature vector according to a row vector or a column vector, and then concatenating to obtain a classification feature vector; using the fully connected layer of the classifier to perform fully connected coding on the classification feature vector to obtain a coded classification feature vector; and inputting the coded classification feature vector into the Softmax classification function of the classifier to obtain the classification result.

[0073] In summary, the detection method for identifying whether the natural garlic oil is adulterated with synthetic garlic oil according to the embodiments of the present application is illustrated, which adopts artificial intelligence detection technology based on machine vision, takes the detected garlic oil detection multispectral image and the reference multispectral image of natural garlic oil as input data, extracts the difference between the multi-scale global implicit features in the high-dimensional feature space, and identifies whether the detected garlic oil contains adulterated synthetic garlic oil. In this way, artificial intelligence technology and spectral imaging technology are combined to construct a detection scheme for identifying whether the natural garlic oil is adulterated with synthetic garlic oil, so as to accurately detect whether the natural garlic oil in the food garlic oil is adulterated with synthetic garlic oil.

[0074] Exemplary system

[0075] Figure 5 The block diagram of the detection system for identifying whether the natural garlic oil is adulterated with synthetic garlic oil according to the embodiments of the present application is shown in FIG. 1. As shown in FIG. 1, the detection system comprises a multispectral image acquisition device 1, a multispectral image preprocessing device 2, a multispectral image feature extraction device 3, a classifier 4, and a detection result output device 5. Figure 5As shown, the detection system 100 for identifying natural garlic oil adulterated with synthetic garlic oil according to the embodiment of the present application comprises: an image acquisition module 110, configured to acquire a detection multi-spectral image of a garlic oil to be detected and a reference multi-spectral image of natural garlic oil; a hybrid coding module 120, configured to pass the detection multi-spectral image and the reference multi-spectral image through a deep convolutional neural network model comprising a plurality of hybrid convolutional layers respectively to obtain a detection feature map and a reference feature map; a global coding module 130, configured to pass the detection feature map and the reference feature map through a non-local neural network respectively to obtain an enhanced detection feature map and an enhanced reference feature map; a difference module 140, configured to calculate a difference feature map between the enhanced detection feature map and the enhanced reference feature map; a distribution transfer optimization module 150, configured to perform distribution transfer optimization on the difference feature map in a class-bounded closed domain to obtain an optimized difference feature map; and a detection result generation module 160, configured to pass the optimized difference feature map through a classifier to obtain a classification result, which is used to indicate whether the garlic oil to be detected contains adulterated synthetic garlic oil.

[0076] In one example, in the detection system for identifying natural garlic oil adulterated with synthetic garlic oil described above, the hybrid coding module is further configured to: use the deep convolutional neural network model comprising a plurality of hybrid convolutional layers as a feature extractor to perform multi-scale deep convolutional coding on the detection multi-spectral image to obtain the detection feature map; and use the deep convolutional neural network model comprising a plurality of hybrid convolutional layers as a feature extractor to perform multi-scale deep convolutional coding on the reference multi-spectral image to obtain the reference feature map.

[0077] In one example, in the detection system for identifying natural garlic oil adulterated with synthetic garlic oil described above, each hybrid convolutional layer of the deep convolutional neural network model comprises a first convolutional branch structure, a second convolutional branch structure, a third convolutional branch structure and a fourth convolutional branch structure in parallel, and a multi-scale fusion structure connected with the first to fourth convolutional branch structures, wherein the first convolutional branch uses a first convolutional kernel with a first size, the second convolutional branch uses a second convolutional kernel with the first size and a first hole rate, the third convolutional branch uses a third convolutional kernel with the first size and a second hole rate, and the fourth convolutional branch uses a fourth convolutional kernel with the first size and a fourth hole rate.

[0078] In one example, in the detection system described above for identifying adulterated natural garlic oil with synthetic garlic oil, the global encoding module is further configured to: input the detection feature map into the first point convolutional layer, the second point convolutional layer, and the third point convolutional layer of the nonlocal neural network to obtain a first feature map, a second feature map, and a third feature map; calculate the position-weighted sum of the first feature map and the second feature map to obtain an intermediate fused feature map; input the intermediate fused feature map into a Softmax function to normalize the feature values ​​at each position in the intermediate fused feature map to obtain a normalized intermediate fused feature map; calculate the position-weighted sum of the normalized intermediate fused feature map and the third feature map to obtain a refused feature map; embed the refused feature map using a Gaussian similarity function to calculate the similarity between the feature values ​​at each position in the refused feature map to obtain a global perception feature map; pass the global perception feature map through the fourth point convolutional layer of the nonlocal neural network to obtain a channel-adjusted global perception feature map; and calculate the position-weighted sum of the channel-adjusted global perception feature map and the detection feature map to obtain the enhanced detection feature map.

[0079] In one example, in the detection system described above for identifying adulterated natural garlic oil with synthetic garlic oil, the global encoding module is further configured to: input the reference feature map into the first point convolutional layer, the second point convolutional layer, and the third point convolutional layer of the nonlocal neural network to obtain a first feature map, a second feature map, and a third feature map; calculate the position-weighted sum of the first feature map and the second feature map to obtain an intermediate fused feature map; input the intermediate fused feature map into a Softmax function to normalize the feature values ​​at each position in the intermediate fused feature map to obtain a normalized intermediate fused feature map; calculate the position-weighted sum of the normalized intermediate fused feature map and the third feature map to obtain a refused feature map; embed the refused feature map using a Gaussian similarity function to calculate the similarity between the feature values ​​at each position in the refused feature map to obtain a global perception feature map; pass the global perception feature map through the fourth point convolutional layer of the nonlocal neural network to obtain a channel-adjusted global perception feature map; and calculate the position-weighted sum of the channel-adjusted global perception feature map and the reference feature map to obtain the enhanced reference feature map.

[0080] In one example, in the detection system described above for identifying synthetic garlic oil adulterated with natural garlic oil, the differential module is further configured to: calculate the differential feature map between the enhanced detection feature map and the enhanced reference feature map using the following formula; wherein, the formula is: Wherein, F′1 represents the enhanced detection feature map, F′2 represents the enhanced reference feature map, and F c This represents the difference feature map. denotes the difference by position.

[0081] In one example, in the above detection system for identifying natural garlic oil adulterated with synthetic garlic oil, the distribution transfer optimization module is further configured to perform class-bounded closed domain distribution transfer optimization on the difference feature map according to the following formula to obtain the optimized difference feature map; wherein the formula is:

[0082]

[0083] wherein f i,j,k is the feature value of the (i, j, k) position of the difference feature map, W, H and C are the width, height and channel number of the difference feature map, and log represents the logarithmic function value with 2 as the base, f′ i,j,k is the feature value of the (i, j, k) position of the optimized difference feature map.

[0084] In one example, in the above detection system for identifying natural garlic oil adulterated with synthetic garlic oil, the detection result generation module is further configured to: expand each optimized difference feature matrix in the optimized difference feature map into a one-dimensional feature vector according to a row vector or a column vector, and then concatenate the one-dimensional feature vectors to obtain a classification feature vector; perform full connection coding on the classification feature vector using the full connection layer of the classifier to obtain an encoded classification feature vector; and input the encoded classification feature vector into the Softmax classification function of the classifier to obtain the classification result.

[0085] Here, those skilled in the art can understand that the specific functions and operations of each unit and module in the above detection system 100 for identifying natural garlic oil adulterated with synthetic garlic oil have been described in detail above with reference to the above description of the detection method for identifying natural garlic oil adulterated with synthetic garlic oil, and therefore, the repeated description thereof will be omitted. Figures 1 to 4

[0086] As described above, the detection system 100 for identifying natural garlic oil adulterated with synthetic garlic oil according to the embodiments of the present application can be implemented in various terminal devices, such as a server for identifying natural garlic oil adulterated with synthetic garlic oil, etc. In one example, the detection system 100 for identifying natural garlic oil adulterated with synthetic garlic oil according to the embodiments of the present application can be integrated into a terminal device as a software module and / or a hardware module. For example, the detection system 100 for identifying natural garlic oil adulterated with synthetic garlic oil can be a software module in the operating system of the terminal device, or can be an application program developed for the terminal device; of course, the detection system 100 for identifying natural garlic oil adulterated with synthetic garlic oil can also be one of the many hardware modules of the terminal device. ​

[0087] Alternatively, in another example, the detection system 100 for identifying natural garlic oil adulterated with synthetic garlic oil and the terminal device can also be separate devices, and the detection system 100 for identifying natural garlic oil adulterated with synthetic garlic oil can be connected to the terminal device through a wired and / or wireless network, and transmit interactive information in an agreed data format.

Claims

1. A detection method for identifying natural garlic oil adulterated with synthetic garlic oil, characterized by, The method comprises: obtaining a detection multi-spectral image of a to-be-detected garlic oil and a reference multi-spectral image of natural garlic oil; respectively passing the detection multi-spectral image and the reference multi-spectral image through a deep convolutional neural network model comprising a plurality of mixed convolutional layers to obtain a detection feature map and a reference feature map; respectively passing the detection feature map and the reference feature map through a non-local neural network to obtain an enhanced detection feature map and an enhanced reference feature map; calculating a difference feature map between the enhanced detection feature map and the enhanced reference feature map; performing class-bounded closed domain-oriented distribution transfer optimization on the difference feature map to obtain an optimized difference feature map; and passing the optimized difference feature map through a classifier to obtain a classification result, which is used to indicate whether the to-be-detected garlic oil contains adulterated synthetic garlic oil; wherein the class-bounded closed domain-oriented distribution transfer optimization on the difference feature map to obtain the optimized difference feature map comprises performing class-bounded closed domain-oriented distribution transfer optimization on the difference feature map according to the following formula to obtain the optimized difference feature map; wherein the formula is: wherein is a feature value of the differential feature map at the position, , and is a width, a height, and a channel number of the differential feature map, and denotes a logarithm function value with base 2, is a feature value of the optimized differential feature map at the position.

2. The detection method for identifying natural garlic oil adulterated with synthetic garlic oil according to claim 1, characterized in that, the passing of the detection multi-spectral image and the reference multi-spectral image through the deep convolutional neural network model comprising a plurality of mixed convolutional layers to obtain the detection feature map and the reference feature map comprises using the deep convolutional neural network model comprising a plurality of mixed convolutional layers as a feature extractor to perform multi-scale deep convolutional coding on the detection multi-spectral image to obtain the detection feature map, and using the deep convolutional neural network model comprising a plurality of mixed convolutional layers as a feature extractor to perform multi-scale deep convolutional coding on the reference multi-spectral image to obtain the reference feature map.

3. The detection method for identifying natural garlic oil adulterated with synthetic garlic oil according to claim 2, characterized in that, the using of the deep convolutional neural network model comprising a plurality of mixed convolutional layers as a feature extractor to perform multi-scale deep convolutional coding on the detection multi-spectral image to obtain the detection feature map comprises using each mixed convolutional layer of the deep convolutional neural network model to respectively perform multi-scale convolution processing, pooling processing and nonlinear activation processing on input data in layer forward transmission to output the detection feature map from the last mixed convolutional layer of the deep convolutional neural network model, wherein the input of the first mixed convolutional layer of the deep convolutional neural network model is the detection multi-spectral image.

4. The detection method for identifying natural garlic oil adulterated with synthetic garlic oil according to claim 3, characterized in that, the using of the deep convolutional neural network model comprising a plurality of mixed convolutional layers as a feature extractor to perform multi-scale deep convolutional coding on the reference multi-spectral image to obtain the reference feature map comprises using each mixed convolutional layer of the deep convolutional neural network model to respectively perform multi-scale convolution processing, pooling processing and nonlinear activation processing on input data in layer forward transmission to output the reference feature map from the last mixed convolutional layer of the deep convolutional neural network model, wherein the input of the first mixed convolutional layer of the deep convolutional neural network model is the reference multi-spectral image.

5. The detection method for identifying natural garlic oil adulterated with synthetic garlic oil according to claim 4, characterized in that, Each mixed convolutional layer of the deep convolutional neural network model comprises a first convolutional branch structure, a second convolutional branch structure, a third convolutional branch structure and a fourth convolutional branch structure in parallel, and a multi-scale fusion structure connected with the first to fourth convolutional branch structures, wherein the first convolutional branch uses a first convolutional kernel with a first size, the second convolutional branch uses a second convolutional kernel with the first size and a first hole rate, the third convolutional branch uses a third convolutional kernel with the first size and a second hole rate, and the fourth convolutional branch uses a fourth convolutional kernel with the first size and a fourth hole rate.

6. The detection method for identifying natural garlic oil adulterated with synthetic garlic oil according to claim 5, characterized in that, The detection feature map and the reference feature map are respectively input into first, second and third point convolutional layers of the non-local neural network to obtain first, second and third feature maps; a position-wise weighted sum of the first and second feature maps is calculated to obtain an intermediate fusion feature map; the intermediate fusion feature map is input into a Softmax function to normalize feature values at each position in the intermediate fusion feature map to obtain a normalized intermediate fusion feature map; a position-wise weighted sum of the normalized intermediate fusion feature map and the third feature map is calculated to obtain a re-fusion feature map; the re-fusion feature map is input into an embedded Gaussian similarity function to calculate similarity between feature values at each position in the re-fusion feature map to obtain a global perception feature map; the global perception feature map is input into a fourth point convolutional layer of the non-local neural network to obtain a channel-adjusted global perception feature map; and a position-wise weighted sum of the channel-adjusted global perception feature map and the detection feature map is calculated to obtain the enhanced detection feature map.

7. The detection method for identifying natural garlic oil adulterated with synthetic garlic oil according to claim 6, characterized in that, The detection feature map and the reference feature map are respectively input into first, second and third point convolutional layers of the non-local neural network to obtain first, second and third feature maps; a position-wise weighted sum of the first and second feature maps is calculated to obtain an intermediate fusion feature map; the intermediate fusion feature map is input into a Softmax function to normalize feature values at each position in the intermediate fusion feature map to obtain a normalized intermediate fusion feature map; a position-wise weighted sum of the normalized intermediate fusion feature map and the third feature map is calculated to obtain a re-fusion feature map; the re-fusion feature map is input into an embedded Gaussian similarity function to calculate similarity between feature values at each position in the re-fusion feature map to obtain a global perception feature map; the global perception feature map is input into a fourth point convolutional layer of the non-local neural network to obtain a channel-adjusted global perception feature map; and a position-wise weighted sum of the channel-adjusted global perception feature map and the detection feature map is calculated to obtain the enhanced detection feature map.

8. The detection method for identifying natural garlic oil adulterated with synthetic garlic oil according to claim 7, characterized in that, The calculating the differential feature map between the enhanced detection feature map and the enhanced reference feature map comprises: calculating the differential feature map between the enhanced detection feature map and the enhanced reference feature map in the following formula; wherein the formula is: wherein, denotes the enhanced detection feature map, denotes the enhanced reference feature map, denotes the differential feature map, denotes the difference in position.

9. The detection method for identifying natural garlic oil adulterated with synthetic garlic oil according to claim 8, characterized in that, The method comprises the following steps: obtaining the optimized differential feature map of the garlic oil sample; inputting the optimized differential feature map into a classifier to obtain a classification result, wherein the classification result is used to indicate whether the garlic oil sample contains the adulterated synthetic garlic oil; and obtaining the classification result of the garlic oil sample.

Citation Information

Patent Citations

  • Method for identification of multivariate adulteration of edible oil based on near-infrared spectrometer

    CN107894408A

  • Artificial neural network architectures for resource-constrained applications

    US20220114415A1