Image recognition model acquisition method, image recognition method, electronic equipment and storage medium

By performing regional division and neural network linkage training on the training images, the problem of insufficient comprehensive extraction of facial recognition feature in the prior art is solved, and the recognition accuracy is improved.

CN119693975APending Publication Date: 2025-03-25ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311246125.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

When existing facial recognition technology deals with faces with posture angles, feature extraction is not comprehensive and robust enough, resulting in low recognition accuracy.

Method used

Multiple areas are divided by preset division of the training images, each area corresponds to a neural network, extract the features of each area, and use the features of the overlapping areas for linkage training to determine the training of the image recognition model.

Benefits of technology

The recognition accuracy of the image recognition model is improved, the extracted features are more comprehensive and robust, and it can better handle faces in different postures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693975A_ABST
    Figure CN119693975A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image recognition model acquisition method, an image recognition method, electronic equipment and a storage medium. The image recognition model acquisition method comprises the following steps: acquiring a training image; dividing each training image into a first region; the at least two first regions have a first overlapping region, and each first region corresponds to one first neural network; inputting each first region into a corresponding first neural network to obtain a first feature; inputting each first overlapping region into a first neural network corresponding to a plurality of first regions forming the first overlapping region to obtain a second feature; calculating a feature error corresponding to the first neural network according to the first feature and / or the second feature; and when the feature error of each first neural network is smaller than an error threshold, storing training parameters of the first neural network to obtain an image recognition model. According to the scheme of the embodiment, the extracted features are more comprehensive and robust, so that the image recognition accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer vision, and in particular to an image recognition model acquisition and image recognition method, an electronic device and a storage medium. Background Art

[0002] In recent years, face recognition technology has become one of the hottest research topics in the fields of artificial intelligence, pattern recognition, and computer vision. The main reason that affects face image recognition is the occlusion caused by face posture. How to improve the recognition rate of faces at different posture angles is also a hot topic. Summary of the invention

[0003] The embodiments of the present disclosure provide an image recognition model acquisition and image recognition method, an electronic device, and a storage medium.

[0004] In a first aspect, an embodiment of the present disclosure provides a method for acquiring an image recognition model, the method comprising:

[0005] Get at least one training image;

[0006] Divide each of the training images into a plurality of first regions according to a preset division method; at least two of the plurality of the first regions have a first overlapping region, and each of the first regions corresponds to a first neural network;

[0007] Input each of the first regions into a corresponding first neural network to extract a first feature corresponding to each of the first regions; and input each of the first overlapping regions into a first neural network corresponding to a plurality of first regions overlapping the first overlapping region to extract a plurality of second features of each of the first overlapping regions;

[0008] Calculate a feature error corresponding to each of the first neural networks according to the first feature and / or the second feature;

[0009] When the feature errors corresponding to each of the first neural networks are less than a preset error threshold, the training parameters of each of the first neural networks are saved to obtain the image recognition model.

[0010] In a second aspect, an embodiment of the present disclosure provides an image recognition method, the method comprising:

[0011] Inputting the image to be recognized into a preset image recognition model; the image recognition model is obtained based on the image recognition model acquisition method;

[0012] The image recognition model performs feature extraction on the plurality of third regions into which the image to be recognized is divided, to obtain a plurality of third features;

[0013] Preprocessing the plurality of third features to obtain processed features;

[0014] comparing the processed features with target features of a pre-stored target image;

[0015] When the processed feature matches any one of the target features, it is determined that the identity information of the image to be identified is the identity information corresponding to the matched target image; or, when the processed feature does not match any one of the target features, it is determined that the identity recognition of the image to be identified has failed.

[0016] In a third aspect, an embodiment of the present disclosure provides an electronic device, the electronic device comprising:

[0017] one or more processors;

[0018] A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the image recognition model acquisition method or the image recognition method;

[0019] One or more input / output I / O interfaces are connected between the processor and the memory and are configured to implement information interaction between the processor and the memory.

[0020] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the image recognition model acquisition method or the image recognition method is implemented.

[0021] The disclosed embodiment divides each training image into a plurality of first areas according to a preset division method, and at least two of the plurality of first areas have a first overlapping area, and each first area corresponds to a first neural network; a first feature corresponding to each first area and a second feature of the first overlapping area are obtained based on each first neural network, a feature error is obtained according to the first feature and the second feature, and the feature error is used to determine whether the image recognition model is trained, so that the plurality of first neural networks are trained in linkage during the training process of the image recognition model, and based on the addition of the second feature of the first overlapping area, the training process fully considers the influence between adjacent first areas, so that the features extracted by the trained image recognition model are more comprehensive and robust, thereby improving the recognition accuracy of the image recognition model. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In the accompanying drawings of the embodiments of the present disclosure:

[0023] Figure 1A flow chart of a method for acquiring an image recognition model provided in an embodiment of the present disclosure;

[0024] Figure 2 A schematic diagram of multiple first regions divided by a preset division method provided in an embodiment of the present disclosure;

[0025] Figure 3 A flow chart of a method for calculating a feature error corresponding to each first neural network according to a first feature and / or a second feature when a first region corresponding to any first neural network has a first overlapping region provided in an embodiment of the present disclosure;

[0026] Figure 4 A flow chart of a method for calculating an intra-region feature error of a first region corresponding to any first neural network based on all first features extracted by any first neural network provided in an embodiment of the present disclosure;

[0027] Figure 5 A flow chart of a method for obtaining standard features of each first neural network provided in an embodiment of the present disclosure;

[0028] Figure 6 A flow chart of a method for calculating feature errors of adjacent regions according to second features corresponding to associated overlapping regions provided in an embodiment of the present disclosure;

[0029] Figure 7 A flow chart of a method for calculating a feature error corresponding to each first neural network according to a first feature and / or a second feature when a first region corresponding to any first neural network does not have a first overlapping region provided in an embodiment of the present disclosure;

[0030] Figure 8 A flow chart of an image recognition method provided by an embodiment of the present disclosure;

[0031] Fig. 9 A block diagram of the electronic device provided in the embodiment of the present disclosure;

[0032] Fig.10 A block diagram of the computer-readable storage medium provided for an embodiment of the present disclosure. DETAILED DESCRIPTION

[0033] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the communication perception data processing method and computer-readable storage medium provided by the embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.

[0034] The present disclosure will be described more fully below with reference to the accompanying drawings, but the embodiments shown may be embodied in different forms, and the present disclosure should not be construed as being limited to the embodiments set forth below. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete, and will enable those skilled in the art to fully understand the scope of the present disclosure.

[0035] The accompanying drawings of the embodiments of the present disclosure are used to provide a further understanding of the embodiments of the present disclosure, and constitute a part of the specification, and are used together with the detailed embodiments to explain the present disclosure, and do not constitute a limitation of the present disclosure. By describing the detailed embodiments with reference to the accompanying drawings, the above and other features and advantages will become more apparent to those skilled in the art.

