[go: up one dir, main page]

WO2020125229A1 - Feature fusion method and apparatus, and electronic device and storage medium - Google Patents

Feature fusion method and apparatus, and electronic device and storage medium Download PDF

Info

Publication number
WO2020125229A1
WO2020125229A1 PCT/CN2019/114733 CN2019114733W WO2020125229A1 WO 2020125229 A1 WO2020125229 A1 WO 2020125229A1 CN 2019114733 W CN2019114733 W CN 2019114733W WO 2020125229 A1 WO2020125229 A1 WO 2020125229A1
Authority
WO
WIPO (PCT)
Prior art keywords
feature
image
trained
fusion
images
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/114733
Other languages
French (fr)
Chinese (zh)
Inventor
张兆丰
王孝宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Intellifusion Technologies Co Ltd
Original Assignee
Shenzhen Intellifusion Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Intellifusion Technologies Co Ltd filed Critical Shenzhen Intellifusion Technologies Co Ltd
Publication of WO2020125229A1 publication Critical patent/WO2020125229A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition

Definitions

  • the present invention relates to the field of image processing technology, and in particular, to a feature fusion method, device, electronic device, and storage medium.
  • a first aspect of the present invention provides a feature fusion method.
  • the method includes:
  • M is a positive integer
  • the acquiring multiple images of the target object includes:
  • the weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain the fusion feature includes:
  • the image quality of the jth image is multiplied by the i-dimensional image feature of the jth image to obtain the i-dimensional sub-feature of the jth image;
  • i is a positive integer
  • j is a positive integer
  • the weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain the fusion feature includes:
  • the i-dimensional image quality of the j-th image is multiplied by the i-dimensional image feature of the j-th image to obtain the i-th dimension of the j-th image Sub-feature
  • i is a positive integer
  • j is a positive integer
  • the method further includes:
  • the method before acquiring multiple images of the target object, the method further includes:
  • the loss value of the loss function reaches a convergence state, it is determined that the training model after updating the parameters is a trained image quality model.
  • the input order of the multiple images of the target object and the number of images have no effect on the fusion feature.
  • a second aspect of the present invention provides a feature fusion device.
  • the device includes:
  • the acquisition module is used to acquire multiple images of the target object
  • the input module is used to input the multiple images into a pre-trained image quality model to obtain the M-dimensional image quality of each image;
  • the input module is further configured to input the multiple images into a pre-trained feature recognition model to obtain N-dimensional image features of each image;
  • a third aspect of the present invention provides an electronic device.
  • the electronic device includes a processor and a memory.
  • the processor is used to implement the feature fusion method when executing a computer program stored in the memory.
  • a fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium.
  • the computer program is executed by a processor to implement the feature fusion method.
  • the image quality and image features of the multiple images can be extracted through the image quality model and the feature recognition model, and then, the image quality and image features of all images are processed
  • the weighted sum can obtain the fusion feature. Since the fusion feature is obtained by fusing multiple image features of multiple images and multiple image qualities, the fusion feature can include all the features of the target object, relative to As far as single image features are concerned, the fusion feature makes up for the lack of certain image features of the target object in the single image feature.
  • the fusion feature can be used to identify the image in all directions, which can improve the image Recognition effect, recognition accuracy is higher.
  • FIG. 1 is a flowchart of a preferred embodiment of a feature fusion method disclosed in the present invention.
  • FIG. 2 is a functional block diagram of a preferred embodiment of a feature fusion device disclosed in the present invention.
  • FIG. 3 is a schematic structural diagram of an electronic device according to a preferred embodiment of a method for implementing feature fusion according to the present invention.
  • FIG. 1 is a flowchart of a preferred embodiment of a feature fusion method disclosed in the present invention. According to different requirements, the sequence of steps in the flowchart can be changed, and some steps can be omitted.
  • the electronic device acquires multiple images of the target object.
  • the difference is The images of time are all different. That is to say, the photos taken at the first time and the photos taken at the second time may be different, and the two images of the same object captured in the same video may also be different.
  • the electronic device may obtain multiple images of the target object that needs to be image-recognized in various ways. Among them, any two of the images have different characteristics.
  • the acquiring multiple images of the target object includes:
  • the target object may be photographed to obtain a video of the target object, and further, multiple images of the target object at different times may be captured from the video; or
  • the target object may be photographed multiple times at different times to obtain multiple images.
  • the electronic device inputs the multiple images into a pre-trained image quality model to obtain the M-dimensional image quality of each image.
  • the image quality may be M-dimensional, and M is a positive integer.
  • M ⁇ 2 the quality of the image is multi-dimensional, using multiple values (such as 1 * M values)
  • the quality of the image in M dimensions is good or bad.
  • the image quality model can be used to measure the quality of the image.
  • the M-dimensional image quality of each image can be obtained.
  • the input order and number of images of the multiple images that is, the images of the target object can be input to the pre-trained image quality model in any order, and at the same time, the number of images of the target object can be Any number.
  • the training process of the 1-dimensional image quality model is as follows:
  • the first image set includes multiple standard images
  • the second image set includes at least one sample image, and each sample in the at least one sample image
  • the image and at least one standard image of the plurality of standard images contain the same elements
  • a correspondence relationship between the sample image and the quality score of the sample image may be established, and each sample image and the corresponding quality score are used as training samples. Then input the training samples into the model to be trained (such as the training model based on deep learning) to obtain the image quality model. Among them, the obtained trained image quality model can be used to obtain the 1-dimensional quality score of any image.
  • the training process of the multi-dimensional image quality model is as follows:
  • the sample image may be an image that is randomly taken from the object to be trained or intercepted from a video
  • the standard image may be an ID photo of the object to be trained.
  • the feature recognition model is pre-trained and will not be repeated here.
  • a training model is preset first, and the parameters in the training model are all preset, and then the training model is trained to update the parameters to obtain an image quality model.
  • the acquired multiple sample images and the multiple standard images can be mixed together and divided into several parts.
  • the fusion features formed by different sets of image sets can be constructed according to the conventional recognition feature training scheme, such as SoftMax (ie normalized exponential function), Contrastive (ie contrast loss function) and Triplet (ie error function) and other losses Function, of course, can also build a unique loss function.
  • SoftMax ie normalized exponential function
  • Contrastive ie contrast loss function
  • Triplet ie error function
  • other losses Function of course, can also build a unique loss function.
  • SoftMax or Contrastive the multiple sample images and the multiple standard images after mixing need to be divided into n parts, n ⁇ 2, each part contains m images, m ⁇ 1, if used Triplet, the multiple sample images and the multiple standard images after mixing need to be divided into n parts, and n ⁇ 3 is required.
  • the fusion feature of the object to be trained can be input to a preset loss function, a loss value is calculated, and according to the loss value, a parameter of the training model is updated using a back propagation method, and the above training steps are repeated Continue training. If the loss value of the loss function reaches the convergence state, you can determine that the training model with updated parameters is the trained image quality model. For example, if the loss value is stable at a small value, or if the loss value fluctuates slightly within a certain range, it can be determined that the loss value has reached a convergence state, and the training can be ended to obtain a trained image quality model.
  • the electronic device inputs the multiple images into a pre-trained feature recognition model to obtain N-dimensional image features of each image.
  • the input order and the number of images of the multiple images that is, the images of the target object can be input to the pre-trained feature recognition model in any order, and at the same time, the number of images of the target object can be Any number.
  • the electronic device performs weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain a fusion feature.
  • M is a positive integer
  • the weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain a fusion feature includes:
  • the image quality of the jth image is multiplied by the i-dimensional image feature of the jth image to obtain the i-dimensional sub-feature of the jth image;
  • i is a positive integer
  • j is a positive integer
  • f i is the fusion feature of the i-th dimension
  • f j,i is the i-dimensional image feature of the j-th image
  • q j is the image quality of the j-th image
  • K is the number of images, K ⁇ 2, 1 ⁇ i ⁇ N, j ⁇ 1.
  • the quality of each image of the target object is one-dimensional, and for each image, the image quality of the image and the image characteristics of the image may be multiplied, After that, all the multiplied results are summed to obtain the fusion feature of the target object.
  • the calculation amount is small and the calculation is simple.
  • the final fusion feature can improve the image recognition effect, but it is also easy to add the wrong information to the fusion feature .
  • the image feature of the first image is [0.5,0.3,0.2], where the image feature 0.2 of the third dimension is wrong, 1
  • the dimensional image quality is 0.5
  • the multi-dimensional image quality is [1.0,1.0,0.0]
  • the image feature of the second image is [0.2,0.3,0.5] where the image feature of the first dimension is 0.2 is wrong, 1 dimension
  • the image quality is 0.5
  • the multi-dimensional image quality is [0.0, 1.0, 1.0].
  • the 3rd feature of the first image and the 1st feature of the second image will be multiplied by the quality 0.5 to form the final feature, because of its own It is wrong and will introduce the error into the fused features.
  • the fusion feature needs to be normalized to obtain the final feature.
  • the modulus of the fusion feature can be 1, which reduces the impact on the overall fusion feature.
  • the weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain the fusion feature includes:
  • the i-dimensional image quality of the j-th image is multiplied by the i-dimensional image feature of the j-th image to obtain the i-th dimension of the j-th image Sub-feature
  • i is a positive integer
  • j is a positive integer
  • f i is the fusion feature of the i-th dimension
  • f j,i is the i-dimensional image feature of the j-th image
  • q j,i is the i-dimensional image quality of the j-th image
  • K is the number of images, K ⁇ 2, 1 ⁇ i ⁇ N, j ⁇ 1.
  • the quality of each image of the target object is multi-dimensional, for each of the images, the image quality of the image and the image characteristics of the image may be multiplied, and then , After summing all the multiplied results, and finally, dividing the summation result by the sum of the image quality of the image, that is, normalizing the image quality of the image, which is conducive to reducing the image
  • the multi-dimensional quality has an effect on the final fusion feature, which makes the final fusion feature more reasonable.
  • the final fusion feature In the whole process of using the second formula to calculate the fusion feature, the amount of calculation is large and the calculation is complicated. However, the final fusion feature will not be doped with wrong information. At the same time, the final fusion feature can improve the image The effect of identification.
  • the image feature of the first image is [0.5,0.3,0.2], where the image feature 0.2 of the third dimension is wrong, 1
  • the dimensional image quality is 0.5
  • the multi-dimensional image quality is [1.0,1.0,0.0]
  • the image feature of the second image is [0.2,0.3,0.5] where the image feature of the first dimension is 0.2 is wrong, 1 dimension
  • the image quality is 0.5
  • the multi-dimensional image quality is [0.0, 1.0, 1.0].
  • the fusion feature needs to be normalized to obtain the final feature.
  • the fusion feature obtained by multi-dimensional image quality is processed by using the third formula, so that the modulus of the fusion feature is 1, and the influence on the overall fusion feature is reduced.
  • the image quality and image features of the multiple images can be extracted through the image quality model and the feature recognition model, and then, the image quality and image features of all images are processed
  • the weighted sum can obtain the fusion feature. Since the fusion feature is obtained by fusing multiple image features of multiple images and multiple image qualities, the fusion feature can include all the features of the target object, relative to As far as single image features are concerned, the fusion feature makes up for the lack of certain image features of the target object in the single image feature.
  • the fusion feature can be used to identify the image in all directions, which can improve the image Recognition effect, recognition accuracy is higher.
  • FIG. 2 is a functional block diagram of a preferred embodiment of a feature fusion device disclosed in the present invention.
  • the feature fusion device runs in an electronic device.
  • the feature fusion device may include multiple functional modules composed of program code segments.
  • the program codes of each program segment in the feature fusion device may be stored in a memory and executed by at least one processor to perform some or all of the steps in the feature fusion method described in FIG. 1, for details, refer to FIG. 1 Relevant descriptions in will not be repeated here.
  • the feature fusion device may be divided into multiple functional modules according to the functions it performs.
  • the functional module may include: an acquisition module 201, an input module 202, and a calculation module 203.
  • the module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can perform fixed functions, and are stored in a memory. In some embodiments, the functions of each module will be described in detail in subsequent embodiments.
  • the feature fusion device includes:
  • the first acquisition module 201 is used to acquire multiple images of the target object
  • the input module 202 is used to input the multiple images into a pre-trained image quality model to obtain the M-dimensional image quality of each image;
  • the input module 202 is further configured to input the multiple images into a pre-trained feature recognition model to obtain N-dimensional image features of each image;
  • the manner in which the first acquiring module 201 acquires multiple images of the target object is specifically:
  • the calculation module 203 performs weighted summation of the quality of the M-dimensional image and the feature of the N-dimensional image to obtain a fusion feature specifically as follows:
  • the image quality of the jth image is multiplied by the i-dimensional image feature of the jth image to obtain the i-dimensional sub-feature of the jth image;
  • i is a positive integer
  • j is a positive integer
  • the calculation module 203 performs weighted summation of the quality of the M-dimensional image and the feature of the N-dimensional image to obtain a fusion feature specifically as follows:
  • the i-dimensional image quality of the j-th image is multiplied by the i-dimensional image feature of the j-th image to obtain the i-th dimension of the j-th image Sub-feature
  • i is a positive integer
  • j is a positive integer
  • the feature fusion device further includes:
  • the processing module is used for normalizing the fusion feature to obtain the final feature.
  • the feature fusion device further includes:
  • a second acquisition module configured to acquire multiple sample images of the object to be trained, and acquire multiple standard images of the object to be trained
  • the input module 202 is further configured to input the multiple sample images and the multiple standard images into a pre-trained feature recognition model to obtain image features of the object to be trained;
  • the input module 202 is further configured to input the multiple sample images and the multiple standard images into a preset training model to obtain the image quality of the object to be trained;
  • the calculation module 203 is further configured to calculate the fusion characteristics of the object to be trained according to the image characteristics of the object to be trained and the image quality of the object to be trained;
  • the input module 202 is further configured to input the fusion feature of the object to be trained into a preset loss function to obtain a loss value;
  • the update module is used to update the parameters of the training model based on the loss value using a back propagation algorithm
  • the determining module is used to determine that the training model after updating the parameters is a trained image quality model if the loss value of the loss function reaches a convergence state.
  • the input order of the multiple images of the target object and the number of images have no effect on the fusion feature.
  • the image quality and image features of the multiple images can be extracted through the image quality model and the feature recognition model, and then, the image quality and image features of all images are processed
  • the weighted sum can obtain the fusion feature. Since the fusion feature is obtained by fusing multiple image features of multiple images and multiple image qualities, the fusion feature can include all the features of the target object, relative to As far as single image features are concerned, the fusion feature makes up for the lack of certain image features of the target object in the single image feature.
  • the fusion feature can be used to identify the image in all directions, which can improve the image Recognition effect, recognition accuracy is higher.
  • FIG. 3 is a schematic structural diagram of an electronic device of a preferred embodiment of a method for implementing feature fusion according to the present invention.
  • the electronic device 3 includes a memory 31, at least one processor 32, a computer program 33 stored in the memory 31 and executable on the at least one processor 32, and at least one communication bus 34.
  • FIG. 3 is only an example of the electronic device 3, and does not constitute a limitation on the electronic device 3, and may include more or less components than the illustration, or a combination Certain components, or different components, for example, the electronic device 3 may further include input and output devices, network access devices, and the like.
  • the electronic device 3 also includes, but is not limited to, any electronic product that can interact with a user through a keyboard, a mouse, a remote control, a touchpad, or a voice control device, such as a personal computer, tablet computer, smart phone, Personal digital assistant (Personal Digital Assistant, PDA), game console, interactive network TV (Internet Protocol, IPTV), smart wearable device, etc.
  • the network where the electronic device 3 is located includes but is not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network (Virtual Private Network, VPN), etc.
  • the at least one processor 32 may be a central processing unit (Central Processing Unit, CPU), or may be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC ), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the processor 32 may be a microprocessor or the processor 32 may also be any conventional processor, etc.
  • the processor 32 is the control center of the electronic device 3, and uses various interfaces and lines to connect the entire electronic device 3 The various parts.
  • the memory 31 may be used to store the computer program 33 and/or module/unit, and the processor 32 executes or executes the computer program and/or module/unit stored in the memory 31, and calls the stored in the memory
  • the data in 31 realizes various functions of the electronic device 3.
  • the memory 31 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may Data (such as audio data, phone book, etc.) created according to the use of the electronic device 3 is stored.
  • the memory 31 may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart) Media, Card (SMC), and a secure digital (SD) Card, flash card (Flash), at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
  • a non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart) Media, Card (SMC), and a secure digital (SD) Card, flash card (Flash), at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
  • the memory 31 in the electronic device 3 stores multiple instructions to implement a feature fusion method, and the processor 32 can execute the multiple instructions to achieve:
  • M is a positive integer
  • N is a positive integer
  • the acquiring multiple images of the target object includes:
  • the weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain the fusion feature includes:
  • the image quality of the jth image is multiplied by the i-dimensional image feature of the jth image to obtain the i-dimensional sub-feature of the jth image;
  • i is a positive integer
  • j is a positive integer
  • the weighted summation of the M-dimensional image quality and the N-dimensional image features to obtain the fusion feature includes:
  • the i-dimensional image quality of the j-th image is multiplied by the i-dimensional image feature of the j-th image to obtain the i-th dimension of the j-th image Sub-feature
  • i is a positive integer
  • j is a positive integer
  • processor 32 can execute the multiple instructions to implement:
  • the processor 32 may execute the multiple instructions to implement:
  • the loss value of the loss function reaches a convergence state, it is determined that the training model after updating the parameters is a trained image quality model.
  • the input sequence of the multiple images of the target object and the number of images have no effect on the fusion feature.
  • the image quality and image features of the multiple images can be extracted through the image quality model and the feature recognition model, and then, the image quality and image features of all images are processed
  • the weighted sum can obtain the fusion feature. Since the fusion feature is obtained by fusing multiple image features of multiple images and multiple image qualities, the fusion feature can include all the features of the target object, relative to As far as single image features are concerned, the fusion feature makes up for the lack of certain image features of the target object in the single image feature.
  • the fusion feature can be used to identify the image in all directions, which can improve the image Recognition effect, recognition accuracy is higher.
  • the integrated module/unit of the electronic device 3 may be stored in a computer-readable storage medium.
  • the present invention can realize all or part of the processes in the methods of the above embodiments, and can also be completed by a computer program instructing relevant hardware.
  • the computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, the steps of the foregoing method embodiments may be implemented.
  • the computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file, or some intermediate form, etc.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, and a read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signals, telecommunications signals and software distribution media, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electrical carrier signals telecommunications signals and software distribution media, etc.
  • the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in jurisdictions. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media Does not include electrical carrier signals and telecommunications signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Image Analysis (AREA)

