Image detection method and device

Through multi-scale feature extraction and dimensionality reduction technology, the problems of insufficient image feature extraction and repeated detection are solved, richer feature information is obtained, the amount of calculation is reduced, and the accuracy of image detection is improved.

CN110334746BActive Publication Date: 2024-10-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN201910508310.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-12
Publication Date
2024-10-18
Estimated Expiration
2039-06-19

AI Technical Summary

Technical Problem

The existing technology only uses the highest level features in image feature extraction, which results in insufficient extracted features, easily leads to misjudgment of image similarity and repeated detection, and increases the amount of system calculations.

Method used

A multi-scale feature extraction model is used to extract multi-scale feature information of the image, and the target image feature information is obtained through dimensionality reduction technology, and historical image feature information is searched. If there is a match, the repeated detection step is skipped and historical detection records are used as output.

Benefits of technology

Obtain more sufficient feature information, avoid repeated detection, reduce the amount of calculation, and optimize the model through the ternary loss function to improve feature discrimination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110334746B_ABST
    Figure CN110334746B_ABST
Patent Text Reader

Abstract

The present invention discloses an image detection method and device, the method comprising obtaining an image to be detected, extracting multi-scale feature information of the image to be detected according to a preset multi-scale feature extraction model, reducing the dimension of the multi-scale feature information to obtain target image feature information, searching for historical image feature information according to the target image feature information to obtain a search result, and if there is historical image feature information matching the target image feature information in the search result, calling the historical detection record corresponding to the historical image feature information, and outputting the historical detection record as the detection result of the image to be detected. The method avoids repeated detection, and can extract richer features and better characterize the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image detection, and in particular to an image detection method and device. Background Art

[0002] Feature extraction is a concept in computer vision and image processing. It refers to using a computer to extract image information and determine whether each image point belongs to an image feature. The result is called a feature description or feature vector. Commonly used image features include color features, texture features, shape features, and spatial relationship features. Image feature extraction is widely used in various scenarios, such as face recognition or image review.

[0003] In the prior art, only the features of the last convolutional layer are used to extract the fingerprint of the image material, and only the highest layer features are used. The extracted features are insufficient, and the lower layer features are not modeled. When it is necessary to judge the similarity of images, if the extracted features are insufficient, it is easy to misjudge the similarity of the images, resulting in repeated detection and increasing the computational complexity of the system. Summary of the invention

[0004] In order to solve the problem of feature information extraction and repeated detection, obtain more sufficient feature information and retain the spatial information of the feature, while avoiding the technical effect of repeated detection, the present invention provides an image detection method and device.

[0005] In one aspect, the present invention provides an image detection method, the method comprising:

[0006] Obtaining an image to be detected;

[0007] Extracting multi-scale feature information of the image to be detected according to a preset multi-scale feature extraction model;

[0008] Performing dimension reduction on the multi-scale feature information to obtain target image feature information;

[0009] According to the target image feature information, searching for historical image feature information to obtain a search result;

[0010] If there is historical image feature information matching the target image feature information in the search result, calling the historical detection record corresponding to the historical image feature information;

[0011] The historical detection record is output as the detection result of the image to be detected.

[0012] On the other hand, an image detection device is provided, the device comprising: an image input module to be detected, an image feature extraction module, an image feature dimension reduction module, an image duplication detection module, a historical detection record calling module and a detection request generation module;

[0013] The image input module to be detected is used to obtain the image to be detected;

[0014] The image feature extraction module is used to extract the multi-scale feature information of the image to be detected according to a preset multi-scale feature extraction model;

[0015] The image feature dimension reduction module is used to reduce the dimension of the multi-scale feature information to obtain target image feature information;

[0016] The image duplication checking module is used to search for historical image feature information according to the target image feature information to obtain a search result;

[0017] The historical detection record calling module is used to call the historical detection record corresponding to the historical image feature information if there is historical image feature information matching the target image feature information in the search result, and output the historical detection record as the detection result of the image to be detected;

[0018] The detection request generation module is used to generate a detection request for the image to be detected according to the absence of historical image feature information matching the target image feature information in the search results.

[0019] On the other hand, a computer-readable storage medium is provided for storing a program, and when the program is executed, the image detection method is implemented.