[0036] The present disclosure may be described with reference to plan views and / or cross-sectional views by means of ideal schematic views of the present disclosure. Therefore, the exemplary illustrations may be modified according to manufacturing techniques and / or tolerances.

[0037] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0038] The terms used in the present disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure. The term "and / or" as used in the present disclosure includes any and all combinations of one or more related enumerated items. The singular forms "one" and "the" as used in the present disclosure are also intended to include plural forms, unless the context clearly indicates otherwise. The terms "including", "made of..." as used in the present disclosure specify the presence of the features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof.

[0039] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined in this disclosure.

[0040] The present disclosure is not limited to the embodiments shown in the drawings, but includes modifications of the configurations formed based on the manufacturing process. Therefore, the regions illustrated in the drawings have schematic properties, and the shapes of the regions shown in the drawings illustrate the specific shapes of the regions of the elements, but are not intended to be limiting.

[0041] In recent years, face recognition technology is one of the hottest research topics in the fields of contemporary artificial intelligence, pattern recognition, and computer vision. The main reason that affects face image recognition in face recognition is the occlusion caused by face posture. How to improve the recognition rate of face with posture angles is also a hot topic. At present, there are the following problems in the recognition schemes for posture faces: these methods do not consider the correlation between face regions in feature extraction, and thus do not consider the correlation between the extracted regional features. Therefore, the posture face features extracted from these regions are equivalent to extracting the deep spatial features of each region through a neural network, and then performing a simple weighted recognition. Therefore, the feature extraction of the current scheme is not comprehensive and robust enough, and the image recognition accuracy is low.

[0042] The disclosed embodiment scheme proposes a method for acquiring an image recognition model based on a Markov random field and a corresponding image recognition method. Each training image is divided into multiple first regions according to a preset division method, and at least two of the multiple first regions have a first overlapping region, and each first region corresponds to a first neural network; based on each first neural network, a first feature corresponding to each first region and a second feature of the first overlapping region are obtained, and a feature error is obtained according to the first feature and the second feature, and the feature error is used to determine whether the image recognition model is trained, so that multiple first neural networks are trained in linkage during the training process of the image recognition model, and based on the addition of the second feature of the first overlapping region, the training process fully considers the influence between adjacent first regions, so that the features extracted by the trained image recognition model are more comprehensive and robust, thereby improving the recognition accuracy of the image recognition model.

[0043] The image recognition model acquisition method and the image recognition method of the embodiment of the present disclosure can be executed by any electronic device that requires image recognition, such as a terminal device or a server. The terminal device may include but is not limited to: vehicle-mounted equipment, user equipment (UE), mobile equipment, computing equipment, wearable devices, etc., for example, including but not limited to cellular phones, cordless phones, personal digital assistants (PDA), portable computers, etc. The image recognition model acquisition method and the image recognition method can be implemented by a processor calling a computer-readable program instruction stored in a memory, or can be implemented by a server.

[0044] The following is a detailed introduction to the embodiments of the present disclosure.

[0045] The present disclosure provides a method for obtaining an image recognition model. Figure 1 As shown, the method may include steps S11-S15:

[0046] S11, obtaining at least one training image;

[0047] S12, dividing each training image into a plurality of first regions according to a preset division method; at least two of the plurality of first regions have a first overlapping region, and each first region corresponds to a first neural network;

[0048] S13, inputting each first region into a corresponding first neural network, extracting a first feature corresponding to each first region; and inputting each first overlapping region into a first neural network corresponding to a plurality of first regions constituting the first overlapping region, extracting a plurality of second features of the first overlapping region;

[0049] S14, calculating a feature error corresponding to each first neural network according to the first feature and / or the second feature;

[0050] S15. When the feature errors corresponding to each first neural network are less than a preset error threshold, the training parameters of each first neural network are saved to obtain an image recognition model.

[0051] In the embodiment of the present disclosure, the method may further include:

[0052] When the feature error corresponding to any one or more first neural networks is greater than or equal to the error threshold, the training parameters of the first neural network are adjusted and the process returns to the step of obtaining the training image.

[0053] In the disclosed embodiment, the first neural network can be iteratively trained according to the training image until the feature error of each first neural network is less than the error threshold and the feature error converges. It can be considered that each first neural network has been trained and the training is stopped, so that the global optimal training parameters corresponding to each first neural network are obtained after the training process is completed. Multiple first neural networks with the global optimal training parameters can constitute an image recognition model, or constitute part of an image recognition model.

[0054] In the embodiments of the present disclosure, the training images may be different types of images according to different application scenarios of the embodiments of the present disclosure. For example, in a face recognition scenario, the training images may include multiple face images, and the multiple face images may include face images in multiple postures, such as, including but not limited to frontal face images and side face images; in an object recognition scenario, the training images may include multiple object images, and the multiple object images may include images of a target object (such as a mobile phone) taken from multiple shooting angles, such as, including but not limited to frontal images and side images; in a scenery recognition scenario, the training images may include multiple scenery images, and the multiple scenery images may include images of a target scenery (such as a landmark building in a scenic spot) taken from multiple shooting angles, such as, including but not limited to frontal images and side images.

[0055] In the disclosed embodiment, when the training image includes multiple face images, the training set of face images can use a preset face database, for example, the authorized MS-Celeb-1M face database, which contains a variety of face posture scenes and is an ideal source of face images for network training and testing.

[0056] In the disclosed embodiment, it is known that the original face database image has a lot of noise, so the face image data can be sorted, selected and processed in advance.

[0057] In the embodiments of the present disclosure, after the training images are prepared, the training images may be preprocessed, for example, including but not limited to completing the cropping (or region division, i.e., dividing each training image into a plurality of first regions according to a preset division method) of a target region (such as a face portion) of each training image.

[0058] In the disclosed embodiment, the preset division method may be a uniquely predetermined division method, that is, for each training image, the same division method is used to divide the image so that the format and other information of the sub-images belonging to the same first area divided out are the same, which is conducive to using a first neural network to extract features.

[0059] In an embodiment of the present disclosure, the preset division method may include but is not limited to: the number of first areas divided into each training image, the position, size, shape of each first area, and the position, size, shape of the first overlapping area formed by each first area and the adjacent first area.

[0060] In the embodiment of the present disclosure, for example, the picture may be cropped to a size of 224×224.

[0061] In the embodiments of the present disclosure, Figure 2As shown, it is a schematic diagram of multiple first areas divided by a preset division method according to an embodiment of the present disclosure, wherein the total number of first areas is 6, and the 6 first areas include first areas A1, A2, A3, A4, A5 and A6, respectively, wherein adjacent first areas A1 and A2 have a first overlapping area B1, adjacent first areas A2 and A3 have a first overlapping area B2, adjacent first areas A4 and A5 have a first overlapping area B3, and adjacent first areas A5 and A6 have a first overlapping area B4.

[0062] In the embodiment of the present disclosure, the first overlapping area may also be an overlapping area obtained by overlapping 3, 4, 5, etc., or more first areas. For example, Figure 2 B5 is a first overlapping region formed by overlapping the first regions A1, A4 and A5. Here, there is no limitation on whether the first overlapping region is obtained by overlapping several first regions.