Abstract

A feature fusion method, comprising: an electronic device obtains a plurality of images of a target object (S11); the electronic device inputs the plurality of images into a pre-trained image quality model to obtain the M-dimensional image quality of each image (S12); the electronic device inputs the plurality of images into a pre-trained feature recognition model to obtain N-dimensional image features of each image (S13); and the electronic device performs weighted summation on the M-dimensional image quality and the N-dimensional image features to obtain fusion features (S14), wherein M is a positive integer, N is a positive integer, when M=1, N≥2, and when M≥2, M=N. Also provided are a feature fusion apparatus, an electronic device and a storage medium. According to the method, the image recognition effect can be improved.

Description

特征融合方法、装置、电子设备及存储介质Feature fusion method, device, electronic equipment and storage medium

本申请要求于2018年12月20日提交中国专利局,申请号为201811565889.2、发明名称为“特征融合方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires priority to be submitted to the Chinese Patent Office on December 20, 2018, with the application number 201811565889.2 and the invention titled "Feature Fusion Method, Device, Electronic Equipment, and Storage Media", the entire contents of which are incorporated by reference In this application.

技术领域Technical field

本发明涉及图像处理技术领域,尤其涉及一种特征融合方法、装置、电子设备及存储介质。The present invention relates to the field of image processing technology, and in particular, to a feature fusion method, device, electronic device, and storage medium.

背景技术Background technique

在视频识别场景中,通常会针对同一个目标进行多次抓拍,获得多张图像,并从每张图像中分别提取特征。由于针对同一个目标抓拍,获得的图像的数量较多,而且,抓拍出的图像在大小、光照、姿态、遮挡、表情等方面都不同,这使得在进行图像识别时,使用单一图像特征无法对图像的所有部分进行识别,图像识别的效果较差。In video recognition scenes, it is common to take multiple snapshots of the same target to obtain multiple images, and extract features from each image separately. Because of the large number of images captured for the same target, and the captured images are different in size, lighting, posture, occlusion, expression, etc., this makes it impossible to use a single image feature for image recognition All parts of the image are recognized, and the effect of image recognition is poor.

发明内容Summary of the invention

鉴于以上内容,有必要提供一种特征融合方法、装置、电子设备及存储介质,能够提高图像识别的效果。In view of the above, it is necessary to provide a feature fusion method, device, electronic device, and storage medium, which can improve the effect of image recognition.

本发明的第一方面提供一种特征融合方法,所述方法包括:A first aspect of the present invention provides a feature fusion method. The method includes:

获取目标物体的多张图像;Acquire multiple images of the target object;

将所述多张图像输入预先训练好的图像质量模型,获得每张所述图像的M维图像质量;Input the multiple images into a pre-trained image quality model to obtain the M-dimensional image quality of each image;

将所述多张图像输入预先训练好的特征识别模型,获得每张所述图像的N维图像特征;Input the multiple images into a pre-trained feature recognition model to obtain N-dimensional image features of each image;

将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征; 其中,所述M为正整数,所述N为正整数,当所述M=1时,N≥2,当所述M≥2时,M=N。Weighting and summing the M-dimensional image quality and the N-dimensional image feature to obtain a fusion feature; wherein, M is a positive integer, the N is a positive integer, when M=1, N≥2 When M≥2, M=N.

在一种可能的实现方式中,所述获取目标物体的多张图像包括:In a possible implementation manner, the acquiring multiple images of the target object includes:

从所述目标物体的视频中,抓拍出所述目标物体的多张图像;或Capture multiple images of the target object from the video of the target object; or

获取在不同时间拍摄的所述目标物体的多张图像。Acquire multiple images of the target object taken at different times.

在一种可能的实现方式中,当所述M=1时,所述将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征包括:In a possible implementation, when the M=1, the weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain the fusion feature includes:

针对第j张所述图像,将第j张所述图像的图像质量与第j张所述图像的第i维图像特征进行相乘,获得第j张所述图像的第i维的子特征;For the jth image, the image quality of the jth image is multiplied by the i-dimensional image feature of the jth image to obtain the i-dimensional sub-feature of the jth image;

将多张所述图像的第i维的子特征进行求和,获得第i维的融合特征;Summing the i-dimensional sub-features of multiple images to obtain the i-dimensional fusion feature;

其中,i为正整数,j为正整数,且1≤i≤N,j≥1。Among them, i is a positive integer, j is a positive integer, and 1≤i≤N, j≥1.

在一种可能的实现方式中,当所述M≥2,M=N时,所述将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征包括:In a possible implementation manner, when the M≥2 and M=N, the weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain the fusion feature includes:

针对第j张所述图像,将第j张所述图像的第i维图像质量与第j张所述图像的第i维图像特征进行相乘,获得第j张所述图像的第i维的子特征;For the jth image, the i-dimensional image quality of the j-th image is multiplied by the i-dimensional image feature of the j-th image to obtain the i-th dimension of the j-th image Sub-feature

将多张所述图像的第i维的子特征进行求和,获得第i维的特征和;Summing the i-dimensional sub-features of multiple images to obtain the i-dimensional feature sum;

将多张所述图像的第i维图像质量进行求和,获得图像质量和;Summing the i-dimensional image qualities of multiple images to obtain the image quality sum;

将所述第i维的特征和除以所述图像质量和,获得第i维的融合特征;Dividing the feature sum of the i-th dimension by the sum of the image quality to obtain the fusion feature of the i-th dimension;

其中,i为正整数,j为正整数,且1≤i≤N,j≥1。Among them, i is a positive integer, j is a positive integer, and 1≤i≤N, j≥1.

在一种可能的实现方式中,所述方法还包括:In a possible implementation manner, the method further includes:

对所述融合特征进行归一化处理,获得最终特征。Perform normalization processing on the fusion feature to obtain a final feature.

在一种可能的实现方式中,所述获取目标物体的多张图像之前,所述方法还包括:In a possible implementation manner, before acquiring multiple images of the target object, the method further includes:

获取待训练物体的多张样本图像,以及获取所述待训练物体的多张标准图像;Acquiring multiple sample images of the object to be trained, and acquiring multiple standard images of the object to be trained;

将所述多张样本图像以及所述多张标准图像输入预先训练好的特征识别模 型,获得所述待训练物体的图像特征;Input the multiple sample images and the multiple standard images into a pre-trained feature recognition model to obtain image features of the object to be trained;

将所述多张样本图像以及所述多张标准图像输入预设的训练模型,获得所述待训练物体的图像质量;Input the plurality of sample images and the plurality of standard images into a preset training model to obtain the image quality of the object to be trained;

根据所述待训练物体的图像特征以及所述待训练物体的图像质量,计算所述待训练物体的融合特征;Calculate the fusion characteristics of the object to be trained according to the image characteristics of the object to be trained and the image quality of the object to be trained;

将所述待训练物体的融合特征输入至预设的损失函数,获得损失值;Input the fusion feature of the object to be trained into a preset loss function to obtain a loss value;

根据所述损失值,使用反向传播算法,更新所述训练模型的参数;According to the loss value, use a back propagation algorithm to update the parameters of the training model;

若所述损失函数的损失值达到收敛状态,确定更新参数后的训练模型为训练好的图像质量模型。If the loss value of the loss function reaches a convergence state, it is determined that the training model after updating the parameters is a trained image quality model.

在一种可能的实现方式中,所述目标物体的多张图像的输入顺序以及图像数量对所述融合特征无影响。In a possible implementation manner, the input order of the multiple images of the target object and the number of images have no effect on the fusion feature.

本发明的第二方面提供一种特征融合装置,所述装置包括:A second aspect of the present invention provides a feature fusion device. The device includes:

获取模块,用于获取目标物体的多张图像;The acquisition module is used to acquire multiple images of the target object;

输入模块,用于将所述多张图像输入预先训练好的图像质量模型,获得每张所述图像的M维图像质量;The input module is used to input the multiple images into a pre-trained image quality model to obtain the M-dimensional image quality of each image;

所述输入模块,还用于将所述多张图像输入预先训练好的特征识别模型,获得每张所述图像的N维图像特征;The input module is further configured to input the multiple images into a pre-trained feature recognition model to obtain N-dimensional image features of each image;

计算模块,用于将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征;其中,所述M为正整数,所述N为正整数,当所述M=1时,N≥2,当所述M≥2时,M=N。A calculation module, configured to perform weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain a fusion feature; wherein, M is a positive integer, the N is a positive integer, and when M=1 , N≥2, when M≥2, M=N.

本发明的第三方面提供一种电子设备,所述电子设备包括处理器和存储器,所述处理器用于执行所述存储器中存储的计算机程序时实现所述的特征融合方法。A third aspect of the present invention provides an electronic device. The electronic device includes a processor and a memory. The processor is used to implement the feature fusion method when executing a computer program stored in the memory.

本发明的第四方面提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现所述的特征融合方法。A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium. The computer program is executed by a processor to implement the feature fusion method.

由以上技术方案,本发明中,可以先获取目标物体的多张图像,将所述多张图像输入预先训练好的图像质量模型,获得每张所述图像的M维图像质量,以及将所述多张图像输入预先训练好的特征识别模型,获得每张所述图像的N维图像特征,进一步地,可以将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征;其中,所述M为正整数,所述N为正整数,当所述M=1时,N≥2,当所述M≥2时,M=N。可见,本发明中,在获取到目标物体的多张图像后,可以通过图像质量模型以及特征识别模型提取多张图像的图像质量和图像特征,之后,再将所有图像的图像质量和图像特征进行加权求和,就可以获得融合特征,由于该融合特征是通过多张图像的多个图像特征和多个图像质量融合得到的,因此,该融合特征可以包括所述目标物体的所有特征,相对于单一图像特征而言,融合特征弥补了单一图像特征存在缺少所述目标物体的某些图像特征的缺陷,在进行图像识别时,使用融合特征,能够对图像进行全方位地识别,从而能够提高图像识别的效果,识别精度更高。From the above technical solution, in the present invention, multiple images of the target object can be obtained first, the multiple images are input into a pre-trained image quality model to obtain the M-dimensional image quality of each image, and the Multiple images are input into a pre-trained feature recognition model to obtain N-dimensional image features of each image. Further, the M-dimensional image quality and the N-dimensional image features may be weighted and summed to obtain fusion features ; Where M is a positive integer and N is a positive integer, when M=1, N≥2, and when M≥2, M=N. It can be seen that in the present invention, after acquiring multiple images of the target object, the image quality and image features of the multiple images can be extracted through the image quality model and the feature recognition model, and then, the image quality and image features of all images are processed The weighted sum can obtain the fusion feature. Since the fusion feature is obtained by fusing multiple image features of multiple images and multiple image qualities, the fusion feature can include all the features of the target object, relative to As far as single image features are concerned, the fusion feature makes up for the lack of certain image features of the target object in the single image feature. When performing image recognition, the fusion feature can be used to identify the image in all directions, which can improve the image Recognition effect, recognition accuracy is higher.

附图说明BRIEF DESCRIPTION

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly explain the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only This is an embodiment of the present invention. For those of ordinary skill in the art, without paying any creative labor, other drawings may be obtained according to the provided drawings.

图1是本发明公开的一种特征融合方法的较佳实施例的流程图。FIG. 1 is a flowchart of a preferred embodiment of a feature fusion method disclosed in the present invention.

图2是本发明公开的一种特征融合装置的较佳实施例的功能模块图。2 is a functional block diagram of a preferred embodiment of a feature fusion device disclosed in the present invention.

图3是本发明实现特征融合方法的较佳实施例的电子设备的结构示意图。3 is a schematic structural diagram of an electronic device according to a preferred embodiment of a method for implementing feature fusion according to the present invention.

具体实施方式detailed description

请参见图1,图1是本发明公开的一种特征融合方法的较佳实施例的流程图。其中,根据不同的需求,该流程图中步骤的顺序可以改变,某些步骤可以省略。Please refer to FIG. 1, which is a flowchart of a preferred embodiment of a feature fusion method disclosed in the present invention. According to different requirements, the sequence of steps in the flowchart can be changed, and some steps can be omitted.

S11、电子设备获取目标物体的多张图像。S11. The electronic device acquires multiple images of the target object.

通常,对同一个物体(如目标物体)进行拍摄,由于光照、运动模糊、噪声、表情、姿态以及杂物遮挡等方面的不同,无论拍摄获得的是静态的照片,还是动态的视频,在不同时间的图像均是不同的。也就是说,在第一时间拍摄获得的照片与在第二时间拍摄获得的照片可能是不同的,在同一个视频中抓拍的同一个物体的两张图像也可能是不同的。Generally, when shooting the same object (such as a target object), due to differences in lighting, motion blur, noise, expression, posture, and debris blocking, whether it is a static photo or a dynamic video, the difference is The images of time are all different. That is to say, the photos taken at the first time and the photos taken at the second time may be different, and the two images of the same object captured in the same video may also be different.

本发明实施例中,电子设备可以通过多种方式获取需要进行图像识别的目标物体的多张图像。其中,任意两张所述图像均存在不同的特征。In the embodiment of the present invention, the electronic device may obtain multiple images of the target object that needs to be image-recognized in various ways. Among them, any two of the images have different characteristics.

具体的,所述获取目标物体的多张图像包括:Specifically, the acquiring multiple images of the target object includes:

从所述目标物体的视频中,抓拍出所述目标物体的多张图像;或Capture multiple images of the target object from the video of the target object; or

获取在不同时间拍摄的所述目标物体的多张图像。Acquire multiple images of the target object taken at different times.

在该可选的实施方式中,可以对所述目标物体进行拍摄,获得所述目标物体的视频,进一步地,从所述视频中抓拍出不同时间的所述目标物体的多张图像;或In this optional embodiment, the target object may be photographed to obtain a video of the target object, and further, multiple images of the target object at different times may be captured from the video; or

可以在不同时间,对所述目标物体进行多次拍摄,获得多张图像。The target object may be photographed multiple times at different times to obtain multiple images.

S12、电子设备将所述多张图像输入预先训练好的图像质量模型,获得每张所述图像的M维图像质量。S12. The electronic device inputs the multiple images into a pre-trained image quality model to obtain the M-dimensional image quality of each image.