[0020] On the other hand, a terminal device is provided, and the terminal device includes the above-mentioned image detection device.

[0021] The present invention provides an image detection method and device, which can extract multi-scale features of an image to be detected, and reduce the dimension of the multi-scale features to obtain target image feature information. Check whether there is historical image feature information that matches the target image feature information. If so, skip the image detection step and use the historical detection record corresponding to the historical image feature information as the detection result output of the image to be detected. The method avoids repeated detection and can extract richer features and better characterize the image. In addition, the method can also optimize the image detection model through a ternary loss function during data training to obtain more discriminative features. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 A schematic diagram of an application scenario of an image detection method provided by an embodiment of the present invention;

[0024] Figure 2 A flowchart of an image detection method provided by an embodiment of the present invention;

[0025] Figure 3 A flowchart of a method for extracting multi-scale feature information of an image to be detected in an image detection method provided by an embodiment of the present invention;

[0026] Figure 4 A schematic diagram of a multi-scale feature extraction model in an image detection method provided by an embodiment of the present invention;

[0027] Figure 5 A flow chart of a method for pooling each basic feature information in an image detection method provided by an embodiment of the present invention;

[0028] Figure 6 A flowchart of a method for reducing the dimension of the multi-scale feature information in an image detection method provided by an embodiment of the present invention;

[0029] Figure 7 A flow chart of a method for searching historical image feature information according to the target image feature information in an image detection method provided by an embodiment of the present invention;

[0030] Figure 8 A flowchart of a method for determining whether a match exists based on Euclidean distance in an image detection method provided by an embodiment of the present invention;

[0031] Fig. 9 A schematic diagram of a training data model for an image detection method provided by an embodiment of the present invention;

[0032] Fig.10 A flowchart of a method for calculating a preset threshold in an image detection method provided by an embodiment of the present invention;

[0033] Fig.11 A schematic diagram of the structure of an image detection device provided by an embodiment of the present invention;

[0034] Fig.12 A schematic diagram of the structure of an image feature extraction module in an image detection device provided by an embodiment of the present invention;

[0035] Fig.13 A schematic diagram of the structure of an image feature dimensionality reduction module in an image detection device provided by an embodiment of the present invention;

[0036] Fig.14A schematic diagram of the hardware structure of a device provided in an embodiment of the present invention for implementing the method provided in an embodiment of the present invention is provided. DETAILED DESCRIPTION

[0037] To make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0038] In the description of the present invention, it is to be understood that the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. Moreover, the terms "first", "second", etc. are applicable to distinguishing similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numerals used in this way are interchangeable 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.

[0039] First, the relevant terms involved in the embodiments of the present invention are explained as follows:

[0040] VGG: VGG is the abbreviation of the Visual Geometry Group, Department of Engineering Science, University of Oxford. It is the network structure submitted by the Visual Geometry Group of the University of Oxford to the 2014 ImageNet Large Scale Visual Recognition Challenge (ILSVRC). It is named VGG after the abbreviation of the group name, or VGG network.

[0041] See also Figure 1, which shows a schematic diagram of an application scenario of an image detection method provided by an embodiment of the present invention, wherein the application scenario includes a user terminal 110 and a server 120, wherein the user terminal includes but is not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, etc. The server obtains the image information to be detected from the user terminal, extracts the multi-scale features of the image information to be detected, and performs dimensionality reduction on the multi-scale features of the image information to be detected to obtain the target image feature information. According to the target image feature information, it searches the server for matching historical image feature information. If so, the corresponding historical detection record is directly called as the detection result of the image to be detected, so as to avoid repeated detection of the image to be detected by the server.

[0042] See also Figure 2 , which shows an image detection method, which can be applied to the server side, and the method includes:

[0043] S210. Obtaining an image to be detected;

[0044] S220. Extracting multi-scale feature information of the image to be detected according to a preset multi-scale feature extraction model;

[0045] For further information, see Figure 3 , extracting the multi-scale feature information of the image to be detected according to the preset multi-scale feature extraction model includes:

[0046] S310. Inputting the image to be detected into a preset convolutional neural network;

[0047] S320. According to a preset convolutional neural network, extracting basic feature information of the image to be detected on each convolution group;