[0063] In the embodiment of the present disclosure, Figure 2 If the first region division method in the example is determined to be the preset division method, each training image is divided according to the preset division method. Figure 2 The first area division method shown is used to perform area division.

[0064] Markov random fields describe that among multiple data points, although there is interaction between two points, it only exists between nearby points and has nothing to do with further away points or the frontmost points. In view of this characteristic, the disclosed embodiment applies it to image region division, so that each divided first overlapping region reflects the correlation between adjacent first regions, and the correlation is referenced in the subsequent training of the first neural network to improve the training effect.

[0065] In the embodiment of the present disclosure, each of the multiple first regions divided according to the above-mentioned preset division method corresponds to a first neural network. For example, Figure 2 The six first areas A1, A2, A3, A4, A5 and A6 shown correspond to the six first neural networks C1, C2, C3, C4, C5 and C6 respectively, wherein the first area A1 can correspond to the first neural network C1, the first area A2 can correspond to the first neural network C2, the first area A3 can correspond to the first neural network C3, the first area A4 can correspond to the first neural network C4, the first area A5 can correspond to the first neural network C5, and the first area A6 can correspond to the first neural network C6.

[0066] In the embodiments of the present disclosure, there is no limitation on the detailed structure of each first neural network, which can be defined according to the requirements.

[0067] In the embodiments of the present disclosure, there are many development frameworks that can be selected, for example, including but not limited to TensorFlow (TensorFlow is an open source software library for high-performance numerical computing), PyTorch (PyTorch framework is currently a very concise, elegant and efficient deep learning framework, PyTorch is an open source Python (a computer programming language) machine learning library, a deep learning framework based on dynamic tensors), Keras (an open source artificial neural network library written in Python), Caffe (a deep learning framework, composed of expression, speed and modularity), etc. The present embodiment can choose the PyTorch framework. For the selection of the first neural network, a CNN (Convolutional Neural Networks) network can be selected, for example, including but not limited to: a 9-layer CNN network, a 16-layer deep convolutional neural network VGG16 (VGG: Visual Geometry Group, a deep convolutional neural network architecture) or a residual network ResNet. The present embodiment can choose an 18-layer residual network ResNet-18.

[0068] In the disclosed embodiment, since there are usually many training images, each divided first area will correspond to many corresponding sub-images. For example, if there are 100 training images, the first area A1 corresponds to 100 first sub-images (some or all of the 100 first sub-images are different), the first area A2 corresponds to 100 second sub-images (some or all of the 100 first sub-images are different), the first area A3 corresponds to 100 third sub-images (some or all of the 100 third sub-images are different), the first area A4 corresponds to 100 fourth sub-images (some or all of the 100 fourth sub-images are different), the first area A5 corresponds to 100 fifth sub-images (some or all of the 100 fifth sub-images are different), and the first area A6 corresponds to 100 sixth sub-images (some or all of the 100 sixth sub-images are different).

[0069] In the disclosed embodiment, the sub-images contained in each first region are respectively input into the corresponding first neural network, and the first feature of each sub-image can be extracted (the first feature can be a feature vector or a feature matrix). For example, 100 first sub-images are input into the first neural network C1, and 100 first features corresponding to the first region A1 can be obtained; 100 second sub-images are input into the first neural network C2, and 100 first features corresponding to the first region A2 can be obtained; 100 third sub-images are input into the first neural network C3, and 100 first features corresponding to the first region A3 can be obtained; 100 fourth sub-images are input into the first neural network C4, and 100 first features corresponding to the first region A4 can be obtained; 100 fifth sub-images are input into the first neural network C5, and 100 first features corresponding to the first region A5 can be obtained; 100 sixth sub-images are input into the first neural network C6, and 100 first features corresponding to the first region A6 can be obtained.

[0070] In the disclosed embodiment, the sub-images corresponding to one or more first overlapping areas (for example, the aforementioned first overlapping areas B1, B2, B3, B4, B5) can also be respectively input into the associated first neural network to obtain multiple second features corresponding to each first overlapping area.

[0071] In the embodiment of the present disclosure, when a first region corresponding to a first neural network is included in a plurality of first regions constituting a first overlapping region, the first overlapping region is determined to be associated with the first neural network, and the first overlapping region can be referred to as an associated overlapping region of the first neural network. For any first neural network, it may be stored in an associated overlapping region, or there may be no associated overlapping region.

[0072] In the embodiment of the present disclosure, since there are usually many training images, each of the divided first overlapping areas will also correspond to multiple sub-images. For example, if there are 100 training images, the first overlapping area B1 corresponds to 100 first overlapping sub-images (some or all of the 100 first overlapping sub-images are different), the first overlapping area B2 corresponds to 100 second overlapping sub-images (some or all of the 100 second overlapping sub-images are different), the first area B3 corresponds to 100 third overlapping sub-images (some or all of the 100 third overlapping sub-images are different), and the first overlapping area B4 corresponds to 100 fourth overlapping sub-images (some or all of the 100 fourth overlapping sub-images are different).

[0073] In the embodiment of the present disclosure, the sub-images contained in each first overlapping area are respectively input into the associated first neural network, and the second features of all the sub-images corresponding to each first overlapping area can be extracted (the second features can be feature vectors or feature matrices).

[0074] In the embodiment of the present disclosure, for example, 100 first overlapping sub-images corresponding to the first overlapping area B1 (composed of the overlapping first areas A1 and A2) are respectively input into the associated first neural networks C1 and C2, and each first overlapping sub-image obtains two second features, then the first overlapping area B1 has a total of 2*100 second features.

[0075] In the embodiment of the present disclosure, for example, 100 second overlapping sub-images corresponding to the first overlapping area B2 (composed of the overlapping first areas A2 and A3) are respectively input into the associated first neural networks C2 and C3, and each second overlapping sub-image obtains two second features, then the first overlapping area B2 has a total of 2*100 second features.

[0076] In the embodiment of the present disclosure, for example, 100 third overlapping sub-images corresponding to the first overlapping area B3 (composed of the overlapping first areas A4 and A5) are respectively input into the associated first neural networks C4 and C5, and each third overlapping sub-image obtains two second features, then the first overlapping area B3 has a total of 2*100 second features.

[0077] In the embodiment of the present disclosure, for example, 100 fourth overlapping sub-images corresponding to the first overlapping area B4 (composed of the overlapping first areas A5 and A6) are respectively input into the associated first neural networks C5 and C6, and each fourth overlapping sub-image obtains two second features, then the first overlapping area B4 has a total of 2*100 second features.

[0078] In the embodiment of the present disclosure, for example, 100 fifth overlapping sub-images corresponding to the first overlapping area B5 (composed of the overlapping first areas A1, A4 and A5) are respectively input into the associated first neural networks C1, C4 and C5, and each fifth overlapping sub-image obtains three second features, then the first overlapping area B4 has a total of 3*100 second features.