其中,图像质量可以为M维,所述M为正整数。当M=1时,即图像的质量为1维,使用1个值表示图像质量的好坏,当M≥2时,图像的质量为多维,使用多个值(如1*M个值)表示图像在M个维度上的质量好坏。The image quality may be M-dimensional, and M is a positive integer. When M=1, that is, the quality of the image is 1 dimensional, using 1 value to indicate the quality of the image, when M ≥ 2, the quality of the image is multi-dimensional, using multiple values (such as 1 * M values) The quality of the image in M dimensions is good or bad.

本发明实施例中,图像质量模型可以用来衡量图像质量的好坏。将所述目标物体的多张图像输入预先训练好的图像质量模型,可以获得每张所述图像的M维图像质量。其中,所述多张图像的输入顺序以及图像数量均没有要求,即所述目标物体的图像可以以任意顺序输入至预先训练好的图像质量模型,同时,所述目标物体的图像的数量可以为任意数量。In the embodiments of the present invention, the image quality model can be used to measure the quality of the image. By inputting multiple images of the target object into a pre-trained image quality model, the M-dimensional image quality of each image can be obtained. There is no requirement for the input order and number of images of the multiple images, that is, the images of the target object can be input to the pre-trained image quality model in any order, and at the same time, the number of images of the target object can be Any number.

其中,1维的图像质量模型的训练过程如下:Among them, the training process of the 1-dimensional image quality model is as follows:

11)获取第一图像集合和第二图像集合,所述第一图像集合包括多张标准图像,所述第二图像集合包括至少一张样本图像,所述至少一张样本图像中的每张样本图像与所述多张标准图像中的至少一张标准图像包含相同元素;11) Acquire a first image set and a second image set, the first image set includes multiple standard images, the second image set includes at least one sample image, and each sample in the at least one sample image The image and at least one standard image of the plurality of standard images contain the same elements;

12)确定所述至少一张样本图像中每张样本图像与所述多张标准图像中每张标准图像的相似度;12) Determine the similarity between each sample image in the at least one sample image and each standard image in the multiple standard images;

13)根据所述相似度,确定所述每张样本图像的质量分数;13) Determine the quality score of each sample image according to the similarity;

14)将所述每张样本图像和所述质量分数输入待训练模型得到图像质量模型。14) Input each sample image and the quality score into the model to be trained to obtain an image quality model.

具体的,可以建立样本图像和该样本图像的质量分数的对应关系,并将每张样本图像和对应的质量分数作为训练样本。然后将训练样本输入待训练模型(如基于深度学习的训练模型)得到图像质量模型。其中,可以利用所得到的训练好的图像质量模型获取任意图像的1维质量分数。Specifically, a correspondence relationship between the sample image and the quality score of the sample image may be established, and each sample image and the corresponding quality score are used as training samples. Then input the training samples into the model to be trained (such as the training model based on deep learning) to obtain the image quality model. Among them, the obtained trained image quality model can be used to obtain the 1-dimensional quality score of any image.

其中,多维的图像质量模型的训练过程如下:Among them, the training process of the multi-dimensional image quality model is as follows:

21)获取待训练物体的多张样本图像,以及获取所述待训练物体的多张标准图像;21) Acquire multiple sample images of the object to be trained, and acquire multiple standard images of the object to be trained;

22)将所述多张样本图像以及所述多张标准图像输入预先训练好的特征识别模型,获得所述待训练物体的图像特征;22) Input the multiple sample images and the multiple standard images into a pre-trained feature recognition model to obtain image features of the object to be trained;

23)将所述多张样本图像以及所述多张标准图像输入预设的训练模型,获得所述待训练物体的图像质量;23) Input the multiple sample images and the multiple standard images into a preset training model to obtain the image quality of the object to be trained;

24)根据所述待训练物体的图像特征以及所述待训练物体的图像质量,计算所述待训练物体的融合特征;24) Calculate the fusion characteristics of the object to be trained according to the image characteristics of the object to be trained and the image quality of the object to be trained;

25)将所述待训练物体的融合特征输入至预设的损失函数,获得损失值;25) Input the fusion feature of the object to be trained into a preset loss function to obtain a loss value;

26)根据所述损失值,使用反向传播算法,更新所述训练模型的参数;26) According to the loss value, use the back propagation algorithm to update the parameters of the training model;

27)若所述损失函数的损失值达到收敛状态,确定更新参数后的训练模型为训练好的图像质量模型。27) If the loss value of the loss function reaches a convergence state, determine that the training model after updating the parameters is a trained image quality model.

其中,所述样本图像可以为对所述待训练物体随意拍摄或者从视频中截取 的图像,所述标准图像可以为所述待训练物体的证件照。特征识别模型采用预先训练好的,在此不再过多赘述。先预设一个训练模型,所述训练模型中的参数都是预先设定好的,然后对所述训练模型进行训练,更新参数,以获得图像质量模型。Wherein, the sample image may be an image that is randomly taken from the object to be trained or intercepted from a video, and the standard image may be an ID photo of the object to be trained. The feature recognition model is pre-trained and will not be repeated here. A training model is preset first, and the parameters in the training model are all preset, and then the training model is trained to update the parameters to obtain an image quality model.

其中,可以将获取的所述多张样本图像以及所述多张标准图像混合在一起,分成若干份。不同份数的图像集合形成的融合特征,可以按常规的识别特征训练方案构建损失函数,比如SoftMax(即归一化指数函数)、Contrastive(即对比损失函数)以及Triplet(即误差函数)等损失函数,当然也可以构建特有的损失函数。其中,如果使用SoftMax或Contrastive,需要将混合后的所述多张样本图像以及所述多张标准图像构分成n份,n≥2,每份中所含图像m张,m≥1,如果使用Triplet,需要将混合后的所述多张样本图像以及所述多张标准图像构分成n份,要求n≥3。Wherein, the acquired multiple sample images and the multiple standard images can be mixed together and divided into several parts. The fusion features formed by different sets of image sets can be constructed according to the conventional recognition feature training scheme, such as SoftMax (ie normalized exponential function), Contrastive (ie contrast loss function) and Triplet (ie error function) and other losses Function, of course, can also build a unique loss function. Among them, if SoftMax or Contrastive is used, the multiple sample images and the multiple standard images after mixing need to be divided into n parts, n≥2, each part contains m images, m≥1, if used Triplet, the multiple sample images and the multiple standard images after mixing need to be divided into n parts, and n≥3 is required.

进一步地,可以将所述待训练物体的融合特征输入至预设的损失函数,计算损失值,并根据损失值,使用反向传播方法,更新所述训练模型的参数,并重复上述的训练步骤,继续训练,若损失函数的损失值达到收敛状态,则可以确定更新参数后的训练模型为训练好的图像质量模型。比如,损失值稳定在一个较小的值,或者,损失值在某个范围内小幅波动,均可以确定损失值达到收敛状态,可以结束训练,获得训练好的图像质量模型。Further, the fusion feature of the object to be trained can be input to a preset loss function, a loss value is calculated, and according to the loss value, a parameter of the training model is updated using a back propagation method, and the above training steps are repeated Continue training. If the loss value of the loss function reaches the convergence state, you can determine that the training model with updated parameters is the trained image quality model. For example, if the loss value is stable at a small value, or if the loss value fluctuates slightly within a certain range, it can be determined that the loss value has reached a convergence state, and the training can be ended to obtain a trained image quality model.

S13、电子设备将所述多张图像输入预先训练好的特征识别模型,获得每张所述图像的N维图像特征。S13. The electronic device inputs the multiple images into a pre-trained feature recognition model to obtain N-dimensional image features of each image.

其中,所述多张图像的输入顺序以及图像数量均没有要求,即所述目标物体的图像可以以任意顺序输入至预先训练好的特征识别模型,同时,所述目标物体的图像的数量可以为任意数量。There is no requirement on the input order and the number of images of the multiple images, that is, the images of the target object can be input to the pre-trained feature recognition model in any order, and at the same time, the number of images of the target object can be Any number.

S14、电子设备将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征。S14. The electronic device performs weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain a fusion feature.

其中,所述M为正整数,所述N为正整数,当所述M=1时,N≥2,当所 述M≥2时,M=N。Wherein, M is a positive integer, and N is a positive integer, when M=1, N≥2, and when M≥2, M=N.

本发明实施例中,有两种方式可以对所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征。In the embodiment of the present invention, there are two ways to perform weighted summation on the M-dimensional image quality and the N-dimensional image features to obtain fusion features.

作为一种可选的实施方式,当所述M=1时,所述将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征包括:As an optional implementation manner, when M=1, the weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain a fusion feature includes:

针对第j张所述图像,将第j张所述图像的图像质量与第j张所述图像的第i维图像特征进行相乘,获得第j张所述图像的第i维的子特征;For the jth image, the image quality of the jth image is multiplied by the i-dimensional image feature of the jth image to obtain the i-dimensional sub-feature of the jth image;

将多张所述图像的第i维的子特征进行求和,获得第i维的融合特征;Summing the i-dimensional sub-features of multiple images to obtain the i-dimensional fusion feature;

其中,i为正整数,j为正整数,且1≤i≤N,j≥1。Among them, i is a positive integer, j is a positive integer, and 1≤i≤N, j≥1.

其中,上述步骤可以用第一公式来描述,所述第一公式为:

Figure PCTCN2019114733-appb-000001
f i为第i维的融合特征,f j,i为第j张图像的第i维图像特征,q j为第j张图像的图像质量,K为图像的数量,K≥2,1≤i≤N,j≥1。 The above steps can be described by a first formula, and the first formula is:
Figure PCTCN2019114733-appb-000001
f i is the fusion feature of the i-th dimension, f j,i is the i-dimensional image feature of the j-th image, q j is the image quality of the j-th image, K is the number of images, K≥2, 1≤i ≤N, j≥1.

在该可选的实施方式中,每张所述目标物体的图像的质量是1维的,可以先针对每张所述图像,将所述图像的图像质量与所述图像的图像特征相乘,之后,在将所有相乘的结果进行求和,获得所述目标物体的融合特征。In this optional embodiment, the quality of each image of the target object is one-dimensional, and for each image, the image quality of the image and the image characteristics of the image may be multiplied, After that, all the multiplied results are summed to obtain the fusion feature of the target object.

其中,使用所述第一公式计算得到的融合特征的整个过程中,计算量少,计算简单,最后获得的融合特征能够提高图像识别的效果,但是,也容易将错误的信息添加进融合特征中。Among them, in the entire process of using the first formula to calculate the fusion feature, the calculation amount is small and the calculation is simple. The final fusion feature can improve the image recognition effect, but it is also easy to add the wrong information to the fusion feature .

