Image information extraction method, training method and device, medium and electronic device
By extracting and calculating local descriptors of images and their confidence, and using image information extraction network training, the problem of insufficient correlation between global descriptors and local descriptors is solved, and the image processing effect and feature representation capabilities are improved.
Patent Information
- Application Number
- CN202010818332.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-14
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-08-14
AI Technical Summary
The existing technology does not consider the correlation when extracting the global descriptor and local descriptor of the image, resulting in insufficient accuracy of the descriptor and affecting the image processing effect.
By acquiring the image, extracting the local descriptor and calculating its confidence, extracting the global descriptor based on the local descriptor and its confidence, using the image information extraction network and training set to train the network through the loss function to improve the correlation and representation of the descriptor extraction. ability.
It improves the accuracy and extraction speed of image feature descriptors, and improves the accuracy of upper-layer applications such as visual navigation and image retrieval.
Smart Images

Figure CN111967515B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to an image information extraction method, an image information extraction network training method, an image information extraction device, an image information extraction network training device, a computer-readable storage medium, and an electronic device. Background Art
[0002] With the development of terminal technology, visual navigation, AR (Augmented Reality), scene recognition, unmanned driving and other functions can be realized based on terminals. In order to realize these technologies, terminals usually need to perform a series of image processing. In the process of image processing, the extraction of feature descriptors is particularly important, which directly affects whether the upper-layer applications can be successfully implemented.
[0003] The description of an image can be achieved based on global descriptors and local descriptors. In technologies such as visual navigation and image retrieval, in order to express the image more accurately, it is necessary to use both global descriptors and local descriptors.
[0004] At present, in the scheme of extracting global descriptors and local descriptors separately, the correlation between global descriptors and local descriptors is not taken into account, resulting in poor image representation ability of global descriptors and local descriptors, and the extracted descriptors are not accurate enough, resulting in unsatisfactory image processing effect. Summary of the invention
[0005] The present disclosure provides an image information extraction method, an image information extraction network training method, an image information extraction device, an image information extraction network training device, a computer-readable storage medium and an electronic device, thereby overcoming the problem of poor image processing effect caused by inaccurate extracted descriptors, at least to a certain extent.
[0006] According to a first aspect of the present disclosure, a method for extracting image information is provided, comprising: acquiring an image, extracting a local descriptor of the image; calculating the confidence of the local descriptor; and extracting a global descriptor of the image based on the local descriptor and the confidence of the local descriptor.
[0007] According to a second aspect of the present disclosure, a training method for an image information extraction network is provided, comprising: obtaining an image information extraction network and a training set, wherein the training set comprises a plurality of image pairs, each image pair comprising a first training image and a second training image belonging to the same scene; inputting the first training image into the image information extraction network to obtain a local descriptor and a global descriptor of the first training image; inputting the second training image into the image information extraction network to obtain a local descriptor and a global descriptor of the second training image; and training the image information extraction network using a loss function according to the local descriptor and the global descriptor of the first training image and the local descriptor and the global descriptor of the second training image.
[0008] According to a third aspect of the present disclosure, an image information extraction device is provided, comprising: a first extraction module, used to acquire an image and extract a local descriptor of the image; a confidence calculation module, used to calculate the confidence of the local descriptor; and a second extraction module, used to extract a global descriptor of the image based on the local descriptor and the confidence of the local descriptor.
[0009] According to a fourth aspect of the present disclosure, a training device for an image information extraction network is provided, comprising: a network acquisition module, used to acquire an image information extraction network and a training set, wherein the training set comprises a plurality of image pairs, each image pair comprising a first training image and a second training image belonging to the same scene; a first training data determination module, used to input the first training image into the image information extraction network to obtain a local descriptor and a global descriptor of the first training image; a second training data determination module, used to input the second training image into the image information extraction network to obtain a local descriptor and a global descriptor of the second training image; and a training module, used to train the image information extraction network using a loss function according to the local descriptor and the global descriptor of the first training image and the local descriptor and the global descriptor of the second training image.
[0010] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned image information extraction method or image information extraction network training method is implemented.
[0011] According to a sixth aspect of the present disclosure, an electronic device is provided, comprising a processor; and a memory for storing one or more programs, wherein when the one or more programs are executed by the processor, the processor implements the above-mentioned image information extraction method or image information extraction network training method.
[0012] In the technical solutions provided by some embodiments of the present disclosure, local descriptors of an image are extracted and the confidence of the local descriptors is calculated, and the global descriptors of the image are extracted based on the local descriptors and their confidence. On the one hand, the global descriptors are determined using the local descriptors, and the extraction of local descriptors and global descriptors is achieved through an algorithm processing process, thereby improving the speed at which the computer extracts image feature descriptors; on the other hand, the extraction of local descriptors and global descriptors is achieved based on an image information extraction network, and the extraction processes of the two can be integrated, so that the correlation between the local descriptors and the global descriptors is improved, thereby improving the ability to characterize images, and greatly improving the accuracy of upper-level applications such as visual positioning and image retrieval.
[0013] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0015] Figure 1 A schematic diagram showing an exemplary system architecture of an image information extraction solution according to an embodiment of the present disclosure;
[0016] Figure 2 A schematic diagram of the structure of an electronic device suitable for implementing an embodiment of the present disclosure is shown;
[0017] Figure 3 A flowchart of an image information extraction method according to an exemplary embodiment of the present disclosure is schematically shown;
[0018] Figure 4 A schematic diagram of a network structure of an image information extraction network according to an exemplary embodiment of the present disclosure is shown;
[0019] Figure 5 A schematic diagram showing similar scene retrieval using a global descriptor in an embodiment of the image information extraction method disclosed herein is shown;
[0020] Figure 6 A schematic diagram showing feature point matching using local descriptors in an embodiment of the image information extraction method disclosed herein is shown;
[0021] Figure 7A flowchart schematically illustrates a method for training an image information extraction network according to an exemplary embodiment of the present disclosure;
[0022] Figure 8 A block diagram schematically shows an image information extraction device according to an exemplary embodiment of the present disclosure;
[0023] Fig. 9 A block diagram of a training device for an image information extraction network according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0024] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0025] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0026] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to the actual situation. In addition, all the terms "first", "second", and "third" below are only for the purpose of distinction and should not be used as limitations of the present disclosure.
[0027] Figure 1 A schematic diagram showing an exemplary system architecture of an image information extraction solution according to an embodiment of the present disclosure.
[0028] like Figure 1As shown, the system architecture 1000 may include one or more of terminal devices 1001, 1002, 1003, a network 1004, and a server 1005. The network 1004 is used to provide a medium for communication links between the terminal devices 1001, 1002, 1003 and the server 1005. The network 1004 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0029] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 1005 may be a server cluster composed of multiple servers.
[0030] Users can use terminal devices 1001, 1002, 1003 to interact with server 1005 through network 1004 to receive or send messages, etc. Terminal devices 1001, 1002, 1003 can be various electronic devices with display screens, including but not limited to smartphones, AR devices, tablet computers, portable computers, desktop computers, etc.
[0031] It should be noted that the image information extraction method and the image information extraction network training method of the exemplary embodiment of the present disclosure can be implemented only by the terminal devices 1001, 1002, and 1003, that is, the terminal devices 1001, 1002, and 1003 can perform the various steps of the image information extraction method and the image information extraction network training method. However, the image information extraction method and the image information extraction network training method can also be performed only by the server 1005.
[0032] Alternatively, the server 1005 may execute the training method of the image information extraction network of the exemplary embodiment of the present disclosure. After obtaining the trained image information extraction network, the server 1005 may send the network to the terminal devices 1001, 1002, 1003, or the terminal devices 1001, 1002, 1003 may actively download the network from the server 1005. Next, the terminal devices 1001, 1002, 1003 use the network to implement the image information extraction process of the exemplary embodiment of the present disclosure.
[0033] Alternatively, the network training process can be implemented by a terminal device, and then the terminal device sends the trained network to another terminal device, and the other terminal device performs the steps of image information extraction.
[0034] For ease of explanation, although in the following description, the contents of the present disclosure are explained by taking the terminal devices 1001, 1002, and 1003 executing the image information extraction method and the server 1005 executing the image information extraction network training method as an example, through the above description, those skilled in the art can know that the present disclosure does not limit the execution end of the image information extraction method and the image information extraction network training method.
[0035] The process of extracting image information:
[0036] First, the terminal devices 1001, 1002, and 1003 can acquire an image and extract a local descriptor of the image; next, the terminal devices 1001, 1002, and 1003 can calculate the confidence of the local descriptor and extract a global descriptor of the image based on the local descriptor and the confidence of the local descriptor.
[0037] After obtaining the local descriptor and global descriptor of the image, the terminal devices 1001, 1002, and 1003 can apply them to the visual navigation scene. Specifically, the terminal devices 1001, 1002, and 1003 can use the global descriptor to identify the current map location, and then use the local descriptor to match the features of the image and the map point cloud. After the matching is completed, the current accurate location is calculated in combination with the PnP (Perspective-n-Point) algorithm, thereby providing navigation and positioning services.
[0038] For example, when a user is in an unfamiliar shopping mall environment, the user needs to go to a target location through a mobile phone navigation service. In this case, the user's current environment position can be accurately calculated through the disclosed solution, and the user can reach the target location based on the navigation algorithm.
[0039] For another example, when a user is at a tourist attraction, he or she can take a photo of a landmark in the attraction with a mobile phone, and the location of the attraction where the user is located can be identified through the disclosed solution. In addition, the AR algorithm can also be used to provide personalized AR services for users.
[0040] When the image information extraction method of the present disclosure is implemented through the terminal devices 1001 , 1002 , and 1003 , the image information extraction device described below can be configured in the terminal devices 1001 , 1002 , and 1003 .
[0041] The process of training the network for image information extraction:
[0042] First, the server 1005 can obtain an image information extraction network and a training set (also referred to as training data), the training set including multiple image pairs, and each image pair including a first training image and a second training image, the first training image and the second training image belonging to the same scene, and can be two images obtained by shooting the same scene at different shooting times or shooting angles; next, the server 1005 can input the first training image into the image information extraction network to obtain the local descriptor and global descriptor of the first training image. In addition, the server 1005 can also input the second training image into the image information extraction network to obtain the local descriptor and global descriptor of the second training image; then, the server 1005 can train the image information extraction network using a loss function according to the local descriptor and global descriptor of the first training image and the local descriptor and global descriptor of the second training image, and obtain the trained image information extraction network after convergence.
[0043] When the training method of the image information extraction network disclosed in the present invention is implemented through the server 1005 , the training device of the image information extraction network described below can be configured in the server 1005 .
[0044] Figure 2 Schematic diagram of an electronic device suitable for implementing the exemplary embodiment of the present disclosure is shown. The above terminal device can be configured as follows Figure 2 The form of the electronic device shown. It should be noted that Figure 2 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0045] The electronic device disclosed in the present invention includes at least a processor and a memory, and the memory is used to store one or more programs. When the one or more programs are executed by the processor, the processor can implement the image information extraction method or the image information extraction network training method of the exemplary embodiment of the present invention.
[0046] Specifically, Figure 2As shown, the electronic device 200 may include: a processor 210, an internal memory 221, an external memory interface 222, a Universal Serial Bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 271, a receiver 272, a microphone 273, an earphone interface 274, a sensor module 280, a display screen 290, a camera module 291, an indicator 292, a motor 293, a button 294, and a Subscriber Identification Module (SIM) card interface 295, etc. The sensor module 280 may include a depth sensor, a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor, etc.
[0047] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0048] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor and / or a neural network processor (NPU). Different processing units may be independent devices or integrated into one or more processors. In addition, a memory may be provided in the processor 210 for storing instructions and data.
[0049] The electronic device 200 can realize the shooting function through the ISP, the camera module 291, the video codec, the GPU, the display screen 290 and the application processor. In some embodiments, the electronic device 200 may include 1 or N camera modules 291, where N is a positive integer greater than 1. If the electronic device 200 includes N cameras, one of the N cameras is a main camera.
[0050] The internal memory 221 can be used to store computer executable program codes, which include instructions. The internal memory 221 can include a program storage area and a data storage area. The external memory interface 222 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200.
[0051] The present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device.
[0052] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0053] Computer-readable storage media can send, propagate or transmit programs for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0054] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device implements the method described in the following embodiments.
[0055] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0056] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0057] The image information extracted by the exemplary embodiment of the present disclosure includes local descriptors and global descriptors of the image, wherein the local descriptors can also be called local feature descriptors, and the global descriptors can also be called global feature descriptors.
[0058] Figure 3 The flowchart of the image information extraction method according to the exemplary embodiment of the present disclosure is schematically shown. Figure 3 , the image information extraction method may include the following steps:
[0059] S32. Obtain an image and extract a local descriptor of the image.
[0060] The image in the exemplary embodiment of the present disclosure may be an image captured by the terminal device through its camera module. For example, for an AR scene, when the terminal device performs a mapping operation or a relocation operation, the terminal device needs to turn on the camera module to obtain an image in the scene, and the obtained image can be used as the image to be extracted for information in the present disclosure.
[0061] In addition, the image in the exemplary embodiment of the present disclosure may also be an image obtained by the terminal device from other devices or servers. For example, in a scenario where image retrieval is required, the terminal device downloads an image from the server, and through the subsequent steps of the solution, the image information of the image can be obtained, and the image information can be used to search for the same or similar images to achieve image retrieval.
[0062] After acquiring the image, the terminal device can extract the local descriptor of the image.
[0063] Specifically, the terminal device may use a first neural network to extract a first intermediate descriptor of the image, wherein the first neural network may be a CNN Convolutional Neural Networks. For example, a 128-dimensional first intermediate descriptor may be extracted by CNN. It should be understood that the present disclosure does not impose any specific restrictions on the network results and output dimensions of the first neural network.
[0064] In some embodiments of the present disclosure, the terminal device may output the first intermediate descriptor as a local descriptor of the image. That is, the local descriptor directly extracted by the first neural network is the local descriptor output by the solution of the present disclosure.
[0065] In other embodiments of the present disclosure, the terminal device may upsample the first intermediate descriptor and use the upsampled result as the local descriptor of the image. Specifically, the local descriptor of the image may be calculated by bilinear interpolation. However, upsampling may also be achieved by methods such as nearest neighbor interpolation, mean interpolation, median interpolation, etc., and the present disclosure does not limit the upsampling method.
[0066] By upsampling, the local descriptor corresponding to each pixel in the image can be obtained.
[0067] In addition, before using the first neural network to extract the first intermediate descriptor from the image, the terminal device may also use a pre-extraction network to extract the information to be processed from the image. In this case, the first neural network is used to process the information to be processed, that is, the information to be processed is input into the first neural network to extract the first intermediate descriptor.
[0068] Specifically, the VGG network can be used to construct a pre-extraction network to deepen the network's extraction of image features and obtain information to be processed. In addition, the CNN network can also be used to construct a pre-extraction network, and the present disclosure does not limit the network structure of the pre-extraction network.
[0069] S34. Calculate the confidence of the local descriptor.
[0070] When the present disclosure uses a neural network to implement the image information extraction process, the Sigmoid activation function can be used to calculate the confidence of the local descriptor, where the confidence is the probability that the pixel corresponding to the local descriptor can be used as a feature point.
[0071] Specifically, the local descriptor determined in step S32 may be input into a confidence layer to obtain the confidence of the local descriptor. The confidence layer may be composed of, for example, a CNN network and a Sigmoid activation function layer.
[0072] S36. Extract the global descriptor of the image based on the local descriptor and the confidence of the local descriptor.
[0073] In an exemplary embodiment of the present disclosure, the global descriptor is a description of the entire image. For example, the global descriptor may be a vector of 1024 dimensions, which represents the entire image.
[0074] First, a second intermediate descriptor may be generated based on the local descriptor and the confidence of the local descriptor. Specifically, the product of the local descriptor and the confidence of the local descriptor may be determined as the second intermediate descriptor.
[0075] Next, the second intermediate descriptor can be processed by a second neural network, and the global descriptor of the image can be determined according to the processing result. The second neural network can be constructed by using a CNN network, and the present disclosure does not limit its network structure.
[0076] Specifically, the terminal device may process the second intermediate descriptor using the second neural network to generate a third intermediate descriptor, and perform dimensionality reduction processing on the third intermediate descriptor to obtain the image global descriptor. For example, the dimensionality reduction processing of the third intermediate descriptor may be implemented by PCA (Principal Components Analysis).
[0077] The neural networks described above can constitute the image information extraction network of this scheme. Figure 4 A schematic diagram of the network structure of an image information extraction network according to an exemplary embodiment of the present disclosure is shown.
[0078] refer to Figure 4 The image information extraction network may include a local descriptor extraction structure and a global descriptor extraction structure. The local descriptor extraction structure includes a pre-extraction network 41 and a first neural network 42, and the global descriptor extraction structure includes a confidence layer 43, a matrix product unit 44 and a second neural network 45.
[0079] Combination Figure 4In the network structure shown, first, the input image is subjected to feature extraction by the pre-extraction network 41 to obtain information to be processed. Next, after the information to be processed passes through the first neural network 42, a local descriptor of the image can be obtained. In addition, after the information to be processed passes through the first neural network 42, a first intermediate descriptor is obtained, and then the first intermediate descriptor is upsampled to obtain a local descriptor of the image. It should be understood that after the upsampling process, a local descriptor corresponding to each pixel in the image can be obtained.
[0080] Then, the local descriptor of the image may pass through the confidence layer 43 to obtain the confidence of the local descriptor. In the matrix product unit 44, the local descriptor of the image may be multiplied with the confidence of the local descriptor to generate a second intermediate descriptor.
[0081] Subsequently, the second intermediate descriptor may be input into the second neural network 45 for feature extraction, and then a dimension reduction process such as PCA is performed to finally obtain a global descriptor of the image.
[0082] Figure 5 FIG. 1 is a schematic diagram showing a similar scene retrieval using a global descriptor in an embodiment of the image information extraction method disclosed in the present invention. Figure 5 , the image to be retrieved 50 can obtain the global descriptor and local descriptor of the image to be retrieved 50 through the image information extraction process of this solution. The retrieval image set 500 can be retrieved through the global descriptor of the image to be retrieved 50.
[0083] In addition, for Figure 5 The image to be retrieved 50 is shown, Figure 6 A schematic diagram is shown for performing feature point matching using local descriptors of the image 50 to be retrieved.
[0084] The training method of the image information extraction network disclosed in the present invention is described below. Although the training method is described below by taking the server executing the training method as an example, the training method can also be executed by a terminal device.
[0085] Figure 7 The flowchart of the training method of the image information extraction network according to the exemplary embodiment of the present disclosure is schematically shown. Figure 7 , the training method of the image information extraction network may include the following steps:
[0086] S72. Obtain an image information extraction network and a training set, wherein the training set includes multiple image pairs, and each image pair includes a first training image and a second training image belonging to the same scene.
[0087] In an exemplary embodiment of the present disclosure, the training set includes multiple image pairs, each of which includes a first training image and a second training image. The first training image and the second training image are images of the same scene. For example, they may be two images of the same scene taken at different times (such as daytime and nighttime), at different shooting angles, under different lighting conditions, etc.
[0088] In addition, the training data includes not only image pairs, but also the pose transformation relationship between the training images in the image pair. The training images of the same scene in the image pair are used for supervised learning of the global descriptor during the training process. The pose transformation relationship between the training images in the image pair can calculate the similar pixel pairs between the two training images, and the supervised learning of the local descriptor can be completed through the similar pixel pairs.
[0089] For image information extraction networks, such as Figure 4 As shown, the image information extraction network may include a local descriptor extraction structure and a global descriptor extraction structure. The local descriptor extraction structure may include a pre-extraction network and a first neural network, and the global descriptor extraction structure may include a confidence layer, a matrix product unit and a second neural network.
[0090] S74. Input the first training image into the image information extraction network to obtain the local descriptor and the global descriptor of the first training image.
[0091] Specifically, the server inputs the first training image into a local descriptor extraction structure to obtain a local descriptor of the first training image; and inputs the local descriptor of the first training image into a global descriptor extraction structure to obtain a global descriptor of the first training image.
[0092] S76. Input the second training image into the image information extraction network to obtain the local descriptor and global descriptor of the second training image.
[0093] Specifically, the server inputs the second training image into the local descriptor extraction structure to obtain the local descriptor of the second training image; and inputs the local descriptor of the second training image into the global descriptor extraction structure to obtain the global descriptor of the second training image.
[0094] In addition, the present disclosure does not limit the execution order of step S74 and step S76. The first training image and the second training image can also be input into the network at the same time and the processing process can be performed at the same time.
[0095] S78. Based on the local descriptor and the global descriptor of the first training image and the local descriptor and the global descriptor of the second training image, use the loss function to train the image information extraction network.
[0096] The loss function of the image information extraction network of the exemplary embodiment of the present disclosure includes a global descriptor loss function and a local descriptor loss function. Specifically, the loss function of the image information extraction network can be the sum of the global descriptor loss function and the local descriptor loss function.
[0097] The global descriptor loss function calculates the Euclidean distance between the global descriptors output by the network as the loss function. The more similar the two images are, the smaller the Euclidean distance of the global descriptors is. The global descriptor loss function is shown in Formula 1:
[0098]
[0099] Among them, L g is the global descriptor loss function, is the global descriptor of the first training image (denoted as image A) output by the network, It is the global descriptor of the second training image (denoted as image B) output by the network.
[0100] The local descriptor calculates the Euclidean distance of the local descriptor point pairs output by the network. The more similar the local descriptor point pairs are, the smaller the Euclidean distance between the point pairs is. The local descriptor loss function is shown in Formula 2:
[0101]
[0102] Among them, L l is the local descriptor loss function, represents the local descriptor of the i-th point pair in the first training image, Represents the local descriptor of the i-th point pair in the second training image.
[0103] In this case, the loss function of the image information extraction network can be expressed as Formula 3:
[0104] L(L g ,L l )=L g +L l (Formula 3)
[0105] By calculating the above loss function, the back propagation process is performed to adjust the parameters of the image information extraction network until convergence, so as to obtain the trained image information extraction network.
[0106] After obtaining the trained image information extraction network, the server can use the network to perform the process of the above-mentioned image information extraction method. Alternatively, the server can send the trained image information extraction network to other servers or terminal devices, and the other servers or terminal devices use the network to perform the process of the above-mentioned image information extraction method.
[0107] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0108] Furthermore, this exemplary embodiment also provides an image information extraction device.
[0109] Figure 8 FIG. 1 schematically shows a block diagram of an image information extraction device according to an exemplary embodiment of the present disclosure. Figure 8 According to an exemplary embodiment of the present disclosure, the image information extraction device 8 may include a first extraction module 81 , a confidence calculation module 83 , and a second extraction module 85 .
[0110] Specifically, the first extraction module 81 can be used to acquire an image and extract a local descriptor of the image; the confidence calculation module 83 can be used to calculate the confidence of the local descriptor; the second extraction module 85 can be used to extract a global descriptor of the image based on the local descriptor and the confidence of the local descriptor.
[0111] According to an exemplary embodiment of the present disclosure, the first extraction module 81 may be configured to perform: extracting a first intermediate descriptor from an image using a first neural network; and upsampling the first intermediate descriptor to determine a local descriptor of the image.
[0112] According to an exemplary embodiment of the present disclosure, before the first extraction module 81 adopts the first neural network to extract the first intermediate descriptor from the image, it can also be configured to perform: adopting a pre-extraction network to extract information to be processed from the image; wherein, the process of the first extraction module 81 adopting the first neural network to extract the first intermediate descriptor from the image includes: the first extraction module 81 uses the first neural network to process the information to be processed to extract the first intermediate descriptor.
[0113] According to an exemplary embodiment of the present disclosure, the second extraction module 85 can be configured to perform: generating a second intermediate descriptor based on the local descriptor and the confidence of the local descriptor; processing the second intermediate descriptor using a second neural network, and determining the global descriptor of the image based on the processing result.
[0114] According to an exemplary embodiment of the present disclosure, the process of the second extraction module 85 generating the second intermediate descriptor may be configured to execute: determining the product of the local descriptor and the confidence of the local descriptor as the second intermediate descriptor.
[0115] According to an exemplary embodiment of the present disclosure, the process of determining the global descriptor of the image by the second extraction module 85 can be configured to perform: using a second neural network to process the second intermediate descriptor to generate a third intermediate descriptor; performing dimensionality reduction processing on the third intermediate descriptor to determine the global descriptor of the image.
[0116] Furthermore, this example implementation also provides a training device for an image information extraction network.
[0117] Fig. 9 Schematically shows a block diagram of a training device for an image information extraction network according to an exemplary embodiment of the present disclosure. Fig. 9 According to an exemplary embodiment of the present disclosure, the training device 9 of the image information extraction network may include a network acquisition module 91, a first training data determination module 93, a second training data determination module 95 and a training module 97.
[0118] Specifically, the network acquisition module 91 can be used to acquire an image information extraction network and a training set, wherein the training set includes multiple image pairs, each image pair includes a first training image and a second training image belonging to the same scene; the first training data determination module 93 can be used to input the first training image into the image information extraction network to obtain a local descriptor and a global descriptor of the first training image; the second training data determination module 95 can be used to input the second training image into the image information extraction network to obtain a local descriptor and a global descriptor of the second training image; the training module 97 can be used to train the image information extraction network using a loss function based on the local descriptor and the global descriptor of the first training image and the local descriptor and the global descriptor of the second training image.
[0119] According to an exemplary embodiment of the present disclosure, the image information extraction network includes a local descriptor extraction structure and a global descriptor extraction structure. In this case, the first training data determination module 93 can be configured to execute: input the first training image into the local descriptor extraction structure to obtain the local descriptor of the first training image; input the local descriptor of the first training image into the global descriptor extraction structure to obtain the global descriptor of the first training image. The second training data determination module 95 can be configured to execute: input the second training image into the local descriptor extraction structure to obtain the local descriptor of the second training image; input the local descriptor of the second training image into the global descriptor extraction structure to obtain the global descriptor of the second training image.
[0120] Since the functional modules of the image information extraction device and the image information extraction network training device in the embodiments of the present disclosure are the same as those in the above-mentioned method embodiments, they will not be described in detail here.
[0121] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0122] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0123] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0124] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing what is disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and embodiments are to be considered merely as exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.
[0125] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for extracting image information, characterized in that: include: Acquire an image, and extract a local descriptor of the image; Calculating the confidence of the local descriptor; the confidence is the probability that the pixel point corresponding to the local descriptor is a feature point; Extracting a global descriptor of the image based on the local descriptor and the confidence of the local descriptor; Wherein, extracting the local descriptor of the image comprises: extracting a first intermediate descriptor from the image using a first neural network; The first intermediate descriptor is upsampled to obtain a local descriptor corresponding to each pixel in the image, and the upsampling result is used as the local descriptor.
2. The image information extraction method according to claim 1, characterized in that: Before extracting the first intermediate descriptor from the image using the first neural network, the image information extraction method further includes: Using a pre-extraction network to extract information to be processed from the image; Among them, using the first neural network to extract the first intermediate descriptor from the image includes: using the first neural network to process the information to be processed to extract the first intermediate descriptor.
3. The image information extraction method according to claim 1, characterized in that: Extracting a global descriptor of the image based on the local descriptor and the confidence of the local descriptor includes: Generate a second intermediate descriptor based on the local descriptor and the confidence of the local descriptor; The second intermediate descriptor is processed by a second neural network, and a global descriptor of the image is determined according to a processing result.
4. The image information extraction method according to claim 3, characterized in that: Generating a second intermediate descriptor based on the local descriptor and the confidence of the local descriptor includes: The product of the local descriptor and the confidence of the local descriptor is determined as the second intermediate descriptor.
5. The image information extraction method according to claim 3, characterized in that: Processing the second intermediate descriptor using a second neural network and determining a global descriptor of the image according to a result of the processing includes: Processing the second intermediate descriptor using the second neural network to generate a third intermediate descriptor; Perform dimensionality reduction processing on the third intermediate descriptor to determine a global descriptor of the image.
6. A training method for an image information extraction network, characterized in that: include: Acquire an image information extraction network and a training set, wherein the training set includes a plurality of image pairs, each image pair includes a first training image and a second training image belonging to the same scene; Inputting the first training image into the image information extraction network to obtain a local descriptor and a global descriptor of the first training image; Inputting the second training image into the image information extraction network to obtain a local descriptor and a global descriptor of the second training image; Training the image information extraction network using a loss function according to the local descriptor and the global descriptor of the first training image and the local descriptor and the global descriptor of the second training image; The image information extraction network includes a local descriptor extraction structure and a global descriptor extraction structure, wherein the local descriptor extraction structure includes a pre-extraction network and a first neural network, and the global descriptor extraction structure includes a confidence layer, a matrix product unit and a second neural network; The step of inputting the first training image into the image information extraction network to obtain a local descriptor and a global descriptor of the first training image includes: extracting a first intermediate descriptor from the first training image using the first neural network; Upsampling the first intermediate descriptor to obtain a local descriptor corresponding to each pixel in the first training image, and using the upsampling result as the local descriptor of the first training image; The local descriptor of the first training image is passed through the confidence layer to obtain the confidence of the local descriptor, where the confidence is the probability that the pixel point corresponding to the local descriptor is a feature point; The local descriptor is multiplied by the confidence of the local descriptor through the matrix product unit to generate a second intermediate descriptor, and the second intermediate descriptor is input into the second neural network for feature extraction to obtain a global descriptor of the first training image.
7. An image information extraction device, characterized in that: include: A first extraction module, used to acquire an image and extract a local descriptor of the image; A confidence calculation module, used to calculate the confidence of the local descriptor; the confidence is the probability that the pixel point corresponding to the local descriptor is a feature point; A second extraction module, used for extracting a global descriptor of the image based on the local descriptor and the confidence of the local descriptor; Wherein, extracting the local descriptor of the image comprises: extracting a first intermediate descriptor from the image using a first neural network; The first intermediate descriptor is upsampled to obtain a local descriptor corresponding to each pixel in the image, and the upsampling result is used as the local descriptor.
8. A training device for an image information extraction network, characterized in that: include: A network acquisition module, used to acquire an image information extraction network and a training set, wherein the training set includes a plurality of image pairs, each image pair includes a first training image and a second training image belonging to the same scene; A first training data determination module, used for inputting the first training image into the image information extraction network to obtain a local descriptor and a global descriptor of the first training image; A second training data determination module, used for inputting the second training image into the image information extraction network to obtain a local descriptor and a global descriptor of the second training image; A training module, configured to train the image information extraction network using a loss function according to the local descriptor and the global descriptor of the first training image and the local descriptor and the global descriptor of the second training image; The image information extraction network includes a local descriptor extraction structure and a global descriptor extraction structure, wherein the local descriptor extraction structure includes a pre-extraction network and a first neural network, and the global descriptor extraction structure includes a confidence layer, a matrix product unit and a second neural network; The step of inputting the first training image into the image information extraction network to obtain a local descriptor and a global descriptor of the first training image includes: extracting a first intermediate descriptor from the first training image using the first neural network; Upsampling the first intermediate descriptor to obtain a local descriptor corresponding to each pixel in the first training image, and using the upsampling result as the local descriptor of the first training image; The local descriptor of the first training image is passed through the confidence layer to obtain the confidence of the local descriptor, where the confidence is the probability that the pixel point corresponding to the local descriptor is a feature point; The local descriptor is multiplied by the confidence of the local descriptor through the matrix product unit to generate a second intermediate descriptor, and the second intermediate descriptor is input into the second neural network for feature extraction to obtain a global descriptor of the first training image.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the image information extraction method according to any one of claims 1 to 5 or the training method of an image information extraction network according to claim 6 is implemented.
10. An electronic device, characterized in that: include: processor; A memory for storing one or more programs, which, when executed by the processor, enables the processor to implement the image information extraction method as described in any one of claims 1 to 5 or the training method of the image information extraction network as described in claim 6.