[0079] In the embodiment of the present disclosure, the multiple first features and / or multiple second features obtained according to the aforementioned content can be used to calculate the feature error corresponding to each first neural network.

[0080] In the disclosed embodiment, each first neural network corresponds to a standard feature. For example, the first neural network C1 may correspond to the first standard feature, the first neural network C2 may correspond to the second standard feature, the first neural network C3 may correspond to the third standard feature, the first neural network C4 may correspond to the fourth standard feature, the first neural network C5 may correspond to the fifth standard feature, and the first neural network C6 may correspond to the sixth standard feature.

[0081] In the embodiment of the present disclosure, based on the above scheme, the feature error corresponding to each first neural network can be calculated according to the first feature and / or the second feature. Since the embodiment of the present disclosure does not limit the preset division method, some of the multiple first areas divided by the preset division method may have a first overlapping area, and some of the first areas may not have a first overlapping area. Therefore, for the first area without the first overlapping area, when calculating the feature error of the first neural network corresponding to the first area, the feature error of the corresponding first neural network can be calculated only according to the first feature corresponding to the first area; for the first area with the first overlapping area, when calculating the feature error of the first neural network corresponding to the first area, the feature error of the corresponding first neural network can be calculated based on the first feature corresponding to the first area and the second feature of the first overlapping area. The two calculation schemes are respectively introduced in detail below.

[0082] In the embodiments of the present disclosure, Figure 3 As shown, in the case where the first area corresponding to any first neural network has a first overlapping area, the feature error corresponding to each first neural network is calculated according to the first feature and / or the second feature, including steps S21-S24:

[0083] S21, calculating the intra-region feature error of the first region corresponding to any first neural network based on all first features extracted by the any first neural network.

[0084] In the embodiments of the present disclosure, Figure 4 As shown, the intra-region feature error of the first region corresponding to any first neural network is calculated according to all first features extracted by any first neural network, including steps S31-S33:

[0085] S31. Obtain all first features corresponding to any first neural network.

[0086] In the disclosed embodiment, according to the aforementioned embodiment, when there are 100 training images, each first region corresponds to 100 sub-images. Accordingly, the first region corresponding to any first neural network also corresponds to 100 sub-images. By inputting these 100 sub-images into any first neural network, 100 first features corresponding to the first region can be obtained.

[0087] In the embodiment of the present disclosure, according to the change in the number of training images, the number of sub-images corresponding to each first region changes accordingly, and the number of first features extracted by each first neural network also changes accordingly.

[0088] S32: Compare all the first features with the standard features corresponding to any first neural network respectively, and obtain a first difference between each first feature and the standard feature.

[0089] In the embodiments of the present disclosure, Figure 5 As shown, before comparing all the first features with the standard features corresponding to any first neural network, the method may further include steps S41-S43:

[0090] S41, obtaining a preset standard image; the standard image is an image of a target object photographed at a preset shooting angle, and the training image includes at least one image of the target object photographed at a non-preset shooting angle;

[0091] S42, dividing the standard image into regions according to a preset division method to obtain a plurality of second regions; at least two of the plurality of second regions have a second overlapping region, and each second region corresponds to a first neural network;

[0092] S43, inputting each second region into the corresponding first neural network respectively, extracting the second feature corresponding to each second region as the standard feature of the first neural network corresponding to each second region.