举例来说,假设图像特征为3维,同一个目标物体有2张图像,第一张图像的图像特征为[0.5,0.3,0.2],其中,第3维的图像特征0.2是错误的,1维图像质量为0.5,多维图像质量为[1.0,1.0,0.0],第二张图像的图像特征为[0.2,0.3,0.5],其中,第1维的图像特征为0.2是错误的,1维图像质量为0.5,多维图像质量为[0.0,1.0,1.0]。当用1维质量特征融合方案时,按所述第一公式,第一张图像的第3维特征和第二张图像的第1维特征,都会乘以质量0.5形成最终的特征,因其本身是错误的,会将错误引入融合的特征。For example, assuming that the image feature is 3-dimensional, and there are 2 images of the same target object, the image feature of the first image is [0.5,0.3,0.2], where the image feature 0.2 of the third dimension is wrong, 1 The dimensional image quality is 0.5, the multi-dimensional image quality is [1.0,1.0,0.0], and the image feature of the second image is [0.2,0.3,0.5], where the image feature of the first dimension is 0.2 is wrong, 1 dimension The image quality is 0.5, and the multi-dimensional image quality is [0.0, 1.0, 1.0]. When using the 1D quality feature fusion scheme, according to the first formula, the 3rd feature of the first image and the 1st feature of the second image will be multiplied by the quality 0.5 to form the final feature, because of its own It is wrong and will introduce the error into the fused features.

可选的,还需要对所述融合特征进行归一化处理,获得最终特征。Optionally, the fusion feature needs to be normalized to obtain the final feature.

其中,针对1维图像质量获得的融合特征,还需要采用第三公式对所述融

Figure PCTCN2019114733-appb-000002
Among them, for the fusion features obtained by the 1D image quality, a third formula is also needed to
Figure PCTCN2019114733-appb-000002

其中,对所述融合特征采用第三公式进行处理,可以使得融合特征的模为1,减少对整体的融合特征的影响。Wherein, using the third formula to process the fusion feature, the modulus of the fusion feature can be 1, which reduces the impact on the overall fusion feature.

作为一种可选的实施方式,当所述M≥2,M=N时,所述将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征包括:As an optional implementation manner, when M≥2 and M=N, the weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain the fusion feature includes:

针对第j张所述图像,将第j张所述图像的第i维图像质量与第j张所述图像的第i维图像特征进行相乘,获得第j张所述图像的第i维的子特征;For the jth image, the i-dimensional image quality of the j-th image is multiplied by the i-dimensional image feature of the j-th image to obtain the i-th dimension of the j-th image Sub-feature

将多张所述图像的第i维的子特征进行求和,获得第i维的特征和;Summing the i-dimensional sub-features of multiple images to obtain the i-dimensional feature sum;

将多张所述图像的第i维图像质量进行求和,获得图像质量和;Summing the i-dimensional image qualities of multiple images to obtain the image quality sum;

将所述第i维的特征和除以所述图像质量和,获得第i维的融合特征;Dividing the feature sum of the i-th dimension by the sum of the image quality to obtain the fusion feature of the i-th dimension;

其中,i为正整数,j为正整数,且1≤i≤N,j≥1。Among them, i is a positive integer, j is a positive integer, and 1≤i≤N, j≥1.

其中,上述步骤可以用第二公式来描述,所述第二公式为:

Figure PCTCN2019114733-appb-000003
The above steps can be described by a second formula, and the second formula is:
Figure PCTCN2019114733-appb-000003

f i为第i维的融合特征,f j,i为第j张图像的第i维图像特征,q j,i为第j张图像的第i维图像质量,K为图像的数量,K≥2,1≤i≤N,j≥1。 f i is the fusion feature of the i-th dimension, f j,i is the i-dimensional image feature of the j-th image, q j,i is the i-dimensional image quality of the j-th image, K is the number of images, K≥ 2, 1≤i≤N, j≥1.

在该可选的实施方式中,每张所述目标物体的图像的质量是多维的,可以先针对每张所述图像,将所述图像的图像质量与所述图像的图像特征相乘,之后,在将所有相乘的结果进行求和,最后,在将求和的结果除以所述图像的图像质量之和,即对所述图像的图像质量进行归一化处理,这有利于减少图像质量的多维对最后获得的融合特征产生影响,使得最后获得的融合特征更加合理。In this optional embodiment, the quality of each image of the target object is multi-dimensional, for each of the images, the image quality of the image and the image characteristics of the image may be multiplied, and then , After summing all the multiplied results, and finally, dividing the summation result by the sum of the image quality of the image, that is, normalizing the image quality of the image, which is conducive to reducing the image The multi-dimensional quality has an effect on the final fusion feature, which makes the final fusion feature more reasonable.

其中,使用所述第二公式计算得到的融合特征的整个过程中,计算量多,计算复杂,但是,最后获得的融合特征不会掺杂错误的信息,同时,最后获得的融合特征能够提高图像识别的效果。In the whole process of using the second formula to calculate the fusion feature, the amount of calculation is large and the calculation is complicated. However, the final fusion feature will not be doped with wrong information. At the same time, the final fusion feature can improve the image The effect of identification.

举例来说,假设图像特征为3维,同一个目标物体有2张图像,第一张图像的图像特征为[0.5,0.3,0.2],其中,第3维的图像特征0.2是错误的,1维图像 质量为0.5,多维图像质量为[1.0,1.0,0.0],第二张图像的图像特征为[0.2,0.3,0.5],其中,第1维的图像特征为0.2是错误的,1维图像质量为0.5,多维图像质量为[0.0,1.0,1.0]。当用多维质量特征融合方案时,按所述第二公式,第一张图像的第3维特征和第二张图像的第1维特征,都会乘以质量0.0,故不会对最终的特征造成影响。For example, assuming that the image feature is 3-dimensional, and there are 2 images of the same target object, the image feature of the first image is [0.5,0.3,0.2], where the image feature 0.2 of the third dimension is wrong, 1 The dimensional image quality is 0.5, the multi-dimensional image quality is [1.0,1.0,0.0], and the image feature of the second image is [0.2,0.3,0.5], where the image feature of the first dimension is 0.2 is wrong, 1 dimension The image quality is 0.5, and the multi-dimensional image quality is [0.0, 1.0, 1.0]. When using a multi-dimensional quality feature fusion scheme, according to the second formula, the 3rd feature of the first image and the 1st feature of the second image will be multiplied by the quality 0.0, so it will not cause the final feature influences.

可选的,还需要对所述融合特征进行归一化处理,获得最终特征。Optionally, the fusion feature needs to be normalized to obtain the final feature.

其中,针对多维图像质量获得的融合特征,还需要采用第三公式对所述融

Figure PCTCN2019114733-appb-000004
Among them, for the fusion features obtained by the multi-dimensional image quality, a third formula is also needed for the fusion
Figure PCTCN2019114733-appb-000004

其中,对多维图像质量获得的所述融合特征采用第三公式进行处理,可以使得融合特征的模为1,减少对整体的融合特征的影响。Wherein, the fusion feature obtained by multi-dimensional image quality is processed by using the third formula, so that the modulus of the fusion feature is 1, and the influence on the overall fusion feature is reduced.

在图1所描述的方法流程中,可以先获取目标物体的多张图像,将所述多张图像输入预先训练好的图像质量模型,获得每张所述图像的M维图像质量,以及将所述多张图像输入预先训练好的特征识别模型,获得每张所述图像的N维图像特征,进一步地,可以将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征;其中,所述M为正整数,所述N为正整数,当所述M=1时,N≥2,当所述M≥2时,M=N。可见,本发明中,在获取到目标物体的多张图像后,可以通过图像质量模型以及特征识别模型提取多张图像的图像质量和图像特征,之后,再将所有图像的图像质量和图像特征进行加权求和,就可以获得融合特征,由于该融合特征是通过多张图像的多个图像特征和多个图像质量融合得到的,因此,该融合特征可以包括所述目标物体的所有特征,相对于单一图像特征而言,融合特征弥补了单一图像特征存在缺少所述目标物体的某些图像特征的缺陷,在进行图像识别时,使用融合特征,能够对图像进行全方位地识别,从而能够提高图像识别的效果,识别精度更高。In the method flow described in FIG. 1, multiple images of a target object can be obtained first, and the multiple images are input into a pre-trained image quality model to obtain the M-dimensional image quality of each image, and the The multiple images are input into a pre-trained feature recognition model to obtain the N-dimensional image features of each image. Further, the M-dimensional image quality and the N-dimensional image features may be weighted and summed to obtain fusion Features; wherein, M is a positive integer, the N is a positive integer, when the M = 1, N ≥ 2, when the M ≥ 2, M = N. It can be seen that in the present invention, after acquiring multiple images of the target object, the image quality and image features of the multiple images can be extracted through the image quality model and the feature recognition model, and then, the image quality and image features of all images are processed The weighted sum can obtain the fusion feature. Since the fusion feature is obtained by fusing multiple image features of multiple images and multiple image qualities, the fusion feature can include all the features of the target object, relative to As far as single image features are concerned, the fusion feature makes up for the lack of certain image features of the target object in the single image feature. When performing image recognition, the fusion feature can be used to identify the image in all directions, which can improve the image Recognition effect, recognition accuracy is higher.

以上所述,仅是本发明的具体实施方式,但本发明的保护范围并不局限于此,对于本领域的普通技术人员来说,在不脱离本发明创造构思的前提下,还 可以做出改进,但这些均属于本发明的保护范围。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited to this. For those of ordinary skill in the art, without departing from the inventive concept of the present invention, they can also make Improvement, but these all belong to the protection scope of the present invention.

请参见图2,图2是本发明公开的一种特征融合装置的较佳实施例的功能模块图。Please refer to FIG. 2, which is a functional block diagram of a preferred embodiment of a feature fusion device disclosed in the present invention.

在一些实施例中,所述特征融合装置运行于电子设备中。所述特征融合装置可以包括多个由程序代码段所组成的功能模块。所述特征融合装置中的各个程序段的程序代码可以存储于存储器中,并由至少一个处理器所执行,以执行图1所描述的特征融合方法中的部分或全部步骤,具体可以参照图1中的相关描述,在此不再赘述。In some embodiments, the feature fusion device runs in an electronic device. The feature fusion device may include multiple functional modules composed of program code segments. The program codes of each program segment in the feature fusion device may be stored in a memory and executed by at least one processor to perform some or all of the steps in the feature fusion method described in FIG. 1, for details, refer to FIG. 1 Relevant descriptions in will not be repeated here.

本实施例中,所述特征融合装置根据其所执行的功能,可以被划分为多个功能模块。所述功能模块可以包括:获取模块201、输入模块202及计算模块203。本发明所称的模块是指一种能够被至少一个处理器所执行并且能够完成固定功能的一系列计算机程序段,其存储在存储器中。在一些实施例中,关于各模块的功能将在后续的实施例中详述。In this embodiment, the feature fusion device may be divided into multiple functional modules according to the functions it performs. The functional module may include: an acquisition module 201, an input module 202, and a calculation module 203. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can perform fixed functions, and are stored in a memory. In some embodiments, the functions of each module will be described in detail in subsequent embodiments.

所述特征融合装置包括:The feature fusion device includes:

第一获取模块201,用于获取目标物体的多张图像;The first acquisition module 201 is used to acquire multiple images of the target object;

输入模块202,用于将所述多张图像输入预先训练好的图像质量模型,获得每张所述图像的M维图像质量;The input module 202 is used to input the multiple images into a pre-trained image quality model to obtain the M-dimensional image quality of each image;

所述输入模块202,还用于将所述多张图像输入预先训练好的特征识别模型,获得每张所述图像的N维图像特征;The input module 202 is further configured to input the multiple images into a pre-trained feature recognition model to obtain N-dimensional image features of each image;

