WO2021208373A1 - Image identification method and apparatus, and electronic device and computer-readable storage medium - Google Patents
Image identification method and apparatus, and electronic device and computer-readable storage medium Download PDFInfo
- Publication number
- WO2021208373A1 WO2021208373A1 PCT/CN2020/119613 CN2020119613W WO2021208373A1 WO 2021208373 A1 WO2021208373 A1 WO 2021208373A1 CN 2020119613 W CN2020119613 W CN 2020119613W WO 2021208373 A1 WO2021208373 A1 WO 2021208373A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- target
- distance
- feature
- characteristic
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 77
- 230000009466 transformation Effects 0.000 claims abstract description 17
- 238000003062 neural network model Methods 0.000 claims description 39
- 230000008602 contraction Effects 0.000 claims description 25
- 238000004590 computer program Methods 0.000 claims description 17
- 238000004364 calculation method Methods 0.000 claims description 5
- 238000000605 extraction Methods 0.000 claims description 5
- 230000008569 process Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 230000000694 effects Effects 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 241001465754 Metazoa Species 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/74—Image or video pattern matching; Proximity measures in feature spaces
- G06V10/75—Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
- G06V10/751—Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Definitions
- This application relates to the field of image processing technology, and in particular to an image recognition method, device, electronic equipment, and computer-readable storage medium.
- Image recognition refers to the use of computers to process, analyze, and understand images to identify targets and objects in various patterns. Before performing image recognition, you can first enter the target image of the target in the image recognition system as the base library image in the base library, and then perform image recognition based on the similarity between the target image to be recognized and the base library image, for example , The feature distance between the target image to be recognized and the base library image can be calculated (the higher the similarity is, the smaller the feature distance is), and the image recognition can be performed by comparing the size relationship between the feature distance and the preset distance threshold.
- the similarity between the image taken in the dark, top light or large-angle scene and the bottom library image corresponding to the taken image is low, which can also be understood as the difference between the taken image and the corresponding
- the feature distance of the base library images is generally large, which causes the above-mentioned captured images to be unable to be correctly identified. Therefore, the pass rate of the existing image recognition method is low.
- One of the objectives of the present application is to provide an image recognition method, device, electronic device, and computer-readable storage medium to improve the pass rate of image recognition, thereby improving user experience.
- an embodiment of the present application provides an image recognition method, including: extracting features of the target image to be recognized; calculating the first feature distance between the features of the target image to be recognized and the features of the base library image According to the first characteristic distance and the target expansion parameter, the second characteristic distance between the target object image to be recognized and the base library image is obtained; wherein the target expansion parameter and the target object image to be recognized According to the second feature distance, determine the target recognition result in the image of the target to be recognized.
- the step of calculating the first feature distance between the feature of the target image to be recognized and the feature of the base library image includes: calculating the feature of the target image to be recognized and the base library image using the following formula The first feature distance d12 between the features of the library image:
- f 1,i represents the i-th element of the feature of the base library image
- f 2,i represents the i-th element of the feature of the target image to be recognized.
- the step of obtaining the second characteristic distance between the image of the object to be identified and the base library image according to the first characteristic distance and the target expansion and contraction parameter includes: converting the image of the object to be identified
- the feature of the object to be recognized is input into the neural network model to obtain the target expansion parameter corresponding to the image of the target to be recognized; the first feature distance is numerically transformed by the target expansion parameter to obtain the image of the target to be recognized and the background
- the second feature distance between library images includes: converting the image of the object to be identified
- the feature of the object to be recognized is input into the neural network model to obtain the target expansion parameter corresponding to the image of the target to be recognized; the first feature distance is numerically transformed by the target expansion parameter to obtain the image of the target to be recognized and the background
- the second feature distance between library images includes: converting the image of the object to be identified
- the feature of the object to be recognized is input into the neural network model to obtain the target expansion parameter corresponding to the image of the target to be recognized; the first feature distance is numerically
- the target stretch parameter includes a target stretch coefficient or a target stretch value; using the target stretch parameter to perform a numerical transformation on the first characteristic distance to obtain the difference between the image of the target to be identified and the image of the base library
- the step of the second characteristic distance between the two includes: multiplying the first characteristic distance and the target expansion coefficient to obtain the second characteristic distance between the image of the target object to be recognized and the image of the base library;
- the target expansion coefficient is greater than 0 and less than 1;
- the base library image is one, and the base library image corresponds to one of the second characteristic distances; the step of determining the target recognition result in the target image to be recognized according to the second characteristic distance , Including: determining whether the second characteristic distance is less than or equal to a distance threshold; if the second characteristic distance is less than or equal to the distance threshold, determining the target in the base library image as the target image to be recognized The result of target recognition.
- each base library image corresponds to one second characteristic distance; according to the second characteristic distance, the target recognition in the target image to be recognized is determined
- the result step includes: judging the numerical relationship between each of the second characteristic distances and a distance threshold; when there is a target second characteristic distance smaller than the distance threshold in each of the second characteristic distances, the target The target object in the base library image corresponding to the second characteristic distance is determined as the target object recognition result.
- the step of judging the numerical value relationship between each of the second characteristic distances and a distance threshold includes: judging whether the minimum value of each of the second characteristic distances is less than or equal to the distance threshold; if the The minimum value of the second characteristic distances is less than or equal to the distance threshold, and the minimum value of each of the second characteristic distances is determined as the target second characteristic distance.
- the target expansion and contraction parameters are determined by a neural network model, and the neural network model is obtained by training in the following steps: extracting the characteristics of the sample image; inputting the characteristics of the sample image into the initial neural network model to obtain the predicted expansion and contraction parameters; Determine the label expansion parameter corresponding to the sample image according to the third characteristic distance between the characteristic of the sample image and the characteristic of each image in the target image set; determine the label expansion parameter according to the predicted expansion parameter and the label expansion parameter The loss value of the initial neural network model; the parameters in the initial neural network model are updated according to the loss value to obtain the trained neural network model.
- the step of determining the label expansion parameter corresponding to the sample image according to the third characteristic distance between the characteristic of the sample image and the characteristic of each image in the target image set includes: calculating the characteristic of the sample image and the target image The third feature distance between the features of each image is collected; and the label expansion and contraction parameters corresponding to the sample image are determined according to each third feature distance and the distance threshold.
- the step of determining the label expansion parameter corresponding to the sample image according to each third characteristic distance and the distance threshold includes: judging whether the target characteristic distance is the smallest value among the third characteristic distances; the target The feature distance is the third feature distance between the feature of the sample image and the feature of the standard image corresponding to the sample image in the target image set; when the target feature distance is the smallest of the third feature distances Value, judging whether the target feature distance is greater than the distance threshold; when the target feature distance is greater than the distance threshold, the label stretch parameter is determined according to the target feature distance and the distance threshold.
- the label expansion parameter includes a label expansion coefficient
- the step of determining the label expansion parameter according to the target feature distance and the distance threshold includes: determining that the label expansion coefficient is the distance from the target feature and the distance The first value related to the distance threshold, where the first value is greater than 0 and less than 1.
- the step of determining that the label expansion coefficient is the first value related to the target characteristic distance and the distance threshold includes: determining according to the ratio of the distance threshold to the target characteristic distance and a preset coefficient The first value is used as the label expansion coefficient; wherein the preset coefficient is greater than 0 and less than 1.
- the label expansion parameter includes a label expansion coefficient; the method further includes: when the target feature distance is not the smallest value among the third characteristic distances, determining that the label expansion coefficient is a second value, The second value is greater than or equal to 1.
- the label expansion parameter includes a label expansion coefficient; the method further includes: when the target feature distance is less than the distance threshold, determining that the label expansion coefficient is 1.
- the target image to be recognized is a face image to be recognized
- the method further includes: extracting features of the face image to be recognized; calculating the difference between the feature of the face image to be recognized and the feature of each base library image The first feature distance between the first feature distance; input the features of the face image to be recognized into the neural network model to obtain the target expansion coefficient corresponding to the face image to be recognized; multiply each first feature distance and the target expansion coefficient to obtain the target expansion coefficient
- the second feature distance between the face image and the base library image, the target expansion coefficient is greater than 0 and less than 1; determine the numerical relationship between each second feature distance and the distance threshold; when each second feature distance is less than When the target second feature distance of the distance threshold is the target second feature distance, the face in the base image corresponding to the target second feature distance is determined as the face recognition result of the face image to be recognized.
- an embodiment of the present application also provides an image recognition device, including: an extraction module configured to extract features of an image of a target object to be recognized; The first feature distance between the features of the library image; a transformation module configured to obtain the second feature distance between the target object image to be identified and the base library image according to the first feature distance and the target expansion parameter Wherein, the target stretch parameter is related to the feature of the image of the target to be recognized; the determining module is configured to determine the target recognition result in the image of the target to be recognized according to the second characteristic distance.
- an embodiment of the present application also provides an electronic device, including a memory and a processor, the memory stores a computer program that can run on the processor, and when the processor executes the computer program
- an electronic device including a memory and a processor, the memory stores a computer program that can run on the processor, and when the processor executes the computer program
- an embodiment of the present application also provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and the computer program executes the image recognition method of the first aspect when the computer program is run by a processor .
- the embodiments of the application provide an image recognition method, device, electronic equipment, and computer-readable storage medium.
- image recognition When performing image recognition on an image of a target to be recognized, first extract the features of the target image to be recognized; then calculate the target to be recognized The first feature distance between the feature of the image and the feature of the base library image, and the second feature distance between the image of the target object to be identified and the base library image is obtained according to the first feature distance and the target scaling parameter; wherein, the target stretches The parameter is related to the feature of the image of the target object to be recognized; and the result of the target object recognition in the image of the target object to be recognized is determined according to the second characteristic distance.
- the feature distance of the target image to be recognized is shortened, and the target scaling coefficient is related to the features of the target image to be recognized, so as not to increase the error.
- the recognition rate the recognition accuracy and pass rate of images taken under low light, top light or large angles are improved, and the false rejection rate is reduced, thereby improving the recognition effect and user experience.
- FIG. 1 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application
- Fig. 2 shows a flowchart of an image recognition method provided by an embodiment of the present application
- FIG. 3 shows a schematic diagram of the principle of distance expansion and contraction in an image recognition method provided by an embodiment of the present application
- FIG. 4 shows a flowchart of another image recognition method provided by an embodiment of the present application.
- Fig. 5 shows a structural block diagram of an image recognition device provided by an embodiment of the present application
- Fig. 6 shows a structural block diagram of another image recognition device provided by an embodiment of the present application.
- the recognition result is determined to be The target in the base library image.
- some difficult samples such as images taken under dark light, top light or large angles
- the distance may be greater than the distance threshold, causing these difficult samples to not be correctly identified.
- the image recognition method, device, electronic equipment, and computer-readable storage medium provided by the embodiments of the present application can improve the pass of image recognition of difficult samples without increasing the misrecognition rate. Rate, thereby enhancing the user experience.
- FIG. 1 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application
- the electronic device 100 shown in FIG. 1 is an image recognition that can be used to implement an embodiment of the present application.
- the electronic device 100 can be configured with one or more processors 102, one or more storage devices 104, an input device 106, an output device 108, and an image acquisition device 110. These components can be connected through a bus system 112 and/ Or other forms of connection mechanism (not shown) are interconnected. It should be noted that the components and structure of the electronic device 100 shown in FIG. 1 are only exemplary and not restrictive. According to needs, the electronic device may have some of the components shown in FIG. Other components and structures.
- the processor 102 may be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA), and the processor 102 may It is one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units with data processing capabilities and/or instruction execution capabilities, and can control other components in the electronic device 100 Component to perform the desired function.
- DSP digital signal processor
- FPGA field programmable gate array
- PDA programmable logic array
- the storage device 104 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory.
- the volatile memory may include random access memory (RAM) and/or cache memory (cache), for example.
- the non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, and the like.
- One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 102 may run the program instructions to implement the client functions and/or other functions in the embodiments of the present application (implemented by the processor) described below. The desired function.
- Various application programs and various data such as various data used and/or generated by the application program, can also be stored in the computer-readable storage medium.
- the input device 106 may be a device used by the user to input instructions, and may include one or more of a keyboard, a mouse, a microphone, and a touch screen.
- the output device 108 may output various information (for example, text, image, or sound) to the outside (for example, a user), and may include one or more of a display, a speaker, and the like.
- the image capture device 110 may capture images (such as photos, videos, etc.) desired by the user, and store the captured images in the storage device 104 for use by other components.
- the exemplary electronic device 100 for implementing the image recognition method according to the embodiment of the present application may be implemented as a smart terminal such as a smart phone, a tablet computer, or a computer.
- FIG. 2 shows a flowchart of an image recognition method provided by an embodiment of the present application.
- the method mainly includes the following steps S202 to S208:
- Step S202 Extract the features of the image of the target object to be recognized.
- the aforementioned target object to be recognized may be, but is not limited to, a human face, human body, animal, or vehicle (such as a car, boat or bicycle, etc.), and the target object image to be recognized may be dark light, top
- the image recognition method provided in the embodiments of the present application may be suitable for image recognition of such images.
- the characteristics of the target image to be recognized can be extracted through the corresponding neural network model after pre-training. The specific extraction process of the characteristics can refer to the related prior art, which will not be repeated here.
- Step S204 Calculate the first feature distance between the feature of the target image to be recognized and the feature of the base library image.
- the electronic device used to execute the image recognition method provided in the embodiments of the present application may pre-store the base library image, and there may be one or more base library images, and there is one base library image in each base library image.
- Target In this embodiment, one base library image corresponds to one target.
- the above-mentioned first characteristic distance may represent the characteristic distance of the target image to be identified in the feature space to the base library image. It is understandable that the above-mentioned first characteristic distance may correspond to the base library image one-to-one. In a possible example If there are multiple base library images stored in the electronic device, there are also multiple first characteristic distances that can be obtained.
- the above-mentioned feature of the base library image may be obtained by performing feature extraction on the base library image before step S204 is performed, or may be pre-extracted and stored in the electronic device.
- the method of extracting the features of the base library image is the same as the method of extracting the features of the target image to be recognized.
- the features of the target image to be recognized and the features of the base library image may both be in the form of a matrix. Since the matrix usually contains multiple elements, the features of the target image to be recognized and the features of the base library image are also Both contain multiple elements.
- the embodiments of the present application take as an example that the features of the target image to be recognized and the features of the base library image are both one-dimensional matrices, and also provide a calculation for the relationship between the features of the target image to be recognized and the features of the base library image.
- a possible implementation of the first characteristic distance is as follows:
- the first feature distance d12 between the feature of the target image to be recognized and the feature of the base library image is calculated by the following formula:
- f 1,i represents the i-th element of the feature of the base library image
- f 2,i represents the i-th element of the feature of the target image to be recognized.
- Step S206 Obtain a second characteristic distance between the image of the target object to be identified and the image of the base library according to the first characteristic distance and the target expansion parameter; wherein, the target expansion parameter is related to the characteristics of the target object image to be identified.
- the first feature distance obtained through the above step S204 may be greater than the preset distance threshold. At this time, the image of the target to be recognized may not be correct.
- the embodiment of the present invention provides a possible implementation manner.
- the difficult samples can be brought closer to the bottom by performing a distance scaling transformation on the first feature distance. Library images, thereby improving the pass rate of image recognition of difficult samples, avoiding the recognition of images containing the target object as images not containing the target object, and reducing the false rejection rate.
- the target stretch parameter when performing the distance stretch transformation is related to the characteristics of the target object image to be recognized. This ensures that the zooming process does not bring the target-free image closer than the distance threshold, so that no Misrecognition means that the rate of misrecognition will not increase.
- FIG. 3 shows a schematic diagram of the principle of distance expansion and contraction in an image recognition method provided by an embodiment of the present application
- base represents the base library image
- simple query represents simple samples (that is, images that are easily recognized correctly)
- difficult query represents difficult samples
- dots and triangles represent images corresponding to two different targets (including the base library).
- Image, simple sample and difficult sample) position in the feature space, the circle corresponds to the distance threshold (samples inside the circle can be correctly identified, samples outside the circle cannot be correctly identified).
- the difficult samples are all located outside the circle, so that the difficult samples cannot be correctly identified; and after the distance expansion and transformation is performed on the first feature distance, the ones located outside the circle
- the difficult sample is drawn into the circle, and the feature distance between the difficult sample and the base library image corresponding to the difficult sample becomes smaller, so that the difficult sample can be correctly identified.
- step S206 can be implemented by the following process: input the features of the image of the target object to be recognized into the neural network model to obtain the target expansion and contraction parameters corresponding to the image of the target object to be recognized; The parameter performs numerical transformation on the first characteristic distance to obtain the second characteristic distance between the image of the target object to be identified and the image of the base library.
- the aforementioned neural network model may be a pre-trained neural network model, and the neural network model may be a layer of fully connected neural network.
- the input of the neural network model may be To identify the characteristics of the target image, the output of the neural network model is a real value, and the real value can be the target expansion parameter in the embodiment of this application.
- the aforementioned target expansion parameter may include a target expansion coefficient or a target expansion value.
- the second characteristic distance can be obtained by the following implementation: , The first characteristic distance and the target expansion coefficient are multiplied to obtain the second characteristic distance between the target image to be identified and the base library image, the target expansion coefficient is greater than 0 and less than 1; in another implementation manner , Performing a subtraction operation on the first characteristic distance and the target stretch value to obtain the second characteristic distance between the image of the target object to be identified and the image of the base library.
- Step S208 Determine the target recognition result in the image of the target to be recognized according to the above-mentioned second characteristic distance.
- the target recognition result in the image of the target to be recognized can be determined by comparing the second characteristic distance with a preset distance threshold.
- the distance threshold can be set according to the required misrecognition rate, which is not limited here.
- step S208 may go through the following process Realization: Determine whether the second characteristic distance is less than or equal to the distance threshold; if the second characteristic distance is less than or equal to the distance threshold, determine the target in the base library image as the target recognition result in the target image to be recognized.
- each base library image corresponds to a second feature distance. Therefore, there are also multiple second feature distances.
- the above step S208 can be implemented by the following process: judging the numerical relationship between each second characteristic distance and the distance threshold; The second feature distance, the target object in the base library image corresponding to the second feature distance of the target is determined as the target object recognition result in the target object image to be recognized.
- the step of judging the numerical value relationship between each second characteristic distance and the distance threshold may be: judging whether the minimum value of each second characteristic distance is less than or equal to the distance threshold; The minimum value of the second characteristic distances is less than or equal to the distance threshold, and the minimum value of each second characteristic distance is determined as the target second characteristic distance.
- the above-mentioned image recognition method of this embodiment makes full use of the distinguishability of difficult samples.
- the first feature distance is subjected to the distance expansion and contraction transformation under the target expansion parameter to narrow the to-be-identified
- the feature distance of the target image to the bottom library image, and the target expansion parameter is related to the features of the target image to be recognized, so that the accuracy of shooting under dark light, top light or large angles is improved without increasing the misrecognition rate.
- the image recognition accuracy and pass rate reduce the false rejection rate, thereby improving the user experience.
- the target expansion parameter as the target expansion coefficient as an example, and give an implementation way to obtain the second characteristic distance.
- the second characteristic distance d" 12 can be calculated by the following formula :
- h(f 2 ) represents the target stretch coefficient.
- the embodiment of the present application also provides a training process of a neural network model, which mainly includes the following steps 302 to 310:
- Step 302 Extract the features of the sample image.
- the sample images in the training set may be images taken under shooting scenes such as dark light, overhead light, or large angles.
- the process of extracting the features of the sample image can refer to the related prior art, which will not be repeated here.
- Step 304 Input the characteristics of the above-mentioned sample image into the initial neural network model to obtain the predicted expansion and contraction parameters.
- the prediction scaling parameter may include a prediction scaling coefficient or a prediction scaling value.
- Step 306 Determine a label expansion parameter corresponding to the sample image according to the third feature distance between the feature of the sample image and the feature of each image in the target image set.
- each image in the target image set may be the bottom library image in the embodiment of the present application.
- the label expansion parameter corresponds to the aforementioned predicted expansion parameter, which can be understood as: if the predicted expansion parameter is the predicted expansion coefficient, the label expansion parameter is the label expansion coefficient; if the predicted expansion parameter is the predicted expansion value, then The label expansion parameter is the label expansion value.
- the method of determining the label expansion and contraction parameters corresponding to the sample image may be: calculation The third feature distance between the feature of the sample image and the feature of each image in the target image set, and then the label expansion parameter corresponding to the sample image is determined according to each third feature distance and the distance threshold.
- the above distance threshold is the same as the distance threshold used in the specific implementation of determining the target recognition result in the target image to be recognized based on the second feature distance, so as to ensure that the trained neural network model can be accurate Identify the target image.
- the label stretch parameter may be determined according to the comparison result between each third characteristic distance and the distance threshold. For example, the average distance of each third characteristic distance may be compared with the distance threshold. Or, compare the maximum or minimum value of each third characteristic distance with the distance threshold, etc., and obtain a corresponding strategy for determining the label expansion parameter according to the comparison result.
- the value of the label expansion parameter may be jointly determined based on the third characteristic distance and the distance threshold, and may also be based on The preset coefficients, the third feature distance, and the distance threshold are used to determine the value of the label expansion and contraction parameters to facilitate understanding of the above-mentioned implementation of obtaining the label expansion and contraction parameters.
- the distance and distance threshold the way to determine the label expansion parameters corresponding to the sample image can be achieved by the following process: determine whether the target feature distance is the minimum of the third feature distances, and the target feature distance is the concentration of the features of the sample image and the target image The third characteristic distance between the features of the standard image corresponding to the sample image; when the target characteristic distance is the smallest value among the third characteristic distances, it is judged whether the target characteristic distance is greater than the distance threshold; when the target characteristic distance is greater than the distance threshold, according to the target The feature distance and distance threshold determine the label expansion parameters.
- the label expansion parameter when the label expansion parameter is the label expansion coefficient, the target feature distance can be the smallest value among the third feature distances, and the target feature distance is greater than the distance
- thresholding this is the case of corresponding difficult samples
- the label stretch coefficient is the first value related to the target feature distance and the distance threshold greater than 0 and less than 1.
- the first value can be determined according to the ratio of the distance threshold to the target characteristic distance and a preset coefficient, and the first value is used as the label expansion coefficient; wherein the preset coefficient is greater than 0 and less than 1.
- the above-mentioned first value may be determined according to the following formula:
- h(f) represents the first value
- d represents the distance threshold
- k represents the preset coefficient
- a third characteristic distance between the characteristics of the sample image and the characteristics of each image in the target image set is given.
- the method of determining the label expansion parameter corresponding to the sample image may also include: when the target feature distance is not the smallest value among the third feature distances (this is the case of misidentification), determining the label expansion coefficient as the first Two values, the second value is greater than or equal to 1; when the target feature distance is less than the distance threshold (this is the case of correct identification), the label expansion coefficient is determined to be 1.
- the label expansion coefficient is set to a second value greater than or equal to 1, which will not further increase the misrecognition rate; in the case of correct recognition, the label is expanded and contracted. If the coefficient is set to 1, it will not affect the recognition result.
- the label expansion coefficient in the embodiments of this application can be denoted as h(f).
- the relationship between the target feature distance and each third feature distance and distance threshold can be Divided into the following three situations:
- h(f) ⁇ 1 is set, so that the misrecognition rate will not increase
- Step 308 Determine the loss value of the initial neural network model according to the aforementioned predicted expansion and contraction parameters and the label expansion and contraction parameters.
- the predicted stretch parameters and label stretch parameters can be brought into the loss function of the initial neural network model to obtain the loss value of the initial neural network model.
- Step 310 Update the parameters in the initial neural network model according to the aforementioned loss value to obtain a trained neural network model.
- step 304 there is no order of execution between the above step 304 and step 306; the steps not described in detail in the above step 302 to step 310 can refer to the corresponding content of the foregoing embodiment or related prior art, and will not be repeated here.
- this embodiment also provides a possible example of applying the aforementioned image recognition method.
- the target object to be recognized is a human face, that is, the aforementioned
- the target image is a face image to be recognized, there are multiple base library images, and the target expansion parameter is the target expansion coefficient.
- the method mainly includes the following steps S402 to S412:
- Step S402 Extract the features of the face image to be recognized.
- Step S404 Calculate the first feature distance between the feature of the face image to be recognized and the feature of each base library image.
- Step S406 Input the features of the face image to be recognized into the neural network model to obtain the target expansion coefficient corresponding to the face image to be recognized.
- Step S408 Multiply each first feature distance and the target expansion coefficient to obtain a second feature distance between the face image to be recognized and the base library image, and the target expansion coefficient is greater than 0 and less than 1.
- Step S410 Determine the numerical value relationship between each second characteristic distance and the distance threshold.
- Step S412 When there is a target second characteristic distance smaller than the distance threshold in each second characteristic distance, determine the face in the base image corresponding to the target second characteristic distance as the face recognition result of the face image to be recognized.
- the first feature distance is subjected to the distance scaling transformation under the target scaling coefficient to narrow the features of the face image to be recognized in the base image.
- the distance, and the target expansion coefficient is related to the characteristics of the face image to be recognized, so that the accuracy of face recognition for images taken under dark light, overhead light or large angles is improved without increasing the misrecognition rate And the pass rate reduces the false rejection rate, thereby improving the user experience.
- the embodiment of the application provides an image recognition device.
- the device includes the following modules:
- the extraction module 52 is configured to extract features of the image of the target object to be recognized
- the calculation module 54 is configured to calculate the first feature distance between the feature of the target image to be recognized and the feature of the base library image;
- the transformation module 56 is configured to obtain the second characteristic distance between the image of the target object to be identified and the base library image according to the first characteristic distance and the target expansion parameter; wherein the target expansion parameter is related to the characteristics of the target object image to be identified;
- the determining module 58 is configured to determine the target object recognition result in the image of the target object to be recognized according to the second characteristic distance.
- the above-mentioned image recognition device makes full use of the distinguishability of difficult samples.
- the first feature distance is adjusted by the distance expansion and contraction transformation under the target expansion parameter.
- the feature distance of the target image to be recognized to the bottom library image, and the target expansion parameter is related to the feature of the target image to be recognized, so as not to increase the misrecognition rate, it improves the resistance to low light, top light or large angles.
- the recognition accuracy and pass rate of the captured images reduce the false rejection rate, thereby improving the user experience.
- the foregoing calculation module 54 may be configured as:
- the first feature distance d12 between the feature of the target image to be recognized and the feature of the base library image is calculated by the following formula:
- f 1,i represents the i-th element of the feature of the base library image
- f 2,i represents the i-th element of the feature of the target image to be recognized.
- the above-mentioned transformation module 56 may be configured as:
- the first characteristic distance is numerically transformed using the target stretch parameter to obtain the second characteristic distance between the image of the target object to be identified and the image of the base library.
- the aforementioned target expansion parameter includes a target expansion coefficient or a target expansion value; the aforementioned transformation module 56 may also be configured as:
- the target expansion coefficient is greater than 0 and less than 1;
- the above determining module 58 may be configured as:
- the target in the base library image is determined as the target recognition result in the to-be-recognized target image.
- each base library image corresponds to a second characteristic distance; the determining module 58 may also be configured to:
- the target object in the base library image corresponding to the target second characteristic distance is determined as the target object recognition result.
- the above determining module 58 may also be configured as:
- the minimum value of each second characteristic distance is less than or equal to the distance threshold, the minimum value of each second characteristic distance is determined as the target second characteristic distance.
- the above-mentioned target expansion parameters are determined by a neural network model.
- a neural network model Refer to the structural block diagram of another image recognition device shown in FIG. 6. On the basis of FIG. 5, the above-mentioned device is also equipped with a training module 62.
- the training module 62 can be configured as:
- the parameters in the initial neural network model are updated according to the loss value to obtain the trained neural network model.
- the above-mentioned training module 62 may be configured as:
- the target feature distance is the minimum of the third feature distances; the target feature distance is the third feature distance between the feature of the sample image and the feature of the standard image corresponding to the sample image in the target image set;
- the target characteristic distance is the minimum value among the third characteristic distances, it is judged whether the target characteristic distance is greater than the distance threshold;
- the label stretch parameter is determined according to the target feature distance and the distance threshold.
- the aforementioned label expansion parameter includes a label expansion coefficient; the aforementioned training module 62 is further configured to:
- the label expansion coefficient is the first value related to the target feature distance and the distance threshold, and the first value is greater than 0 and less than 1.
- the above-mentioned training module 62 is further configured to:
- the first value is determined according to the ratio of the distance threshold to the target characteristic distance and the preset coefficient, and the first value is used as the label expansion coefficient; wherein the preset coefficient is greater than 0 and less than 1.
- the above-mentioned label expansion parameter includes a label expansion coefficient;
- the above-mentioned training module 62 may also be configured as:
- the target feature distance is not the minimum value among the third feature distances, it is determined that the label expansion coefficient is the second value, and the second value is greater than or equal to 1.
- the above-mentioned label expansion parameter includes a label expansion coefficient;
- the above-mentioned training module 62 may also be configured as:
- the label expansion coefficient is determined to be 1.
- the embodiments of the present application also provide a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and the computer program executes the image recognition method described in the foregoing method embodiment when the computer program is run by a processor.
- the computer program product of the image recognition method and device provided in the embodiments of the present application includes a computer-readable storage medium storing program code, and the instructions included in the program code can be configured to execute the method described in the previous method embodiment, For specific implementation, please refer to the method embodiment, which will not be repeated here.
- the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
- the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM for short), RAM, magnetic disk, or optical disk and other media that can store program codes.
- This application provides an image recognition method, device, electronic equipment, and computer-readable storage medium, and relates to the technical field of image processing.
- image recognition When performing image recognition, first extract the features of the image of the target to be recognized; then calculate the image of the target to be recognized The first feature distance between the feature of and the feature of the base library image, and the second feature distance between the target image to be identified and the base library image is obtained according to the first feature distance and the target expansion parameter; wherein, the target expansion parameter It is related to the feature of the image of the target to be recognized; and then according to the second feature distance, the target recognition result in the image of the target to be recognized is determined.
- the feature distance of the target image to be recognized is narrowed to the base library image, thereby improving the sensitivity to dark light and top image without increasing the misrecognition rate.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Multimedia (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Molecular Biology (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Image Analysis (AREA)
Abstract
The present application relates to the technical field of image processing. Provided are an image identification method and apparatus, and an electronic device and a computer-readable medium. The method comprises: during image identification, first extracting a feature of a target object image to be subjected to identification; then calculating a first feature distance between the feature of said target object image and a feature of a base library image, and obtaining a second feature distance between said target object image and the base library image according to the first feature distance and a target scaling parameter, wherein the target scaling parameter is related to the feature of said target object image; and determining an identification result of a target object in said target object image according to the second feature distance. As such, the feature distance from said target object image to the base library image is shortened by means of distance scaling transformation of the first feature distance under the target scaling parameter, so as to improve the passing rate of identification of an image photographed under dim light, top light or at a large angle, etc. without increasing an identification error rate.
Description
相关申请的交叉引用Cross-references to related applications
本申请要求于2020年04月14日提交中国专利局的申请号为2020102932947、名称为“图像识别方法、装置、电子设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the Chinese Patent Office on April 14, 2020, with the application number 2020102932947, titled "Image Recognition Method, Device, Electronic Equipment, and Computer-readable Storage Medium", and the entire content of it is approved The reference is incorporated in this application.
本申请涉及图像处理技术领域,尤其是涉及一种图像识别方法、装置、电子设备及计算机可读存储介质。This application relates to the field of image processing technology, and in particular to an image recognition method, device, electronic equipment, and computer-readable storage medium.
图像识别,是指利用计算机对图像进行处理、分析和理解,以识别各种不同模式的目标和对象的技术。在进行图像识别前,可以先在图像识别系统中录入目标物的目标物图像作为底库中的底库图像,然后基于待识别目标物图像与底库图像之间的相似度进行图像识别,例如,可以计算待识别目标物图像与底库图像之间的特征距离(相似度越高,特征距离越小),通过比对该特征距离与预设的距离阈值的大小关系进行图像识别。Image recognition refers to the use of computers to process, analyze, and understand images to identify targets and objects in various patterns. Before performing image recognition, you can first enter the target image of the target in the image recognition system as the base library image in the base library, and then perform image recognition based on the similarity between the target image to be recognized and the base library image, for example , The feature distance between the target image to be recognized and the base library image can be calculated (the higher the similarity is, the smaller the feature distance is), and the image recognition can be performed by comparing the size relationship between the feature distance and the preset distance threshold.
然而,在暗光、顶光或大角度场景下拍摄的图像以及与该拍摄的图像对应的底库图像之间的相似度较低,也可以理解为该拍摄的图像到与该拍摄图像对应的底库图像的特征距离普遍较大,导致上述拍摄的图像无法被正确识别出来。因此,现有的图像识别方法的通过率较低。However, the similarity between the image taken in the dark, top light or large-angle scene and the bottom library image corresponding to the taken image is low, which can also be understood as the difference between the taken image and the corresponding The feature distance of the base library images is generally large, which causes the above-mentioned captured images to be unable to be correctly identified. Therefore, the pass rate of the existing image recognition method is low.
发明内容Summary of the invention
本申请的目的之一在于提供一种图像识别方法、装置、电子设备及计算机可读存储介质,以提高图像识别的通过率,从而提升用户体验。One of the objectives of the present application is to provide an image recognition method, device, electronic device, and computer-readable storage medium to improve the pass rate of image recognition, thereby improving user experience.
第一方面,本申请实施例提供了一种图像识别方法,包括:提取待识别目标物图像的特征;计算所述待识别目标物图像的特征与底库图像的特征之间的第一特征距离;根据所述第一特征距离和目标伸缩参数,得到所述待识别目标物图像与所述底库图像之间的第二特征距离;其中,所述目标伸缩参数与所述待识别目标物图像的特征有关;根据所述第二特征距离,确定所述待识别目标物图像中的目标物识别结果。In the first aspect, an embodiment of the present application provides an image recognition method, including: extracting features of the target image to be recognized; calculating the first feature distance between the features of the target image to be recognized and the features of the base library image According to the first characteristic distance and the target expansion parameter, the second characteristic distance between the target object image to be recognized and the base library image is obtained; wherein the target expansion parameter and the target object image to be recognized According to the second feature distance, determine the target recognition result in the image of the target to be recognized.
可选地,计算所述待识别目标物图像的特征与底库图像的特征之间的第一特征距离的步骤,包括:通过以下公式计算得到所述待识别目标物图像的特征与所述底库图像的特征之间的第一特征距离d12:Optionally, the step of calculating the first feature distance between the feature of the target image to be recognized and the feature of the base library image includes: calculating the feature of the target image to be recognized and the base library image using the following formula The first feature distance d12 between the features of the library image:
其中,f
1,i表示所述底库图像的特征的第i个元素,f
2,i表示所述待识别目标物图像的特征的第i个元素。
Wherein, f 1,i represents the i-th element of the feature of the base library image, and f 2,i represents the i-th element of the feature of the target image to be recognized.
可选地,根据所述第一特征距离和目标伸缩参数,得到所述待识别目标物图像与所述底库图像之间的第二特征距离的步骤,包括:将所述待识别目标物图像的特征输入神经网络模型,得到所述待识别目标物图像对应的目标伸缩参数;利用所述目标伸缩参数对所述第一特征距离进行数值变换,得到所述待识别目标物图像与所述底库图像之间的第二特征距离。Optionally, the step of obtaining the second characteristic distance between the image of the object to be identified and the base library image according to the first characteristic distance and the target expansion and contraction parameter includes: converting the image of the object to be identified The feature of the object to be recognized is input into the neural network model to obtain the target expansion parameter corresponding to the image of the target to be recognized; the first feature distance is numerically transformed by the target expansion parameter to obtain the image of the target to be recognized and the background The second feature distance between library images.
可选地,所述目标伸缩参数包括目标伸缩系数或目标伸缩值;利用所述目标伸缩参数对所述第一特征距离进行数值变换,得到所述待识别目标物图像与所述底库图像之间的第二特征距离的步骤,包括:对所述第一特征距离和所述目标伸缩系数进行乘法运算,得到所述待识别目标物图像与所述底库图像之间的第二特征距离;所述目标伸缩系数大于0且小于1;Optionally, the target stretch parameter includes a target stretch coefficient or a target stretch value; using the target stretch parameter to perform a numerical transformation on the first characteristic distance to obtain the difference between the image of the target to be identified and the image of the base library The step of the second characteristic distance between the two includes: multiplying the first characteristic distance and the target expansion coefficient to obtain the second characteristic distance between the image of the target object to be recognized and the image of the base library; The target expansion coefficient is greater than 0 and less than 1;
或者,对所述第一特征距离和所述目标伸缩值进行减法运算,得到所述待识别目标物图像与所述底库图像之间的第二特征距离。Or, performing a subtraction operation on the first characteristic distance and the target stretch value to obtain the second characteristic distance between the image of the target object to be recognized and the image of the base library.
可选地,所述底库图像为一个,所述底库图像对应一个所述第二特征距离;根据所述第二特征距离,确定所述待识别目标物图像中的目标物识别结果的步骤,包括:判断所述第二特征距离是否小于或等于距离阈值;如果所述第二特征距离小于或等于距离阈值,将所述底库图像中的目标物确定为所述待识别目标物图像中的目标物识别结果。Optionally, the base library image is one, and the base library image corresponds to one of the second characteristic distances; the step of determining the target recognition result in the target image to be recognized according to the second characteristic distance , Including: determining whether the second characteristic distance is less than or equal to a distance threshold; if the second characteristic distance is less than or equal to the distance threshold, determining the target in the base library image as the target image to be recognized The result of target recognition.
可选地,所述底库图像为多个,每个所述底库图像对应一个所述第二特征距离;根据所述第二特征距离,确定所述待识别目标物图像中的目标物识别结果的步骤,包括:判断各所述第二特征距离与距离阈值之间的数值大小关系;当各所述第二特征距离中存在小于所述距离阈值的目标第二特征距离,将所述目标第二特征距离对应的底库图像中的目标物确定为所述目标物识别结果。Optionally, there are multiple base library images, and each base library image corresponds to one second characteristic distance; according to the second characteristic distance, the target recognition in the target image to be recognized is determined The result step includes: judging the numerical relationship between each of the second characteristic distances and a distance threshold; when there is a target second characteristic distance smaller than the distance threshold in each of the second characteristic distances, the target The target object in the base library image corresponding to the second characteristic distance is determined as the target object recognition result.
可选地,判断各所述第二特征距离与距离阈值之间的数值大小关系的步骤,包括:判断各所述第二特征距离中的最小值是否小于或等于所述距离阈值;如果所述第二特征距离中的最小值小于或等于所述距离阈值,将各所述第二特征距离中的最小值确定为所述目标第二特征距离。Optionally, the step of judging the numerical value relationship between each of the second characteristic distances and a distance threshold includes: judging whether the minimum value of each of the second characteristic distances is less than or equal to the distance threshold; if the The minimum value of the second characteristic distances is less than or equal to the distance threshold, and the minimum value of each of the second characteristic distances is determined as the target second characteristic distance.
可选地,通过神经网络模型确定所述目标伸缩参数,所述神经网络模型通过以下步骤训练得到:提取样本图像的特征;将所述样本图像的特征输入初始神经网络模型,得到预测伸缩参数;根据所述样本图像的特征与目标图像集中各图像的特征之间的第三特征距离,确定所述样本图像对应的标签伸缩参数;根据所述预测伸缩参数和所述标签伸缩参数,确定所述初始神经网络模型的损失值;根据所述损失值对所述初始神经网络模型中的参数进行更新,以得到训练后的所述神经网络模型。Optionally, the target expansion and contraction parameters are determined by a neural network model, and the neural network model is obtained by training in the following steps: extracting the characteristics of the sample image; inputting the characteristics of the sample image into the initial neural network model to obtain the predicted expansion and contraction parameters; Determine the label expansion parameter corresponding to the sample image according to the third characteristic distance between the characteristic of the sample image and the characteristic of each image in the target image set; determine the label expansion parameter according to the predicted expansion parameter and the label expansion parameter The loss value of the initial neural network model; the parameters in the initial neural network model are updated according to the loss value to obtain the trained neural network model.
可选地,根据所述样本图像的特征与目标图像集中各图像的特征之间的第三特征距离,确定所述样本图像对应的标签伸缩参数的步骤,包括:计算样本图像的特征与目标图像集中各图像的特征之间的第三特征距离;根据各第三特征距离和所述距离阈值,确定样本图像对应的标签伸缩参数。Optionally, the step of determining the label expansion parameter corresponding to the sample image according to the third characteristic distance between the characteristic of the sample image and the characteristic of each image in the target image set includes: calculating the characteristic of the sample image and the target image The third feature distance between the features of each image is collected; and the label expansion and contraction parameters corresponding to the sample image are determined according to each third feature distance and the distance threshold.
可选地,根据各第三特征距离和所述距离阈值,确定样本图像对应的标签伸缩参数的步骤,包括:判断目标特征距离是否为各所述第三特征距离中的最小值;所述目标特征距离为所述样本图像的特征与 所述目标图像集中所述样本图像对应的标准图像的特征之间的第三特征距离;当所述目标特征距离是各所述第三特征距离中的最小值,判断所述目标特征距离是否大于距离阈值;当所述目标特征距离大于所述距离阈值,根据所述目标特征距离和所述距离阈值,确定标签伸缩参数。Optionally, the step of determining the label expansion parameter corresponding to the sample image according to each third characteristic distance and the distance threshold includes: judging whether the target characteristic distance is the smallest value among the third characteristic distances; the target The feature distance is the third feature distance between the feature of the sample image and the feature of the standard image corresponding to the sample image in the target image set; when the target feature distance is the smallest of the third feature distances Value, judging whether the target feature distance is greater than the distance threshold; when the target feature distance is greater than the distance threshold, the label stretch parameter is determined according to the target feature distance and the distance threshold.
可选地,所述标签伸缩参数包括标签伸缩系数;根据所述目标特征距离和所述距离阈值,确定标签伸缩参数的步骤,包括:确定所述标签伸缩系数为与所述目标特征距离和所述距离阈值有关的第一数值,所述第一数值大于0且小于1。Optionally, the label expansion parameter includes a label expansion coefficient; the step of determining the label expansion parameter according to the target feature distance and the distance threshold includes: determining that the label expansion coefficient is the distance from the target feature and the distance The first value related to the distance threshold, where the first value is greater than 0 and less than 1.
可选地,确定所述标签伸缩系数为与所述目标特征距离和所述距离阈值有关的第一数值的步骤,包括:根据所述距离阈值与所述目标特征距离的比值和预设系数确定所述第一数值,并将所述第一数值作为所述标签伸缩系数;其中,所述预设系数大于0且小于1。Optionally, the step of determining that the label expansion coefficient is the first value related to the target characteristic distance and the distance threshold includes: determining according to the ratio of the distance threshold to the target characteristic distance and a preset coefficient The first value is used as the label expansion coefficient; wherein the preset coefficient is greater than 0 and less than 1.
可选地,所述标签伸缩参数包括标签伸缩系数;所述方法还包括:当所述目标特征距离不是各所述第三特征距离中的最小值,确定所述标签伸缩系数为第二数值,所述第二数值大于或等于1。Optionally, the label expansion parameter includes a label expansion coefficient; the method further includes: when the target feature distance is not the smallest value among the third characteristic distances, determining that the label expansion coefficient is a second value, The second value is greater than or equal to 1.
可选地,所述标签伸缩参数包括标签伸缩系数;所述方法还包括:当所述目标特征距离小于所述距离阈值,确定所述标签伸缩系数为1。Optionally, the label expansion parameter includes a label expansion coefficient; the method further includes: when the target feature distance is less than the distance threshold, determining that the label expansion coefficient is 1.
可选地,所述待识别目标物图像为待识别人脸图像,所述方法还包括:提取待识别人脸图像的特征;计算待识别人脸图像的特征与每个底库图像的特征之间的第一特征距离;将待识别人脸图像的特征输入神经网络模型,得到待识别人脸图像对应的目标伸缩系数;对每个第一特征距离和目标伸缩系数进行乘法运算,得到待识别人脸图像与底库图像之间的第二特征距离,该目标伸缩系数大于0且小于1;判断各第二特征距离与距离阈值之间的数值大小关系;当各第二特征距离中存在小于距离阈值的目标第二特征距离时,将目标第二特征距离对应的底库图像中的人脸确定为待识别人脸图像的人脸识别结果。Optionally, the target image to be recognized is a face image to be recognized, and the method further includes: extracting features of the face image to be recognized; calculating the difference between the feature of the face image to be recognized and the feature of each base library image The first feature distance between the first feature distance; input the features of the face image to be recognized into the neural network model to obtain the target expansion coefficient corresponding to the face image to be recognized; multiply each first feature distance and the target expansion coefficient to obtain the target expansion coefficient The second feature distance between the face image and the base library image, the target expansion coefficient is greater than 0 and less than 1; determine the numerical relationship between each second feature distance and the distance threshold; when each second feature distance is less than When the target second feature distance of the distance threshold is the target second feature distance, the face in the base image corresponding to the target second feature distance is determined as the face recognition result of the face image to be recognized.
第二方面,本申请实施例还提供了一种图像识别装置,包括:提取模块,配置成提取待识别目标物图像的特征;计算模块,配置成计算所述待识别目标物图像的特征与底库图像的特征之间的第一特征距离;变换模块,配置成根据所述第一特征距离和目标伸缩参数,得到所述待识别目标物图像与所述底库图像之间的第二特征距离;其中,所述目标伸缩参数与所述待识别目标物图像的特征有关;确定模块,配置成根据所述第二特征距离,确定所述待识别目标物图像中的目标物识别结果。In a second aspect, an embodiment of the present application also provides an image recognition device, including: an extraction module configured to extract features of an image of a target object to be recognized; The first feature distance between the features of the library image; a transformation module configured to obtain the second feature distance between the target object image to be identified and the base library image according to the first feature distance and the target expansion parameter Wherein, the target stretch parameter is related to the feature of the image of the target to be recognized; the determining module is configured to determine the target recognition result in the image of the target to be recognized according to the second characteristic distance.
第三方面,本申请实施例还提供了一种电子设备,包括存储器、处理器,所述存储器中存储有可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述第一方面的图像识别方法。In a third aspect, an embodiment of the present application also provides an electronic device, including a memory and a processor, the memory stores a computer program that can run on the processor, and when the processor executes the computer program The image recognition method of the first aspect described above is realized.
第四方面,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器运行时执行上述第一方面的图像识别方法。In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and the computer program executes the image recognition method of the first aspect when the computer program is run by a processor .
本申请实施例提供了一种图像识别方法、装置、电子设备及计算机可读存储介质,在对待识别目标物图像进行图像识别时,首先提取待识别目标物图像的特征;然后计算待识别目标物图像的特征与底库图像的特征之间的第一特征距离,并根据第一特征距离和目标伸缩参数,得到待识别目标物图像与底库 图像之间的第二特征距离;其中,目标伸缩参数与待识别目标物图像的特征有关;进而根据第二特征距离,确定待识别目标物图像中的目标物识别结果。这样通过对第一特征距离进行目标伸缩参数下的距离伸缩变换拉近了待识别目标物图像到底库图像的特征距离,且目标伸缩系数与待识别目标物图像的特征有关,从而在不增加误识率的情况下,提高了对诸如暗光、顶光或大角度下拍摄的图像的识别准确率和通过率,减少了误拒率,从而提升了识别效果和用户体验。The embodiments of the application provide an image recognition method, device, electronic equipment, and computer-readable storage medium. When performing image recognition on an image of a target to be recognized, first extract the features of the target image to be recognized; then calculate the target to be recognized The first feature distance between the feature of the image and the feature of the base library image, and the second feature distance between the image of the target object to be identified and the base library image is obtained according to the first feature distance and the target scaling parameter; wherein, the target stretches The parameter is related to the feature of the image of the target object to be recognized; and the result of the target object recognition in the image of the target object to be recognized is determined according to the second characteristic distance. In this way, by performing the distance scaling transformation under the target scaling parameter on the first feature distance, the feature distance of the target image to be recognized is shortened, and the target scaling coefficient is related to the features of the target image to be recognized, so as not to increase the error. In the case of the recognition rate, the recognition accuracy and pass rate of images taken under low light, top light or large angles are improved, and the false rejection rate is reduced, thereby improving the recognition effect and user experience.
本申请实施例的其他特征和优点将在随后的说明书中阐述,或者,部分特征和优点可以从说明书推知或毫无疑义地确定,或者通过实施本申请实施例的上述技术即可得知。Other features and advantages of the embodiments of the present application will be described in the following specification, or some of the features and advantages can be inferred from the specification or determined without doubt, or can be learned by implementing the above-mentioned technology of the embodiments of the present application.
为使本申请的上述目的、特征和优点能更明显易懂,下文特举可选实施例,并配合所附附图,作详细说明如下。In order to make the above objectives, features, and advantages of the present application more comprehensible, optional embodiments accompanied with accompanying drawings are described in detail below.
为了更清楚地说明本申请具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific embodiments of this application or the technical solutions in the prior art, the following will briefly introduce the drawings that need to be used in the specific embodiments or the description of the prior art. Obviously, the appendix in the following description The drawings are some embodiments of the present application. For those of ordinary skill in the art, without creative work, other drawings can be obtained based on these drawings.
图1示出了本申请实施例所提供的一种电子设备的结构示意图;FIG. 1 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application;
图2示出了本申请实施例所提供的一种图像识别方法的流程图;Fig. 2 shows a flowchart of an image recognition method provided by an embodiment of the present application;
图3示出了本申请实施例所提供的一种图像识别方法中距离伸缩变换的原理示意图;FIG. 3 shows a schematic diagram of the principle of distance expansion and contraction in an image recognition method provided by an embodiment of the present application;
图4示出了本申请实施例所提供的另一种图像识别方法的流程图;FIG. 4 shows a flowchart of another image recognition method provided by an embodiment of the present application;
图5示出了本申请实施例所提供的一种图像识别装置的结构框图;Fig. 5 shows a structural block diagram of an image recognition device provided by an embodiment of the present application;
图6示出了本申请实施例所提供的另一种图像识别装置的结构框图。Fig. 6 shows a structural block diagram of another image recognition device provided by an embodiment of the present application.
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请的技术方案进行描述,显然,所描述的本实施例中介绍的各实现方式仅是一部分可能的实现方式,而不是全部的实现方式。In order to make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be described below in conjunction with the accompanying drawings. Obviously, the described implementations in this embodiment are only a part of the possible implementations. , Not the full implementation.
在进行图像识别时,可以先计算待识别目标物图像到底库图像的特征距离,然后比对该特征距离与预设的距离阈值,如果该特征距离小于或等于该距离阈值,则确定识别结果为底库图像中的目标物。在当前的图像识别系统中,需要根据给定的误识率确定比对的距离阈值,然而一些难样本(如暗光、顶光或大角度下拍摄的图像)到对应的底库图像的特征距离可能大于距离阈值,导致这些难样本无法被正确识别出来。基于对上述问题的发现,本申请实施例提供的一种图像识别方法、装置、电子设备及计算机可读存储介质,可以在不增加误识率的情况下,提高对难样本的图像识别的通过率,从而提升用户体验。When performing image recognition, you can first calculate the feature distance of the target image to be recognized in the base image, and then compare the feature distance with the preset distance threshold. If the feature distance is less than or equal to the distance threshold, the recognition result is determined to be The target in the base library image. In the current image recognition system, it is necessary to determine the comparison distance threshold according to a given false recognition rate. However, some difficult samples (such as images taken under dark light, top light or large angles) to the corresponding characteristics of the base library image The distance may be greater than the distance threshold, causing these difficult samples to not be correctly identified. Based on the findings of the above-mentioned problems, the image recognition method, device, electronic equipment, and computer-readable storage medium provided by the embodiments of the present application can improve the pass of image recognition of difficult samples without increasing the misrecognition rate. Rate, thereby enhancing the user experience.
首先,参照图1,图1示出了本发明本申请实施例所提供的一种电子设备的结构示意图;图1所示的电子设备100为可以用于实现本申请实施例的一种图像识别方法及装置的示例电子设备100。First, referring to FIG. 1, FIG. 1 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application; the electronic device 100 shown in FIG. 1 is an image recognition that can be used to implement an embodiment of the present application. An example electronic device 100 of the method and apparatus.
如图1所示,电子设备100可以配置有一个或多个处理器102、一个或多个存储装置104、输入装置106、输出装置108以及图像采集装置110,这些组件可以通过总线系统112和/或其它形式的连接机构(未示出)互连。应当注意,图1所示的电子设备100的组件和结构只是示例性的,而非限制性的,根据需要,所述电子设备可以具有图1示出的部分组件,也可以具有图1未示出的其他组件和结构。As shown in FIG. 1, the electronic device 100 can be configured with one or more processors 102, one or more storage devices 104, an input device 106, an output device 108, and an image acquisition device 110. These components can be connected through a bus system 112 and/ Or other forms of connection mechanism (not shown) are interconnected. It should be noted that the components and structure of the electronic device 100 shown in FIG. 1 are only exemplary and not restrictive. According to needs, the electronic device may have some of the components shown in FIG. Other components and structures.
在一些可能的示例中,处理器102可以采用数字信号处理器(DSP)、现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)中的至少一种硬件形式来实现,处理器102可以是中央处理单元(CPU)、图形处理单元(GPU)或者具有数据处理能力和/或指令执行能力的其它形式的处理单元中的一种或几种的组合,并且可以控制电子设备100中的其它组件以执行期望的功能。In some possible examples, the processor 102 may be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA), and the processor 102 may It is one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units with data processing capabilities and/or instruction execution capabilities, and can control other components in the electronic device 100 Component to perform the desired function.
在一些可能的示例中,存储装置104可以包括一个或多个计算机程序产品,所述计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。所述易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。所述非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。在计算机可读存储介质上可以存储一个或多个计算机程序指令,处理器102可以运行程序指令,以实现下文所述的本申请实施例中(由处理器实现)的客户端功能以及/或者其它期望的功能。在计算机可读存储介质中还可以存储各种应用程序和各种数据,例如应用程序使用和/或产生的各种数据等。In some possible examples, the storage device 104 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. . The volatile memory may include random access memory (RAM) and/or cache memory (cache), for example. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 102 may run the program instructions to implement the client functions and/or other functions in the embodiments of the present application (implemented by the processor) described below. The desired function. Various application programs and various data, such as various data used and/or generated by the application program, can also be stored in the computer-readable storage medium.
在一些可能的示例中,输入装置106可以是用户用来输入指令的装置,并且可以包括键盘、鼠标、麦克风和触摸屏等中的一个或多个。In some possible examples, the input device 106 may be a device used by the user to input instructions, and may include one or more of a keyboard, a mouse, a microphone, and a touch screen.
在一些可能的示例中,输出装置108可以向外部(例如,用户)输出各种信息(例如,文字、图像或声音),并且可以包括显示器、扬声器等中的一个或多个。In some possible examples, the output device 108 may output various information (for example, text, image, or sound) to the outside (for example, a user), and may include one or more of a display, a speaker, and the like.
在一些可能的示例中,图像采集装置110可以拍摄用户期望的图像(例如照片、视频等),并且将所拍摄的图像存储在存储装置104中以供其它组件使用。In some possible examples, the image capture device 110 may capture images (such as photos, videos, etc.) desired by the user, and store the captured images in the storage device 104 for use by other components.
示例性地,用于实现根据本申请实施例的图像识别方法的示例电子设备100可以被实现为,如智能手机、平板电脑、计算机等智能终端。Exemplarily, the exemplary electronic device 100 for implementing the image recognition method according to the embodiment of the present application may be implemented as a smart terminal such as a smart phone, a tablet computer, or a computer.
参见图2,图2示出了本申请实施例所提供的一种图像识别方法的流程图,该方法主要包括如下步骤S202~步骤S208:Referring to FIG. 2, FIG. 2 shows a flowchart of an image recognition method provided by an embodiment of the present application. The method mainly includes the following steps S202 to S208:
步骤S202,提取待识别目标物图像的特征。Step S202: Extract the features of the image of the target object to be recognized.
在一些可能的实施例中,上述的待识别目标物可以但不限于是人脸、人体、动物或交通工具(如汽车、轮船或自行车等)等,待识别目标物图像可以是暗光、顶光或大角度下拍摄的图像,本申请实施例提供的图像识别方法可以适用于对这类图像进行图像识别。在一种可能的实现方式中,可以通过预先训练后的相应神经网络模型来提取待识别目标物图像的特征,特征的具体提取过程可以参照相关现有技术,这里不再赘述。In some possible embodiments, the aforementioned target object to be recognized may be, but is not limited to, a human face, human body, animal, or vehicle (such as a car, boat or bicycle, etc.), and the target object image to be recognized may be dark light, top For images taken under light or at a large angle, the image recognition method provided in the embodiments of the present application may be suitable for image recognition of such images. In a possible implementation manner, the characteristics of the target image to be recognized can be extracted through the corresponding neural network model after pre-training. The specific extraction process of the characteristics can refer to the related prior art, which will not be repeated here.
步骤S204,计算待识别目标物图像的特征与底库图像的特征之间的第一特征距离。Step S204: Calculate the first feature distance between the feature of the target image to be recognized and the feature of the base library image.
在一些可能的实施例中,用于执行本申请实施例提供的图像识别方法的电子设备内可以预先存储有底库图像,底库图像可以为一个或多个,每个底库图像中存在一个目标物。在本实施例中,一个底库图像对应一个目标物。上述的第一特征距离可以表征在特征空间上待识别目标物图像到底库图像的特征距离,可以理解的是,上述的第一特征距离可以与底库图像一一对应,在一种可能的示例中,若该电子设备内存储有多个底库图像,可以得到的第一特征距离也为多个。In some possible embodiments, the electronic device used to execute the image recognition method provided in the embodiments of the present application may pre-store the base library image, and there may be one or more base library images, and there is one base library image in each base library image. Target. In this embodiment, one base library image corresponds to one target. The above-mentioned first characteristic distance may represent the characteristic distance of the target image to be identified in the feature space to the base library image. It is understandable that the above-mentioned first characteristic distance may correspond to the base library image one-to-one. In a possible example If there are multiple base library images stored in the electronic device, there are also multiple first characteristic distances that can be obtained.
在一些可能的实施例中,上述底库图像的特征可以是在执行步骤S204之前对底库图像进行特征提取得到的,也可以是预先提取好并存储在电子设备内的。提取底库图像的特征的方法与提取待识别目标物图像的特征的方法相同。In some possible embodiments, the above-mentioned feature of the base library image may be obtained by performing feature extraction on the base library image before step S204 is performed, or may be pre-extracted and stored in the electronic device. The method of extracting the features of the base library image is the same as the method of extracting the features of the target image to be recognized.
在一些可能的实施例中,待识别目标物图像的特征和底库图像的特征均可以为矩阵形式,由于矩阵通常包含多个元素,因此待识别目标物图像的特征和底库图像的特征也均包含多个元素。为了便于理解,本申请实施例以待识别目标物图像的特征和底库图像的特征均为一维矩阵为例,还提供了计算待识别目标物图像的特征与底库图像的特征之间的第一特征距离的一种可能的实现方式,如下:In some possible embodiments, the features of the target image to be recognized and the features of the base library image may both be in the form of a matrix. Since the matrix usually contains multiple elements, the features of the target image to be recognized and the features of the base library image are also Both contain multiple elements. For ease of understanding, the embodiments of the present application take as an example that the features of the target image to be recognized and the features of the base library image are both one-dimensional matrices, and also provide a calculation for the relationship between the features of the target image to be recognized and the features of the base library image. A possible implementation of the first characteristic distance is as follows:
通过以下公式计算得到待识别目标物图像的特征与底库图像的特征之间的第一特征距离d12:The first feature distance d12 between the feature of the target image to be recognized and the feature of the base library image is calculated by the following formula:
其中,f
1,i表示底库图像的特征的第i个元素,f
2,i表示待识别目标物图像的特征的第i个元素。
Among them, f 1,i represents the i-th element of the feature of the base library image, and f 2,i represents the i-th element of the feature of the target image to be recognized.
步骤S206,根据上述第一特征距离和目标伸缩参数,得到待识别目标物图像与底库图像之间的第二特征距离;其中,目标伸缩参数与待识别目标物图像的特征有关。Step S206: Obtain a second characteristic distance between the image of the target object to be identified and the image of the base library according to the first characteristic distance and the target expansion parameter; wherein, the target expansion parameter is related to the characteristics of the target object image to be identified.
在一些可能的实施例中,考虑到待识别目标物图像属于上述难样本时,通过上述步骤S204得到的第一特征距离可能大于预设的距离阈值,此时待识别目标物图像会无法被正确识别出来,而难样本也存在一定的可区分性,为了解决上述技术问题,本发明实施例给出一种可能的实现方式,可以通过对第一特征距离进行距离伸缩变换将难样本拉近底库图像,从而提高对难样本的图像识别的通过率,避免将包含目标对象的图像识别为不包含目标对象的图像,减少误拒率。In some possible embodiments, considering that the image of the target to be recognized belongs to the above-mentioned difficult sample, the first feature distance obtained through the above step S204 may be greater than the preset distance threshold. At this time, the image of the target to be recognized may not be correct. In order to solve the above technical problems, the embodiment of the present invention provides a possible implementation manner. The difficult samples can be brought closer to the bottom by performing a distance scaling transformation on the first feature distance. Library images, thereby improving the pass rate of image recognition of difficult samples, avoiding the recognition of images containing the target object as images not containing the target object, and reducing the false rejection rate.
在本申请实施例中,进行距离伸缩变换时的目标伸缩参数与待识别目标物图像的特征有关,这样可以保证拉近过程没有把不含目标物的图像拉近超过距离阈值,从而不会产生误识别,也即不会增加误识率。In the embodiment of the present application, the target stretch parameter when performing the distance stretch transformation is related to the characteristics of the target object image to be recognized. This ensures that the zooming process does not bring the target-free image closer than the distance threshold, so that no Misrecognition means that the rate of misrecognition will not increase.
在一些可能的实现方式中,为了方便理解步骤S206的实现方式,请参见图3,图3示出了本申请实施例所提供的一种图像识别方法中距离伸缩变换的原理示意图;如图3所示,base表示底库图像,简单query表示简单样本(也即容易被正确识别出的图像),难query表示难样本,圆点和三角形表示对应两个不同的目标物的图像(包括底库图像、简单样本和难样本)在特征空间中的位置,圆圈对应距离阈值(圆圈内的样本可以被正确识别出来,圆圈外的样本无法被正确识别出来)。In some possible implementations, in order to facilitate the understanding of the implementation of step S206, please refer to FIG. 3, which shows a schematic diagram of the principle of distance expansion and contraction in an image recognition method provided by an embodiment of the present application; FIG. As shown, base represents the base library image, simple query represents simple samples (that is, images that are easily recognized correctly), difficult query represents difficult samples, and dots and triangles represent images corresponding to two different targets (including the base library). Image, simple sample and difficult sample) position in the feature space, the circle corresponds to the distance threshold (samples inside the circle can be correctly identified, samples outside the circle cannot be correctly identified).
如图3所示,在对第一特征距离进行距离伸缩变换前,难样本均位于圆圈外,使得难样本无法被正确识别出来;而对第一特征距离进行距离伸缩变换后,位于圆圈外的难样本被拉进圆圈内,难样本和与难样本对应的底库图像之间的特征距离变小,从而使得难样本能够被正确识别出来。As shown in Figure 3, before the first feature distance is transformed by the distance expansion, the difficult samples are all located outside the circle, so that the difficult samples cannot be correctly identified; and after the distance expansion and transformation is performed on the first feature distance, the ones located outside the circle The difficult sample is drawn into the circle, and the feature distance between the difficult sample and the base library image corresponding to the difficult sample becomes smaller, so that the difficult sample can be correctly identified.
可选地,在一种可能的实现方式中,上述步骤S206可以通过如下过程实现:将待识别目标物图像的特征输入神经网络模型,得到待识别目标物图像对应的目标伸缩参数;利用目标伸缩参数对第一特征距离进行数值变换,得到待识别目标物图像与底库图像之间的第二特征距离。Optionally, in a possible implementation manner, the above step S206 can be implemented by the following process: input the features of the image of the target object to be recognized into the neural network model to obtain the target expansion and contraction parameters corresponding to the image of the target object to be recognized; The parameter performs numerical transformation on the first characteristic distance to obtain the second characteristic distance between the image of the target object to be identified and the image of the base library.
在一些可能的实施例中,上述神经网络模型可以是预先训练好的神经网络模型,神经网络模型可以为一层全连接的神经网络,在本申请实施例中,神经网络模型的输入可以是待识别目标物图像的特征,神经网络模型的输出是实数值,该实数值可以为本申请实施例中的即目标伸缩参数,对该神经网络模型的训练过程的具体内容可以参照后文的解释说明In some possible embodiments, the aforementioned neural network model may be a pre-trained neural network model, and the neural network model may be a layer of fully connected neural network. In the embodiments of the present application, the input of the neural network model may be To identify the characteristics of the target image, the output of the neural network model is a real value, and the real value can be the target expansion parameter in the embodiment of this application. For the specific content of the training process of the neural network model, please refer to the explanation below
在一些可能的实施例中,上述目标伸缩参数可以包括目标伸缩系数或目标伸缩值,基于这两种实现方式下的目标伸缩参数,可以通过如下实现方式得到第二特征距离:在一种实现方式中,对第一特征距离和目标伸缩系数进行乘法运算,得到待识别目标物图像与底库图像之间的第二特征距离,该目标伸缩系数大于0且小于1;在另一种实现方式中,对第一特征距离和目标伸缩值进行减法运算,得到待识别目标物图像与底库图像之间的第二特征距离。In some possible embodiments, the aforementioned target expansion parameter may include a target expansion coefficient or a target expansion value. Based on the target expansion parameters in these two implementation modes, the second characteristic distance can be obtained by the following implementation: , The first characteristic distance and the target expansion coefficient are multiplied to obtain the second characteristic distance between the target image to be identified and the base library image, the target expansion coefficient is greater than 0 and less than 1; in another implementation manner , Performing a subtraction operation on the first characteristic distance and the target stretch value to obtain the second characteristic distance between the image of the target object to be identified and the image of the base library.
步骤S208,根据上述第二特征距离,确定待识别目标物图像中的目标物识别结果。Step S208: Determine the target recognition result in the image of the target to be recognized according to the above-mentioned second characteristic distance.
在一种可能的实现方式中,可以通过比对第二特征距离和预设的距离阈值来确定待识别目标物图像中的目标物识别结果。该距离阈值可以根据所需的误识率设置,这里不做限定。In a possible implementation manner, the target recognition result in the image of the target to be recognized can be determined by comparing the second characteristic distance with a preset distance threshold. The distance threshold can be set according to the required misrecognition rate, which is not limited here.
在一些可能的示例中,底库图像可以为一个,因此第二特征距离也为一个,在这种底库图像为一个,第二特征距离也为一个的情况下,上述步骤S208可以通过如下过程实现:判断第二特征距离是否小于或等于距离阈值;如果第二特征距离小于或等于距离阈值,将底库图像中的目标物确定为待识别目标物图像中的目标物识别结果。In some possible examples, there may be one base library image, so the second characteristic distance is also one. In the case where there is one base library image and the second characteristic distance is also one, the above step S208 may go through the following process Realization: Determine whether the second characteristic distance is less than or equal to the distance threshold; if the second characteristic distance is less than or equal to the distance threshold, determine the target in the base library image as the target recognition result in the target image to be recognized.
在另一些可能的示例中,底库图像可以为多个,每个底库图像对应一个第二特征距离,因此第二特征距离也为多个,在底库图像为多个,每个底库图像对应一个第二特征距离的情况下,上述步骤S208可以通过如下过程实现:判断各第二特征距离与距离阈值之间的数值大小关系;当各第二特征距离中存在小于距离阈值的目标第二特征距离,将目标第二特征距离对应的底库图像中的目标物确定为待识别目标物图像中的目标物识别结果。In other possible examples, there may be multiple base library images, and each base library image corresponds to a second feature distance. Therefore, there are also multiple second feature distances. There are multiple base library images, and each base library image In the case that the image corresponds to a second characteristic distance, the above step S208 can be implemented by the following process: judging the numerical relationship between each second characteristic distance and the distance threshold; The second feature distance, the target object in the base library image corresponding to the second feature distance of the target is determined as the target object recognition result in the target object image to be recognized.
在一种可选的实现方式中,上述判断各第二特征距离与距离阈值之间的数值大小关系的步骤可以为:判断各第二特征距离中的最小值是否小于或等于距离阈值;如果第二特征距离中的最小值小于或等于距离阈值,将各第二特征距离中的最小值确定为目标第二特征距离。In an optional implementation manner, the step of judging the numerical value relationship between each second characteristic distance and the distance threshold may be: judging whether the minimum value of each second characteristic distance is less than or equal to the distance threshold; The minimum value of the second characteristic distances is less than or equal to the distance threshold, and the minimum value of each second characteristic distance is determined as the target second characteristic distance.
可以理解的是,通过上述步骤S202~步骤S208可以实现对待识别目标物图像的图像识别。It is understandable that the image recognition of the image of the target object to be recognized can be realized through the above steps S202 to S208.
本实施例的上述图像识别方法,充分利用了难样本的可区分性,在对待识别目标物图像进行图像识别时,通过对第一特征距离进行目标伸缩参数下的距离伸缩变换拉近了待识别目标物图像到底库图像的特征距离,且目标伸缩参数与待识别目标物图像的特征有关,从而在不增加误识率的情况下,提高了对诸如暗光、顶光或大角度下拍摄的图像的识别准确率和通过率,减少了误拒率,从而提升了用户体验。The above-mentioned image recognition method of this embodiment makes full use of the distinguishability of difficult samples. When performing image recognition on the image of the target object to be recognized, the first feature distance is subjected to the distance expansion and contraction transformation under the target expansion parameter to narrow the to-be-identified The feature distance of the target image to the bottom library image, and the target expansion parameter is related to the features of the target image to be recognized, so that the accuracy of shooting under dark light, top light or large angles is improved without increasing the misrecognition rate. The image recognition accuracy and pass rate reduce the false rejection rate, thereby improving the user experience.
对于上述步骤S204和步骤S206,下面将以目标伸缩参数为目标伸缩系数为例,给出一种获得第二特征距离的实现方式式中,即可以通过如下公式计算得到第二特征距离d″
12:
For the above steps S204 and S206, the following will take the target expansion parameter as the target expansion coefficient as an example, and give an implementation way to obtain the second characteristic distance. In the formula, the second characteristic distance d" 12 can be calculated by the following formula :
其中,h(f
2)表示目标伸缩系数。
Among them, h(f 2 ) represents the target stretch coefficient.
在一些可能的实施例中本申请实施例还提供了一种神经网络模型的训练过程,主要包括如下步骤302~步骤310:In some possible embodiments, the embodiment of the present application also provides a training process of a neural network model, which mainly includes the following steps 302 to 310:
步骤302,提取样本图像的特征。Step 302: Extract the features of the sample image.
在一些可能的实施例中,训练集中的样本图像可以是在暗光、顶光或大角度等拍摄场景下拍摄的图像。提取样本图像的特征的过程可以参照相关现有技术,这里不再赘述。In some possible embodiments, the sample images in the training set may be images taken under shooting scenes such as dark light, overhead light, or large angles. The process of extracting the features of the sample image can refer to the related prior art, which will not be repeated here.
步骤304,将上述样本图像的特征输入初始神经网络模型,得到预测伸缩参数。该预测伸缩参数可以包括预测伸缩系数或预测伸缩值。Step 304: Input the characteristics of the above-mentioned sample image into the initial neural network model to obtain the predicted expansion and contraction parameters. The prediction scaling parameter may include a prediction scaling coefficient or a prediction scaling value.
步骤306,根据上述样本图像的特征与目标图像集中各图像的特征之间的第三特征距离,确定样本图像对应的标签伸缩参数。Step 306: Determine a label expansion parameter corresponding to the sample image according to the third feature distance between the feature of the sample image and the feature of each image in the target image set.
在一些可能的实施例实现例中,目标图像集中各张图像可以是本申请实施例中底库图像。在本申请实施例中,标签伸缩参数与上述预测伸缩参数相对应,可以理解为:若预测伸缩参数为预测伸缩系数,则标签伸缩参数为标签伸缩系数;若预测伸缩参数为预测伸缩值,则标签伸缩参数为标签伸缩值。In some possible implementation examples, each image in the target image set may be the bottom library image in the embodiment of the present application. In the embodiment of the present application, the label expansion parameter corresponds to the aforementioned predicted expansion parameter, which can be understood as: if the predicted expansion parameter is the predicted expansion coefficient, the label expansion parameter is the label expansion coefficient; if the predicted expansion parameter is the predicted expansion value, then The label expansion parameter is the label expansion value.
可选地,在一些可能的实施例中,根据样本图像的特征与目标图像集中各图像的特征之间的第三特征距离,确定所述样本图像对应的标签伸缩参数的方式可以为::计算样本图像的特征与目标图像集中各图像的特征之间的第三特征距离,然后根据各第三特征距离和距离阈值,确定样本图像对应的标签伸缩参数。Optionally, in some possible embodiments, according to the third feature distance between the feature of the sample image and the feature of each image in the target image set, the method of determining the label expansion and contraction parameters corresponding to the sample image may be: calculation The third feature distance between the feature of the sample image and the feature of each image in the target image set, and then the label expansion parameter corresponding to the sample image is determined according to each third feature distance and the distance threshold.
可以理解的是,上述距离阈值与在根据第二特征距离,确定待识别目标物图像中的目标物识别结果的具体实现方式中采用的距离阈值相同,这样可以保证训练出来的神经网络模型能够准确识别出目标图像。It is understandable that the above distance threshold is the same as the distance threshold used in the specific implementation of determining the target recognition result in the target image to be recognized based on the second feature distance, so as to ensure that the trained neural network model can be accurate Identify the target image.
在一种可能的实现方式中,可以根据各第三特征距离和距离阈值之间的比较结果来确定标签伸缩参数,例如,可以将各第三特征距离的距离平均值与所述距离阈值进行比较,或者,将各第三特征距离的最大值或者最小值与所述距离阈值进行比较等,根据比较结果获得相应的确定标签伸缩参数的策略。In a possible implementation manner, the label stretch parameter may be determined according to the comparison result between each third characteristic distance and the distance threshold. For example, the average distance of each third characteristic distance may be compared with the distance threshold. Or, compare the maximum or minimum value of each third characteristic distance with the distance threshold, etc., and obtain a corresponding strategy for determining the label expansion parameter according to the comparison result.
在另一种可能的实现方式中,在根据比较结果获得相应的确定标签伸缩参数的策略的过程中,可以基于各第三特征距离和距离阈值来共同确定标签伸缩参数的取值,还可以基于预设系数、第三特征距离和距离阈值来确定标签伸缩参数的取值为了方便理解上述获得标签伸缩参数的实现方式,本申请给出了一种可能的实现方式,即上述根据各第三特征距离和距离阈值,确定样本图像对应的标签伸缩参数的的方式可以通过如下过程实现:判断目标特征距离是否为各第三特征距离中的最小值,目标特征距离为样本图像的特征与目标图像集中样本图像对应的标准图像的特征之间的第三特征距离;当目标特征距离是各第三特征距离中的最小值,判断目标特征距离是否大于距离阈值;当目标特征距离大于距离阈值,根据目标特征距离和距离阈值,确定标签伸缩参数。In another possible implementation manner, in the process of obtaining the corresponding strategy for determining the label expansion parameter based on the comparison result, the value of the label expansion parameter may be jointly determined based on the third characteristic distance and the distance threshold, and may also be based on The preset coefficients, the third feature distance, and the distance threshold are used to determine the value of the label expansion and contraction parameters to facilitate understanding of the above-mentioned implementation of obtaining the label expansion and contraction parameters. The distance and distance threshold, the way to determine the label expansion parameters corresponding to the sample image can be achieved by the following process: determine whether the target feature distance is the minimum of the third feature distances, and the target feature distance is the concentration of the features of the sample image and the target image The third characteristic distance between the features of the standard image corresponding to the sample image; when the target characteristic distance is the smallest value among the third characteristic distances, it is judged whether the target characteristic distance is greater than the distance threshold; when the target characteristic distance is greater than the distance threshold, according to the target The feature distance and distance threshold determine the label expansion parameters.
本申请还给出了另一种可能的获得标签伸缩参数的实现方式,即当标签伸缩参数为标签伸缩系数,目标特征距离可以是各第三特征距离中的最小值,且目标特征距离大于距离阈值时(此时为对应难样本的情况),确定标签伸缩系数为与目标特征距离和距离阈值有关的第一数值大于0且小于1。在一种可能的实现方式中,可以根据距离阈值与目标特征距离的比值和预设系数确定第一数值,并将第一数值作为标签伸缩系数;其中,预设系数大于0且小于1。This application also provides another possible way to obtain the label expansion parameter, that is, when the label expansion parameter is the label expansion coefficient, the target feature distance can be the smallest value among the third feature distances, and the target feature distance is greater than the distance When thresholding (this is the case of corresponding difficult samples), it is determined that the label stretch coefficient is the first value related to the target feature distance and the distance threshold greater than 0 and less than 1. In a possible implementation manner, the first value can be determined according to the ratio of the distance threshold to the target characteristic distance and a preset coefficient, and the first value is used as the label expansion coefficient; wherein the preset coefficient is greater than 0 and less than 1.
在一种可能的实现方式中,上述第一数值可以根据以下式子确定:In a possible implementation manner, the above-mentioned first value may be determined according to the following formula:
其中,h(f)表示第一数值,d表示距离阈值,
表示目标特征距离,k表示预设系数,且0<k<1。
Among them, h(f) represents the first value, d represents the distance threshold, Represents the target feature distance, k represents the preset coefficient, and 0<k<1.
在一些可能的实施例中,为了不增加误识率,以标签伸缩参数为标签伸缩系数为例,给出一种根据样本图像的特征与目标图像集中各图像的特征之间的第三特征距离确定样本图像对应的标签伸缩参数的实现方式,即上述步骤306还可以包括:当目标特征距离不是各第三特征距离中的最小值(此时为误识别的情况),确定标签伸缩系数为第二数值,该第二数值大于或等于1;当目标特征距离小于距离阈值时(此时为正确识别的情况),确定标签伸缩系数为1。这样,在本身为误识别的情况下,将标签伸缩系数设置为大于或等于1的第二数值,不会进一步造成误识率的升高;在本身为可以正确识别的情况下,将标签伸缩系数设置为1,不会对识别结果造成影响。In some possible embodiments, in order not to increase the false recognition rate, taking the label expansion parameter as the label expansion coefficient as an example, a third characteristic distance between the characteristics of the sample image and the characteristics of each image in the target image set is given. The method of determining the label expansion parameter corresponding to the sample image, that is, the above step 306 may also include: when the target feature distance is not the smallest value among the third feature distances (this is the case of misidentification), determining the label expansion coefficient as the first Two values, the second value is greater than or equal to 1; when the target feature distance is less than the distance threshold (this is the case of correct identification), the label expansion coefficient is determined to be 1. In this way, in the case of misrecognition, the label expansion coefficient is set to a second value greater than or equal to 1, which will not further increase the misrecognition rate; in the case of correct recognition, the label is expanded and contracted. If the coefficient is set to 1, it will not affect the recognition result.
在一些可能的实施例中,本申请实施例中的标签伸缩系数可以记为h(f),在一种可能的实现方式中,可以将目标特征距离与各第三特征距离和距离阈值的关系分为以下三种情况:In some possible embodiments, the label expansion coefficient in the embodiments of this application can be denoted as h(f). In a possible implementation manner, the relationship between the target feature distance and each third feature distance and distance threshold can be Divided into the following three situations:
其中,
表示样本图像q
i到目标图像集中对应的标准图像b
i的特征距离(即目标特征距离);min
表示样本图像q
i到目标图像集中各图像b的第三特征距离中的最小值;d表示距离阈值。
in, Represents the feature distance from the sample image q i to the corresponding standard image b i in the target image set (ie the target feature distance); min Represents the minimum value of the third feature distances from the sample image q i to each image b in the target image set; d represents the distance threshold.
在一些可能的实施例中,对于第1种可以正确识别的情况,设置h(f)=1,这样不会对识别结果造成影响;In some possible embodiments, for the first situation that can be correctly identified, h(f)=1 is set, so that it will not affect the identification result;
在一些可能的实施例中,对于第3种误识别的情况,设置h(f)≥1,这样不会造成误识率升高;In some possible embodiments, for the third type of misrecognition, h(f)≥1 is set, so that the misrecognition rate will not increase;
在一些可能的实施例中,对于第2种对应难样本的情况,可以设置
(即上述的预设系数k为0.99),这样
可以正确识别。
In some possible embodiments, for the second case corresponding to difficult samples, you can set (That is, the above-mentioned preset coefficient k is 0.99), so Can be correctly identified.
步骤308,根据上述预测伸缩参数和标签伸缩参数,确定初始神经网络模型的损失值。Step 308: Determine the loss value of the initial neural network model according to the aforementioned predicted expansion and contraction parameters and the label expansion and contraction parameters.
在一些可能的实现方式中,可以将预测伸缩参数和标签伸缩参数带入初始神经网络模型的损失函数中,得到该初始神经网络模型的损失值。In some possible implementations, the predicted stretch parameters and label stretch parameters can be brought into the loss function of the initial neural network model to obtain the loss value of the initial neural network model.
步骤310,根据上述损失值对初始神经网络模型中的参数进行更新,以得到训练后的神经网络模型。Step 310: Update the parameters in the initial neural network model according to the aforementioned loss value to obtain a trained neural network model.
需要说明的是,上述步骤304和步骤306之间无先后执行顺序;上述步骤302~步骤310中未详细描述的步骤可以参见前述实施例的相应内容或相关现有技术,这里不再赘述。It should be noted that there is no order of execution between the above step 304 and step 306; the steps not described in detail in the above step 302 to step 310 can refer to the corresponding content of the foregoing embodiment or related prior art, and will not be repeated here.
在本申请实施例提供的图像识别方法的实施例的基础上,本实施例还提供了一种应用前述图像识别方法的可能的示例,该示例中的待识别目标物为人脸,即上述待识别目标物图像为待识别人脸图像,底库图像为多个,目标伸缩参数为目标伸缩系数。参见图4所示的另一种图像识别方法的流程图,该方法主要包括如下步骤S402~步骤S412:On the basis of the embodiment of the image recognition method provided in the embodiment of this application, this embodiment also provides a possible example of applying the aforementioned image recognition method. In this example, the target object to be recognized is a human face, that is, the aforementioned The target image is a face image to be recognized, there are multiple base library images, and the target expansion parameter is the target expansion coefficient. Referring to the flowchart of another image recognition method shown in FIG. 4, the method mainly includes the following steps S402 to S412:
步骤S402,提取待识别人脸图像的特征。Step S402: Extract the features of the face image to be recognized.
步骤S404,计算待识别人脸图像的特征与每个底库图像的特征之间的第一特征距离。Step S404: Calculate the first feature distance between the feature of the face image to be recognized and the feature of each base library image.
步骤S406,将待识别人脸图像的特征输入神经网络模型,得到待识别人脸图像对应的目标伸缩系数。Step S406: Input the features of the face image to be recognized into the neural network model to obtain the target expansion coefficient corresponding to the face image to be recognized.
步骤S408,对每个第一特征距离和目标伸缩系数进行乘法运算,得到待识别人脸图像与底库图像之间的第二特征距离,该目标伸缩系数大于0且小于1。Step S408: Multiply each first feature distance and the target expansion coefficient to obtain a second feature distance between the face image to be recognized and the base library image, and the target expansion coefficient is greater than 0 and less than 1.
步骤S410,判断各第二特征距离与距离阈值之间的数值大小关系。Step S410: Determine the numerical value relationship between each second characteristic distance and the distance threshold.
步骤S412,当各第二特征距离中存在小于距离阈值的目标第二特征距离时,将目标第二特征距离对应的底库图像中的人脸确定为待识别人脸图像的人脸识别结果。Step S412: When there is a target second characteristic distance smaller than the distance threshold in each second characteristic distance, determine the face in the base image corresponding to the target second characteristic distance as the face recognition result of the face image to be recognized.
本实施例提供的上述图像识别方法,在对待识别人脸图像进行人脸识别时,通过对第一特征距离进行目标伸缩系数下的距离伸缩变换拉近了待识别人脸图像到底库图像的特征距离,且目标伸缩系数与待识别人脸图像的特征有关,从而在不增加误识率的情况下,提高了对诸如暗光、顶光或大角度下拍摄的图像的人脸识别的准确率和通过率,减少了误拒率,从而提升了用户体验。In the above-mentioned image recognition method provided by this embodiment, when performing face recognition on the face image to be recognized, the first feature distance is subjected to the distance scaling transformation under the target scaling coefficient to narrow the features of the face image to be recognized in the base image. The distance, and the target expansion coefficient is related to the characteristics of the face image to be recognized, so that the accuracy of face recognition for images taken under dark light, overhead light or large angles is improved without increasing the misrecognition rate And the pass rate reduces the false rejection rate, thereby improving the user experience.
对应于本申请实施例所提供的图像识别方法,本申请实施例提供了一种图像识别装置,参见图5所示的一种图像识别装置的结构框图,该装置包括以下模块:Corresponding to the image recognition method provided by the embodiment of the application, the embodiment of the application provides an image recognition device. Refer to the structural block diagram of the image recognition device shown in FIG. 5, the device includes the following modules:
提取模块52,配置成提取待识别目标物图像的特征;The extraction module 52 is configured to extract features of the image of the target object to be recognized;
计算模块54,配置成计算待识别目标物图像的特征与底库图像的特征之间的第一特征距离;The calculation module 54 is configured to calculate the first feature distance between the feature of the target image to be recognized and the feature of the base library image;
变换模块56,配置成根据第一特征距离和目标伸缩参数,得到待识别目标物图像与底库图像之间的第二特征距离;其中,目标伸缩参数与待识别目标物图像的特征有关;The transformation module 56 is configured to obtain the second characteristic distance between the image of the target object to be identified and the base library image according to the first characteristic distance and the target expansion parameter; wherein the target expansion parameter is related to the characteristics of the target object image to be identified;
确定模块58,配置成根据第二特征距离,确定待识别目标物图像中的目标物识别结果。The determining module 58 is configured to determine the target object recognition result in the image of the target object to be recognized according to the second characteristic distance.
本申请实施例提供的上述图像识别装置,充分利用了难样本的可区分性,在对待识别目标物图像进行图像识别时,通过对第一特征距离进行目标伸缩参数下的距离伸缩变换拉近了待识别目标物图像到底库图像的特征距离,且目标伸缩参数与待识别目标物图像的特征有关,从而在不增加误识率的情况下,提高了对诸如暗光、顶光或大角度下拍摄的图像的识别准确率和通过率,减少了误拒率,从而提升了用户体验。The above-mentioned image recognition device provided by the embodiment of the present application makes full use of the distinguishability of difficult samples. When image recognition is performed on the image of the target object to be recognized, the first feature distance is adjusted by the distance expansion and contraction transformation under the target expansion parameter. The feature distance of the target image to be recognized to the bottom library image, and the target expansion parameter is related to the feature of the target image to be recognized, so as not to increase the misrecognition rate, it improves the resistance to low light, top light or large angles. The recognition accuracy and pass rate of the captured images reduce the false rejection rate, thereby improving the user experience.
作为一种可能的实施方式,上述计算模块54可以配置成:As a possible implementation manner, the foregoing calculation module 54 may be configured as:
通过以下公式计算得到待识别目标物图像的特征与底库图像的特征之间的第一特征距离d12:The first feature distance d12 between the feature of the target image to be recognized and the feature of the base library image is calculated by the following formula:
其中,f
1,i表示底库图像的特征的第i个元素,f
2,i表示待识别目标物图像的特征的第i个元素。
Among them, f 1,i represents the i-th element of the feature of the base library image, and f 2,i represents the i-th element of the feature of the target image to be recognized.
作为一种可能的实施方式,上述变换模块56可以配置成:As a possible implementation manner, the above-mentioned transformation module 56 may be configured as:
将待识别目标物图像的特征输入神经网络模型,得到待识别目标物图像对应的目标伸缩参数;Input the characteristics of the image of the target to be recognized into the neural network model to obtain the target expansion parameters corresponding to the image of the target to be recognized;
利用目标伸缩参数对第一特征距离进行数值变换,得到待识别目标物图像与底库图像之间的第二特征距离。The first characteristic distance is numerically transformed using the target stretch parameter to obtain the second characteristic distance between the image of the target object to be identified and the image of the base library.
作为一种可能的实施方式,上述目标伸缩参数包括目标伸缩系数或目标伸缩值;上述变换模块56还可以配置成:As a possible implementation manner, the aforementioned target expansion parameter includes a target expansion coefficient or a target expansion value; the aforementioned transformation module 56 may also be configured as:
对第一特征距离和目标伸缩系数进行乘法运算,得到待识别目标物图像与底库图像之间的第二特征距离;目标伸缩系数大于0且小于1;Multiply the first characteristic distance and the target expansion coefficient to obtain the second characteristic distance between the target image to be identified and the base library image; the target expansion coefficient is greater than 0 and less than 1;
或者,对第一特征距离和目标伸缩值进行减法运算,得到待识别目标物图像与底库图像之间的第二特征距离。Or, perform a subtraction operation on the first characteristic distance and the target stretch value to obtain the second characteristic distance between the image of the target object to be identified and the image of the base library.
在一种可选的实现方式中,上述确定模块58可以配置成:In an optional implementation manner, the above determining module 58 may be configured as:
判断第二特征距离是否小于或等于距离阈值;Determine whether the second characteristic distance is less than or equal to the distance threshold;
如果第二特征距离小于或等于距离阈值,将底库图像中的目标物确定为待识别目标物图像中的目标物识别结果。If the second characteristic distance is less than or equal to the distance threshold, the target in the base library image is determined as the target recognition result in the to-be-recognized target image.
在另一种可选的实现方式中,上述底库图像为多个,每个底库图像对应一个第二特征距离;上述确定模块58还可以配置成:In another optional implementation manner, there are multiple base library images, and each base library image corresponds to a second characteristic distance; the determining module 58 may also be configured to:
判断各第二特征距离与距离阈值之间的数值大小关系;Judge the numerical relationship between each second characteristic distance and the distance threshold;
当各第二特征距离中存在小于距离阈值的目标第二特征距离,将目标第二特征距离对应的底库图像中的目标物确定为目标物识别结果。When there is a target second characteristic distance smaller than the distance threshold in each second characteristic distance, the target object in the base library image corresponding to the target second characteristic distance is determined as the target object recognition result.
作为一种可能的实施方式,上述确定模块58还可以配置成:As a possible implementation manner, the above determining module 58 may also be configured as:
判断各第二特征距离中的最小值是否小于或等于距离阈值;Determine whether the minimum value of each second characteristic distance is less than or equal to the distance threshold;
如果各第二特征距离中的最小值小于或等于距离阈值,将各第二特征距离中的最小值确定为目标第二特征距离。If the minimum value of each second characteristic distance is less than or equal to the distance threshold, the minimum value of each second characteristic distance is determined as the target second characteristic distance.
在一种实施方式中,通过神经网络模型确定上述目标伸缩参数,参见图6所示的另一种图像识别装置的结构框图,在图5的基础上,上述装置还配置有训练模块62,该训练模块62可以配置成:In an implementation manner, the above-mentioned target expansion parameters are determined by a neural network model. Refer to the structural block diagram of another image recognition device shown in FIG. 6. On the basis of FIG. 5, the above-mentioned device is also equipped with a training module 62. The training module 62 can be configured as:
提取样本图像的特征;Extract the features of the sample image;
将样本图像的特征输入初始神经网络模型,得到预测伸缩参数;Input the features of the sample image into the initial neural network model to obtain the predicted expansion and contraction parameters;
根据样本图像的特征与目标图像集中各图像的特征之间的第三特征距离,确定样本图像对应的标签伸缩参数;Determine the label expansion parameter corresponding to the sample image according to the third characteristic distance between the characteristic of the sample image and the characteristic of each image in the target image set;
根据预测伸缩参数和标签伸缩参数,确定初始神经网络模型的损失值;Determine the loss value of the initial neural network model according to the predicted expansion and contraction parameters and the label expansion and contraction parameters;
根据损失值对初始神经网络模型中的参数进行更新,以得到训练后的神经网络模型。The parameters in the initial neural network model are updated according to the loss value to obtain the trained neural network model.
作为一种可能的实施方式,上述训练模块62可以配置成:As a possible implementation manner, the above-mentioned training module 62 may be configured as:
判断目标特征距离是否为各第三特征距离中的最小值;目标特征距离为样本图像的特征与目标图像集中样本图像对应的标准图像的特征之间的第三特征距离;Determine whether the target feature distance is the minimum of the third feature distances; the target feature distance is the third feature distance between the feature of the sample image and the feature of the standard image corresponding to the sample image in the target image set;
当目标特征距离是各第三特征距离中的最小值,判断目标特征距离是否大于距离阈值;When the target characteristic distance is the minimum value among the third characteristic distances, it is judged whether the target characteristic distance is greater than the distance threshold;
当目标特征距离大于距离阈值,根据目标特征距离和距离阈值,确定标签伸缩参数。When the target feature distance is greater than the distance threshold, the label stretch parameter is determined according to the target feature distance and the distance threshold.
作为一种可能的实施方式,上述标签伸缩参数包括标签伸缩系数;上述训练模块62还配置成:As a possible implementation manner, the aforementioned label expansion parameter includes a label expansion coefficient; the aforementioned training module 62 is further configured to:
确定标签伸缩系数为与目标特征距离和距离阈值有关的第一数值,第一数值大于0且小于1。It is determined that the label expansion coefficient is the first value related to the target feature distance and the distance threshold, and the first value is greater than 0 and less than 1.
作为一种可能的实施方式,上述训练模块62还配置成:As a possible implementation manner, the above-mentioned training module 62 is further configured to:
根据距离阈值与目标特征距离的比值和预设系数确定第一数值,并将第一数值作为标签伸缩系数;其中,预设系数大于0且小于1。The first value is determined according to the ratio of the distance threshold to the target characteristic distance and the preset coefficient, and the first value is used as the label expansion coefficient; wherein the preset coefficient is greater than 0 and less than 1.
作为一种可能的实施方式,上述标签伸缩参数包括标签伸缩系数;上述训练模块62还可以配置成:As a possible implementation manner, the above-mentioned label expansion parameter includes a label expansion coefficient; the above-mentioned training module 62 may also be configured as:
当目标特征距离不是各第三特征距离中的最小值时,确定标签伸缩系数为第二数值,第二数值大于或等于1。When the target feature distance is not the minimum value among the third feature distances, it is determined that the label expansion coefficient is the second value, and the second value is greater than or equal to 1.
作为一种可能的实施方式,上述标签伸缩参数包括标签伸缩系数;上述训练模块62还可以配置成:As a possible implementation manner, the above-mentioned label expansion parameter includes a label expansion coefficient; the above-mentioned training module 62 may also be configured as:
当目标特征距离不大于距离阈值时,确定标签伸缩系数为1。When the target feature distance is not greater than the distance threshold, the label expansion coefficient is determined to be 1.
本实施例所提供的装置,其实现原理及产生的技术效果和前述方法实施例相同,为简要描述,装置实施例部分未提及之处,可参考本申请实施例提供的图像识别方法的实施例中相应内容。The implementation principles and technical effects of the device provided in this embodiment are the same as those in the foregoing method embodiments. For a brief description, for parts not mentioned in the device embodiments, please refer to the implementation of the image recognition method provided in the embodiments of this application. The corresponding content in the example.
另外,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行前面方法实施例中所述的图像识别方法。In addition, the embodiments of the present application also provide a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and the computer program executes the image recognition method described in the foregoing method embodiment when the computer program is run by a processor.
本申请实施例所提供的图像识别方法及装置的计算机程序产品,包括存储了程序代码的计算机可读存储介质,所述程序代码包括的指令可配置成执行前面方法实施例中所述的方法,具体实现可参见方法实施例,在此不再赘述。The computer program product of the image recognition method and device provided in the embodiments of the present application includes a computer-readable storage medium storing program code, and the instructions included in the program code can be configured to execute the method described in the previous method embodiment, For specific implementation, please refer to the method embodiment, which will not be repeated here.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,简称ROM)、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM for short), RAM, magnetic disk, or optical disk and other media that can store program codes.
在这里示出和描述的所有示例中,任何具体值应被解释为仅仅是示例性的,而不是作为限制,因此,示例性实施例的其他示例可以具有不同的值。In all the examples shown and described herein, any specific value should be interpreted as merely exemplary, rather than as a limitation, and therefore, other examples of the exemplary embodiment may have different values.
在本申请的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制。此外,术语“第一”、“第二”、“第三”仅配置成描述目的,而不能理解为指示或暗示相对重要性。In the description of this application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. The indicated orientation or positional relationship is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the application and simplifying the description, and does not indicate or imply that the pointed device or element must have a specific orientation or a specific orientation. The structure and operation cannot therefore be understood as a limitation of this application. In addition, the terms "first", "second", and "third" are only configured for descriptive purposes, and cannot be understood as indicating or implying relative importance.
最后应说明的是:以上所述实施例,仅为本申请的具体实施方式,用以说明本申请的技术方案,而非对其限制,本申请的保护范围并不局限于此,尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本申请实施例技术方案的精神和范围,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。Finally, it should be noted that the above-mentioned embodiments are only specific implementations of this application, which are used to illustrate the technical solution of this application, rather than limit it. The scope of protection of this application is not limited to this, although referring to the foregoing The examples describe the application in detail, and those of ordinary skill in the art should understand that any person skilled in the art can still modify the technical solutions described in the foregoing examples within the technical scope disclosed in this application. Or it can be easily conceived of changes, or equivalent replacements of some of the technical features; and these modifications, changes or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should be covered in this application Within the scope of protection. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
本申请提供了一种图像识别方法、装置、电子设备及计算机可读存储介质,涉及图像处理技术领域,在进行图像识别时,首先提取待识别目标物图像的特征;然后计算待识别目标物图像的特征与底库图像的特征之间的第一特征距离,并根据第一特征距离和目标伸缩参数,得到待识别目标物图像与底库图像之间的第二特征距离;其中,目标伸缩参数与待识别目标物图像的特征有关;进而根据第二特征距离,确定待识别目标物图像中的目标物识别结果。这样通过对第一特征距离进行目标伸缩参数下的距离伸缩变换拉近了待识别目标物图像到底库图像的特征距离,从而在不增加误识率的情况下,提高了对诸如暗光、顶光或大角度下拍摄的图像的识别通过率。This application provides an image recognition method, device, electronic equipment, and computer-readable storage medium, and relates to the technical field of image processing. When performing image recognition, first extract the features of the image of the target to be recognized; then calculate the image of the target to be recognized The first feature distance between the feature of and the feature of the base library image, and the second feature distance between the target image to be identified and the base library image is obtained according to the first feature distance and the target expansion parameter; wherein, the target expansion parameter It is related to the feature of the image of the target to be recognized; and then according to the second feature distance, the target recognition result in the image of the target to be recognized is determined. In this way, by performing the distance scaling transformation under the target scaling parameter on the first feature distance, the feature distance of the target image to be recognized is narrowed to the base library image, thereby improving the sensitivity to dark light and top image without increasing the misrecognition rate. The recognition pass rate of images taken under light or large angles.
Claims (18)
- 一种图像识别方法,其特征在于,包括:An image recognition method, characterized in that it comprises:提取待识别目标物图像的特征;Extract the features of the target image to be recognized;计算所述待识别目标物图像的特征与底库图像的特征之间的第一特征距离;Calculating the first feature distance between the feature of the target image to be recognized and the feature of the base library image;根据所述第一特征距离和目标伸缩参数,得到所述待识别目标物图像与所述底库图像之间的第二特征距离;其中,所述目标伸缩参数与所述待识别目标物图像的特征有关;According to the first characteristic distance and the target telescopic parameter, the second characteristic distance between the target object image to be recognized and the base library image is obtained; wherein the target telescopic parameter and the target object image to be recognized Feature-related根据所述第二特征距离,确定所述待识别目标物图像中的目标物识别结果。According to the second characteristic distance, a target recognition result in the image of the target to be recognized is determined.
- 根据权利要求1所述的方法,其特征在于,计算所述待识别目标物图像的特征与底库图像的特征之间的第一特征距离的步骤,包括:The method according to claim 1, wherein the step of calculating the first feature distance between the feature of the target image to be recognized and the feature of the base library image comprises:通过以下公式计算得到所述待识别目标物图像的特征与所述底库图像的特征之间的第一特征距离d 12: The first feature distance d 12 between the feature of the target image to be recognized and the feature of the base library image is calculated by the following formula:其中,f 1,i表示所述底库图像的特征的第i个元素,f 2,i表示所述待识别目标物图像的特征的第i个元素。 Wherein, f 1,i represents the i-th element of the feature of the base library image, and f 2,i represents the i-th element of the feature of the target image to be recognized.
- 根据权利要求1所述的方法,其特征在于,根据所述第一特征距离和目标伸缩参数,得到所述待识别目标物图像与所述底库图像之间的第二特征距离的步骤,包括:The method according to claim 1, wherein the step of obtaining the second characteristic distance between the image of the target object to be recognized and the image of the base library according to the first characteristic distance and the target expansion parameter comprises :将所述待识别目标物图像的特征输入神经网络模型,得到所述待识别目标物图像对应的目标伸缩参数;Inputting the features of the image of the target object to be recognized into a neural network model to obtain the target expansion parameters corresponding to the image of the target object to be recognized;利用所述目标伸缩参数对所述第一特征距离进行数值变换,得到所述待识别目标物图像与所述底库图像之间的第二特征距离。The first characteristic distance is numerically transformed by using the target stretch parameter to obtain the second characteristic distance between the image of the target object to be recognized and the image of the base library.
- 根据权利要求3所述的方法,其特征在于,所述目标伸缩参数包括目标伸缩系数或目标伸缩值;利用所述目标伸缩参数对所述第一特征距离进行数值变换,得到所述待识别目标物图像与所述底库图像之间的第二特征距离的步骤,包括:The method according to claim 3, wherein the target expansion parameter comprises a target expansion coefficient or a target expansion value; the target expansion parameter is used to perform a numerical transformation on the first characteristic distance to obtain the target to be identified The step of determining the second characteristic distance between the object image and the base library image includes:对所述第一特征距离和所述目标伸缩系数进行乘法运算,得到所述待识别目标物图像与所述底库图像之间的第二特征距离;所述目标伸缩系数大于0且小于1;Multiplying the first characteristic distance and the target expansion coefficient to obtain a second characteristic distance between the target object image to be identified and the base library image; the target expansion coefficient is greater than 0 and less than 1;或者,对所述第一特征距离和所述目标伸缩值进行减法运算,得到所述待识别目标物图像与所述底库图像之间的第二特征距离。Or, performing a subtraction operation on the first characteristic distance and the target stretch value to obtain the second characteristic distance between the image of the target object to be recognized and the image of the base library.
- 根据权利要求1-4任一项所述的方法,其特征在于,所述底库图像为一个,所述底库图像对应一个所述第二特征距离;根据所述第二特征距离,确定所述待识别目标物图像中的目标物识别结果的步骤,包括:The method according to any one of claims 1 to 4, wherein there is one base library image, and the base library image corresponds to one of the second characteristic distances; the second characteristic distance is determined according to the second characteristic distance. The steps of the target recognition result in the target image to be recognized include:判断所述第二特征距离是否小于或等于距离阈值;Judging whether the second characteristic distance is less than or equal to a distance threshold;如果所述第二特征距离小于或等于距离阈值,将所述底库图像中的目标物确定为所述待识别目标物图像中的目标物识别结果。If the second characteristic distance is less than or equal to the distance threshold, the target in the base library image is determined as the target recognition result in the to-be-recognized target image.
- 根据权利要求1-4任一项所述的方法,其特征在于,所述底库图像为多个,每个所述底库图像对应一个所述第二特征距离;根据所述第二特征距离,确定所述待识别目标物图像中的目标物识别结果的步骤,包括:The method according to any one of claims 1 to 4, wherein there are multiple base library images, and each base library image corresponds to one second characteristic distance; according to the second characteristic distance , The step of determining the target recognition result in the image of the target to be recognized includes:判断各所述第二特征距离与距离阈值之间的数值大小关系;Judging the numerical magnitude relationship between each of the second characteristic distances and the distance threshold;当各所述第二特征距离中存在小于所述距离阈值的目标第二特征距离时,将所述目标第二特征距离对应的底库图像中的目标物确定为所述目标物识别结果。When there is a target second characteristic distance smaller than the distance threshold in each of the second characteristic distances, the target object in the base library image corresponding to the target second characteristic distance is determined as the target object recognition result.
- 根据权利要求6所述的方法,其特征在于,判断各所述第二特征距离与距离阈值之间的数值大小关系的步骤,包括:The method according to claim 6, wherein the step of judging the numerical value relationship between each of the second characteristic distances and a distance threshold comprises:判断各所述第二特征距离中的最小值是否小于或等于所述距离阈值;Judging whether the minimum value of each of the second characteristic distances is less than or equal to the distance threshold;如果各所述第二特征距离中的最小值小于或等于所述距离阈值,将各所述第二特征距离中的最小值确定为所述目标第二特征距离。If the minimum value of each of the second characteristic distances is less than or equal to the distance threshold, the minimum value of each of the second characteristic distances is determined as the target second characteristic distance.
- 根据权利要求1-7任一项所述的方法,其特征在于,通过神经网络模型确定所述目标伸缩参数,所述神经网络模型通过以下步骤训练得到:The method according to any one of claims 1-7, wherein the target expansion and contraction parameters are determined by a neural network model, and the neural network model is obtained by training in the following steps:提取样本图像的特征;Extract the features of the sample image;将所述样本图像的特征输入初始神经网络模型,得到预测伸缩参数;Input the features of the sample image into the initial neural network model to obtain the predicted expansion and contraction parameters;根据所述样本图像的特征与目标图像集中各图像的特征之间的第三特征距离,确定所述样本图像对应的标签伸缩参数;Determine the label expansion parameter corresponding to the sample image according to the third feature distance between the feature of the sample image and the feature of each image in the target image set;根据所述预测伸缩参数和所述标签伸缩参数,确定所述初始神经网络模型的损失值;Determine the loss value of the initial neural network model according to the predicted expansion and contraction parameters and the label expansion and contraction parameters;根据所述损失值对所述初始神经网络模型中的参数进行更新,以得到训练后的所述神经网络模型。The parameters in the initial neural network model are updated according to the loss value to obtain the trained neural network model.
- 根据权利要求8所述的方法,其特征在于,根据所述样本图像的特征与目标图像集中各图像的特征之间的第三特征距离,确定所述样本图像对应的标签伸缩参数的步骤,包括:The method according to claim 8, wherein the step of determining the label expansion parameter corresponding to the sample image according to the third characteristic distance between the characteristic of the sample image and the characteristic of each image in the target image set comprises :计算样本图像的特征与目标图像集中各图像的特征之间的第三特征距离;Calculate the third feature distance between the feature of the sample image and the feature of each image in the target image set;根据各第三特征距离和所述距离阈值,确定样本图像对应的标签伸缩参数。According to each third characteristic distance and the distance threshold, the label expansion and contraction parameters corresponding to the sample image are determined.
- 根据权利要求8或9所述的方法,其特征在于,根据所述样本图像的特征与目标图像集中各图像的特征之间的第三特征距离,确定所述样本图像对应的标签伸缩参数的步骤,包括:The method according to claim 8 or 9, wherein the step of determining the label expansion parameter corresponding to the sample image according to the third feature distance between the feature of the sample image and the feature of each image in the target image set ,include:判断目标特征距离是否为各所述第三特征距离中的最小值;所述目标特征距离为所述样本图像的特征与所述目标图像集中所述样本图像对应的标准图像的特征之间的第三特征距离;Determine whether the target feature distance is the minimum of the third feature distances; the target feature distance is the first between the feature of the sample image and the feature of the standard image corresponding to the sample image in the target image set Three characteristic distance;当所述目标特征距离是各所述第三特征距离中的最小值时,判断所述目标特征距离是否大于距离阈值;When the target characteristic distance is the minimum value among the third characteristic distances, judging whether the target characteristic distance is greater than a distance threshold;当所述目标特征距离大于所述距离阈值时,根据所述目标特征距离和所述距离阈值,确定标签伸缩参数。When the target feature distance is greater than the distance threshold, the label expansion parameter is determined according to the target feature distance and the distance threshold.
- 根据权利要求10所述的方法,其特征在于,所述标签伸缩参数包括标签伸缩系数;根据所述目标特征距离和所述距离阈值,确定标签伸缩参数的步骤,包括:The method according to claim 10, wherein the label expansion and contraction parameter comprises a label expansion coefficient; the step of determining the label expansion and contraction parameter according to the target feature distance and the distance threshold comprises:确定所述标签伸缩系数为与所述目标特征距离和所述距离阈值有关的第一数值,所述第一数值大于0且小于1。It is determined that the tag expansion coefficient is a first value related to the target feature distance and the distance threshold, and the first value is greater than 0 and less than 1.
- 根据权利要求11所述的方法,其特征在于,确定所述标签伸缩系数为与所述目标特征距离和所述距离阈值有关的第一数值的步骤,包括:The method according to claim 11, wherein the step of determining that the tag expansion coefficient is a first value related to the target feature distance and the distance threshold comprises:根据所述距离阈值与所述目标特征距离的比值和预设系数确定所述第一数值,并将所述第一数值作为所述标签伸缩系数;其中,所述预设系数大于0且小于1。The first value is determined according to the ratio of the distance threshold to the target characteristic distance and a preset coefficient, and the first value is used as the label expansion coefficient; wherein the preset coefficient is greater than 0 and less than 1. .
- 根据权利要求10所述的方法,其特征在于,所述标签伸缩参数包括标签伸缩系数;所述方法还包括:The method according to claim 10, wherein the label expansion parameter comprises a label expansion coefficient; the method further comprises:当所述目标特征距离不是各所述第三特征距离中的最小值,确定所述标签伸缩系数为第二数值,所述第二数值大于或等于1。When the target characteristic distance is not the minimum value among the third characteristic distances, it is determined that the tag expansion coefficient is a second value, and the second value is greater than or equal to 1.
- 根据权利要求10所述的方法,其特征在于,所述标签伸缩参数包括标签伸缩系数;所述方法还包括:The method according to claim 10, wherein the label expansion parameter comprises a label expansion coefficient; the method further comprises:当所述目标特征距离小于所述距离阈值时,确定所述标签伸缩系数为1。When the target feature distance is less than the distance threshold, it is determined that the label expansion coefficient is 1.
- 根据权利要求1-14任意一项所述的方法,其特征在于,所述待识别目标物图像为待识别人脸图像,所述方法还包括:The method according to any one of claims 1-14, wherein the target image to be recognized is a face image to be recognized, and the method further comprises:提取待识别人脸图像的特征;Extract the features of the face image to be recognized;计算待识别人脸图像的特征与每个底库图像的特征之间的第一特征距离;Calculate the first feature distance between the feature of the face image to be recognized and the feature of each base library image;将待识别人脸图像的特征输入神经网络模型,得到待识别人脸图像对应的目标伸缩系数;Input the features of the face image to be recognized into the neural network model to obtain the target expansion coefficient corresponding to the face image to be recognized;对每个第一特征距离和目标伸缩系数进行乘法运算,得到待识别人脸图像与底库图像之间的第二特征距离,该目标伸缩系数大于0且小于1;Multiply each first feature distance and the target expansion coefficient to obtain the second feature distance between the face image to be recognized and the base library image, and the target expansion coefficient is greater than 0 and less than 1;判断各第二特征距离与距离阈值之间的数值大小关系;Judge the numerical relationship between each second characteristic distance and the distance threshold;当各第二特征距离中存在小于距离阈值的目标第二特征距离时,将目标第二特征距离对应的底库图像中的人脸确定为待识别人脸图像的人脸识别结果。When there is a target second characteristic distance smaller than the distance threshold in each second characteristic distance, the face in the base image corresponding to the target second characteristic distance is determined as the face recognition result of the face image to be recognized.
- 一种图像识别装置,其特征在于,包括:An image recognition device, characterized in that it comprises:提取模块,配置成提取待识别目标物图像的特征;An extraction module, configured to extract features of the target image to be recognized;计算模块,配置成计算所述待识别目标物图像的特征与底库图像的特征之间的第一特征距离;A calculation module configured to calculate the first feature distance between the feature of the target image to be recognized and the feature of the base library image;变换模块,配置成根据所述第一特征距离和目标伸缩参数,得到所述待识别目标物图像与所述底库图像之间的第二特征距离;其中,所述目标伸缩参数与所述待识别目标物图像的特征有关;The transformation module is configured to obtain the second characteristic distance between the target object image to be identified and the base library image according to the first characteristic distance and the target expansion parameter; wherein, the target expansion parameter and the target expansion parameter are Recognize the characteristics of the target image;确定模块,配置成根据所述第二特征距离,确定所述待识别目标物图像中的目标物识别结果。The determining module is configured to determine the target recognition result in the image of the target to be recognized according to the second characteristic distance.
- 一种电子设备,包括存储器、处理器,所述存储器中存储有可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1-15中任一项所述的方法。An electronic device, comprising a memory and a processor, and a computer program that can be run on the processor is stored in the memory, wherein the processor executes the computer program to implement claims 1-15 Any of the methods.
- 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,其特征在于,所述计算机程序被处理器运行时执行权利要求1-15中任一项所述的方法。A computer-readable storage medium with a computer program stored on the computer-readable storage medium, wherein the computer program executes the method according to any one of claims 1-15 when the computer program is run by a processor.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010293294.7A CN111639667B (en) | 2020-04-14 | 2020-04-14 | Image recognition method, device, electronic equipment and computer readable storage medium |
CN202010293294.7 | 2020-04-14 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021208373A1 true WO2021208373A1 (en) | 2021-10-21 |
Family
ID=72331390
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/119613 WO2021208373A1 (en) | 2020-04-14 | 2020-09-30 | Image identification method and apparatus, and electronic device and computer-readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111639667B (en) |
WO (1) | WO2021208373A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114429663A (en) * | 2022-01-28 | 2022-05-03 | 北京百度网讯科技有限公司 | Updating method of human face base, human face recognition method, device and system |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111639667B (en) * | 2020-04-14 | 2023-06-16 | 北京迈格威科技有限公司 | Image recognition method, device, electronic equipment and computer readable storage medium |
CN112579803B (en) * | 2020-11-16 | 2024-04-02 | 北京迈格威科技有限公司 | Image data cleaning method and device, electronic equipment and storage medium |
CN113822296A (en) * | 2021-08-23 | 2021-12-21 | 北京迈格威科技有限公司 | Identification method, device, electronic equipment and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7792386B1 (en) * | 2004-02-27 | 2010-09-07 | Adobe Systems Incorporated | Using difference kernels for image filtering |
CN104424483A (en) * | 2013-08-21 | 2015-03-18 | 中移电子商务有限公司 | Face image illumination preprocessing method, face image illumination preprocessing device and terminal |
CN110188641A (en) * | 2019-05-20 | 2019-08-30 | 北京迈格威科技有限公司 | Image recognition and the training method of neural network model, device and system |
CN111639667A (en) * | 2020-04-14 | 2020-09-08 | 北京迈格威科技有限公司 | Image recognition method and device, electronic equipment and computer readable storage medium |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3475422B2 (en) * | 1997-08-04 | 2003-12-08 | オムロン株式会社 | Image recognition device, image recognition method, and recording medium |
JP2005173995A (en) * | 2003-12-11 | 2005-06-30 | Nippon Telegr & Teleph Corp <Ntt> | Device and method for calculating depth, and program |
WO2012114464A1 (en) * | 2011-02-23 | 2012-08-30 | 富士通株式会社 | Imaging device, program and imaging support method |
CN107766864B (en) * | 2016-08-23 | 2022-02-01 | 斑马智行网络(香港)有限公司 | Method and device for extracting features and method and device for object recognition |
CN107895166B (en) * | 2017-04-24 | 2021-05-25 | 长春工业大学 | Method for realizing target robust recognition based on feature descriptor by geometric hash method |
CN108596110A (en) * | 2018-04-26 | 2018-09-28 | 北京京东金融科技控股有限公司 | Image-recognizing method and device, electronic equipment, storage medium |
CN109102020A (en) * | 2018-08-10 | 2018-12-28 | 新华三技术有限公司 | A kind of image comparison method and device |
CN110874921A (en) * | 2018-08-31 | 2020-03-10 | 百度在线网络技术(北京)有限公司 | Intelligent road side unit and information processing method thereof |
-
2020
- 2020-04-14 CN CN202010293294.7A patent/CN111639667B/en active Active
- 2020-09-30 WO PCT/CN2020/119613 patent/WO2021208373A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7792386B1 (en) * | 2004-02-27 | 2010-09-07 | Adobe Systems Incorporated | Using difference kernels for image filtering |
CN104424483A (en) * | 2013-08-21 | 2015-03-18 | 中移电子商务有限公司 | Face image illumination preprocessing method, face image illumination preprocessing device and terminal |
CN110188641A (en) * | 2019-05-20 | 2019-08-30 | 北京迈格威科技有限公司 | Image recognition and the training method of neural network model, device and system |
CN111639667A (en) * | 2020-04-14 | 2020-09-08 | 北京迈格威科技有限公司 | Image recognition method and device, electronic equipment and computer readable storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114429663A (en) * | 2022-01-28 | 2022-05-03 | 北京百度网讯科技有限公司 | Updating method of human face base, human face recognition method, device and system |
CN114429663B (en) * | 2022-01-28 | 2023-10-20 | 北京百度网讯科技有限公司 | Updating method of face base, face recognition method, device and system |
Also Published As
Publication number | Publication date |
---|---|
CN111639667A (en) | 2020-09-08 |
CN111639667B (en) | 2023-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021208373A1 (en) | Image identification method and apparatus, and electronic device and computer-readable storage medium | |
CN109255352B (en) | Target detection method, device and system | |
US10354168B2 (en) | Systems and methods for recognizing characters in digitized documents | |
CN109145766B (en) | Model training method and device, recognition method, electronic device and storage medium | |
CN109829506B (en) | Image processing method, image processing device, electronic equipment and computer storage medium | |
CN111797893A (en) | Neural network training method, image classification system and related equipment | |
WO2019041519A1 (en) | Target tracking device and method, and computer-readable storage medium | |
CN111666960A (en) | Image recognition method and device, electronic equipment and readable storage medium | |
WO2018082308A1 (en) | Image processing method and terminal | |
Liu et al. | Real-time facial expression recognition based on cnn | |
CN113255557B (en) | Deep learning-based video crowd emotion analysis method and system | |
CN112597918B (en) | Text detection method and device, electronic equipment and storage medium | |
WO2021238586A1 (en) | Training method and apparatus, device, and computer readable storage medium | |
CN111160288A (en) | Gesture key point detection method and device, computer equipment and storage medium | |
CN113569868A (en) | Target detection method and device and electronic equipment | |
CN111105017A (en) | Neural network quantization method and device and electronic equipment | |
CN112560710B (en) | Method for constructing finger vein recognition system and finger vein recognition system | |
CN112232506A (en) | Network model training method, image target recognition method, device and electronic equipment | |
CN114266897A (en) | Method and device for predicting pox types, electronic equipment and storage medium | |
KR20230043318A (en) | Method and apparatus for classifying object in image | |
CN112819011A (en) | Method and device for identifying relationships between objects and electronic system | |
CN110490058B (en) | Training method, device and system of pedestrian detection model and computer readable medium | |
CN112560791B (en) | Recognition model training method, recognition method and device and electronic equipment | |
CN110889290B (en) | Text encoding method and apparatus, text encoding validity checking method and apparatus | |
CN109871814B (en) | Age estimation method and device, electronic equipment and computer storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20931629 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20931629 Country of ref document: EP Kind code of ref document: A1 |