[0093] In the embodiment of the present disclosure, in order to obtain the standard features corresponding to each first neural network, a standard image can be taken in advance, and the standard image can be divided in the same preset manner (for example Figure 2 After region division is performed using the division method shown in the figure, the multiple second regions obtained are respectively input into each first neural network for feature extraction, thereby obtaining the standard features corresponding to each first neural network.

[0094] In the embodiment of the present disclosure, the preset shooting requirement may include but is not limited to: a preset shooting angle, a preset shooting pixel, etc. For example, the standard image is an image of the target object shot at a preset shooting angle, and the training image includes at least one image of the target object shot at a non-preset shooting angle.

[0095] In the embodiments of the present disclosure, depending on the purpose of image processing, the standard image can be photographed accordingly according to preset shooting requirements. For example, if the purpose of image processing is to identify the identity information of images in different shooting angles, the standard image can be an image shot at a preset shooting angle. For example, for a face image, the standard image can be a frontal face image, and the training image can include a frontal face image and / or a side face image; if the purpose of image processing is to identify the identity information of images with different pixels, the standard image can be an image shot at preset shooting pixels. For example, in this case, the standard image is a high-definition image, and the training image can include a high-definition image and / or a non-high-definition image.

[0096] In the embodiments of the present disclosure, the above scheme can be used to obtain the standard features corresponding to each first neural network, for example, the first standard feature D1 corresponding to the first neural network C1, the first standard feature D2 corresponding to the first neural network C2, the first standard feature D3 corresponding to the first neural network C3, the first standard feature D4 corresponding to the first neural network C4, the first standard feature D5 corresponding to the first neural network C5, and the first standard feature D6 corresponding to the first neural network C6.

[0097] In the embodiment of the present disclosure, based on the standard feature corresponding to each first neural network, a first difference between the first feature of the first area corresponding to any first neural network and the corresponding standard feature can be calculated.

[0098] In the embodiment of the present disclosure, for example, for the first neural network C1, 100 first sub-images can be respectively input into the first neural network C1 to extract the first features, and 100 first features X1 are obtained. These 100 first features X1 are respectively compared with the first standard features D1 corresponding to the first neural network C1, and 100 first difference values ​​Y1 (the 100 first difference values ​​Y1 are partially different or completely different) can be obtained.

[0099] In the disclosed embodiment, for example, for the first neural network C2, 100 second sub-images can be respectively input into the first neural network C2 to extract the first features, and 100 first features X2 are obtained. These 100 first features X2 are respectively compared with the second standard features D2 corresponding to the first neural network C2, and 100 first difference values ​​Y2 (the 100 first difference values ​​Y2 are partially different or completely different) can be obtained.

[0100] In the embodiment of the present disclosure, for example, for the first neural network C3, 100 third sub-images can be respectively input into the first neural network C3 to extract the first features, and 100 first features X3 are obtained. These 100 first features X3 are respectively compared with the third standard features D3 corresponding to the first neural network C3, and 100 first difference values ​​Y3 (the 100 first difference values ​​Y3 are partially different or completely different) can be obtained.

[0101] In the embodiment of the present disclosure, for example, for the first neural network C4, 100 fourth sub-images can be respectively input into the first neural network C4 to extract the first features, and 100 first features X4 are obtained. These 100 first features X4 are respectively compared with the fourth standard features D4 corresponding to the first neural network C4, and 100 first difference values ​​Y4 (the 100 first difference values ​​Y4 are partially different or completely different) can be obtained.

[0102] In the embodiment of the present disclosure, for example, for the first neural network C5, 100 fifth sub-images can be respectively input into the first neural network C5 to extract the first features, and 100 first features X5 are obtained. These 100 first features X5 are respectively compared with the fifth standard features D5 corresponding to the first neural network C5, and 100 first difference values ​​Y5 (the 100 first difference values ​​Y5 are partially different or completely different) can be obtained.

[0103] In the embodiment of the present disclosure, for example, for the first neural network C6, 100 sixth sub-images can be respectively input into the first neural network C6 to extract the first features, and 100 first features X6 are obtained. These 100 first features X6 are respectively compared with the sixth standard feature D6 corresponding to the first neural network C6, and 100 first difference values ​​Y6 (the 100 first difference values ​​Y6 are partially different or completely different) can be obtained.

[0104] In the embodiment of the present disclosure, from the above content, it can be known that for the 6 first neural networks C1, C2, C3, C4, C5, and C6, 100 first differences can be obtained respectively: 100 first differences Y1, 100 first differences Y2, 100 first differences Y3, 100 first differences Y4, 100 first differences Y5, and 100 first differences Y6.

[0105] S33. Calculate the intra-region feature error corresponding to the first region according to all the first difference values.

[0106] In the embodiment of the present disclosure, the intra-region feature error corresponding to the first region is calculated according to all the first difference values, and may include but is not limited to:

[0107] When the first difference is 1, the square of the first difference is calculated to obtain the characteristic error within the region; or,

[0108] In the case where there are multiple first difference values, the sum of squares of the multiple first difference values ​​is calculated to obtain the characteristic error within the region.

[0109] In the embodiment of the present disclosure, for example, for the first neural network C1, 100 first difference values ​​Y1 are obtained, each first difference value Y1 corresponds to a vector, called a first difference vector, and the sum of the squares of the components in each first difference vector is calculated as a characteristic difference value corresponding to the first difference value Y1. The characteristic difference values ​​corresponding to the 100 first difference values ​​Y1 are added together to obtain the intra-regional characteristic error of the first region A1 corresponding to the first neural network C1.

[0110] In the embodiment of the present disclosure, the characteristic error in the region may be calculated based on the following first calculation formula:

[0111]

[0112] Wherein, E1(Y) represents the first difference Y i The calculated feature error in the region, Y i represents the i-th first difference, i is a positive integer, and n is the total number of first differences.

[0113] In the embodiment of the present disclosure, since Y i =X i -D i , where X i is the i-th first feature, D i is the standard feature of the first neural network corresponding to the i-th first feature, then

[0114] In the embodiments of the present disclosure, according to different application scenarios or requirements, other methods can be used to obtain the intra-regional characteristic error corresponding to the first region, and are not limited to calculating the square or sum of squares of the first difference. The method for obtaining the intra-regional characteristic error is not limited here, and any scheme that can obtain the intra-regional characteristic error of the first region can be implemented.

[0115] S22. Select an associated overlapping region associated with any first neural network from all first overlapping regions; wherein the plurality of first regions constituting the associated overlapping region include a first region corresponding to any first neural network.

[0116] In the embodiment of the present disclosure, it can be seen from the foregoing that the associated overlapping area is an area associated with the arbitrary first neural network, that is, the first area constituting the associated overlapping area includes the first area corresponding to the arbitrary first neural network.

[0117] In the embodiment of the present disclosure, for example, the associated overlapping areas of the first neural network C1 (corresponding to the first area A1) include the first overlapping area B1 and the first overlapping area B5, because the first overlapping area B1 is composed of the first area A1 and the first area A2, and includes the first area A1, and the first overlapping area B5 is composed of the first area A1, the first area A4 and the first area A5, and also includes the first area A1.

[0118] In the embodiment of the present disclosure, for example, the associated overlapping area of ​​the first neural network C2 (corresponding to the first area A2) includes the first overlapping area B1 and the first overlapping area B2, because the first overlapping area B1 is composed of the first area A1 and the first area A2, and includes the first area A2, and the first overlapping area B2 is composed of the first area A2 and the first area A3, and also includes the first area A2.

[0119] In the embodiment of the present disclosure, for example, the associated overlapping area of ​​the first neural network C3 (corresponding to the first area A3) includes the first overlapping area B2, because the first overlapping area B2 is composed of the first area A2 and the first area A3, and also includes the first area A3.

[0120] In the embodiment of the present disclosure, for example, the associated overlapping areas of the first neural network C4 (corresponding to the first area A4) include the first overlapping area B3 and the first overlapping area B5, because the first overlapping area B3 is composed of the first area A4 and the first area A5, and includes the first area A4, and the first overlapping area B5 is composed of the first area A1, the first area A4 and the first area A5, and also includes the first area A4.

[0121] In the embodiment of the present disclosure, for example, the associated overlapping areas of the first neural network C5 (corresponding to the first area A5) include the first overlapping area B3, the first overlapping area B4 and the first overlapping area B5, because the first overlapping area B3 is composed of the first area A4 and the first area A5, and includes the first area A5, the first overlapping area B4 is composed of the first area A5 and the first area A6, and also includes the first area A5, and the first overlapping area B5 is composed of the first area A1, the first area A4 and the first area A5, and also includes the first area A5.

[0122] In the embodiment of the present disclosure, for example, the associated overlapping area of ​​the first neural network C6 (corresponding to the first area A6) includes the first overlapping area B4, because the first overlapping area B4 is composed of the first area A5 and the first area A6, including the first area A6.

[0123] S23. Calculate the adjacent region feature error according to the second feature corresponding to the associated overlapping region.

[0124] In an embodiment of the present disclosure, based on the associated overlapping area of ​​each first neural network determined by the above scheme, for any first neural network, the adjacent area feature error of the first area corresponding to the arbitrary first neural network can be calculated according to the second feature of the associated overlapping area of ​​the arbitrary first neural network.

[0125] In the embodiments of the present disclosure, Figure 6 As shown, the adjacent region feature error is calculated according to the second feature corresponding to the associated overlapping region, including steps S51-S53:

[0126] S51. From all the second features corresponding to the associated overlapping areas, select the second features extracted by any first neural network as associated features, and from all the second features corresponding to the associated overlapping areas, select the features other than the associated features as non-associated features.

[0127] In the embodiment of the present disclosure, each associated overlapping area is composed of multiple first areas. When the associated overlapping area is input into the first neural network corresponding to these first areas, multiple corresponding second features will also be obtained. When calculating the feature error of adjacent areas for any first neural network, among the multiple second features corresponding to each associated overlapping area of ​​the arbitrary first neural network, only one is a key second feature, which can be called an associated feature, that is, the second feature obtained by extracting features from the associated overlapping area by the arbitrary first neural network. Among the multiple second features corresponding to each associated overlapping area, the second feature that is not extracted from the associated overlapping area by the arbitrary first neural network can be called a non-associated feature.

[0128] In the embodiment of the present disclosure, for example, for the first neural network C1, its associated overlapping area includes a first overlapping area B1 and a first overlapping area B5; wherein, the first overlapping area B1 (composed of the first area A1 and the first area A2) includes the second feature E1 obtained by inputting the first neural network C1 (the second feature obtained by inputting the first neural network C1 corresponding to the first area A1), and the second feature E2 obtained by inputting the first neural network C2 (the second feature obtained by inputting the first neural network C2 corresponding to the first area A2), then for the first neural network C1, the second feature E1 is an associated feature, and the second feature E2 is a non-associated feature; the first overlapping area B5 (composed of the first area A1, the first area A4 and the first area A5) includes the second feature E3 obtained by inputting the first neural network C1, the second feature E4 obtained by inputting the first neural network C4, and the second feature E5 obtained by inputting the first neural network C5, then for the first neural network C1, the second feature E3 is an associated feature, and the second feature E4 and the second feature E5 are non-associated features.

[0129] In the disclosed embodiment, for other first neural networks, the principles are the same as the first neural network C1 and will not be described in detail here.

[0130] S52: Calculate a second difference between the associated feature and each non-associated feature.

[0131] In the embodiment of the present disclosure, for each associated overlapping region of the arbitrary first neural network, the following operations may be performed on the associated features and non-associated features in each of the associated overlapping regions: a second difference between the associated feature and each non-associated feature is calculated.

[0132] In the embodiments of the present disclosure, for example, for the first neural network C1, its associated overlapping areas include a first overlapping area B1 and a first overlapping area B5, wherein, when calculating the second difference for the first overlapping area B1, the associated feature E1 can be subtracted from the non-associated feature E2 to obtain a second difference F1; when calculating the second difference for the first overlapping area B5, the associated feature E3 can be subtracted from the non-associated feature E4 to obtain a second difference F2, and the associated feature E3 can be subtracted from the non-associated feature E5 to obtain another second difference F3.

[0133] In the embodiments of the present disclosure, the associated feature E1, the non-associated feature E2, the associated feature E3, the non-associated feature E4 and the non-associated feature E5 can all be feature vectors. When the associated feature E1 is subtracted from the non-associated feature E2, the corresponding components in the feature vector can be subtracted to obtain the second difference F1, and the second difference F1 is also the first feature vector; similarly, when the associated feature E3 is subtracted from the non-associated feature E4, the corresponding components in the feature vector can be subtracted to obtain the second difference F2, and the second difference F2 is also the first feature vector; similarly, when the associated feature E3 is subtracted from the non-associated feature E5, the corresponding components in the feature vector can be subtracted to obtain the second difference F3, and the second difference F3 is also the first feature vector.

[0134] In the disclosed embodiment, for other first neural networks, the principles are the same as the first neural network C1 and will not be described in detail here.

[0135] S53, calculating the adjacent region feature error corresponding to the first region according to all the second difference values.

[0136] In the embodiment of the present disclosure, the feature error of the adjacent region corresponding to the first region is calculated according to all the second differences, which may include but is not limited to:

[0137] When the second difference is 1, the square of the second difference is calculated to obtain the adjacent region feature error; or,

[0138] In the case where there are multiple second difference values, the square sum of the multiple second difference values ​​is calculated to obtain the adjacent region feature error.

[0139] In the embodiment of the present disclosure, for example, for the first neural network C1 described above, if the first neural network C1 has only one associated overlapping region, the first overlapping region B1, then the adjacent region feature error of the first region corresponding to the first neural network C1 can be calculated as the square of the second difference F1. In the embodiment of the present disclosure, the first neural network C1 has two associated overlapping regions, the first overlapping region B1 and the first overlapping region B5, then the adjacent region feature error of the first region corresponding to the first neural network C1 can be calculated as the sum of the square of the second difference F1, the square of the second difference F2, and the square of the second difference F3.

[0140] In the embodiment of the present disclosure, the adjacent region feature error may be calculated based on the following second calculation formula:

[0141]

[0142] Wherein, E2(F) represents the second difference F j The calculated adjacent region feature error, F j represents the jth second difference, j is a positive integer, and m is the total number of second differences.

[0143] In the embodiment of the present disclosure, since F j =E b -E j , where E b is the correlation feature corresponding to the current first neural network, E j is the jth non-correlated feature corresponding to the current first neural network, then

[0144] In the embodiments of the present disclosure, according to different application scenarios or requirements, other methods can be used to obtain the adjacent area characteristic error corresponding to the first area, and are not limited to calculating the square or the sum of squares of the second difference. There is no limitation on the method for obtaining the adjacent area characteristic error, and any scheme that can obtain the adjacent area characteristic error of the first area can be implemented.

[0145] S24, calculating the feature error corresponding to any first neural network based on the feature error within the region and the feature error of the adjacent region.

[0146] In the embodiment of the present disclosure, the feature error corresponding to any first neural network is calculated according to the feature error within the region and the feature error of the adjacent region, including:

[0147] The sum of the feature error within the region and the feature error of the adjacent region is calculated to obtain the feature error corresponding to any first neural network.

[0148] In the embodiment of the present disclosure, the characteristic error corresponding to any first neural network can be calculated based on the following third calculation formula:

[0149] E3=E1(Y)+λE2(F);

[0150] Among them, E3 represents the feature error, λ is a regularization parameter, which can be used to represent the weight relationship between the feature error of the adjacent area corresponding to the arbitrary first neural network and the feature error of the adjacent area iterated by the first neural network corresponding to the first area near the first area corresponding to the arbitrary first neural network, and λ can take the value of 1.

[0151] In the embodiments of the present disclosure, according to different application scenarios or requirements, other methods can be used to obtain the feature error corresponding to any first neural network. It is not limited to calculating the sum of the feature error in the area and the feature error in the adjacent area. For example, the average value can also be calculated. There is no limitation on the method for obtaining the feature error. Any solution that can obtain the feature error corresponding to any first neural network can be implemented.

[0152] In the embodiments of the present disclosure, Figure 7 As shown, in the case where the first area corresponding to any first neural network does not have a first overlapping area, the feature error corresponding to each first neural network is calculated according to the first feature and / or the second feature, including steps S61-S62:

[0153] S61, calculating the intra-region feature error based on all first features of the first region corresponding to any first neural network.

[0154] In the embodiment of the present disclosure, the implementation method of this step is the same as the method in the aforementioned steps S31 to S33, and will not be repeated here.

[0155] S62, taking the feature error in the region as the feature error corresponding to any first neural network.

[0156] In the disclosed embodiment, after obtaining the characteristic error corresponding to each first neural network through the above scheme, the characteristic error can be compared with a preset error threshold, so as to determine whether each characteristic error converges according to the comparison result, thereby determining whether the corresponding first neural network has been trained.

[0157] In the disclosed embodiment, after each first neural network is trained, an image recognition model can be obtained.

[0158] In the embodiment of the present disclosure, the image recognition model may include: a plurality of first neural networks; the number of the plurality of first neural networks is the same as the number of regions divided according to the preset division method;

[0159] or,

[0160] The image recognition model includes: a pre-processing network and a plurality of first neural networks; the output of the pre-processing network is respectively connected to the input of the plurality of first neural networks;

[0161] The pre-processing network is configured to divide the image input to the pre-processing network into regions according to a preset division method, wherein at least two regions among the multiple divided regions have overlapping regions.

[0162] In the embodiment of the present disclosure, the image recognition model of the embodiment of the present disclosure may have an image segmentation function or may not have an image segmentation function, and can be defined according to needs.

[0163] In the disclosed embodiment, the disclosed embodiment scheme forms a Markov random field by overlappingly dividing the training image, and each divided first area and the first area near the first area. When the first neural network corresponding to the first area is used to extract the first feature (such as deep space feature) of each first area, the training of each first snake network is realized, and the corresponding training parameters are extracted. The difference between the feature values ​​corresponding to the overlapping area of ​​any first area and the adjacent area of ​​the first area is considered, and the difference is fed back to the first neural network corresponding to the first area, so as to obtain the global optimal training parameters of the first neural network corresponding to the first area. The image features extracted by the image recognition model obtained by the disclosed embodiment scheme are more comprehensive and robust, which improves the image recognition effect. For example, for face images, it can achieve good recognition effects for faces with different postures.

[0164] The present disclosure also provides an image recognition method, such as Figure 8 As shown, the method may include steps S71-S75:

[0165] S71, inputting the image to be recognized into a preset image recognition model; the image recognition model is obtained based on the image recognition model acquisition method;

[0166] S72, extracting features from the plurality of third regions into which the image to be recognized is divided by the image recognition model to obtain a plurality of third features;

[0167] S73, preprocessing the plurality of third features to obtain processed features;

[0168] S74, comparing the processed features with the target features of the pre-stored target image;

[0169] S75. When the processed feature matches any target feature, determine that the identity information of the image to be identified is the identity information corresponding to the matched target image; or, when the processed feature does not match any target feature, determine that the identity identification of the image to be identified fails.

[0170] In the embodiment of the present disclosure, preprocessing the multiple third features may include but is not limited to: splicing the multiple third features.

[0171] In the disclosed embodiment, multiple fourth features of the target image can be extracted in advance by an image recognition model, and the fourth features are preprocessed (e.g., spliced) to obtain the target features for storage. The preprocessing method of the fourth features is exactly the same as the preprocessing method of the third features.

[0172] In the disclosed embodiment, the spliced ​​features of the image to be identified can be compared with the spliced ​​target features to detect whether the processed features match the target features, and the recognition result of the image to be identified is determined based on the comparison result.

[0173] In an embodiment of the present disclosure, detecting whether the processed feature matches the target feature may include: detecting the similarity (for example, cosine similarity) between the processed feature and the target feature; if the similarity between the processed feature and the target feature is greater than or equal to a preset similarity threshold, it can be determined that the processed feature matches the target feature; if the similarity between the processed feature and the target feature is less than the preset similarity threshold, it can be determined that the processed feature does not match the target feature.

[0174] In the embodiment of the present disclosure, when the image recognition model includes a plurality of second neural networks, before inputting the image to be recognized into the preset image recognition model, the method may further include:

[0175] The image to be recognized is divided into regions according to a preset division method to obtain multiple third regions; at least two of the multiple third regions have a third overlapping region, and each third region corresponds to a second neural network.

[0176] In the embodiment of the present disclosure, when the image recognition model does not include a pre-processing network, the image to be recognized can be pre-processed, that is, the work of the pre-processing network is completed outside the image recognition model, and the processing result is input into the image recognition model for feature extraction.

[0177] In the embodiment of the present disclosure, inputting the image to be recognized into a preset image recognition model includes: inputting the plurality of third regions into the image recognition model respectively.

[0178] In the embodiment of the present disclosure, the image recognition model performs feature extraction on the plurality of third regions into which the image to be recognized is divided, and obtains a plurality of third features, including:

[0179] The plurality of second neural networks respectively perform feature extraction on the plurality of third regions to obtain a plurality of third features.

[0180] In the embodiment of the present disclosure, multiple third regions can be respectively input into corresponding multiple second neural networks to extract third features.

[0181] In the embodiment of the present disclosure, when the image recognition model includes: a pre-processing network and a plurality of second neural networks, and the output of the pre-processing network is respectively connected to the input of the plurality of second neural networks, the image recognition model performs feature extraction on the plurality of third regions into which the image to be recognized is divided, and obtains a plurality of third features, including:

[0182] The pre-processing network divides the image to be recognized into regions according to a preset division method to obtain a plurality of third regions; at least two of the plurality of third regions have a third overlapping region, and each third region corresponds to a second neural network;

[0183] The plurality of second neural networks respectively perform feature extraction on the plurality of third regions to obtain a plurality of third features.

[0184] In the embodiment of the present disclosure, when the image recognition model includes a pre-processing network and multiple second neural networks, no pre-processing is required for the image to be recognized, and the image recognition work can be automatically completed by directly inputting the image to be recognized into the image recognition model of the embodiment of the present disclosure.

[0185] The present disclosure also provides an electronic device 100, such as Fig. 9 As shown, the electronic device 100 includes:

[0186] One or more processors 101;

[0187] A memory 102 having one or more programs stored thereon, which, when executed by one or more processors 101, enables one or more processors 101 to implement the image recognition model acquisition method or the image recognition method;

[0188] One or more input / output I / O interfaces 103 are connected between the processor 101 and the memory 102 and are configured to implement information interaction between the processor 101 and the memory 102 .

[0189] Among them, the processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU) and the like; the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus) and the like.