计算模块203,用于将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征;其中,所述M为正整数,所述N为正整数,当所述M=1时,N≥2,当所述M≥2时,M=N。The calculation module 203 is configured to perform weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain a fusion feature; wherein, M is a positive integer, and N is a positive integer, when the M= When 1, N≥2, and when M≥2, M=N.

可选的,所述第一获取模块201获取目标物体的多张图像的方式具体为:Optionally, the manner in which the first acquiring module 201 acquires multiple images of the target object is specifically:

从所述目标物体的视频中,抓拍出所述目标物体的多张图像;或Capture multiple images of the target object from the video of the target object; or

获取在不同时间拍摄的所述目标物体的多张图像。Acquire multiple images of the target object taken at different times.

可选的,所述计算模块203将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征的方式具体为:Optionally, the calculation module 203 performs weighted summation of the quality of the M-dimensional image and the feature of the N-dimensional image to obtain a fusion feature specifically as follows:

针对第j张所述图像,将第j张所述图像的图像质量与第j张所述图像的第i维图像特征进行相乘,获得第j张所述图像的第i维的子特征;For the jth image, the image quality of the jth image is multiplied by the i-dimensional image feature of the jth image to obtain the i-dimensional sub-feature of the jth image;

将多张所述图像的第i维的子特征进行求和,获得第i维的融合特征;Summing the i-dimensional sub-features of multiple images to obtain the i-dimensional fusion feature;

其中,i为正整数,j为正整数,且1≤i≤N,j≥1。Among them, i is a positive integer, j is a positive integer, and 1≤i≤N, j≥1.

可选的,所述计算模块203将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征的方式具体为:Optionally, the calculation module 203 performs weighted summation of the quality of the M-dimensional image and the feature of the N-dimensional image to obtain a fusion feature specifically as follows:

针对第j张所述图像,将第j张所述图像的第i维图像质量与第j张所述图像的第i维图像特征进行相乘,获得第j张所述图像的第i维的子特征;For the jth image, the i-dimensional image quality of the j-th image is multiplied by the i-dimensional image feature of the j-th image to obtain the i-th dimension of the j-th image Sub-feature

将多张所述图像的第i维的子特征进行求和,获得第i维的特征和;Summing the i-dimensional sub-features of multiple images to obtain the i-dimensional feature sum;

将多张所述图像的第i维图像质量进行求和,获得图像质量和;Summing the i-dimensional image qualities of multiple images to obtain the image quality sum;

将所述第i维的特征和除以所述图像质量和,获得第i维的融合特征;Dividing the feature sum of the i-th dimension by the sum of the image quality to obtain the fusion feature of the i-th dimension;

其中,i为正整数,j为正整数,且1≤i≤N,j≥1。Among them, i is a positive integer, j is a positive integer, and 1≤i≤N, j≥1.

可选的,所述特征融合装置还包括:Optionally, the feature fusion device further includes:

处理模块,用于对所述融合特征进行归一化处理,获得最终特征。The processing module is used for normalizing the fusion feature to obtain the final feature.

可选的,所述特征融合装置还包括:Optionally, the feature fusion device further includes:

第二获取模块,用于获取待训练物体的多张样本图像,以及获取所述待训练物体的多张标准图像;A second acquisition module, configured to acquire multiple sample images of the object to be trained, and acquire multiple standard images of the object to be trained;

所述输入模块202,还用于将所述多张样本图像以及所述多张标准图像输入预先训练好的特征识别模型,获得所述待训练物体的图像特征;The input module 202 is further configured to input the multiple sample images and the multiple standard images into a pre-trained feature recognition model to obtain image features of the object to be trained;

所述输入模块202,还用于将所述多张样本图像以及所述多张标准图像输入预设的训练模型,获得所述待训练物体的图像质量;The input module 202 is further configured to input the multiple sample images and the multiple standard images into a preset training model to obtain the image quality of the object to be trained;

所述计算模块203,还用于根据所述待训练物体的图像特征以及所述待训练物体的图像质量,计算所述待训练物体的融合特征;The calculation module 203 is further configured to calculate the fusion characteristics of the object to be trained according to the image characteristics of the object to be trained and the image quality of the object to be trained;

所述输入模块202,还用于将所述待训练物体的融合特征输入至预设的损 失函数,获得损失值;The input module 202 is further configured to input the fusion feature of the object to be trained into a preset loss function to obtain a loss value;

更新模块,用于根据所述损失值,使用反向传播算法,更新所述训练模型的参数;The update module is used to update the parameters of the training model based on the loss value using a back propagation algorithm;

确定模块,用于若所述损失函数的损失值达到收敛状态,确定更新参数后的训练模型为训练好的图像质量模型。The determining module is used to determine that the training model after updating the parameters is a trained image quality model if the loss value of the loss function reaches a convergence state.

可选的,所述目标物体的多张图像的输入顺序以及图像数量对所述融合特征无影响。Optionally, the input order of the multiple images of the target object and the number of images have no effect on the fusion feature.

在图2所描述的特征融合装置中,可以先获取目标物体的多张图像,将所述多张图像输入预先训练好的图像质量模型,获得每张所述图像的M维图像质量,以及将所述多张图像输入预先训练好的特征识别模型,获得每张所述图像的N维图像特征,进一步地,可以将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征;其中,所述M为正整数,所述N为正整数,当所述M=1时,N≥2,当所述M≥2时,M=N。可见,本发明中,在获取到目标物体的多张图像后,可以通过图像质量模型以及特征识别模型提取多张图像的图像质量和图像特征,之后,再将所有图像的图像质量和图像特征进行加权求和,就可以获得融合特征,由于该融合特征是通过多张图像的多个图像特征和多个图像质量融合得到的,因此,该融合特征可以包括所述目标物体的所有特征,相对于单一图像特征而言,融合特征弥补了单一图像特征存在缺少所述目标物体的某些图像特征的缺陷,在进行图像识别时,使用融合特征,能够对图像进行全方位地识别,从而能够提高图像识别的效果,识别精度更高。In the feature fusion device described in FIG. 2, multiple images of the target object can be acquired first, and the multiple images are input into a pre-trained image quality model to obtain the M-dimensional image quality of each image, and The multiple images are input into a pre-trained feature recognition model to obtain N-dimensional image features of each image. Further, the quality of the M-dimensional image and the N-dimensional image features may be weighted and summed to obtain Fusion feature; wherein, M is a positive integer, and N is a positive integer, when M=1, N≥2, and when M≥2, M=N. It can be seen that in the present invention, after acquiring multiple images of the target object, the image quality and image features of the multiple images can be extracted through the image quality model and the feature recognition model, and then, the image quality and image features of all images are processed The weighted sum can obtain the fusion feature. Since the fusion feature is obtained by fusing multiple image features of multiple images and multiple image qualities, the fusion feature can include all the features of the target object, relative to As far as single image features are concerned, the fusion feature makes up for the lack of certain image features of the target object in the single image feature. When performing image recognition, the fusion feature can be used to identify the image in all directions, which can improve the image Recognition effect, recognition accuracy is higher.

如图3所示,图3是本发明实现特征融合方法的较佳实施例的电子设备的结构示意图。所述电子设备3包括存储器31、至少一个处理器32、存储在所述存储器31中并可在所述至少一个处理器32上运行的计算机程序33及至少一条通讯总线34。As shown in FIG. 3, FIG. 3 is a schematic structural diagram of an electronic device of a preferred embodiment of a method for implementing feature fusion according to the present invention. The electronic device 3 includes a memory 31, at least one processor 32, a computer program 33 stored in the memory 31 and executable on the at least one processor 32, and at least one communication bus 34.

本领域技术人员可以理解,图3所示的示意图仅仅是所述电子设备3的示 例,并不构成对所述电子设备3的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备3还可以包括输入输出设备、网络接入设备等。Those skilled in the art may understand that the schematic diagram shown in FIG. 3 is only an example of the electronic device 3, and does not constitute a limitation on the electronic device 3, and may include more or less components than the illustration, or a combination Certain components, or different components, for example, the electronic device 3 may further include input and output devices, network access devices, and the like.

所述电子设备3还包括但不限于任何一种可与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互的电子产品,例如,个人计算机、平板电脑、智能手机、个人数字助理(Personal Digital Assistant,PDA)、游戏机、交互式网络电视(Internet Protocol Television,IPTV)、智能式穿戴式设备等。所述电子设备3所处的网络包括但不限于互联网、广域网、城域网、局域网、虚拟专用网络(Virtual Private Network,VPN)等。The electronic device 3 also includes, but is not limited to, any electronic product that can interact with a user through a keyboard, a mouse, a remote control, a touchpad, or a voice control device, such as a personal computer, tablet computer, smart phone, Personal digital assistant (Personal Digital Assistant, PDA), game console, interactive network TV (Internet Protocol, IPTV), smart wearable device, etc. The network where the electronic device 3 is located includes but is not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network (Virtual Private Network, VPN), etc.

所述至少一个处理器32可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。该处理器32可以是微处理器或者该处理器32也可以是任何常规的处理器等,所述处理器32是所述电子设备3的控制中心,利用各种接口和线路连接整个电子设备3的各个部分。The at least one processor 32 may be a central processing unit (Central Processing Unit, CPU), or may be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC ), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 32 may be a microprocessor or the processor 32 may also be any conventional processor, etc. The processor 32 is the control center of the electronic device 3, and uses various interfaces and lines to connect the entire electronic device 3 The various parts.

所述存储器31可用于存储所述计算机程序33和/或模块/单元,所述处理器32通过运行或执行存储在所述存储器31内的计算机程序和/或模块/单元,以及调用存储在存储器31内的数据,实现所述电子设备3的各种功能。所述存储器31可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备3的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器31可以包括高速随机存取存储器,还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 31 may be used to store the computer program 33 and/or module/unit, and the processor 32 executes or executes the computer program and/or module/unit stored in the memory 31, and calls the stored in the memory The data in 31 realizes various functions of the electronic device 3. The memory 31 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may Data (such as audio data, phone book, etc.) created according to the use of the electronic device 3 is stored. In addition, the memory 31 may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart) Media, Card (SMC), and a secure digital (SD) Card, flash card (Flash), at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.

结合图1,所述电子设备3中的所述存储器31存储多个指令以实现一种特征融合方法,所述处理器32可执行所述多个指令从而实现:With reference to FIG. 1, the memory 31 in the electronic device 3 stores multiple instructions to implement a feature fusion method, and the processor 32 can execute the multiple instructions to achieve:

获取目标物体的多张图像;Acquire multiple images of the target object;

将所述多张图像输入预先训练好的图像质量模型,获得每张所述图像的M维图像质量;Input the multiple images into a pre-trained image quality model to obtain the M-dimensional image quality of each image;

将所述多张图像输入预先训练好的特征识别模型,获得每张所述图像的N维图像特征;Input the multiple images into a pre-trained feature recognition model to obtain N-dimensional image features of each image;

