Image feature quantization method, system, device and storage medium
Through the plastic coding of sliding window extraction and iReLU function transformation, combined with multi-loss function optimization, the problem of uniform segmentation and information loss in image feature quantification is solved, and more accurate feature expression is achieved.
Patent Information
- Application Number
- CN202111584934.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2041-12-22
AI Technical Summary
Existing image feature quantification methods suffer from information loss and weakened feature expression in the process of uniform segmentation and binary hash encoding. In particular, the feature contributions of different parts of the target are not detailed enough.
The sliding window method is used to extract local features, and the continuous feature vector is converted into a plastic code through the iReLU function. The quantized code is optimized by combining multiple loss functions to retain the response size of the target feature and suppress irrelevant information.
It alleviates the potential risks of uniform segmentation, reduces information loss, enhances the representation ability of quantized coding, and obtains more accurate expression of image information.
Smart Images

Figure CN114332495B_ABST
Abstract
Description
Background Art
[0002] Image feature quantization refers to extracting the features of the input image and expressing the image data with its feature code. After obtaining the quantitative feature code of the image, this feature code can be applied to subsequent related reasoning tasks, such as target detection in the image, image classification and recognition, etc.
[0003] An existing method for quantizing image features is to divide the deep features of the sample into horizontal blocks, and then supervise the classification loss function on the features of each block to optimize the expression of local features. However, the potential risk of this method is that uniform horizontal block division may divide objects with the same attributes / structures into different parts.
[0004] Another existing method for quantifying image features is to use an effective deep hash coding method. However, this type of binary hash coding method is prone to cause a large loss of information when processing features. However, the contribution of features of different parts of the target to the representation is different. More discriminative parts should have higher response values, while binary hashing actually weakens the expression of such information (responses within a certain range become 0 or 1). Summary of the invention
[0005] In view of the problems in the prior art, the purpose of the present invention is to provide an image feature quantization method, system, device and storage medium, which can obtain and optimize local detail features through a sliding window method to alleviate the potential risks of uniform segmentation.
[0006] The embodiment of the present invention provides an image feature quantification method, comprising the following steps:
[0007] S100: Input the image to be processed into a feature extraction network to obtain a feature map;
[0008] S200: extracting a plurality of local features at different positions in the feature map using a sliding window;
[0009] S300: Obtaining a continuous feature vector of a specified dimension according to a plurality of local features in the feature map;
[0010] S400: Obtaining quantization codes of each local feature based on the continuous feature vector;
[0011] S500: splicing the quantized codes of the local features to obtain the target features of the image to be processed.
[0012] In some embodiments, the feature extraction network is a deep learning neural network, and the feature map is a deep feature map.
[0013] In some embodiments, between step S200 and step S300, the following steps are also included:
[0014] The local features are pooled using a global mean pooling layer to obtain feature vectors of each local feature.
[0015] In some embodiments, step S300 includes the following steps:
[0016] Inputting feature vectors of multiple local features in the feature map into fully connected layers of specified dimensions respectively;
[0017] The output features of the fully connected layer are respectively subjected to nonlinear transformation to obtain continuous feature vectors of a specified dimension corresponding to each local feature.
[0018] In some embodiments, performing a nonlinear transformation on the output features of the fully connected layer includes: performing a nonlinear transformation on the output features of the fully connected layer using a ReLU function.
[0019] In some embodiments, step S400 includes the following steps:
[0020] The floating-point features in the continuous feature vector are converted into integer codes to obtain quantized codes of each local feature.
[0021] In some embodiments, the floating-point features in the continuous feature vector are converted into integer codes using the iReLU function:
[0022]
[0023] The features in the continuous feature vector are used as the variable x in the iReLU function, and the obtained iReLU(x) is the output integer code.
[0024] In some embodiments, between step S400 and step S500, the following steps are also included:
[0025] Calculate the loss value based on the continuous feature vector and quantization code of each local feature;
[0026] A reverse iterative optimization quantization coding network is performed based on the loss value, wherein the quantization coding network includes a network implementing steps S100 to S400.
[0027] In some embodiments, the calculation of the loss value based on the continuous feature vectors and quantization codes of each local feature comprises the following steps:
[0028] Input the continuous feature vectors of each local feature into the classification layer for multi-label prediction, and calculate the cross entropy loss function value;
[0029] The L2 loss function is used to calculate the L2 loss function value based on the continuous feature vector and quantization code of each local feature;
[0030] Setting a penalty weight value of the L2 loss function value;
[0031] The L2 loss function value is multiplied by the penalty weight value and then added to the cross entropy loss function value to obtain a total loss value.
[0032] In some embodiments, the penalty weight value is calculated according to the following formula:
[0033]
[0034] Among them, α(t) is the penalty weight value at the tth iteration, T1 is the starting point of the iteration round, T2 is the stopping point of the iteration round, and α f is the preset stable weight value.
[0035] The embodiment of the present invention further provides an image feature quantization system, which is used to implement the image feature quantization method. The system includes:
[0036] A feature map acquisition module is used to input the image to be processed into a feature extraction network to obtain a feature map;
[0037] A local feature acquisition module, used for extracting a plurality of local features at different positions in the feature map by using a sliding window;
[0038] A continuous feature acquisition module, used to acquire a continuous feature vector of a specified dimension according to a plurality of local features in the feature map;
[0039] A quantization code acquisition module, used to obtain the quantization code of each local feature based on the continuous feature vector;
[0040] The target feature acquisition module is used to splice the quantized codes of the local features to obtain the target feature of the image to be processed.
[0041] The embodiment of the present invention further provides an image feature quantization device, including:
[0042] processor;
[0043] a memory storing executable instructions of the processor;
[0044] The processor is configured to perform the steps of the image feature quantification method by executing the executable instructions.
[0045] An embodiment of the present invention further provides a computer-readable storage medium for storing a program, wherein the program implements the steps of the image feature quantification method when executed by a processor.
[0046] 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.
[0047] The image feature quantification method, system, device and storage medium of the present invention have the following beneficial effects:
[0048] The present invention obtains and optimizes local detail features through a sliding window method, which can alleviate the potential risks of uniform segmentation. In some embodiments, the floating-point features in the continuous feature vector are converted into integer codes through the iRelu function, retaining the different response sizes of the target effective features and suppressing the expression of irrelevant information, and then optimizing the information loss in the quantization process, thereby strengthening the representation ability of the quantization code by supervising the expression of local detail features, and obtaining quantized features that can more accurately express image information. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Other features, objectives and advantages of the present invention will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following accompanying drawings.
[0050] Figure 1 is a flow chart of an image feature quantification method according to an embodiment of the present invention;
[0051] Figure 2 is a network structure diagram of image feature quantization according to an embodiment of the present invention;
[0052] Figure 3 is a flow chart of calculating loss value according to an embodiment of the present invention;
[0053] Figure 4 is a structural schematic diagram of an image feature quantization system according to an embodiment of the present invention;
[0054] Figure 5 is a schematic structural diagram of an image feature quantization device according to an embodiment of the present invention;
[0055] Figure 6 It is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION
[0056] 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 limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0057] 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.
[0058] 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. Therefore, the actual execution order may be changed according to the actual situation.
[0059] like Figure 1 As shown, an embodiment of the present invention provides an image feature quantization method, comprising the following steps:
[0060] S100: Input the image to be processed into a feature extraction network to obtain a feature map;
[0061] S200: extracting a plurality of local features at different positions in the feature map using a sliding window;
[0062] S300: Obtaining a continuous feature vector of a specified dimension according to a plurality of local features in the feature map;
[0063] S400: Obtaining quantization codes of each local feature based on the continuous feature vector;
[0064] S500: splicing the quantized codes of the local features to obtain the target features of the image to be processed.
[0065] In the image feature quantization method of the present invention, first, feature maps are extracted through step S100, and local detail features are acquired and optimized using a sliding window through step S200, which can alleviate the potential risk of uniform segmentation, and continuous feature vectors corresponding to each local feature are acquired through step S300, and quantization codes of each local feature are acquired through step S400, and finally, the quantization codes are spliced and fused through step S500 to obtain the final output target features, which can be used for some subsequent related reasoning tasks, such as target detection in images, image classification and recognition, etc.
[0066] Figure 2 The network structure for implementing the image feature quantization method of the present invention is shown, wherein the arrow represents forward propagation, and the part in the dotted box is the inference network for implementing the above steps S100 to S500. In this embodiment, the feature extraction network is a deep learning neural network, and the feature map is a deep feature map. Figure 2 The ResNet50 network is taken as an example for explanation. In step S100, the backbone of ResNet50 is used to extract a deep feature map, whose dimensions are B, C, H, W (C = 2048).
[0067] In step S200, a sliding window of size B, C, h, W is designed, and the corresponding local features are extracted by sliding along the H dimension with a stride=k amplitude, where k is the preset sliding window size. The local features obtained by step S300 are the local features corresponding to each sliding window.
[0068] In this embodiment, between step S200 and step S300, the following step is further included: applying a global mean pooling layer to the local features to obtain feature vectors of each local feature. Specifically, in this embodiment, after the local features are extracted in step S200, GeM pooling (Global Generalized-Mean Pooling) is used to extract each local feature vector f1 of 2048 dimensions.
[0069] In this embodiment, if Figure 2 As shown, step S300 includes the following steps:
[0070] Inputting the multiple local features in the feature map into the fully connected layer fc of the specified dimension respectively;
[0071] The output features of the fully connected layer fc are respectively subjected to nonlinear transformation to obtain continuous feature vectors of a specified dimension corresponding to each local feature. Specifically, the ReLU function is used for nonlinear transformation in this embodiment. The present invention uses the ReLU function instead of Tanh as an activation function to suppress the expression of irrelevant information to a certain extent.
[0072] Specifically, in this embodiment, each local feature vector f1 is input into a defined fully connected layer fc ([2048, D], default D = 512), and a nonlinear transformation is performed using a ReLU function to obtain a continuous feature vector f2 of dimension D. Here, D is a specified dimension, and its value can be adjusted as needed.
[0073] As mentioned above, the existing method of processing target features using binary hash coding does not make fine-grained distinctions between responses of different parts, weakening the expression of information of more discriminative parts. In this embodiment, further, an iReLU function is proposed. This function refers to the idea of the ReLU function and replaces the sign to retain the different response sizes of the target features. Compared with the binary coding of the sign, the iReLU function can not only reduce the quantized information difference and precision loss, but also retain the difference between different response areas, obtain a more robust representation, and achieve more refined quantization coding, so that more discriminative parts can have higher response values and more obvious feature expressions, which achieves the retention of different response size characteristics of effective target features and suppresses irrelevant information expression.
[0074] Specifically, the step S400 includes the following steps:
[0075] The iReLU function is used to convert the floating-point features in the continuous feature vector into integer codes to obtain quantized codes of each local feature.
[0076] In this embodiment, the formula of the iReLU function can be expressed as follows:
[0077]
[0078] The features in the continuous feature vector are used as the variable x in the iReLU function, and the obtained iReLU(x) is the output integer code.
[0079] Therefore, this embodiment converts the floating-point features in the continuous feature vector into integer codes through the iRelu function, retains the different response sizes of the target effective features and suppresses the expression of irrelevant information, optimizes the existing binary hash coding problem of serious information loss during the quantization process. Although it is quite insufficient compared to the binary hash coding in calculation and storage, it achieves a more detailed local description in the coding features and retains the values of different response degrees in different local areas, thereby obtaining more distinctive and robust quantization features.
[0080] Furthermore, in this embodiment, a multi-loss joint optimization method is provided. By optimizing the information loss in the quantization process, the representation capability of the quantization coding is enhanced by supervising the expression of local detail features, and quantized features that can more accurately express image information are obtained.
[0081] Specifically, Figure 2 As shown, between step S400 and step S500, the following steps are also included:
[0082] Calculate the loss value based on the continuous feature vector and quantization code of each local feature;
[0083] Based on the loss value, a reverse iterative optimization quantization coding network is performed, wherein the quantization coding network includes a network implementing steps S100 to S400, that is, Figure 2 The reasoning network in the dashed box.
[0084] like Figure 3 As shown, in this embodiment, the continuous feature vector and quantization coding based on each local feature calculates the loss value, including the following steps:
[0085] S410: Input the continuous feature vectors of each local feature into the softmax classification layer for multi-label prediction, and calculate the cross entropy loss function value L c , L c The mean of the cross entropy loss function values calculated for each local feature;
[0086] S420: In order to control the quantization error of the D-dimensional continuous vector f2 converted into the integer quantization code f3, an L2 loss function is used as a quantization loss function, and the L2 loss function value is calculated based on the continuous feature vectors and quantization codes of each local feature, which is expressed as L2;
[0087] The calculation formula of L2 is as follows:
[0088]
[0089] Among them, f 3_i represents the i-th feature in the quantized code f3, f 2_i represents the i-th feature in the quantized code f2, and n represents the total number of features;
[0090] S430: Setting a penalty weight value of the L2 loss function value;
[0091] S440: After multiplying the L2 loss function value by the penalty weight value, the resultant is added to the cross entropy loss function value to obtain a total loss value, that is, a calculation formula for the total loss value L is as follows:
[0092] L=L c +αL2
[0093] Among them, α is the penalty weight. That is, for the quantization loss, it is necessary to release the penalty signal appropriately on the basis of the effective supervision of the cross entropy loss, and the penalty signal weight is recorded as α. The penalty weight is preferably a variable value. In the early stage of model training, the quantization error is large. In order not to affect the normal optimization of the cross entropy loss, α should take a smaller value; in the middle and late stages of model training, the penalty signal of classification supervision tends to be stable, and the quantization error gradually decreases. At this time, the quantization penalty signal is more effective and reliable, and the penalty weight α of the quantization process on the model should be appropriately increased.
[0094] Specifically, in this embodiment, the penalty weight value is calculated according to the following formula:
[0095]
[0096] Among them, α(t) is the penalty weight value at the tth iteration, T1 is the starting point of the iteration round, T2 is the stopping point of the iteration round, and α f It is a preset stable weight value, which can be a value set artificially based on experience.
[0097] In another implementation, the penalty weight values α at different stages may also be manually set.
[0098] like Figure 4 As shown, an embodiment of the present invention further provides an image feature quantization system for implementing the image feature quantization method, the system comprising:
[0099] The feature map acquisition module M100 is used to input the image to be processed into the feature extraction network to obtain a feature map;
[0100] A local feature acquisition module M200 is used to extract a plurality of local features at different positions in the feature map using a sliding window;
[0101] A continuous feature acquisition module M300, used to acquire a continuous feature vector of a specified dimension according to a plurality of local features in the feature map;
[0102] A quantization code acquisition module M400, used to obtain the quantization code of each local feature based on the continuous feature vector;
[0103] The target feature acquisition module M500 is used to splice the quantized codes of the local features to obtain the target feature of the image to be processed.
[0104] In the image feature quantization system of the present invention, the feature map is first extracted by the feature map acquisition module M100, and the local detail features are acquired and optimized by the local feature acquisition module M200 using a sliding window, which can alleviate the potential risk of uniform segmentation, and the continuous feature vector corresponding to each local feature is acquired by the continuous feature acquisition module M300, and the quantization code acquisition module M400 obtains the quantization code of each local feature, and finally the quantization code is spliced and fused by the target feature acquisition module M500 to obtain the target feature of the final output, which can be used for some subsequent related reasoning tasks, such as target detection in images, image classification and recognition, etc.
[0105] Further, in this embodiment, the quantization code acquisition module M400 quantizes the local features through the above-mentioned iReLU function, and the floating-point features in the continuous feature vector are converted into integer codes to obtain the quantization codes of each local feature. This iReLU function refers to the idea of the ReLU function, and replaces the sign to retain the different response sizes of the target feature. Compared with the binary encoding of the sign, the iReLU function can not only reduce the information difference and precision loss of the quantization, but also retain the difference between different response areas, obtain a more robust representation, and achieve more refined quantization coding, so that more discriminating parts can have higher response values and more obvious feature expressions, and achieve the retention of different response size characteristics of effective target features and the suppression of irrelevant information expression.
[0106] Furthermore, in this embodiment, the image feature quantization system also includes a model optimization module for calculating the loss function and optimizing the inference network. The calculation of the loss function value can adopt the calculation method of the loss function value of the above steps S410 to S440, which will not be repeated here. In this embodiment, through the method of multi-loss joint optimization, the information loss in the quantization process is optimized, and the representation ability of the quantization coding is enhanced by supervising the expression of local detail features, so as to obtain quantized features that can more accurately express the image information.
[0107] The functions of each module of the image feature quantization system can be realized by adopting the specific implementation methods of the corresponding steps of the above-mentioned image feature quantization method, and the corresponding technical effects can be obtained, which will not be repeated here.
[0108] An embodiment of the present invention also provides an image feature quantization device, comprising a processor; a memory, in which executable instructions of the processor are stored; wherein the processor is configured to perform the steps of the image feature quantization method by executing the executable instructions.
[0109] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "platforms".
[0110] Refer to the following Figure 5 The electronic device 600 according to this embodiment of the present invention is described. Figure 5 The electronic device 600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0111] like Figure 5As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.
[0112] The storage unit stores a program code, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps according to various exemplary embodiments of the present invention described in the above image feature quantization method section of this specification. For example, the processing unit 610 can perform the following steps: Figure 1 Follow the steps shown in .
[0113] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0114] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0115] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0116] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0117] In the image feature quantization device, the program in the memory implements the steps of the image feature quantization method when executed by the processor. Therefore, the device can also obtain the technical effect of the above-mentioned image feature quantization method.
[0118] The embodiment of the present invention further provides a computer-readable storage medium for storing a program, wherein when the program is executed by a processor, the steps of the image feature quantization method are implemented. In some possible implementations, various aspects of the present invention may also be implemented in the form of a program product, which includes a program code, and when the program product is executed on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above image feature quantization method section of this specification.
[0119] refer to Figure 6 As shown, a program product 800 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be executed on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0120] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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 of the above.
[0121] The computer readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0122] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0123] When the program in the computer storage medium is executed by the processor, the steps of the image feature quantization method are implemented. Therefore, the computer storage medium can also obtain the technical effect of the above-mentioned image feature quantization method.
[0124] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for quantifying image features, characterized in that: The steps include: S100: Input the image to be processed into a feature extraction network to obtain a feature map; S200: extracting a plurality of local features at different positions in the feature map using a sliding window; S3 00: Obtain a continuous feature vector of a specified dimension according to a plurality of local features in the feature map; S400: Obtaining quantization codes of each local feature based on the continuous feature vector; S500: splicing the quantized codes of the local features to obtain the target features of the image to be processed; The following steps are also included between step S400 and step S500: Calculate the loss value based on the continuous feature vector and quantization code of each local feature; Performing reverse iterative optimization of a quantization coding network based on the loss value, wherein the quantization coding network includes a network that implements steps S100 to S400; The method of calculating the loss value based on the continuous feature vectors and quantization coding of each local feature comprises the following steps: Input the continuous feature vectors of each local feature into the classification layer for multi-label prediction, and calculate the cross entropy loss function value; The L2 loss function is used to calculate the L2 loss function value based on the continuous feature vector and quantization code of each local feature; Setting a penalty weight value of the L2 loss function value; The L2 loss function value is multiplied by the penalty weight value and then added to the cross entropy loss function value to obtain a total loss value.
2. The image feature quantification method according to claim 1, characterized in that: The feature extraction network is a deep learning neural network, and the feature map is a deep feature map.
3. The image feature quantification method according to claim 1, characterized in that: The following steps are also included between step S200 and step S300: The local features are pooled using a global mean pooling layer to obtain feature vectors of each local feature.
4. The image feature quantification method according to claim 3, characterized in that: The step S300 includes the following steps: Inputting feature vectors of multiple local features in the feature map into fully connected layers of specified dimensions respectively; The output features of the fully connected layer are respectively subjected to nonlinear transformation to obtain continuous feature vectors of a specified dimension corresponding to each local feature.
5. The image feature quantification method according to claim 4, characterized in that: Performing a nonlinear transformation on the output features of the fully connected layer includes: performing a nonlinear transformation on the output features of the fully connected layer using a ReLU function.
6. The image feature quantification method according to claim 1, characterized in that: The step S400 includes the following steps: The floating-point features in the continuous feature vector are converted into integer codes to obtain quantized codes of each local feature.
7. The image feature quantification method according to claim 6, characterized in that: The iReLU function is used to convert the floating-point features in the continuous feature vector into an integer code: The features in the continuous feature vector are used as the variable x in the iReLU function, and the obtained iReLU(x) is the output integer code.
8. The image feature quantification method according to claim 1, characterized in that: The penalty weight value is calculated according to the following formula: Among them, α(t) is the penalty weight value at the tth iteration, T1 is the starting point of the iteration round, T2 is the stopping point of the iteration round, and α f is the preset stable weight value.
9. An image feature quantization system, characterized in that: For implementing the image feature quantification method according to any one of claims 1 to 8, the system comprises: A feature map acquisition module is used to input the image to be processed into a feature extraction network to obtain a feature map; A local feature acquisition module, used for extracting a plurality of local features at different positions in the feature map by using a sliding window; A continuous feature acquisition module, used to acquire a continuous feature vector of a specified dimension according to a plurality of local features in the feature map; A quantization code acquisition module, used to obtain the quantization code of each local feature based on the continuous feature vector; The target feature acquisition module is used to splice the quantized codes of the local features to obtain the target feature of the image to be processed.
10. An image feature quantization device, characterized in that: include: processor; a memory storing executable instructions of the processor; The processor is configured to perform the steps of the image feature quantification method according to any one of claims 1 to 8 by executing the executable instructions.
11. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps of the image feature quantification method according to any one of claims 1 to 8 are implemented.