[0190] In some embodiments, the processor 101 , the memory 102 , and the I / O interface 103 are connected to each other via a bus 104 , and further connected to other components of the computing device.

[0191] The present disclosure also provides a computer-readable storage medium 200, such as Fig.10 As shown, a computer program is stored on the computer-readable storage medium 200, and when the computer program is executed by the processor, the image recognition model acquisition method or the image recognition method is implemented.

[0192] Those skilled in the art will appreciate that all or some of the functional modules / units disclosed above may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0193] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation.

[0194] Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-temporary medium) and a communication medium (or temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH) or other disk storage; read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical disk storage; magnetic cassettes, magnetic tapes, disk storage or other magnetic storage; any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0195] The present disclosure has disclosed example embodiments, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A method for acquiring an image recognition model, characterized in that: The method comprises: Get at least one training image; Divide each of the training images into a plurality of first regions according to a preset division method; at least two of the plurality of the first regions have a first overlapping region, and each of the first regions corresponds to a first neural network; Input each of the first regions into a corresponding first neural network to extract a first feature corresponding to each of the first regions; and input each of the first overlapping regions into a first neural network corresponding to a plurality of first regions constituting the first overlapping region to extract a plurality of second features of the first overlapping region; Calculate a feature error corresponding to each of the first neural networks according to the first feature and / or the second feature; When the feature errors corresponding to each of the first neural networks are less than a preset error threshold, the training parameters of each of the first neural networks are saved to obtain the image recognition model.