[0048] S330. Pooling each basic feature information to obtain pooled feature information of the image to be detected on each convolution group;

[0049] S340. Concatenate the pooled feature information of the image to be detected on each convolution group to obtain target image feature information.

[0050] Specifically, after the image to be detected is resized, it is input into a convolutional neural network for feature extraction. The convolutional neural network can be a 16-layer convolutional neural network VGG network or a more expressive network such as a deep residual network. In a specific example, when the VGG network is selected as the feature extraction network, the input image size is 224*224, that is, the image to be detected needs to be resized to 224*224 first, and then input into the VGG network.

[0051] The multi-scale features are the features of each convolution group in the convolution network. Different convolution groups have different features. For example, the low-level convolution layer extracts relatively low-level features, such as the color and edge of the image, while the high-level convolution layer extracts relatively abstract features, such as shape. By extracting features extracted by different convolution layers through multi-scale features, more sufficient feature information can be obtained, thereby better describing the features of the image to be detected.

[0052] For a specific example, see Figure 4 When feature extraction is performed through the VGG network, the 16-layer VGG network has five convolution groups, and the basic feature information on each convolution group is extracted to obtain the first convolution group basic features, the second convolution group basic features, the third convolution group basic features, the fourth convolution group basic features and the fifth convolution group basic features respectively.

[0053] Different convolution group features have different dimensions. For example, the first convolution group basic feature has 64 channels, each channel has a dimension of 224*224, and the second convolution group basic feature has 128 channels, each channel has a dimension of 112*112. Pool the basic feature information on each convolution group to obtain the pooled feature information of each convolution group. The pooling operation can be performed by max pooling, see Figure 5 , the specific operation of the max pooling is as follows:

[0054] S510. Dividing the basic feature information into multiple pooling areas;

[0055] S520. Obtaining regional feature data in each pooling area;

[0056] S530. Selecting the maximum value of the regional feature data to obtain pooled feature data;

[0057] S540. Concatenate the pooling feature data in each pooling area to obtain pooling feature information.

[0058] Alternatively, the pooling operation can also be performed by regional maximum activation pooling (rmac pooling) in the convolution region. The rmac pooling slides the window on the feature image by means of a variable window. Through windows of different sizes, the regional features of each region can be obtained. Perform max pooling on the feature image once to obtain the overall features. Directly add or concatenate the regional features and the overall features to obtain the basic feature information after pooling.

[0059] In a specific example, the pooling operation adopts the form of max pooling. After max pooling, the first convolution group pooling feature, the second convolution group pooling feature, the third convolution group pooling feature, the fourth convolution group pooling feature and the fifth convolution group pooling feature are obtained respectively. The dimension of the first convolution group pooling feature is 1*64*1*1, the dimension of the second convolution group pooling feature is 1*128*1*1, the dimension of the third convolution group pooling feature is 1*256*1*1, the dimension of the fourth convolution group pooling feature is 1*512*1*1, and the dimension of the fifth convolution group pooling feature is 1*512*1*1.

[0060] Finally, the pooled features of each convolution group are concatenated to obtain the multi-scale feature information of the image to be detected. The multi-scale feature information is the material fingerprint of the image to be detected, which is a feature vector that can represent the image. The dimension of the feature vector is 1472.

[0061] S230. Reduce the dimension of the multi-scale feature information to obtain target image feature information;

[0062] For further information, see Figure 6 , reducing the dimension of the multi-scale feature information to obtain the target image feature information includes:

[0063] S610. Calculate the mean vector of the multi-scale feature information;

[0064] S620. Calculate the correlation matrix of the multi-scale feature information according to the mean vector;

[0065] S630. Calculate a eigenvector matrix according to the correlation matrix;

[0066] S640 obtains target image feature information according to the feature vector matrix and the preset dimension reduction dimension.

[0067] Specifically, after obtaining the target image feature information, the target image feature information is subjected to dimensionality reduction, which may be performed using a principal component analysis (PCA) method.

[0068] PCA calculates the covariance matrix of multi-scale feature information to obtain the eigenvalues ​​and eigenvectors of the covariance matrix, and selects the matrix composed of the eigenvectors corresponding to the k features with the largest eigenvalue, that is, the largest variance. In this way, the multi-scale feature information can be transformed into a new space to achieve dimensionality reduction of data features.

