Target recognition method, device and storage medium
By introducing correction parameter prediction networks into the target recognition system to correct the image color and combining with the target recognition network, the impact of image color changes on recognition accuracy is solved and the recognition effect is improved.
Patent Information
- Application Number
- CN202010753181.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-30
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2040-07-30
AI Technical Summary
The complex image shooting scene and color changes lead to low accuracy in target recognition, which is difficult for the existing technology to effectively solve this problem.
The correction parameter prediction network performs color correction of the image to be recognized by the correction parameter prediction network to obtain images suitable for target recognition, and uses the target recognition network to identify them. The correction parameter prediction network is optimized based on the backpropagation error of the target recognition network.
It improves the accuracy of target recognition and can accurately identify text, faces, license plates and other targets in the image under complex and changeable ambient light.
Smart Images

Figure CN111898535B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to a target recognition method, device and storage medium. Background Art
[0002] With the development of image processing technology, the application of target recognition technology based on neural networks is increasing, among which the recognized targets are text, faces, license plates, etc. in images. However, due to the complexity and variability of image shooting scenes, or other human or natural reasons, the collected images have color changes, and image color changes may bring certain obstacles to target recognition. For example, darker colors and more exposure lead to lower accuracy of target recognition. Therefore, it is urgent to propose a target recognition method to improve the accuracy of target recognition. Summary of the invention
[0003] The embodiments of the present application provide a target recognition method, device and storage medium, which can improve the accuracy of target recognition. The technical solution is as follows:
[0004] In one aspect, a target recognition method is provided, the method comprising:
[0005] Inputting a first image of a target to be identified into a correction parameter prediction network to obtain a first color correction parameter;
[0006] Performing color correction on the first image according to the first color correction parameter to obtain a second image;
[0007] Performing target recognition on the second image according to the target recognition network to obtain a target recognition result;
[0008] The target recognition network is trained based on multiple sample images and annotation information of each sample image in the multiple sample images, and the correction parameter prediction network is trained based on the back propagation error in the training process of the target recognition network.
[0009] Optionally, before performing color correction on the first image according to the first color correction parameter to obtain the second image, the method further includes:
[0010] Acquire the multiple sample images and the annotation information of each sample image in the multiple sample images;
[0011] The initial recognition network is trained according to the multiple sample images and the annotation information of each sample image in the multiple sample images, and the recognition parameters in the initial recognition network and the correction parameters in the initial parameter prediction network are updated according to the back propagation error corresponding to each sample image during the training process to obtain the target recognition network and the correction parameter prediction network.
[0012] Optionally, the training of the initial recognition network according to the multiple sample images and the annotation information of each sample image in the multiple sample images, and updating the recognition parameters in the initial recognition network and the correction parameters in the initial parameter prediction network according to the back propagation error corresponding to each sample image in the training process to obtain the target recognition network and the correction parameter prediction network includes:
[0013] Select one sample image from the multiple sample images, and perform the following operations according to the selected sample image until the following operations have been performed according to each sample image in the multiple sample images:
[0014] Inputting the selected sample image into the parameter prediction network after the correction parameters were last updated to obtain the correction prediction parameters, wherein when the selected sample image is the first selected sample image, the parameter prediction network after the correction parameters were last updated refers to the initial parameter prediction network;
[0015] performing color correction on the selected sample image according to the correction prediction parameter to obtain a corrected sample image;
[0016] According to the rectified sample image and the annotation information of the selected sample image, the recognition network after the last update of the recognition parameters is trained, and the back propagation error corresponding to the selected sample image is determined, wherein when the selected sample image is the first selected sample image, the recognition network of the last update of the recognition parameters refers to the initial recognition network;
[0017] According to the back propagation error corresponding to the selected sample image, the recognition parameters in the recognition network after the recognition parameters were last updated and the correction parameters in the parameter prediction network after the correction parameters were last updated are updated.
[0018] Optionally, performing color correction on the selected sample image according to the correction prediction parameter to obtain a corrected sample image includes:
[0019] According to the correction prediction parameters and the preset correction parameters, color correction is performed on the selected sample image to obtain the corrected sample image, the correction prediction parameters and the preset correction parameters both include K scalar values, and the K scalar values included in the preset correction parameters correspond one-to-one to the K scalar values included in the correction prediction parameters.
[0020] Optionally, performing color correction on the selected sample image according to the correction prediction parameter and the preset correction parameter to obtain the corrected sample image includes:
[0021] According to the correction prediction parameter and the preset correction parameter, color correction is performed on the selected sample image by the following formula to obtain the corrected sample image;
[0022]
[0023] Wherein, in the above formula, i is an integer greater than or equal to 1 and less than or equal to K, ω i is the scalar value of the correction prediction parameter, β i is the i-th scalar value included in the preset correction parameter, x is the normalized pixel value of any pixel point included in the selected sample image, and f(x) is the normalized pixel value of the pixel point corresponding to x in the pixel points included in the corrected sample image.
[0024] In another aspect, a target recognition device is provided, the device comprising:
[0025] A parameter prediction module, used for inputting a first image of a target to be identified into a correction parameter prediction network to obtain a first color correction parameter;
[0026] a color correction module, configured to perform color correction on the first image according to the first color correction parameter to obtain a second image;
[0027] A target recognition module, used to perform target recognition on the second image according to a target recognition network to obtain a target recognition result;
[0028] The target recognition network is trained based on multiple sample images and annotation information of each sample image in the multiple sample images, and the correction parameter prediction network is trained based on the back propagation error in the training process of the target recognition network.
[0029] Optionally, the device further comprises:
[0030] An acquisition module, used to acquire the multiple sample images and the annotation information of each sample image in the multiple sample images;
[0031] A training module is used to train an initial recognition network based on the multiple sample images and the annotation information of each sample image in the multiple sample images, and to update the recognition parameters in the initial recognition network and the correction parameters in the initial parameter prediction network according to the back propagation error corresponding to each sample image during the training process, so as to obtain the target recognition network and the correction parameter prediction network.
[0032] Optionally, the training module includes:
[0033] a selection unit, configured to select a sample image from the plurality of sample images, and trigger the parameter prediction unit, the color correction unit, the training unit, and the updating unit in sequence to perform corresponding operations according to the selected sample image, until the execution of the corresponding operation is triggered according to each of the plurality of sample images;
[0034] The parameter prediction unit is used to input the selected sample image into the parameter prediction network after the correction parameters were last updated to obtain the correction prediction parameters, wherein when the selected sample image is the first selected sample image, the parameter prediction network after the correction parameters were last updated refers to the initial parameter prediction network;
[0035] The color correction unit is used to perform color correction on the selected sample image according to the correction prediction parameter to obtain a corrected sample image;
[0036] The training unit is used to train the recognition network after the last update of the recognition parameters according to the annotation information of the corrected sample image and the selected sample image, and determine the back propagation error corresponding to the selected sample image, wherein when the selected sample image is the first selected sample image, the recognition network of the last update of the recognition parameters refers to the initial recognition network;
[0037] The updating unit is used to update the recognition parameters in the recognition network after the recognition parameters were last updated and the correction parameters in the parameter prediction network after the correction parameters were last updated according to the back propagation error corresponding to the selected sample image.
[0038] Optionally, the color correction unit includes:
[0039] The color correction subunit is used to perform color correction on the selected sample image according to the correction prediction parameters and the preset correction parameters to obtain the corrected sample image, wherein the correction prediction parameters and the preset correction parameters both include K scalar values, and the K scalar values included in the preset correction parameters correspond one-to-one to the K scalar values included in the correction prediction parameters.
[0040] Optionally, the color correction subunit is specifically used for:
[0041] According to the correction prediction parameter and the preset correction parameter, color correction is performed on the selected sample image by the following formula to obtain the corrected sample image;
[0042]
[0043] Wherein, in the above formula, i is an integer greater than or equal to 1 and less than or equal to K, ωi is the scalar value of the correction prediction parameter, β i is the i-th scalar value included in the preset correction parameter, x is the normalized pixel value of any pixel point included in the selected sample image, and f(x) is the normalized pixel value of the pixel point corresponding to x in the pixel points included in the corrected sample image.
[0044] On the other hand, a computer device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus, the memory is used to store computer programs, and the processor is used to execute the programs stored in the memory to implement the steps of the above-mentioned target recognition method.
[0045] On the other hand, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, the steps of the target recognition method described above are implemented.
[0046] On the other hand, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the steps of the target recognition method described above.
[0047] The technical solution provided by the embodiments of the present application can at least bring the following beneficial effects:
[0048] In an embodiment of the present application, the color correction of the image can be performed first according to the color correction parameters obtained by the correction parameter prediction network, and then the target recognition result can be obtained by performing target recognition on the corrected image through the target recognition network. Since the target recognition network is trained based on multiple sample images and annotation information, and the correction parameter prediction network is trained based on the back propagation error in the training process of the target recognition network, that is, the correction parameter prediction network can be optimized along with the training optimization of the target recognition network, therefore, the correction parameter prediction network obtained by training can satisfy the target recognition network, that is, the corrected image obtained can improve the accuracy of target recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0050] Figure 1 is a system architecture diagram involved in a target recognition method provided in an embodiment of the present application;
[0051] Figure 2 is a flow chart of another target recognition method provided by an embodiment of the present application;
[0052] Figure 3 is a flow chart of another target recognition method provided in an embodiment of the present application;
[0053] Figure 4 is a flow chart of a target recognition method provided by an embodiment of the present application;
[0054] Figure 5 is a schematic diagram of the structure of a target recognition device provided in an embodiment of the present application;
[0055] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0057] To facilitate understanding, some terms involved in the embodiments of the present application are explained below.
[0058] Convolutional Neural Network (CNN): It is a feedforward artificial neural network whose neurons can respond to surrounding units within a limited coverage area and effectively extract the structural information of the image through weight sharing and feature aggregation.
[0059] End-to-end approach: The processes of multiple sub-modules are merged into one module, and this module only uses one model for training and prediction.
[0060] With the development of image processing technology, the application of target recognition technology based on neural networks is increasing, among which the targets to be recognized are text, faces, license plates, etc. in images. However, due to the complexity and variability of image shooting scenes, or other human or natural reasons, the collected images may have color changes, and image color changes may bring certain obstacles to target recognition, for example, darkening of colors, increased exposure, etc., resulting in low accuracy of target recognition. The target recognition method provided in this solution can cope with the obstacles to target recognition caused by image color changes and improve the accuracy of target recognition.
[0061] For example, in the scenarios of target recognition such as faces, license plate numbers, express numbers, barcode numbers, train numbers, container numbers, etc., it is possible to achieve target recognition with a high accuracy rate according to the target recognition method provided in the embodiments of the present application. For example, in the scenario of camera monitoring traffic, the image captured by the camera may include one or more types of targets, such as faces, or faces and license plate numbers, etc. Assuming that the ambient light is complex and changeable, resulting in changes in the color of the captured image, the target recognition method provided by this solution can still accurately recognize faces and license plate numbers, etc. in the captured image.
[0062] Figure 1 is a system architecture diagram of a target recognition method provided in an embodiment of the present application. Figure 1 The system architecture includes an image acquisition device 101 and an image processing device 102. The image acquisition device 101 can communicate with the image processing device 102 in a wired or wireless manner.
[0063] The image acquisition device 101 is used to acquire images and transmit the acquired images to the image processing device 102 .
[0064] The image processing device 102 is used to perform target recognition on the received image according to the target recognition method provided in the present application to obtain a target recognition result. That is, the image is processed according to the correction parameter prediction network and the target recognition network to obtain a target recognition result.
[0065] Optionally, the image processing device 102 can also be used to obtain multiple sample images and annotation information of each sample image in the multiple sample images to train the initial recognition network and the initial parameter prediction network to obtain the target recognition network and the correction parameter prediction network.
[0066] Optionally, the training process of the target recognition network and the correction parameter prediction network can also be performed on other devices. After the training, the trained target recognition network and the correction parameter prediction network are deployed on the image processing device 102.
[0067] Optionally, the target recognition network and the correction parameter prediction network can also be deployed on the image acquisition device 101 to perform target recognition directly on the image acquisition device 101. In this way, the image acquisition device 101 has the function of target recognition, and the system architecture may not include the image processing device 102.
[0068] Optionally, the system architecture does not include the image acquisition device 101, and the image processing device 102 stores an image of the target to be identified, and the image processing device 102 can perform target recognition on the stored image of the target to be identified. That is, the image processing device 102 can perform target recognition on images acquired by any means, and the aforementioned image acquisition device 101 is only used as an example, and the image acquisition device 101 does not constitute a limitation on the embodiments of the present application.
[0069] In an embodiment of the present application, the image acquisition device 101 is a device capable of acquiring images, such as a mobile phone, a camera, a surveillance camera, or a smart appliance, and the image processing device 102 is a device such as a desktop computer, a laptop computer, a mobile phone, or a smart appliance. Optionally, the image processing device 102 can also be any type of server, such as a server cluster, a cloud server, or the like.
[0070] Next, the target recognition method provided in the embodiment of the present application is explained in detail.
[0071] Figure 2 This is a flow chart of a target recognition method provided by an embodiment of the present application. This method is introduced by taking the application of the method to an image processing device as an example. Please refer to Figure 2 , the method comprises the following steps.
[0072] Step 201: Input a first image of a target to be identified into a correction parameter prediction network to obtain a first color correction parameter.
[0073] In an embodiment of the present application, in a complex scene, due to the shooting environment, the image acquisition device itself, or human factors, the color change of the image of the target to be identified may cause certain obstacles to target recognition. Therefore, the image processing device needs to first perform color correction on the image of the target to be identified, and then perform target recognition on the corrected image, which can improve the accuracy of target recognition.
[0074] Taking the first image of the target to be identified as an example, the image processing device can input the first image of the target to be identified into the correction parameter prediction network to obtain the first color correction parameter.
[0075] In an embodiment of the present application, the correction parameter prediction network is implemented by any neural network, such as a convolutional neural network. Exemplarily, the correction parameter prediction network is implemented by a three-layer convolutional neural network followed by a fully connected layer, or the correction parameter prediction network is implemented by a FCN (Fully Convolutional Network).
[0076] Exemplarily, assuming that the correction parameter prediction network is implemented by a convolutional neural network, the image processing device inputs the first image into the correction parameter prediction network, extracts features of the first image through a convolution operation, processes the first image according to the correction parameters in the correction parameter prediction network, and outputs the first color correction parameters.
[0077] Step 202: Perform color correction on the first image according to the first color correction parameter to obtain a second image.
[0078] In the embodiment of the present application, the image processing device can perform color correction on the first image according to the first color correction parameter to obtain a corrected image, which is called the second image.
[0079] It should be noted that, in the embodiment of the present application, there are multiple ways to implement color correction of an image according to the color correction parameters, for example, using a transformation algorithm as shown in formula (1).
[0080] F′(m,n)=T[F(m,n)] (1)
[0081] In formula (1), (m, n) represents the pixel coordinates in the image before correction, F(m, n) represents the image before correction, T[·] represents the color transformation operation, and F′(m, n) represents the image after correction.
[0082] In the embodiment of the present application, any existing transformation algorithm or a custom-designed transformation algorithm can be used to perform color correction on an image according to a color correction parameter to obtain a corrected sample image. Next, one of the transformation algorithms is introduced, which can be called an SPT (Structure Preserving Transformation) algorithm.
[0083] Optionally, in an implementation based on the SPT algorithm, the image processing device can perform color correction on the first image according to the color correction parameter and the preset correction parameter to obtain the second image.
[0084] Among them, both the color correction parameters and the preset correction parameters include K scalar values, and the K scalar values included in the preset correction parameters correspond one-to-one with the K scalar values included in the color correction parameters. Exemplarily, each of the K scalar values included in the preset correction parameters corresponds to a mark, and each of the K scalar values included in the color correction parameters also corresponds to a mark, and the mark corresponding to the scalar value included in the preset correction parameters is different from the mark corresponding to the scalar value included in the color correction parameters, and there is a mapping relationship between the mark corresponding to the scalar value included in the preset correction parameters and the mark corresponding to the scalar value included in the color correction parameters. Then, according to the mapping relationship between the marks, the K scalar values included in the preset correction parameters can be made to correspond one-to-one with the K scalar values included in the color correction parameters. For example, the marks corresponding to the K scalar values included in the preset correction parameters are A, B, C, D, and D, respectively. 1 , A 2 , ..., A K The color correction parameters include K scalar values, B 1 , B 2 , ..., B K ,The mapping relationship between the tags can be,A 1 With B 1 Mapping, A 2 With B 2 Mapping, ..., B K With B K Mapping.
[0085] Alternatively, the K scalar values included in the preset correction parameters and the K scalar values included in the color correction parameters can be corresponded one-to-one through K different intermediate marks, that is, each scalar value included in the preset correction parameters corresponds to an intermediate mark and is different from each other, and each scalar value included in the color correction parameters also corresponds to an intermediate mark and is different from each other. Then, according to the intermediate mark, the K scalar values included in the preset correction parameters can be corresponded one-to-one with the K scalar values included in the color correction parameters. That is, two scalar values corresponding to the same intermediate mark among the K scalar values included in the preset correction parameters and the K scalar values included in the color correction parameters can be determined as corresponding two parameters.
[0086] It should be noted that K can be equal to any positive integer, for example, K is equal to 11, 13, etc. The K scalar values included in the preset correction parameters are a preset set of bases, which are used to perform basis transformation on each pixel in the first image. The color correction parameters are the K scalar values output by the correction parameter prediction network after processing the first image. It can be understood that the color correction parameters are adjustments and optimizations to the basis transformation to obtain an image that is more conducive to subsequent target recognition.
[0087] In the embodiment of the present application, the image processing device performs color correction on the first image according to the color correction parameter and the preset correction parameter by using the following formula (2) to obtain a corrected second image.
[0088]
[0089] In the target recognition process, the meanings of the symbols in the above formula (2) are: i is an integer greater than or equal to 1 and less than or equal to K, ω i is the i-th scalar value of the color correction parameter, β i is the i-th scalar value included in the preset correction parameter, x is the normalized pixel value of any pixel point included in the first image, and f(x) is the normalized pixel value of the pixel point corresponding to x in the pixel points included in the corrected second image.
[0090] It should be noted that since the data that the neural network can process is a value between 0 and 1, in the above formula (2), the calculation process uses the normalized pixel value of the pixel point.
[0091] Exemplarily, assuming that the color correction process adopts the SPT algorithm, the image processing device can perform color correction on the first image according to the SPT algorithm, that is, the image processing device can process the color of each pixel included in the first image according to formula (2) to obtain a corrected second image.
[0092] It should be noted that in the implementation method using the SPT algorithm, the first color correction parameter output by the correction parameter prediction network includes K scalar values, which correspond one-to-one to the K scalar values included in the preset correction parameters. That is, no matter which neural network is used by the correction parameter prediction network, it is sufficient to ensure that the first image can be processed and output K scalar values.
[0093] In addition, in the embodiment of the present application, the preset correction parameters can be set according to the application scenario, for example, according to the influence of ambient light on image formation.
[0094] Step 203: performing target recognition on the second image according to the target recognition network to obtain a target recognition result.
[0095] In an embodiment of the present application, after obtaining the second image, the image processing device can perform target recognition on the second image according to the target recognition network to obtain a target recognition result.
[0096] In the embodiment of the present application, the target recognition network is a neural network including any one or more task types, such as a face recognition network and a sequence recognition network, etc. Exemplarily, assuming that the task of the target recognition network is to recognize a text sequence in an image, such as a string of a license plate, a barcode number, etc., the image processing device can recognize the string in the second image according to the target recognition network.
[0097] Assuming that the task of the target recognition network is to recognize text sequences in images, such as recognizing strings such as license plate numbers and barcode numbers, the target recognition network can be a network composed of CNN and RNN (Recurrent Neural Network), or the target recognition network uses a VGG (Visual Geometry Group) network as the network backbone, followed by a layer of bidirectional LSTM (Long Short-Term Memory) for character relationship modeling, and finally a CTC (Connectionist Temporal Classification) decoding module to obtain the final string prediction result.
[0098] Figure 3 is a flow chart of another target recognition method provided by this application. Figure 3 , the image of the target to be identified is input into the end-to-end deep neural network, and is processed by the correction module and the recognition module included in the deep neural network in turn, and the target recognition result is output. Among them, the correction module includes a correction parameter prediction network and a color transformation network, and the recognition module includes a target recognition network. Optionally, the color change network is implemented using any change algorithm.
[0099] Figure 4 is a flow chart of another target recognition method provided by an embodiment of the present application. Figure 4 , the image of the target to be identified is input into the correction module, the color correction parameters are first obtained through the correction parameter prediction network, and then the input image is color corrected according to the color correction parameters, and the corrected image is output to the target recognition network of the recognition module, and the target recognition result is output.
[0100] The above introduces the process of the image processing device performing target recognition on the image according to the correction parameter prediction network and the target recognition network. That is, in the embodiment of the present application, the image processing device can input the image of the target to be recognized into the correction parameter prediction network, obtain color correction parameters, perform color correction on the image according to the color correction parameters, and then perform target recognition on the corrected image according to the target recognition network to obtain the target recognition result.
[0101] It should be noted that the target recognition network is trained based on multiple sample images and the annotation information of each sample image in the multiple sample images, and the correction parameter prediction network is trained based on the back propagation error in the training process of the target recognition network. That is, in the embodiment of the present application, before the image processing device performs color correction and target recognition on the image, it is necessary to first train the target recognition network and the correction parameter prediction network. Next, the training process of the target recognition network and the correction parameter prediction network is introduced.
[0102] In an embodiment of the present application, the image processing device is capable of obtaining multiple sample images and annotation information of each sample image in the multiple sample images, and training an initial recognition network based on the multiple sample images and the annotation information of each sample image in the multiple sample images, and updating the recognition parameters in the initial recognition network and the correction parameters in the initial parameter prediction network based on the back propagation error corresponding to each sample image during the training process to obtain a target recognition network and a correction parameter prediction network.
[0103] Optionally, the image processing device can select a sample image from the multiple sample images, and perform the following operations according to the selected sample image until the following operations have been performed according to each of the multiple sample images: input the selected sample image into the parameter prediction network after the correction parameters were last updated to obtain the correction prediction parameters, wherein, when the selected sample image is the first selected sample image, the parameter prediction network after the correction parameters were last updated refers to the initial parameter prediction network; according to the correction prediction parameters, color correction is performed on the selected sample image to obtain a corrected sample image; according to the corrected sample image and the annotation information of the selected sample image, the recognition network after the recognition parameters were last updated is trained, and the back propagation error corresponding to the selected sample image is determined, wherein, when the selected sample image is the first selected sample image, the recognition network after the recognition parameters were last updated refers to the initial recognition network; according to the back propagation error corresponding to the selected sample image, the recognition parameters in the recognition network after the recognition parameters were last updated and the correction parameters in the parameter prediction network after the correction parameters were last updated are updated.
[0104] That is, the image processing module continuously updates the recognition parameters in the recognition network and the correction parameters in the parameter prediction network according to each sample image in the multiple sample images, and finally obtains an optimized target recognition network and correction parameter prediction network.
[0105] It should be noted that in the embodiment of the present application, the target recognition network is connected in series after the correction parameter prediction network. During the training process, after a selected sample image is input into the parameter prediction network, it is forward processed in sequence through the parameter prediction network and the recognition network. After the recognition prediction result of the sample image is obtained, the back propagation error corresponding to the sample image can be determined based on the annotation information and the recognition prediction result of the sample image. As the back propagation error is back propagated in the network, the recognition parameters in the recognition network and the correction parameters in the parameter prediction network are updated in sequence.
[0106] Optionally, in an embodiment of the present application, there are multiple ways to calculate the back propagation error. Assuming that the current task type is to recognize a type of target such as a face or license plate in an image, the annotation information of the sample image includes a category information, and the value '0' can be used to indicate the absence of the target, and '1' can be used to indicate the presence of the target. During the training process, the recognition prediction result of a sample image is represented by a value between 0 and 1. The difference between the recognition prediction result of the sample image and the annotation information can be used as the back propagation error.
[0107] Optionally, assuming that the current task is to recognize multiple types of targets such as faces and license plates included in an image, the annotation information of the sample image includes multiple category information, each category information can be represented by a numerical value, and the recognition prediction result of the sample image may also include multiple categories of target prediction results, each target prediction result corresponds to a category information of the sample image, and the difference between the numerical values corresponding to the various category information of the sample image and the numerical values corresponding to the recognition prediction results of the corresponding categories can be weightedly calculated to obtain the back propagation error corresponding to the sample image.
[0108] It should be noted that the above only shows some implementation methods of determining the back propagation error. In other embodiments, the method for determining the back propagation error can be designed according to specific sample images, annotation information, network structure, etc.
[0109] In an embodiment of the present application, the image processing device performs color correction on the selected sample image according to the correction prediction parameters obtained by the parameter prediction network. There are many ways to obtain the corrected sample image, such as using the transformation algorithm shown in the above formula (1).
[0110] In the embodiment of the present application, any existing transformation algorithm or a custom-designed transformation algorithm can be used to implement the correction prediction parameters obtained according to the parameter prediction network, perform color correction on the selected sample image, and obtain a corrected sample image. Next, the SPT algorithm introduced above is used as an example to introduce this.
[0111] Optionally, the image processing device can perform color correction on the selected sample image according to the correction prediction parameters and the preset correction parameters to obtain a corrected sample image, the correction prediction parameters and the preset correction parameters both include K scalar values, and the K scalar values included in the preset correction parameters correspond one-to-one to the K scalar values included in the correction prediction parameters.
[0112] It should be noted that K can be equal to any positive integer. The K scalar values included in the preset correction parameters are a preset set of bases used to perform basis transformation on each pixel in the sample image. The correction prediction parameters are the K scalar values output by the parameter prediction network after processing the sample image. It can be understood that the correction prediction parameters are adjustments and optimizations to the basis transformation to obtain an image that is more conducive to subsequent target recognition.
[0113] In the embodiment of the present application, the image processing device performs color correction on the selected sample image according to the correction prediction parameters and the preset correction parameters through the above formula (2) to obtain a corrected sample image.
[0114] In the training process, the meanings of the symbols in the above formula (2) are: i is an integer greater than or equal to 1 and less than or equal to K, ω i is the scalar value of the correction prediction parameter, including β i is the i-th scalar value included in the preset correction parameter, x is the normalized pixel value of any pixel point included in the selected sample image, and f(x) is the normalized pixel value of the pixel point corresponding to x in the pixel points included in the corrected sample image.
[0115] Optionally, when performing color transformation based on the SPT algorithm, the above-mentioned parameter prediction network is implemented by a convolutional neural network (CNN), for example, by three convolutional layers followed by a fully connected layer, or by FCN, or by other neural networks. After satisfying the image input parameter prediction network, K scalar values are output.
[0116] The above process of image color correction based on the parameter prediction network and the SPT algorithm can be understood by referring to formula (3).
[0117]
[0118] In formula (3), H(x) represents the feature extractor of the parameter prediction network, W (i) Represents the correction parameters that need to be trained and updated in the parameter prediction network, W (i) H(x) represents the output of the parameter prediction network, which is also the corrected prediction parameter ω in the training process in formula (2) i .
[0119] The above formula (3) can be understood in the aforementioned target recognition process as follows: H(x) represents the feature extractor of the correction parameter prediction network, W (i) represents the correction parameter in the correction parameter prediction network, W (i) H(x) represents the output of the correction parameter prediction network, which is the color correction parameter ω in the target recognition process in formula (2) i .
[0120] It should be noted that in the embodiment of the present application, an end-to-end deep neural network is used as the network model for target recognition. The end-to-end deep neural network includes a correction module and a recognition module. The correction module includes a correction parameter prediction network and a color correction network. The color correction network is implemented by any transformation algorithm. The recognition module includes a target recognition network. The correction module can be connected in series with a recognition module of any task type. Through continuous automatic optimization training, a correction module that can meet the current connected recognition module is obtained. The above training process is a process of automatic training to optimize the correction module and the recognition module, and the process of optimizing the correction parameter prediction network and the target recognition network. That is, the correction parameter prediction network can automatically learn and optimize continuously and adaptively as the target recognition network is optimized. Since the correction module can be connected in series with any type of recognition module, and the correction module itself does not need to be trained directly according to the annotation information of the sample image, the scalability and portability of the correction module in this solution are relatively high.
[0121] From the above, it can be seen that in the embodiment of the present application, the correction module is designed to better complete the subsequent target recognition task. The correction parameter prediction network included in the correction module is optimized and adjusted through the feedback of the recognition results of the subsequent target recognition network, that is, the training process of the correction parameter prediction network itself does not require labeled information, and relies entirely on the feedback of the subsequent target recognition network to automatically learn and adjust the parameters.
[0122] Optionally, the trained correction module can be used as an independent network for image preprocessing.
[0123] It should be noted that since the initial parameter prediction network can be connected to the recognition network of any task type, this solution is flexible and universal, and the correction module is easy to transplant.
[0124] In summary, in the embodiment of the present application, the color correction of the image can be performed first according to the color correction parameters obtained by the correction parameter prediction network, and then the target recognition result can be obtained by performing target recognition on the corrected image through the target recognition network. Since the target recognition network is trained based on multiple sample images and annotation information, and the correction parameter prediction network is trained based on the back propagation error in the training process of the target recognition network, that is, the correction parameter prediction network can be optimized as the training optimization of the target recognition network is carried out, therefore, the correction parameter prediction network obtained by training can satisfy the target recognition network, that is, the corrected image obtained can improve the accuracy of target recognition.
[0125] Figure 5 is a schematic diagram of the structure of a target recognition device 500 provided in an embodiment of the present application. Optionally, the target recognition device 500 is implemented by software, hardware or a combination of both to become part or all of a computer device. Optionally, the computer device is an image processing device in the aforementioned embodiment. Please refer to Figure 5 The device includes: a parameter prediction module 501, a color correction module 502 and a target recognition module 503.
[0126] The parameter prediction module 501 is used to input the first image of the target to be identified into the correction parameter prediction network to obtain the first color correction parameter;
[0127] A color correction module 502, configured to perform color correction on the first image according to a first color correction parameter to obtain a second image;
[0128] The target recognition module 503 is used to perform target recognition on the second image according to the target recognition network to obtain a target recognition result;
[0129] The target recognition network is trained based on multiple sample images and the annotation information of each sample image in the multiple sample images, and the correction parameter prediction network is trained based on the back propagation error in the training process of the target recognition network.
[0130] Optionally, the device 500 further includes:
[0131] An acquisition module, used to acquire a plurality of sample images and annotation information of each sample image in the plurality of sample images;
[0132] A training module is used to train an initial recognition network based on the multiple sample images and the annotation information of each sample image in the multiple sample images, and to update the recognition parameters in the initial recognition network and the correction parameters in the initial parameter prediction network according to the back propagation error corresponding to each sample image during the training process, so as to obtain a target recognition network and a correction parameter prediction network.
[0133] Optionally, the training module includes:
[0134] a selection unit, configured to select a sample image from the plurality of sample images, and trigger the parameter prediction unit, the color correction unit, the training unit, and the updating unit in sequence to perform corresponding operations according to the selected sample image, until the corresponding operation is triggered to be performed according to each of the plurality of sample images;
[0135] A parameter prediction unit, used for inputting the selected sample image into the parameter prediction network after the correction parameters were last updated, to obtain the correction prediction parameters, wherein when the selected sample image is the first selected sample image, the parameter prediction network after the correction parameters were last updated refers to the initial parameter prediction network;
[0136] A color correction unit, used for performing color correction on the selected sample image according to the correction prediction parameter to obtain a corrected sample image;
[0137] A training unit, used to train the recognition network after the last update of the recognition parameters according to the corrected sample image and the annotation information of the selected sample image, and determine the back propagation error corresponding to the selected sample image, wherein when the selected sample image is the first selected sample image, the recognition network of the last update of the recognition parameters refers to the initial recognition network;
[0138] The updating unit is used to update the recognition parameters in the recognition network after the recognition parameters were last updated and the correction parameters in the parameter prediction network after the correction parameters were last updated according to the back propagation error corresponding to the selected sample image.
[0139] Optionally, the color correction unit includes:
[0140] The color correction subunit is used to perform color correction on the selected sample image according to the correction prediction parameters and the preset correction parameters to obtain a corrected sample image. The correction prediction parameters and the preset correction parameters both include K scalar values, and the K scalar values included in the preset correction parameters correspond one-to-one to the K scalar values included in the correction prediction parameters.
[0141] Optionally, the color correction subunit is specifically used for:
[0142] According to the correction prediction parameters and the preset correction parameters, the selected sample image is color corrected by the following formula to obtain a corrected sample image;
[0143]
[0144] Wherein, in the above formula, i is an integer greater than or equal to 1 and less than or equal to K, ω i is the scalar value of the correction prediction parameter, including βi is the i-th scalar value included in the preset correction parameter, x is the normalized pixel value of any pixel point included in the selected sample image, and f(x) is the normalized pixel value of the pixel point corresponding to x in the pixel points included in the corrected sample image.
[0145] In an embodiment of the present application, the color correction of the image can be performed first according to the color correction parameters obtained by the correction parameter prediction network, and then the target recognition result can be obtained by performing target recognition on the corrected image through the target recognition network. Since the target recognition network is trained based on multiple sample images and annotation information, and the correction parameter prediction network is trained based on the back propagation error in the training process of the target recognition network, that is, the correction parameter prediction network can be optimized along with the training optimization of the target recognition network, therefore, the correction parameter prediction network obtained by training can satisfy the target recognition network, that is, the corrected image obtained can improve the accuracy of target recognition.
[0146] It should be noted that: when the target recognition device provided in the above embodiment performs target recognition on an image, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the target recognition device provided in the above embodiment and the target recognition method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0147] Figure 6 600 is a schematic diagram of the structure of a computer device 600 provided in an embodiment of the present application. The computer device 600 may be an image processing device capable of performing image processing, such as a smart phone, a tablet computer, a laptop computer or a desktop computer.
[0148] Typically, the computer device 600 includes a processor 601 and a memory 602 .
[0149] The processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 601 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 601 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 601 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0150] The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 602 is used to store at least one instruction, which is used to be executed by the processor 601 to implement the target recognition method provided in the method embodiment of the present application.
[0151] In some embodiments, the computer device 600 may also optionally include: a peripheral device interface 603 and at least one peripheral device. The processor 601, the memory 602 and the peripheral device interface 603 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 603 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 604, a touch display screen 605, a camera 606, an audio circuit 607, a positioning component 608 and a power supply 609.
[0152] The peripheral device interface 603 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 601 and the memory 602. In some embodiments, the processor 601, the memory 602, and the peripheral device interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 601, the memory 602, and the peripheral device interface 603 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0153] The radio frequency circuit 604 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 604 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 604 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 604 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The radio frequency circuit 604 can communicate with other computer devices through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 604 may also include circuits related to NFC (Near Field Communication), which is not limited in the embodiments of the present application.
[0154] The display screen 605 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 605 is a touch display screen, the display screen 605 also has the ability to collect touch signals on the surface or above the surface of the display screen 605. The touch signal can be input to the processor 601 as a control signal for processing. At this time, the display screen 605 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 605 can be a front panel arranged on the computer device 600; in other embodiments, the display screen 605 can be at least two respectively arranged on different surfaces of the computer device 600 or in a folding design; in other embodiments, the display screen 605 can be a flexible display screen, arranged on a curved surface or a folding surface of the computer device 600. Even, the display screen 605 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 605 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
[0155] The camera assembly 606 is used to capture images or videos. Optionally, the camera assembly 606 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the computer device, and the rear camera is arranged on the back of the computer device. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 606 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0156] The audio circuit 607 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 601 for processing, or input them into the radio frequency circuit 604 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the computer device 600. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 601 or the radio frequency circuit 604 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 607 may also include a headphone jack.
[0157] The positioning component 608 is used to locate the current geographical location of the computer device 600 to implement navigation or LBS (Location Based Service). The positioning component 608 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system or Russia's Galileo system.
[0158] The power supply 609 is used to power various components in the computer device 600. The power supply 609 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 609 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0159] In some embodiments, the computer device 600 further includes one or more sensors 610 , including but not limited to: an acceleration sensor 611 , a gyroscope sensor 612 , a pressure sensor 613 , a fingerprint sensor 614 , an optical sensor 615 , and a proximity sensor 616 .
[0160] The acceleration sensor 611 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the computer device 600. For example, the acceleration sensor 611 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 601 can control the touch display screen 605 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 611. The acceleration sensor 611 can also be used for collecting game or user motion data.
[0161] The gyro sensor 612 can detect the body direction and rotation angle of the computer device 600, and the gyro sensor 612 can cooperate with the acceleration sensor 611 to collect the user's 3D actions on the computer device 600. The processor 601 can implement the following functions based on the data collected by the gyro sensor 612: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0162] The pressure sensor 613 can be set on the side frame of the computer device 600 and / or the lower layer of the touch display screen 605. When the pressure sensor 613 is set on the side frame of the computer device 600, it can detect the user's grip signal of the computer device 600, and the processor 601 performs left and right hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 613. When the pressure sensor 613 is set on the lower layer of the touch display screen 605, the processor 601 controls the operability controls on the UI interface according to the user's pressure operation on the touch display screen 605. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0163] The fingerprint sensor 614 is used to collect the user's fingerprint, and the processor 601 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 614, or the fingerprint sensor 614 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as a trusted identity, the processor 601 authorizes the user to perform relevant sensitive operations, which include unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings. The fingerprint sensor 614 can be set on the front, back, or side of the computer device 600. When a physical button or a manufacturer logo is set on the computer device 600, the fingerprint sensor 614 can be integrated with the physical button or the manufacturer logo.
[0164] The optical sensor 615 is used to collect the ambient light intensity. In one embodiment, the processor 601 can control the display brightness of the touch display screen 605 according to the ambient light intensity collected by the optical sensor 615. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 605 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 605 is reduced. In another embodiment, the processor 601 can also dynamically adjust the shooting parameters of the camera assembly 606 according to the ambient light intensity collected by the optical sensor 615.
[0165] The proximity sensor 616, also called a distance sensor, is usually disposed on the front panel of the computer device 600. The proximity sensor 616 is used to collect the distance between the user and the front of the computer device 600. In one embodiment, when the proximity sensor 616 detects that the distance between the user and the front of the computer device 600 is gradually decreasing, the processor 601 controls the touch display screen 605 to switch from the screen-on state to the screen-off state; when the proximity sensor 616 detects that the distance between the user and the front of the computer device 600 is gradually increasing, the processor 601 controls the touch display screen 605 to switch from the screen-off state to the screen-on state.
[0166] Those skilled in the art will understand that Figure 6 The structure shown in the figure does not constitute a limitation on the computer device 600, and the computer device 600 may include more or less components than those shown in the figure, or combine some components, or adopt a different arrangement of components.
[0167] In some embodiments, a computer-readable storage medium is further provided, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the target recognition method in the above embodiment are implemented. For example, the computer-readable storage medium can be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
[0168] It is worth noting that the computer-readable storage medium mentioned in the embodiments of the present application may be a non-volatile storage medium, in other words, a non-transitory storage medium.
[0169] It should be understood that all or part of the steps to implement the above embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions can be stored in the above-mentioned computer readable storage medium.
[0170] That is, in some embodiments, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute the steps of the target recognition method described above.
[0171] It should be understood that the "at least one" mentioned herein refers to one or more, and "multiple" refers to two or more. In the description of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit them to be necessarily different.
[0172] The above-mentioned embodiments are provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A target recognition method, characterized in that: The method comprises: Inputting a first image of a target to be identified into a correction parameter prediction network to obtain a first color correction parameter; According to the first color correction parameter and the preset correction parameter, color correction is performed on the first image by the following formula to obtain a second image, wherein the first color correction parameter and the preset correction parameter both include K scalar values, and the K scalar values included in the preset correction parameter correspond one-to-one to the K scalar values included in the first color correction parameter; Wherein, in the above formula, i is an integer greater than or equal to 1 and less than or equal to K, ω i is the i-th scalar value of the first color correction parameter, β i is the i-th scalar value included in the preset correction parameter, x is the normalized pixel value of any pixel included in the first image, and f(x) is the normalized pixel value of the pixel corresponding to x among the pixels included in the second image; Performing target recognition on the second image according to the target recognition network to obtain a target recognition result; The target recognition network is trained based on multiple sample images and annotation information of each sample image in the multiple sample images, and the correction parameter prediction network is trained based on the back propagation error in the training process of the target recognition network.
2. The method according to claim 1, characterized in that Before performing color correction on the first image according to the first color correction parameter and the preset correction parameter to obtain the second image, the method further includes: Acquire the multiple sample images and the annotation information of each sample image in the multiple sample images; The initial recognition network is trained according to the multiple sample images, the annotation information of each sample image in the multiple sample images, and the preset correction parameters, and the recognition parameters in the initial recognition network and the correction parameters in the initial parameter prediction network are updated according to the back propagation error corresponding to each sample image during the training process to obtain the target recognition network and the correction parameter prediction network.
3. The method according to claim 2, characterized in that The method of training the initial recognition network according to the multiple sample images, the annotation information of each sample image in the multiple sample images, and the preset correction parameters, and updating the recognition parameters in the initial recognition network and the correction parameters in the initial parameter prediction network according to the back propagation error corresponding to each sample image in the training process to obtain the target recognition network and the correction parameter prediction network includes: Select one sample image from the multiple sample images, and perform the following operations according to the selected sample image until the following operations have been performed according to each sample image in the multiple sample images: Inputting the selected sample image into the parameter prediction network after the correction parameters were last updated to obtain the correction prediction parameters, wherein when the selected sample image is the first selected sample image, the parameter prediction network after the correction parameters were last updated refers to the initial parameter prediction network; Performing color correction on the selected sample image according to the correction prediction parameter and the preset correction parameter to obtain a corrected sample image; According to the rectified sample image and the annotation information of the selected sample image, the recognition network after the last update of the recognition parameters is trained, and the back propagation error corresponding to the selected sample image is determined, wherein when the selected sample image is the first selected sample image, the recognition network of the last update of the recognition parameters refers to the initial recognition network; According to the back propagation error corresponding to the selected sample image, the recognition parameters in the recognition network after the recognition parameters were last updated and the correction parameters in the parameter prediction network after the correction parameters were last updated are updated.
4. A target recognition device, characterized in that: The device comprises: A parameter prediction module, used for inputting a first image of a target to be identified into a correction parameter prediction network to obtain a first color correction parameter; a color correction module, configured to perform color correction on the first image according to the first color correction parameter and the preset correction parameter by using the following formula to obtain a second image, wherein the first color correction parameter and the preset correction parameter both include K scalar values, and the K scalar values included in the preset correction parameter correspond one-to-one to the K scalar values included in the first color correction parameter; Wherein, in the above formula, i is an integer greater than or equal to 1 and less than or equal to K, ω i is the i-th scalar value of the first color correction parameter, β i is the i-th scalar value included in the preset correction parameter, x is the normalized pixel value of any pixel included in the first image, and f(x) is the normalized pixel value of the pixel corresponding to x among the pixels included in the second image; A target recognition module, used to perform target recognition on the second image according to a target recognition network to obtain a target recognition result; The target recognition network is trained based on multiple sample images and annotation information of each sample image in the multiple sample images, and the correction parameter prediction network is trained based on the back propagation error in the training process of the target recognition network.
5. The device according to claim 4, characterized in that The device also includes: An acquisition module, used to acquire the multiple sample images and the annotation information of each sample image in the multiple sample images; A training module is used to train the initial recognition network according to the multiple sample images, the annotation information of each sample image in the multiple sample images, and the preset correction parameters, and update the recognition parameters in the initial recognition network and the correction parameters in the initial parameter prediction network according to the back propagation error corresponding to each sample image during the training process, so as to obtain the target recognition network and the correction parameter prediction network.
6. The device according to claim 5, characterized in that The training module includes: a selection unit, configured to select a sample image from the plurality of sample images, and trigger the parameter prediction unit, the color correction unit, the training unit, and the updating unit in sequence to perform corresponding operations according to the selected sample image, until the execution of the corresponding operation is triggered according to each of the plurality of sample images; The parameter prediction unit is used to input the selected sample image into the parameter prediction network after the correction parameters were last updated to obtain the correction prediction parameters, wherein when the selected sample image is the first selected sample image, the parameter prediction network after the correction parameters were last updated refers to the initial parameter prediction network; The color correction unit is used to perform color correction on the selected sample image according to the correction prediction parameter and the preset correction parameter to obtain a corrected sample image; The training unit is used to train the recognition network after the last update of the recognition parameters according to the annotation information of the corrected sample image and the selected sample image, and determine the back propagation error corresponding to the selected sample image, wherein when the selected sample image is the first selected sample image, the recognition network of the last update of the recognition parameters refers to the initial recognition network; The updating unit is used to update the recognition parameters in the recognition network after the recognition parameters were last updated and the correction parameters in the parameter prediction network after the correction parameters were last updated according to the back propagation error corresponding to the selected sample image.
7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the methods of claims 1-3 are implemented.
Citation Information
Patent Citations
Target object identification method, device and system and computer-readable medium
CN108875486A