2. The image recognition model acquisition method according to claim 1, characterized in that: The method further comprises: When the feature error corresponding to any one or more of the first neural networks is greater than or equal to the error threshold, after adjusting the training parameters of the first neural network, return to the step of obtaining at least one training image.

3. The image recognition model acquisition method according to claim 1, characterized in that: In the case where the first area corresponding to any first neural network has the first overlapping area, the calculating the feature error corresponding to each first neural network according to the first feature and / or the second feature includes: Calculating an intra-region feature error of a first region corresponding to any first neural network based on all first features extracted by any first neural network; Selecting an associated overlapping region associated with the arbitrary first neural network from all the first overlapping regions; wherein the plurality of first regions constituting the associated overlapping region include a first region corresponding to the arbitrary first neural network; Calculating the adjacent region feature error according to the second feature corresponding to the associated overlapping region; The feature error corresponding to the arbitrary first neural network is calculated based on the feature error within the area and the feature error of the adjacent area.

4. The image recognition model acquisition method according to claim 1, characterized in that: In the case where the first area corresponding to any first neural network does not have the first overlapping area, calculating the feature error corresponding to each first neural network according to the first feature and / or the second feature includes: Calculating an intra-region feature error of a first region corresponding to any first neural network based on all first features extracted by any first neural network; The characteristic error in the region is used as the characteristic error corresponding to the arbitrary first neural network.