[0069] When calculating the covariance matrix of multi-scale feature information and obtaining the eigenvalues ​​and eigenvectors of the covariance matrix, the method of eigenvalue decomposition of the covariance matrix and singular value decomposition of the covariance matrix can be used for calculation.

[0070] In a specific example, PCA dimensionality reduction can be achieved by eigenvalue decomposition of the covariance matrix or singular value decomposition. Input multi-scale feature information, and set the multi-scale feature information to be reduced to k dimensions. Remove the average value of the multi-scale feature information, that is, subtract the average value of each feature from each bit. Calculate the covariance matrix, and use the eigenvalue decomposition method or the singular value decomposition method to find the eigenvalues ​​and eigenvectors of the covariance matrix. Sort the eigenvalues ​​from large to small, and select the largest k of them. Then use the corresponding k eigenvectors as row vectors to form an eigenvector matrix P. Convert the multi-scale feature information to a new space constructed by k eigenvectors to obtain the multi-scale feature information after dimensionality reduction.

[0071] The PCA method is used to reduce the dimensionality of multi-scale feature information, which can reduce the dimensionality of 1472-dimensional multi-scale feature information to 64 dimensions, reduce redundant features, avoid increasing the amount of calculation, and cause waste of time and resources. At the same time, some potential feature variables can be discovered through PCA dimensionality reduction.

[0072] S240. According to the target image feature information, search for historical image feature information to obtain a search result;

[0073] S250. If there is historical image feature information matching the target image feature information in the search result, call the historical detection record corresponding to the historical image feature information;

[0074] S260. Output the historical detection record as the detection result of the image to be detected.

[0075] For further information, see Figure 7 , searching for historical image feature information according to the target image feature information to obtain a search result includes:

[0076] S710. Obtain historical image feature information;

[0077] S720. Calculate the Euclidean distance between the target image feature information and the historical image feature information.

[0078] For further information, see Figure 8 , the calculating the Euclidean distance between the target image feature information and the historical image feature information comprises:

[0079] S810. If the Euclidean distance is greater than a preset threshold, a detection request for the image to be detected is generated to detect the image to be detected;

[0080] S820. If the Euclidean distance is less than a preset threshold, calling the historical detection record corresponding to the historical image feature information;

[0081] S830. Output the historical detection record as the detection result of the image to be detected.

[0082] Specifically, when comparing the target image feature information with the historical image feature information, the Euclidean distance can be used to determine whether the target image feature information and the historical image feature information are similar. When the Euclidean distance between the target image feature information and the historical image feature information is less than a preset value, the target image feature information and the historical image feature information match, and the historical detection record corresponding to the historical image feature information is called, and the historical detection record is output as the detection result of the target image feature information. When the Euclidean distance between the target image feature information and the historical image feature information is greater than a preset value, the target image feature information and the historical image feature information do not match. When they do not match, a detection request is generated to detect the image to be detected.

[0083] In a specific example, the method can be applied to an audit system. When features are selected for comparison and it is confirmed that there are pictures in historical pictures that are highly similar to the picture to be detected, the historical records are called as the detection results to skip the detection step of the picture to be detected, thereby avoiding repeated detection.

[0084] When performing similarity detection on the image to be detected and the historical image, you can improve the recognition ability of image detection through training. Fig. 9 , Fig. 9 It is a training model for image detection. First, the training data is obtained, and the features of each sample data in the training data are extracted by the feature extraction model. Then, each data sample is clustered by a preset algorithm. After clustering, the sample data belonging to the same category should have similarity. By manually annotating the sample data in each category, dissimilar samples are further excluded, and finally multiple categories are obtained. The sample data in each class are similar, and the sample data between each class are dissimilar.

[0085] When training the model, feature extraction is performed on the sample data. The feature extraction can use a multi-scale feature extraction model, and the VGG network can be used for multi-scale feature extraction. After feature extraction, 1472-dimensional multi-scale feature information is output to the fully connected layer, and dimension reduction is performed in the fully connected layer. The dimension reduction can use the PCA method to reduce the dimension of the multi-scale feature information to obtain 64-dimensional target image feature information. Finally, the target image information can be optimized using a ternary loss function (triplet loss). The preset threshold can be obtained by the triplet loss method. Please refer to Fig.10 , the calculation method of the preset threshold includes:

[0086] S1010. Obtain target sample information, positive sample information and negative sample information;

[0087] S1020. According to the target sample information, the positive sample information and the negative sample information, sequentially obtain a target sample feature vector, a positive sample feature vector and a negative sample feature vector;

[0088] S1030. Calculate the Euclidean distance between the target sample feature vector and the positive sample feature vector to obtain the same type distance;

[0089] S1040. Calculate the Euclidean distance between the target sample feature vector and the negative sample feature vector to obtain a heterogeneous distance;

[0090] S1050. Calculate a preset threshold value according to the same type distance and the different type distance.

[0091] Specifically, when performing triplet loss optimization, the formula for triplet loss is as follows:

[0092]

[0093] in: represents the feature vector of positive sample a, represents the feature vector of the positive sample p, The goal of triplet loss optimization is to minimize the triplet loss, that is, the distance between positive sample a and positive sample p. The smaller the better, the distance between the positive sample a and the negative sample n The bigger the better.

[0094] When using triplet loss training, the training data used is triples<A,B,C> , in fact, A and B are similar pictures, A and C are not similar pictures, that is,<A,B> =1,<A,C> =0, the Stochastic Gradient Descent (SGD) algorithm can be used for optimization.

[0095] Introducing triplet loss into the image detection training model can enable the image detection model to learn more discriminative feature representations and improve the accuracy of image detection.

[0096] In a specific example, an image detection method described in this embodiment can be applied to an image audit system. In the image audit system, the party providing the image may provide the same or similar images. If the same or similar images are audited repeatedly, system resources will be wasted. The image detection method is used to obtain characteristic information of the image to be detected and compare it with the historical characteristic information in the historical records. When the two match, the previous audit records are directly extracted and no audit is performed.

[0097] An image detection method proposed in an embodiment of the present invention extracts multi-scale features of an image to be detected, and reduces the dimension of the multi-scale features to obtain target image feature information. It is checked whether there is historical image feature information that matches the target image feature information. If so, the image detection step is skipped, and the historical detection record corresponding to the historical image feature information is used as the detection result output of the image to be detected. The method can obtain richer features through multi-scale feature extraction, while avoiding repeated detection, reducing the amount of calculation, and avoiding the waste of detection resources.

[0098] The present invention also provides an image detection device, see Fig.11 The device includes: an image input module 1110 to be detected, an image feature extraction module 1120, an image feature dimension reduction module 1130, an image duplication detection module 1140, a historical detection record calling module 1150 and a detection request generation module 1160;

[0099] The image to be detected input module 1110 is used to obtain the image to be detected;

[0100] The image feature extraction module 1120 is used to extract multi-scale feature information of the image to be detected according to a preset multi-scale feature extraction model;

[0101] The image feature dimension reduction module 1130 is used to reduce the dimension of the multi-scale feature information to obtain target image feature information;

[0102] The image duplication checking module 1140 is used to search for historical image feature information according to the target image feature information to obtain a search result;

[0103] The historical detection record calling module 1150 is used to call the historical detection record corresponding to the historical image feature information if there is historical image feature information matching the target image feature information in the search result, and output the historical detection record as the detection result of the image to be detected;

[0104] The detection request generating module 1160 is used to generate a detection request for the image to be detected according to the absence of historical image feature information matching the target image feature information in the search result.

[0105] For further information, see Fig.12 , the image feature extraction module 1120 includes a basic feature extraction unit 1210, a basic feature pooling unit 1220 and a feature information stitching unit 1230:

[0106] The basic feature extraction unit 1210 is used to input the image to be detected into a preset convolutional neural network, and extract the basic feature information of the image to be detected on each convolution group according to the preset convolutional neural network;

[0107] The basic feature pooling unit 1220 is used to pool each basic feature information to obtain the pooled feature information of the image to be detected on each convolution group;

[0108] The feature information splicing unit 1230 is used to splice the pooled feature information of the image to be detected on each convolution group to obtain the target image feature information.

[0109] For further information, see Fig.13 , the image feature dimension reduction module 1130 includes a mean vector calculation unit 1310, a correlation matrix calculation unit 1320, a feature vector matrix calculation unit 1330 and a target image feature acquisition unit 1340;