将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征;其中,所述M为正整数,所述N为正整数,当所述M=1时,N≥2,当所述M≥2时,M=N。Weighting and summing the M-dimensional image quality and the N-dimensional image feature to obtain a fusion feature; wherein, M is a positive integer, the N is a positive integer, and when M=1, N≥2 When M≥2, M=N.

在一种可选的实施方式中,所述获取目标物体的多张图像包括:In an optional implementation manner, the acquiring multiple images of the target object includes:

从所述目标物体的视频中,抓拍出所述目标物体的多张图像;或Capture multiple images of the target object from the video of the target object; or

获取在不同时间拍摄的所述目标物体的多张图像。Acquire multiple images of the target object taken at different times.

在一种可选的实施方式中,当所述M=1时,所述将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征包括:In an optional embodiment, when the M=1, the weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain the fusion feature includes:

针对第j张所述图像,将第j张所述图像的图像质量与第j张所述图像的第i维图像特征进行相乘,获得第j张所述图像的第i维的子特征;For the jth image, the image quality of the jth image is multiplied by the i-dimensional image feature of the jth image to obtain the i-dimensional sub-feature of the jth image;

将多张所述图像的第i维的子特征进行求和,获得第i维的融合特征;Summing the i-dimensional sub-features of multiple images to obtain the i-dimensional fusion feature;

其中,i为正整数,j为正整数,且1≤i≤N,j≥1。Among them, i is a positive integer, j is a positive integer, and 1≤i≤N, j≥1.

在一种可选的实施方式中,当所述M≥2,M=N时,所述将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征包括:In an optional implementation manner, when M≥2 and M=N, the weighted summation of the M-dimensional image quality and the N-dimensional image features to obtain the fusion feature includes:

针对第j张所述图像,将第j张所述图像的第i维图像质量与第j张所述图像的第i维图像特征进行相乘,获得第j张所述图像的第i维的子特征;For the jth image, the i-dimensional image quality of the j-th image is multiplied by the i-dimensional image feature of the j-th image to obtain the i-th dimension of the j-th image Sub-feature

将多张所述图像的第i维的子特征进行求和,获得第i维的特征和;Summing the i-dimensional sub-features of multiple images to obtain the i-dimensional feature sum;

将多张所述图像的第i维图像质量进行求和,获得图像质量和;Summing the i-dimensional image qualities of multiple images to obtain the image quality sum;

将所述第i维的特征和除以所述图像质量和,获得第i维的融合特征;Dividing the feature sum of the i-th dimension by the sum of the image quality to obtain the fusion feature of the i-th dimension;

其中,i为正整数,j为正整数,且1≤i≤N,j≥1。Among them, i is a positive integer, j is a positive integer, and 1≤i≤N, j≥1.

在一种可选的实施方式中,所述处理器32可执行所述多个指令从而实现:In an optional embodiment, the processor 32 can execute the multiple instructions to implement:

对所述融合特征进行归一化处理,获得最终特征。Perform normalization processing on the fusion feature to obtain a final feature.

在一种可选的实施方式中,所述获取目标物体的多张图像之前,所述处理器32可执行所述多个指令从而实现:In an optional implementation manner, before acquiring multiple images of the target object, the processor 32 may execute the multiple instructions to implement:

获取待训练物体的多张样本图像,以及获取所述待训练物体的多张标准图像;Acquiring multiple sample images of the object to be trained, and acquiring multiple standard images of the object to be trained;

将所述多张样本图像以及所述多张标准图像输入预先训练好的特征识别模型,获得所述待训练物体的图像特征;Input the multiple sample images and the multiple standard images into a pre-trained feature recognition model to obtain image features of the object to be trained;

将所述多张样本图像以及所述多张标准图像输入预设的训练模型,获得所述待训练物体的图像质量;Input the plurality of sample images and the plurality of standard images into a preset training model to obtain the image quality of the object to be trained;

根据所述待训练物体的图像特征以及所述待训练物体的图像质量,计算所述待训练物体的融合特征;Calculate the fusion characteristics of the object to be trained according to the image characteristics of the object to be trained and the image quality of the object to be trained;

将所述待训练物体的融合特征输入至预设的损失函数,获得损失值;Input the fusion feature of the object to be trained into a preset loss function to obtain a loss value;

根据所述损失值,使用反向传播算法,更新所述训练模型的参数;According to the loss value, use a back propagation algorithm to update the parameters of the training model;

若所述损失函数的损失值达到收敛状态,确定更新参数后的训练模型为训练好的图像质量模型。If the loss value of the loss function reaches a convergence state, it is determined that the training model after updating the parameters is a trained image quality model.

在一种可选的实施方式中,所述目标物体的多张图像的输入顺序以及图像数量对所述融合特征无影响。In an optional embodiment, the input sequence of the multiple images of the target object and the number of images have no effect on the fusion feature.

具体地,所述处理器32对上述指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。Specifically, for the specific implementation method of the above instruction by the processor 32, reference may be made to the description of relevant steps in the embodiment corresponding to FIG. 1, and details are not described herein.

在图3所描述的电子设备3中,可以先获取目标物体的多张图像,将所述多张图像输入预先训练好的图像质量模型,获得每张所述图像的M维图像质量,以及将所述多张图像输入预先训练好的特征识别模型,获得每张所述图像的N维图像特征,进一步地,可以将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征;其中,所述M为正整数,所述N为正整数, 当所述M=1时,N≥2,当所述M≥2时,M=N。可见,本发明中,在获取到目标物体的多张图像后,可以通过图像质量模型以及特征识别模型提取多张图像的图像质量和图像特征,之后,再将所有图像的图像质量和图像特征进行加权求和,就可以获得融合特征,由于该融合特征是通过多张图像的多个图像特征和多个图像质量融合得到的,因此,该融合特征可以包括所述目标物体的所有特征,相对于单一图像特征而言,融合特征弥补了单一图像特征存在缺少所述目标物体的某些图像特征的缺陷,在进行图像识别时,使用融合特征,能够对图像进行全方位地识别,从而能够提高图像识别的效果,识别精度更高。In the electronic device 3 described in FIG. 3, multiple images of the target object can be acquired first, and the multiple images are input into a pre-trained image quality model to obtain the M-dimensional image quality of each image, and The multiple images are input into a pre-trained feature recognition model to obtain N-dimensional image features of each image. Further, the quality of the M-dimensional image and the N-dimensional image features may be weighted and summed to obtain Fusion feature; wherein, M is a positive integer, and N is a positive integer, when M=1, N≥2, and when M≥2, M=N. It can be seen that in the present invention, after acquiring multiple images of the target object, the image quality and image features of the multiple images can be extracted through the image quality model and the feature recognition model, and then, the image quality and image features of all images are processed The weighted sum can obtain the fusion feature. Since the fusion feature is obtained by fusing multiple image features of multiple images and multiple image qualities, the fusion feature can include all the features of the target object, relative to As far as single image features are concerned, the fusion feature makes up for the lack of certain image features of the target object in the single image feature. When performing image recognition, the fusion feature can be used to identify the image in all directions, which can improve the image Recognition effect, recognition accuracy is higher.

所述电子设备3集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。If the integrated module/unit of the electronic device 3 is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the present invention can realize all or part of the processes in the methods of the above embodiments, and can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, the steps of the foregoing method embodiments may be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file, or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, and a read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signals, telecommunications signals and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in jurisdictions. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media Does not include electrical carrier signals and telecommunications signals.

Claims (10)

一种特征融合方法,其特征在于,所述方法包括:A feature fusion method, characterized in that the method includes: 获取目标物体的多张图像;Acquire multiple images of the target object; 将所述多张图像输入预先训练好的图像质量模型,获得每张所述图像的M维图像质量;Input the multiple images into a pre-trained image quality model to obtain the M-dimensional image quality of each image; 将所述多张图像输入预先训练好的特征识别模型,获得每张所述图像的N维图像特征;Input the multiple images into a pre-trained feature recognition model to obtain N-dimensional image features of each image; 将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征;其中,所述M为正整数,所述N为正整数,当所述M=1时,N≥2,当所述M≥2时,M=N。Weighting and summing the M-dimensional image quality and the N-dimensional image feature to obtain a fusion feature; wherein, M is a positive integer, the N is a positive integer, and when M=1, N≥2 When M≥2, M=N. 根据权利要求1所述的方法,其特征在于,所述获取目标物体的多张图像包括:The method according to claim 1, wherein the acquiring multiple images of the target object comprises: 从所述目标物体的视频中,抓拍出所述目标物体的多张图像;或Capture multiple images of the target object from the video of the target object; or 获取在不同时间拍摄的所述目标物体的多张图像。Acquire multiple images of the target object taken at different times. 根据权利要求1所述的方法,其特征在于,当所述M=1时,所述将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征包括:The method according to claim 1, wherein when M=1, the weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain a fusion feature includes: 针对第j张所述图像,将第j张所述图像的图像质量与第j张所述图像的第i维图像特征进行相乘,获得第j张所述图像的第i维的子特征;For the jth image, the image quality of the jth image is multiplied by the i-dimensional image feature of the jth image to obtain the i-dimensional sub-feature of the jth image; 将多张所述图像的第i维的子特征进行求和,获得第i维的融合特征;Summing the i-dimensional sub-features of multiple images to obtain the i-dimensional fusion feature; 其中,i为正整数,j为正整数,且1≤i≤N,j≥1。Among them, i is a positive integer, j is a positive integer, and 1≤i≤N, j≥1. 根据权利要求1所述的方法,其特征在于,当所述M≥2,M=N时,所述将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征包括:The method according to claim 1, wherein when M≥2 and M=N, the weighted sum of the M-dimensional image quality and the N-dimensional image feature to obtain the fusion feature includes : 针对第j张所述图像,将第j张所述图像的第i维图像质量与第j张所述图像的第i维图像特征进行相乘,获得第j张所述图像的第i维的子特征;For the jth image, the i-dimensional image quality of the j-th image is multiplied by the i-dimensional image feature of the j-th image to obtain the i-th dimension of the j-th image Sub-feature 将多张所述图像的第i维的子特征进行求和,获得第i维的特征和;Summing the i-dimensional sub-features of multiple images to obtain the i-dimensional feature sum; 将多张所述图像的第i维图像质量进行求和,获得图像质量和;Summing the i-dimensional image qualities of multiple images to obtain the image quality sum; 将所述第i维的特征和除以所述图像质量和,获得第i维的融合特征;Dividing the feature sum of the i-th dimension by the sum of the image quality to obtain the fusion feature of the i-th dimension; 其中,i为正整数,j为正整数,且1≤i≤N,j≥1。Among them, i is a positive integer, j is a positive integer, and 1≤i≤N, j≥1. 根据权利要求1至4任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 4, wherein the method further comprises: 对所述融合特征进行归一化处理,获得最终特征。Perform normalization processing on the fusion feature to obtain a final feature. 根据权利要求1至4任一项所述的方法,其特征在于,所述获取目标物体的多张图像之前,所述方法还包括:The method according to any one of claims 1 to 4, wherein before the acquiring multiple images of the target object, the method further comprises: 获取待训练物体的多张样本图像,以及获取所述待训练物体的多张标准图像;Acquiring multiple sample images of the object to be trained, and acquiring multiple standard images of the object to be trained; 将所述多张样本图像以及所述多张标准图像输入预先训练好的特征识别模型,获得所述待训练物体的图像特征;Input the multiple sample images and the multiple standard images into a pre-trained feature recognition model to obtain image features of the object to be trained; 将所述多张样本图像以及所述多张标准图像输入预设的训练模型,获得所述待训练物体的图像质量;Input the plurality of sample images and the plurality of standard images into a preset training model to obtain the image quality of the object to be trained; 根据所述待训练物体的图像特征以及所述待训练物体的图像质量,计算所述待训练物体的融合特征;Calculate the fusion characteristics of the object to be trained according to the image characteristics of the object to be trained and the image quality of the object to be trained; 将所述待训练物体的融合特征输入至预设的损失函数,获得损失值;Input the fusion feature of the object to be trained into a preset loss function to obtain a loss value; 根据所述损失值,使用反向传播算法,更新所述训练模型的参数;According to the loss value, use a back propagation algorithm to update the parameters of the training model; 若所述损失函数的损失值达到收敛状态,确定更新参数后的训练模型为训练好的图像质量模型。If the loss value of the loss function reaches a convergence state, it is determined that the training model after updating the parameters is a trained image quality model. 根据权利要求1至4中任一项所述的方法,其特征在于,所述目标物体的多张图像的输入顺序以及图像数量对所述融合特征无影响。The method according to any one of claims 1 to 4, wherein the input order of the plurality of images of the target object and the number of images have no effect on the fusion feature. 一种特征融合装置,其特征在于,所述特征融合装置包括:A feature fusion device, characterized in that the feature fusion device includes: 获取模块,用于获取目标物体的多张图像;The acquisition module is used to acquire multiple images of the target object; 输入模块,用于将所述多张图像输入预先训练好的图像质量模型,获得每张所述图像的M维图像质量;The input module is used to input the multiple images into a pre-trained image quality model to obtain the M-dimensional image quality of each image; 所述输入模块,还用于将所述多张图像输入预先训练好的特征识别模型,获得每张所述图像的N维图像特征;The input module is further configured to input the multiple images into a pre-trained feature recognition model to obtain N-dimensional image features of each image; 计算模块,用于将所述M维图像质量与所述N维图像特征进行加权求和,获得融合特征;其中,所述M为正整数,所述N为正整数,当所述M=1时,N≥2,当所述M≥2时,M=N。A calculation module, configured to perform weighted summation of the M-dimensional image quality and the N-dimensional image feature to obtain a fusion feature; wherein, M is a positive integer, the N is a positive integer, and when M=1 , N≥2, when M≥2, M=N. 一种电子设备,其特征在于,所述电子设备包括处理器和存储器,所述处理器用于执行存储器中存储的计算机程序以实现如权利要求1至7中任意一项所述的特征融合方法。An electronic device, characterized in that the electronic device includes a processor and a memory, and the processor is used to execute a computer program stored in the memory to implement the feature fusion method according to any one of claims 1 to 7. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有至少一个指令,所述至少一个指令被处理器执行时实现如权利要求1至7任意一项所述的特征融合方法。A computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the feature fusion according to any one of claims 1 to 7 is realized method.
PCT/CN2019/114733 2018-12-20 2019-10-31 Feature fusion method and apparatus, and electronic device and storage medium Ceased WO2020125229A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811565889.2 2018-12-20
CN201811565889.2A CN109766925B (en) 2018-12-20 2018-12-20 Feature fusion method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2020125229A1 true WO2020125229A1 (en) 2020-06-25