5. The image recognition model acquisition method according to claim 3 or 4, characterized in that: Each of the first neural networks corresponds to a standard feature; The calculating the intra-region feature error of the first region corresponding to the arbitrary first neural network according to all the first features extracted by the arbitrary first neural network comprises: Obtaining all of the first features extracted by any first neural network; Compare all the first features with the standard features corresponding to the arbitrary first neural network respectively, and obtain a first difference between each of the first features and the standard feature; The intra-region feature error corresponding to the first region is calculated based on all the first differences.

6. The image recognition model acquisition method according to claim 5, characterized in that: Before comparing all the first features with the standard features corresponding to any first neural network, the method further includes: Acquire a preset standard image; the standard image is an image of the target object photographed according to preset shooting requirements, and the training image includes at least one image of the target object photographed according to non-preset shooting requirements; Dividing the standard image into regions according to the preset division method to obtain a plurality of second regions; at least two of the plurality of second regions have a second overlapping region, and each of the second regions corresponds to one of the first neural networks; Each of the second regions is input into the corresponding first neural network respectively, and the second feature corresponding to each of the second regions is extracted as the standard feature of the first neural network corresponding to each of the second regions.

7. The image recognition model acquisition method according to claim 5, characterized in that: Calculating the feature error in the region corresponding to the first region according to all the first differences includes: When the first difference is 1, the square of the first difference is calculated to obtain the characteristic error within the region; or In the case where there are multiple first difference values, the sum of squares of the multiple first difference values ​​is calculated to obtain the characteristic error within the region.

8. The image recognition model acquisition method according to claim 3, characterized in that: The calculating the adjacent region feature error according to the second feature corresponding to the associated overlapping region includes: Selecting, from among all the second features corresponding to the associated overlapping regions, the second features extracted by the arbitrary first neural network as associated features, and selecting, from among all the second features corresponding to the associated overlapping regions, features other than the associated features as non-associated features; Calculating a second difference between the associated feature and each of the non-associated features; The adjacent region feature error corresponding to the first region is calculated according to all the second difference values.

9. The image recognition model acquisition method according to claim 8, characterized in that: The calculating the adjacent region feature error corresponding to the first region according to all the second differences includes: When the second difference is one, the adjacent region feature error is obtained by calculating the square of the second difference; or In the case where there are multiple second difference values, the adjacent region feature error is obtained by calculating the sum of squares of the multiple second difference values.

10. The image recognition model acquisition method according to claim 3, characterized in that: The calculating the feature error corresponding to the arbitrary first neural network according to the feature error within the region and the feature error of the adjacent region comprises: The sum of the feature error within the region and the feature error of the adjacent region is calculated to obtain the feature error corresponding to the arbitrary first neural network.

11. The method for acquiring an image recognition model according to any one of claims 1 to 4, characterized in that: The image recognition model includes: a plurality of the first neural networks; the number of the plurality of the first neural networks is the same as the number of regions divided according to the preset division method; or, The image recognition model includes: a pre-processing network and a plurality of the first neural networks; the output of the pre-processing network is respectively connected to the input of the plurality of the first neural networks; The pre-processing network is configured to divide the image input into regions according to the preset division method, wherein at least two regions among the multiple divided regions have overlapping regions.

12. An image recognition method, characterized in that: The method comprises: Inputting the image to be recognized into a preset image recognition model; the image recognition model is obtained based on the image recognition model acquisition method according to any one of claims 1 to 11; The image recognition model performs feature extraction on the plurality of third regions into which the image to be recognized is divided, to obtain a plurality of third features; Preprocessing the plurality of third features to obtain processed features; comparing the processed features with target features of a pre-stored target image; When the processed feature matches any one of the target features, it is determined that the identity information of the image to be identified is the identity information corresponding to the matched target image; or, when the processed feature does not match any one of the target features, it is determined that the identity recognition of the image to be identified has failed.

13. The image recognition method according to claim 12, characterized in that: In the case where the image recognition model includes a plurality of second neural networks, before the image to be recognized is input into the preset image recognition model, the method further includes: The image to be identified is divided into regions according to a preset division method to obtain a plurality of the third regions; at least two of the plurality of the third regions have a third overlapping region, and each of the third regions corresponds to one of the second neural networks.

14. The image recognition method according to claim 13, characterized in that: Inputting the image to be recognized into a preset image recognition model comprises: inputting the plurality of third areas into the image recognition model respectively; and / or, The step of extracting features from the plurality of third regions into which the image to be recognized is divided by the image recognition model to obtain a plurality of third features includes: A plurality of the second neural networks are used to perform feature extraction on the plurality of the third regions respectively to obtain a plurality of the third features.

15. The image recognition method according to claim 12, characterized in that: In the case where the image recognition model includes: a pre-processing network and a plurality of second neural networks, and the output of the pre-processing network is respectively connected to the input of the plurality of second neural networks, the image recognition model performs feature extraction on the plurality of third regions into which the image to be recognized is divided to obtain a plurality of third features, including: The pre-processing network divides the image to be recognized into regions according to a preset division method to obtain a plurality of the third regions; at least two of the plurality of the third regions have a third overlapping region, and each of the third regions corresponds to one of the second neural networks; A plurality of the second neural networks are used to perform feature extraction on the plurality of the third regions respectively to obtain a plurality of the third features.

16. An electronic device, characterized in that: The electronic device comprises: one or more processors; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the image recognition model acquisition method described in any one of claims 1 to 11, or the image recognition method described in any one of claims 12 to 15; One or more input / output I / O interfaces are connected between the processor and the memory and are configured to implement information interaction between the processor and the memory.

17. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the image recognition model acquisition method described in any one of claims 1 to 11, or the image recognition method described in any one of claims 12 to 15.