[0110] The mean vector calculation unit 1310 is used to calculate the mean vector of the multi-scale feature information;

[0111] The correlation matrix calculation unit 1320 is used to calculate the correlation matrix of the multi-scale feature information according to the mean vector;

[0112] The eigenvector matrix calculation unit 1330 is used to calculate the eigenvector matrix according to the correlation matrix;

[0113] The target image feature obtaining unit 1340 is used to obtain target image feature information according to the feature vector matrix and a preset dimension reduction dimension.

[0114] The device provided in the above embodiment can execute the method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method. For technical details not described in detail in the above embodiment, please refer to an image detection method provided in any embodiment of the present invention.

[0115] This embodiment further provides a computer-readable storage medium, in which computer-executable instructions are stored. The computer-executable instructions are loaded by a processor and execute the above-mentioned image detection method of this embodiment.

[0116] This embodiment further provides a device, which includes a processor and a memory, wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned image detection method of this embodiment.

[0117] The device may be a computer terminal, a mobile terminal or a server, and the device may also participate in constituting the apparatus or system provided in the embodiment of the present invention. Fig.14 As shown, the computer terminal 1 (or the mobile terminal 14 or the server 15) may include one or more (shown as 1402a, 1402b, ..., 1402n in the figure) processors 1402 (the processor 1402 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1404 for storing data, and a transmission device 1406 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Fig.14 The structure shown is for illustration only and does not limit the structure of the above electronic device. Fig.14 More or fewer components as shown, or with Fig.14 Different configurations are shown.

[0118] It should be noted that the one or more processors 1402 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 14 (or mobile device). As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0119] The memory 1404 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the method in the embodiment of the present invention. The processor 1402 executes various functional applications and data processing by running the software programs and modules stored in the memory 1404, that is, to implement the above-mentioned method for generating a temporal behavior capture frame based on a self-attention network. The memory 1404 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1404 may further include a memory remotely arranged relative to the processor 1402, and these remote memories may be connected to the mobile device 15 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0120] The transmission device 1406 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 14. In one example, the transmission device 1406 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 1406 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0121] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 14 (or mobile device).

[0122] This specification provides method operation steps as described in the embodiments or flow charts, but more or fewer operation steps may be included based on conventional or non-creative labor. The steps and sequence listed in the embodiments are only one way of executing the sequence of many steps and do not represent the only execution sequence. When the actual system or interrupt product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, in a parallel processor or multi-threaded processing environment).

[0123] The structure shown in this embodiment is only a partial structure related to the scheme of the present application, and does not constitute a limitation on the device to which the scheme of the present application is applied. The specific device may include more or fewer components than shown, or combine certain components, or have different arrangements of components. It should be understood that the method, device, etc. disclosed in this embodiment can be implemented in other ways. For example, the device embodiment described above is only schematic. For example, the division of the modules is only a division of a logical function. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or unit modules.

[0124] Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or the whole or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., various media that can store program codes.

[0125] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this specification can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. 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 the present invention.

[0126] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those 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 thereof may be replaced by equivalents. However, these 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 invention.

Claims

1. An image detection method, characterized in that: The method comprises: Obtaining an image to be detected; Extracting multi-scale feature information of the image to be detected according to a preset multi-scale feature extraction model; Performing dimension reduction on the multi-scale feature information to obtain target image feature information; According to the target image feature information, searching for historical image feature information to obtain a search result; If there is historical image feature information matching the target image feature information in the search result, calling the historical detection record corresponding to the historical image feature information; the historical detection record is the detection result of the historical image corresponding to the historical image feature information; The historical detection record is output as the detection result of the image to be detected, so as to skip the detection step of the image to be detected.

2. An image detection method according to claim 1, characterized in that: The extracting multi-scale feature information of the image to be detected according to the preset multi-scale feature extraction model includes: Inputting the image to be detected into a preset convolutional neural network; According to a preset convolutional neural network, extracting basic feature information of the image to be detected on each convolution group; Pooling each basic feature information to obtain pooled feature information of the image to be detected on each convolution group; The pooled feature information of the image to be detected on each convolution group is concatenated to obtain the target image feature information.