Family

ID=66450775

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/114733 Ceased WO2020125229A1 (en) 2018-12-20 2019-10-31 Feature fusion method and apparatus, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN109766925B (en)
WO (1) WO2020125229A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112434744A (en) * 2020-11-27 2021-03-02 北京奇艺世纪科技有限公司 Training method and device for multi-modal feature fusion model
CN112907728A (en) * 2021-01-27 2021-06-04 北京邮电大学 Ship scene restoration and positioning method and system based on camera and edge calculation
CN114092804A (en) * 2021-11-06 2022-02-25 支付宝(杭州)信息技术有限公司 Method and device for identifying remote sensing image
CN114693960A (en) * 2020-12-30 2022-07-01 深圳云天励飞技术股份有限公司 Image screening method, device, equipment and storage medium
CN115641330A (en) * 2022-11-17 2023-01-24 东莞市众嘉印刷有限公司 Flexible circuit board defect detection method and system based on image processing
CN116342411A (en) * 2023-03-16 2023-06-27 山东浪潮科学研究院有限公司 Image optimization method and system based on small sample learning
CN116416167A (en) * 2021-12-28 2023-07-11 北京字跳网络技术有限公司 Image generation method, device, equipment and storage medium

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109766925B (en) * 2018-12-20 2021-05-11 深圳云天励飞技术有限公司 Feature fusion method and device, electronic equipment and storage medium
CN112257638A (en) * 2020-10-30 2021-01-22 重庆紫光华山智安科技有限公司 Image comparison method, system, equipment and computer readable storage medium
CN113269149B (en) * 2021-06-24 2024-06-07 中国平安人寿保险股份有限公司 Method and device for detecting living body face image, computer equipment and storage medium
CN113255630B (en) * 2021-07-15 2021-10-15 浙江大华技术股份有限公司 Moving target recognition training method, moving target recognition method and device
CN118822835B (en) * 2024-06-20 2025-04-25 神力视界(深圳)文化科技有限公司 Style transfer method, medium, computer device and program product
CN119299622A (en) * 2024-09-30 2025-01-10 广东电网有限责任公司 Method for adjusting the working status of the control ball
CN119621956A (en) * 2025-02-14 2025-03-14 苏州元脑智能科技有限公司 Text data determination method, electronic device, storage medium and program product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673403A (en) * 2009-10-10 2010-03-17 安防制造(中国)有限公司 Target following method in complex interference scene
CN105719239A (en) * 2016-01-21 2016-06-29 科盾科技股份有限公司 Image splicing method and image splicing device
CN106600536A (en) * 2016-12-14 2017-04-26 同观科技(深圳)有限公司 Video imager super-resolution reconstruction method and apparatus
CN108122219A (en) * 2017-11-30 2018-06-05 西北工业大学 Infrared and visible light image fusion method based on joint sparse and non-negative sparse
CN109766925A (en) * 2018-12-20 2019-05-17 深圳云天励飞技术有限公司 Feature fusion method, device, electronic device and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706951B (en) * 2009-11-20 2012-08-08 上海电机学院 Method, device and system for objectively evaluating pneumatic optical image quality based on feature fusion
JP5476403B2 (en) * 2012-02-22 2014-04-23 京セラドキュメントソリューションズ株式会社 Fixing apparatus and image forming apparatus having the same
PH12018500541B1 (en) * 2015-09-11 2024-04-12 Jumio Corp Method and system for determining a quality metric in biometric authentication

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673403A (en) * 2009-10-10 2010-03-17 安防制造(中国)有限公司 Target following method in complex interference scene
CN105719239A (en) * 2016-01-21 2016-06-29 科盾科技股份有限公司 Image splicing method and image splicing device
CN106600536A (en) * 2016-12-14 2017-04-26 同观科技(深圳)有限公司 Video imager super-resolution reconstruction method and apparatus
CN108122219A (en) * 2017-11-30 2018-06-05 西北工业大学 Infrared and visible light image fusion method based on joint sparse and non-negative sparse
CN109766925A (en) * 2018-12-20 2019-05-17 深圳云天励飞技术有限公司 Feature fusion method, device, electronic device and storage medium

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112434744A (en) * 2020-11-27 2021-03-02 北京奇艺世纪科技有限公司 Training method and device for multi-modal feature fusion model
CN112434744B (en) * 2020-11-27 2023-05-26 北京奇艺世纪科技有限公司 Training method and device for multi-modal feature fusion model
CN114693960A (en) * 2020-12-30 2022-07-01 深圳云天励飞技术股份有限公司 Image screening method, device, equipment and storage medium
CN112907728A (en) * 2021-01-27 2021-06-04 北京邮电大学 Ship scene restoration and positioning method and system based on camera and edge calculation
CN112907728B (en) * 2021-01-27 2023-04-11 北京邮电大学 Ship scene restoration and positioning method and system based on camera and edge calculation
CN114092804A (en) * 2021-11-06 2022-02-25 支付宝(杭州)信息技术有限公司 Method and device for identifying remote sensing image
CN116416167A (en) * 2021-12-28 2023-07-11 北京字跳网络技术有限公司 Image generation method, device, equipment and storage medium
CN115641330A (en) * 2022-11-17 2023-01-24 东莞市众嘉印刷有限公司 Flexible circuit board defect detection method and system based on image processing
CN116342411A (en) * 2023-03-16 2023-06-27 山东浪潮科学研究院有限公司 Image optimization method and system based on small sample learning

Also Published As

Publication number Publication date
CN109766925A (en) 2019-05-17
CN109766925B (en) 2021-05-11

Similar Documents

Publication Publication Date Title
WO2020125229A1 (en) Feature fusion method and apparatus, and electronic device and storage medium
CN111209970B (en) Video classification method, device, storage medium and server
CN111368685B (en) Method and device for identifying key points, readable medium and electronic equipment
US12008167B2 (en) Action recognition method and device for target object, and electronic apparatus
US11875599B2 (en) Method and device for detecting blurriness of human face in image and computer-readable storage medium
WO2020119350A1 (en) Video classification method and apparatus, and computer device and storage medium
WO2020253127A1 (en) Facial feature extraction model training method and apparatus, facial feature extraction method and apparatus, device, and storage medium
WO2021164269A1 (en) Attention mechanism-based disparity map acquisition method and apparatus
WO2020155711A1 (en) Image generating method and apparatus, electronic device, and storage medium
CN108197669B (en) Feature training method and device of convolutional neural network
CN110335216B (en) Image processing method, image processing apparatus, terminal device, and readable storage medium
CN111833285B (en) Image processing method, image processing device and terminal equipment
CN111818385B (en) Video processing method, video processing device and terminal equipment
WO2020147414A1 (en) Network optimization method and apparatus, image processing method and apparatus, and storage medium
CN116385328A (en) Image data enhancement method and device based on adding noise to image
CN111290684A (en) Image display method, image display device and terminal equipment
CN112488054A (en) Face recognition method, face recognition device, terminal equipment and storage medium
WO2023124040A1 (en) Facial recognition method and apparatus
WO2021082381A1 (en) Face recognition method and apparatus, electronic device, and storage medium
CN111814811B (en) Image information extraction method, training method and device, medium and electronic equipment
CN115170581A (en) Portrait segmentation model generation method, portrait segmentation model and portrait segmentation method
WO2021109863A1 (en) Photo processing method and photo processing apparatus
WO2021232708A1 (en) Image processing method and electronic device
CN115690845A (en) Motion trail prediction method and device
CN111222446B (en) Face recognition method, face recognition device and mobile terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19899388

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19899388

Country of ref document: EP

Kind code of ref document: A1