3. An image detection method according to claim 2, characterized in that: The step of pooling each basic feature information to obtain the pooled feature information of the image to be detected on each convolution group includes: Dividing the basic feature information into a plurality of pooling regions; Obtain regional feature data in each pooling area; Selecting the maximum value of the regional feature data to obtain pooled feature data; The pooled feature data in each pooled area is concatenated to obtain the pooled feature information.

4. An image detection method according to claim 1, characterized in that: The step of reducing the dimension of the multi-scale feature information to obtain the target image feature information includes: Calculating a mean vector of the multi-scale feature information; Calculating a correlation matrix of the multi-scale feature information according to the mean vector; According to the correlation matrix, a characteristic vector matrix is ​​calculated; According to the feature vector matrix and the preset dimension reduction dimension, the target image feature information is obtained.

5. An image detection method according to claim 1, characterized in that: The searching for historical image feature information according to the target image feature information to obtain a search result includes: Obtain historical image feature information; The Euclidean distance between the target image feature information and the historical image feature information is calculated.

6. An image detection method according to claim 5, characterized in that: The calculating the Euclidean distance between the target image feature information and the historical image feature information comprises: If the Euclidean distance is greater than a preset threshold, generating a detection request for the image to be detected to detect the image to be detected; If the Euclidean distance is less than a preset threshold, calling the historical detection record corresponding to the historical image feature information; The historical detection record is output as the detection result of the image to be detected.

7. An image detection method according to claim 6, characterized in that: The method for calculating the preset threshold includes: Obtain target sample information, positive sample information and negative sample information; According to the target sample information, the positive sample information and the negative sample information, sequentially obtain a target sample feature vector, a positive sample feature vector and a negative sample feature vector; Calculate the Euclidean distance between the target sample feature vector and the positive sample feature vector to obtain the same type distance; Calculate the Euclidean distance between the target sample feature vector and the negative sample feature vector to obtain the heterogeneous distance; A preset threshold is calculated according to the same type distance and the different type distance.

8. An image detection device, characterized in that: The device comprises: an image input module to be detected, an image feature extraction module, an image feature dimension reduction module, an image duplication detection module, a historical detection record calling module and a detection request generation module; The image input module to be detected is used to obtain the image to be detected; The image feature extraction module is used to extract the multi-scale feature information of the image to be detected according to a preset multi-scale feature extraction model; The image feature dimension reduction module is used to reduce the dimension of the multi-scale feature information to obtain target image feature information; The image duplication checking module is used to search for historical image feature information according to the target image feature information to obtain a search result; The historical detection record calling module is used to call the historical detection record corresponding to the historical image feature information if there is historical image feature information matching the target image feature information in the search result, and output the historical detection record as the detection result of the image to be detected, so as to skip the detection step of the image to be detected; the historical detection record is the detection result of the historical image corresponding to the historical image feature information; The detection request generation module is used to generate a detection request for the image to be detected according to the absence of historical image feature information matching the target image feature information in the search results.

9. An image detection device according to claim 8, characterized in that: The image feature extraction module includes a basic feature extraction unit, a basic feature pooling unit and a feature information splicing unit: The basic feature extraction unit is used to input the image to be detected into a preset convolutional neural network, and extract the basic feature information of the image to be detected on each convolution group according to the preset convolutional neural network; The basic feature pooling unit is used to pool each basic feature information to obtain the pooled feature information of the image to be detected on each convolution group; The feature information splicing unit is used to splice the pooled feature information of the image to be detected on each convolution group to obtain the target image feature information.

10. An image detection device according to claim 8, characterized in that: The image feature dimension reduction module includes a mean vector calculation unit, a correlation matrix calculation unit, a feature vector matrix calculation unit and a target image feature acquisition unit; The mean vector calculation unit is used to calculate the mean vector of the multi-scale feature information; The correlation matrix calculation unit is used to calculate the correlation matrix of the multi-scale feature information according to the mean vector; The eigenvector matrix calculation unit is used to calculate the eigenvector matrix according to the correlation matrix; The target image feature obtaining unit is used to obtain target image feature information according to the feature vector matrix and a preset dimension reduction dimension.

Citation Information

Patent Citations

  • Image re-recognition method and recognition device

    CN107451156A

  • Image retrieval method

    CN108009191A