Image processing method and device, computer equipment, and storage medium

The knowledge distillation training of the student network is carried out through the teacher network, which solves the problem that traditional object detection solutions rely on data labels, and achieves efficient and low-cost object detection performance improvement.

CN114519717BActive Publication Date: 2025-03-28SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111660709.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-03-28
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Traditional object detection solutions rely on data labels, resulting in high cost of obtaining data labels and unsatisfactory detection results, making it difficult to meet the needs of diverse scenarios.

Method used

The student network is subjected to knowledge distillation training through the teacher network, and the target detection network is pre-trained using a self-supervised training model to avoid relying on labeled data sets.

Benefits of technology

It significantly improves the target detection performance, reduces the implementation cost, and is suitable for diverse scenarios, allowing high-performance target detection models to be obtained without data labels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114519717B_ABST
    Figure CN114519717B_ABST
Patent Text Reader

Abstract

The present invention discloses an image processing method and device, a computer device, and a storage medium. The image processing method includes: performing image cropping processing on a received first image based on an area of ​​interest to generate a first image block, and obtaining a second image block by adjusting the size of the first image block; performing feature extraction processing on multiple second image blocks using a teacher network to obtain a first feature; the teacher network is a feature classification network; performing feature extraction processing on the first image using a student network to obtain a second feature, and the student network is a network to be trained; performing knowledge distillation processing on the second feature and the first feature, and the trained student network is used to detect targets on the second image. The present invention performs distillation training on the student network through the teacher network used for classification tasks, and does not need to use a data set with data labels. The present invention significantly improves the target detection performance of the trained student network and greatly reduces the cost investment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of target detection technology. More specifically, the present invention can provide an image processing method and device, a computer device, and a storage medium. Background Art

[0002] At present, in the field of target detection technology, algorithms based on deep learning are mainstream technical solutions in both academia and industry. Similar to most deep learning tasks, this type of method is data-driven, and the performance depends largely on the richness of the training data. Commonly used data sets may include MS COCO (Microsoft Common Objects in Context), PASCAL VOC (PASCAL Visual Object Classes), ImageNet (Image Network Dataset), etc. Larger and richer data sets can significantly improve the target detection effect. However, most target detection solutions need to rely on data sets with data labels, and data labels require a lot of manpower and material resources to obtain. Limited data sets with labels are difficult to meet the needs of target detection in more and more scenarios, which not only makes the target detection effect unsatisfactory, but also leads to excessively high implementation costs of target detection. Summary of the invention

[0003] In order to solve the problems of unsatisfactory target detection effect and high implementation cost in traditional target detection solutions, one or more embodiments of the present invention can provide an image processing method and device, computer equipment, and storage medium to achieve technical goals such as improving target detection effect and reducing investment cost.

[0004] To achieve the above technical objectives, the present invention provides an image processing method, which includes but is not limited to one or more of the following steps.

[0005] The received first image is cropped based on the region of interest to generate a first image block.

[0006] The second image block is obtained by adjusting the size of the first image block.

[0007] A teacher network is used to perform feature extraction processing on the plurality of second image blocks to obtain a first feature; the teacher network is a feature classification network used for classification tasks.

[0008] The first image is subjected to feature extraction processing by using a student network to obtain a second feature; the student network is a network to be trained.

[0009] The second feature and the first feature are subjected to knowledge distillation processing, and the student network is iteratively trained according to the result of the knowledge distillation processing, and the trained student network is used for target detection on the second image.

[0010] To achieve the above-mentioned technical objectives, the present invention may also provide an image processing device, which may include but is not limited to a first image cropping module, an image resizing module, a first feature extraction module, a second feature extraction module and a knowledge distillation processing module.

[0011] The first image cropping module is used to perform image cropping processing on the received first image based on the region of interest to generate a first image block.

[0012] The image size adjustment module is used to obtain the second image block by adjusting the size of the first image block.

[0013] The first feature extraction module is used to use a teacher network to perform feature extraction processing on multiple second image blocks to obtain a first feature; the teacher network is a feature classification network used for classification tasks.

[0014] The second feature extraction module is used to perform feature extraction processing on the first image using a student network to obtain a second feature; the student network is a network to be trained.

[0015] The knowledge distillation processing module is used to perform knowledge distillation processing on the second feature and the first feature, and iteratively train the student network according to the knowledge distillation processing result. The trained student network is used to perform target detection on the second image.

[0016] In order to achieve the above-mentioned technical objectives, the present invention can also provide a computer device, which may include a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the image processing method described in any embodiment of the present invention.

[0017] To achieve the above-mentioned technical objectives, the present invention may also provide a storage medium storing computer-readable instructions, which, when executed by one or more processors, enables the one or more processors to perform the steps of the image processing method described in any embodiment of the present invention.

[0018] To achieve the above technical objectives, the present invention can also provide a computer program product. When the instructions in the computer program product are executed by a processor, the steps of the image processing method described in any embodiment of the present invention are executed.

[0019] The beneficial effects of the present invention are as follows: compared with the traditional solution, the present invention performs distillation training on the student network through the teacher network for classification tasks, and does not require the use of a data set with data labels. The technical solution provided by the present invention can significantly improve the target detection performance of the trained student network, and greatly reduces the cost investment, the user satisfaction is very high, and the user experience is very good. The present invention can use the existing self-supervised training model (teacher network) based on the classification task to perform knowledge distillation on the network model (student network to be trained) for the target detection task to obtain a pre-trained model (trained student network) for the target detection task; the present invention can get rid of the dependence on expensive data labels, and is a general method, that is, the present invention can obtain reliable performance improvement on any image classification self-supervised model in the target detection task. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic flow chart of an image processing method in one or more embodiments of the present invention is shown.

[0021] Figure 2 A schematic diagram of an overall algorithm framework for performing distillation training on a student network using a teacher network in one or more embodiments of the present invention is shown.

[0022] Figure 3 A schematic diagram of sampling a region of interest in one or more embodiments of the present invention is shown.

[0023] Figure 4 A schematic diagram of a student network framework based on Mask R-CNN in one or more embodiments of the present invention is shown.

[0024] Figure 5 A schematic diagram showing the composition of an image processing device in one or more embodiments of the present invention.

[0025] Figure 6 A schematic diagram of the internal structure of a computer device in one or more embodiments of the present invention is shown. DETAILED DESCRIPTION

[0026] The following is a detailed explanation and description of an image processing method and apparatus, a computer device, and a storage medium specifically provided by the present invention in conjunction with the accompanying drawings.

[0027] like Figure 1 As shown, and can be combined Figure 2 One or more embodiments of the present invention can provide an image processing method, which may include but is not limited to one or more of the following steps.

[0028] Step 100: Perform image cropping processing on the received first image based on the region of interest to generate a first image block. It can be seen that the first image block of the present invention is an image block of the region of interest cropped from the first image.

[0029] Optionally, the embodiment of the present invention performs image cropping processing on the received first image based on the region of interest, including: determining a target frame by fusing superpixels in the first image, the area surrounded by the target frame is the region of interest; cropping (Crop) the image at the corresponding position of the region of interest. Specifically, the embodiment of the present invention adopts a selective search method to implement region of interest (ROI) sampling. Selective search is a classic target frame proposal algorithm. The present invention can use a series of empirical rules to fuse superpixels to obtain rectangular frames of different sizes. These rectangular frames are used as target frames (proposals) that may contain objects, which are used for subsequent algorithms to perform category judgment and object positioning. For the input first image, the present invention can use selective search to generate a series of target frames for the first image as regions of interest, and distillation learning will be performed on the features of these regions of interest later.

[0030] like Figure 3 As shown, in order to solve the problem that the generated target frames are too dense and numerous, the present invention preferably uses the NMS (Non-Maximum Suppression) algorithm to filter out a large number of target frames with high repetition. Specifically, the embodiment of the present invention assigns a random score value in the range of 0-1 to all target frame results generated by the selective search, and uses the random score value as a threshold to filter out frames with an IOU (Intersection-Over-Union) greater than the threshold, and finally randomly samples a portion of the remaining target frames for subsequent processing. Figure 2 In the feature extraction process of four feature scales, the IOU threshold of NMS in the embodiment of the present invention is set to {0.7, 0.7, 0.5, 0.5}, and the number of samples is set to {64, 64, 32, 16}, which respectively correspond to the target boxes used under the feature scales from low to high; and then the image area in the remaining target box is sampled. Of course, based on the content provided by the present invention, other methods can also be used to optimize the problem of dense target boxes. It should be understood that simple modifications or equivalent substitutions based on the present invention are also included in the protection scope of the present invention.

[0031] Step 200, obtain the second image block by adjusting the size of the first image block. In the embodiment of the present invention, the first image block is resized (Resize), and the image block obtained after the processing is the second image block. Among them, the specific implementation process of the resizing process involved in the present invention is selected according to the actual situation, for example, it may specifically include but not limited to nearest neighbor interpolation, bilinear interpolation, bicubic interpolation, interpolation based on pixel area relationship, Lanczos interpolation, etc.

[0032] Step 300, use the teacher network to perform feature extraction processing on multiple second image blocks to obtain the first feature; the teacher network is a feature classification network for classification tasks. Through the above process, the present invention realizes the feature extraction of the first image through the teacher network (pre-trained model). Specifically, the embodiment of the present invention uses the existing self-supervised training model as the teacher network, so as to perform distillation optimization on the student network to be trained. Among them, the teacher network in this embodiment uses the Swin Transformer as the network structure, and can add global and local contrastive loss functions as training targets for self-supervised learning.

[0033] The global loss function of this embodiment is as follows:

[0034]

[0035] Where P represents all samples in a training batch, s and t represent a pair of positive sample pairs, that is, different data-enhanced versions of the same input image, which are input into a student network and a teacher network respectively, p s and p t Represent the outputs of the two, respectively, and can be used to represent the global semantic expression of the image. |P| represents the number of samples in the training batch. This loss function is a form of contrast loss function. Minimizing this loss function means requiring the teacher network and the student network to have robust feature expressions for different data enhancements of the same sample.

[0036] The local loss function of this embodiment is as follows:

[0037]

[0038] Among them, P represents all samples in a training batch, s and t represent a pair of positive samples, which are input into a student network and a teacher network respectively, p i and p j Represents the local semantic expression of the image. For each local semantic expression p of the student network i (T in total), Indicates that p iThe local semantic expression with the highest cosine similarity is This loss function introduces local feature sensitivity. The self-supervised model obtained by the EsViT (Efficient self-supervised Vision Transformers) algorithm in the embodiment of the present invention already has strong feature expression capabilities and is independent of data labels. Therefore, the present invention uses this model as the teacher network to optimize the student network by network distillation.

[0039] Step 400, using the student network to perform feature extraction processing on the first image to obtain the second feature; the student network is the network to be trained. The student network in the embodiment of the present invention is specifically a student network based on Mask R-CNN (Mask Region Convolutional Neural Network), which may include a backbone network (Backbone), feature pyramid networks (FPN, feature pyramid networks), region of interest alignment network (ROI Align) and parameter-shared multi-layer perceptron layer (MLP, Multi-Layer Perceptron), the multi-layer perceptron layer is the target detection head (Head) shown in the figure.

[0040] like Figure 2 As shown, and can be combined Figure 3 and Figure 4 In the embodiment of the present invention, the feature extraction process of the first image using the student network includes: extracting original features at multiple scales from the first image, performing feature fusion processing on the original features at multiple scales to obtain fused features; performing region of interest alignment processing on the fused features and the features obtained by target sampling of the first image to obtain target features; performing format conversion processing on the target features to obtain a second feature having the same format as the first feature. The embodiment of the present invention can extract the second feature from the first image, which is specifically described as follows.

[0041] Optionally, the embodiment of the present invention may include extracting original features at multiple scales from the first image by: performing block processing and downsampling processing on the first image in sequence to obtain the original features. The embodiment of the present invention divides the first image into blocks, and then downsamples each block of the image, and the downsampling process is implemented using a backbone network; the backbone network in this embodiment includes multiple Swin Transformer Blocks, such as Figure 2Four Swin transform blocks are used to downsample four feature scale features. In the embodiment of the present invention, an input image with a spatial resolution of H×W×3 undergoes four stages of network operations. The first stage of network operations includes downsampling processing in a linear embedding manner. The second, third, and fourth stages of network operations all include downsampling processing in a patch merging manner. Features with resolutions of H / 4×W / 4×C, H / 8×W / 8×2C, H / 16×W / 16×4C, and H / 32×W / 32×8C are obtained respectively, where C represents the number of feature channels, i.e., the deeper the feature channels, the higher the number. K1-K4 are the number of stacked modules, which is determined by the scale of the adopted Swin Transformer.

[0042] Optionally, the embodiment of the present invention may include: making the original features at different scales have the same number of channels based on the convolution operation; performing pixel-by-pixel addition processing on the original features with the same number of channels to perform feature fusion processing on the original features at different scales. The embodiment of the present invention realizes the fusion of features of different feature scales through a feature pyramid network. The feature pyramid network is used to introduce high-level semantics on the underlying features without increasing excessive computational complexity. In the embodiment of the present invention, the features of the four feature scales from the backbone network are adjusted to a uniform number of channels through a convolution module (Conv) through a convolution operation, where "+" represents the pixel-by-pixel addition of the features, and the added features are fused once through the convolution module.

[0043] like Figure 4 As shown, the embodiment of the present invention performs region of interest alignment processing on the fused features and the features obtained by target sampling of the first image, including: determining the region of interest based on the features obtained by target sampling of the first image, and extracting the target features from the fused features according to the region of interest. Among them, the process of determining the region of interest can adopt target sampling based on the target frame, that is, the region of interest sampling (ROISample) is implemented by the selective search method of the present invention. The region of interest alignment operation can be a feature interpolation operation, such as obtaining features corresponding to the region of interest of the same size (for example, 7×7) by interpolation. It can be understood that the process of determining the target frame and sampling the region of interest has been described in detail in this specification and will not be repeated here.

[0044] like Figure 4As shown, in this embodiment, the second feature corresponding to each target detection frame can be obtained through the perceptron layer of the target detection head for distillation optimization. The target detection head (Head) in the embodiment of the present invention is a parameter-sharing perceptron layer, which specifically includes two fully connected layers (FC) and a nonlinear activation function layer (ReLU). The target detection head can unify the features corresponding to the region of interest into the same form as the features output by the teacher network.

[0045] Step 500, performing knowledge distillation processing on the second feature and the first feature, and iteratively training the student network according to the knowledge distillation processing result, and the trained student network is used to perform target detection on the second image.

[0046] like Figure 2 As shown, the present invention can realize self-supervised training of target detection based on knowledge distillation. The present invention performs knowledge distillation processing on the second feature and the first feature, and iteratively trains the student network according to the knowledge distillation processing result, which may specifically include: determining the distillation loss result of the second feature and the first feature based on the loss function, and determining whether it is necessary to iteratively train the student network again according to the distillation loss result, until the distillation loss (Distillation Loss) result meets the preset conditions. The loss function in the embodiment of the present invention may include but is not limited to the L1 loss function, and the L1 loss function is minimized by iterative training, for example, the loss function result reaches a set threshold, that is, the preset conditions are met. Among them, the L1 loss function specifically refers to the 1st-order norm loss function, that is, the mean absolute error loss function.

[0047] After the embodiment of the present invention fully pre-trains the student network in a knowledge distillation manner, a randomly initialized RPN (Region Proposal Network), a randomly initialized target box classification layer (a fully connected layer) and a target box localization layer (a fully connected layer) are added to the downstream target detection task stage to obtain a detection framework for fine-tune.

[0048] Based on the above technical solution, the student network provided by the present invention can obtain the fused features based on the feature pyramid network, and then obtain the features of the position of interest after alignment of the region of interest; the teacher network used in the present invention obtains the sub-image block after cropping and resizing the original input image through the position of interest (i.e., the target box after sampling the region of interest), and inputs it into the teacher network to obtain the features of the region of interest; then the features of the student network and the features of the teacher network are subjected to knowledge distillation, and the present invention runs the above entire process, and the student network finally obtained can be used for downstream tasks of target detection. It can be seen from this that compared with the traditional solution, the technical solution proposed by the present invention has a reliable performance gain in the target detection task, especially compared with the fully supervised pre-training method, the present invention does not need to rely on data labels, and can obtain better performance. For example, on the MS COCO dataset, the average accuracy (mAP, Mean Average Precision) can be improved by more than 1%, and less data can be fine-tuned, and the performance comparable to that obtained by fine-tuning with the full amount of data can be obtained. Compared with the problem that conventional technologies are easily restricted by application scenarios, the present invention can be used in specific application scenarios. Even in the absence of data labels, the present invention can pre-train the target detection network model in a specific image domain, thereby saving a lot of manpower and material resources and greatly reducing investment costs.

[0049] like Figure 5 As shown, based on the same inventive technical concept as the image processing method provided by the present invention, one or more embodiments of the present invention can also provide an image processing device. The image processing device of the embodiment of the present invention includes but is not limited to a first image cropping module 601, an image resizing module 602, a first feature extraction module 603, a second feature extraction module 604, and a knowledge distillation processing module 605, which are specifically described as follows.

[0050] The first image cropping module 601 may be configured to perform image cropping processing on the received first image based on the region of interest to generate a first image block.

[0051] Optionally, the first image cropping module 601 is used to determine a target frame by fusing superpixels in the first image, and the area surrounded by the target frame is the region of interest; the first image cropping module 601 can be used to crop the image at a position corresponding to the region of interest.

[0052] The image resizing module 602 may be configured to obtain a second image block by resizing the first image block.

[0053] The first feature extraction module 603 can be used to perform feature extraction processing on multiple second image blocks using a teacher network to obtain a first feature; the teacher network is a feature classification network used for classification tasks.

[0054] Specifically, the first feature extraction module 603 of the embodiment of the present invention is used to extract original features at multiple scales from the first image, and can be used to perform feature fusion processing on the original features at multiple scales to obtain fused features. The first feature extraction module 603 is used to perform region of interest alignment processing on the fused features and the features obtained by target sampling of the first image to obtain target features; the first feature extraction module 603 is used to perform format conversion processing on the target features to obtain a second feature having the same format as the first feature.

[0055] Optionally, the first feature extraction module 603 may be used to sequentially perform block processing and down-sampling processing on the first image to obtain original features.

[0056] Optionally, the first feature extraction module 603 can be used to make the original features at different scales have the same number of channels based on a convolution operation, and to perform pixel-by-pixel addition processing on the original features with the same number of channels, so as to perform feature fusion processing on the original features at different scales.

[0057] Optionally, the first feature extraction module 603 may be used to determine a region of interest based on features obtained by performing target sampling on the first image, and to extract target features from the fused features according to the region of interest.

[0058] The second feature extraction module 604 is used to perform feature extraction processing on the first image using a student network to obtain a second feature; the student network is a network to be trained.

[0059] The knowledge distillation processing module 605 can be used to perform knowledge distillation processing on the second feature and the first feature, and iteratively train the student network according to the knowledge distillation processing result. The trained student network is used to perform target detection on the second image.

[0060] Specifically, the knowledge distillation processing module 605 can be used to determine the distillation loss result of the second feature and the first feature based on the loss function, and to determine whether the student network needs to be iteratively trained again according to the distillation loss result until the distillation loss result meets the preset conditions.

[0061] like Figure 6As shown, based on the same inventive technical concept as the image processing method provided by the present invention, one or more embodiments of the present invention can also provide a computer device, the computer device comprising a memory and a processor, the memory storing computer-readable instructions, the computer-readable instructions being executed by the processor, so that the processor can execute the steps of the image processing method in any embodiment of the present invention. It should be understood that the detailed execution flow of the image processing method of the present invention has been described in detail in this specification, and will not be repeated here.

[0062] like Figure 6 As shown, based on the same inventive technical concept as the image processing method provided by the present invention, one or more embodiments of the present invention can also provide a storage medium storing computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the image processing method in any embodiment of the present invention. It is understandable that the detailed execution flow of the image processing method of the present invention has been described in detail in this specification and will not be repeated here.

[0063] The image processing method provided by the present invention is based on the same inventive technical concept. One or more embodiments of the present invention can also provide a computer program product. When the instructions in the computer program product are executed by a processor, the steps of the image processing method in any embodiment of the present invention are executed. It can be understood that the detailed execution flow of the image processing method of the present invention has been described in detail in this specification and will not be repeated here.

[0064] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable storage medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, apparatus, or device and execute instructions), or in conjunction with such instruction execution system, apparatus, or device. For purposes of this specification, "computer-readable storage medium" may be any device that can contain, store, communicate, propagate, or transmit a program for use by an instruction execution system, apparatus, or device, or in conjunction with such instruction execution system, apparatus, or device. More specific examples of computer-readable storage media (a non-exhaustive list) include the following: an electrical connection with one or more wirings (electronic devices), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM, Erasable Programmable Read-Only Memory, or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM, Compact Disc Read-Only Memory). In addition, the computer-readable storage medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.

[0065] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA, Programmable Gate Array), a field programmable gate array (FPGA, Field Programmable Gate Array), etc.

[0066] In the description of this specification, the description with reference to the terms "this embodiment", "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0067] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0068] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and simple improvements made to the essential contents of the present invention should be included in the protection scope of the present invention.

Claims

1. An image processing method, characterized in that: include: Performing image cropping processing on the received first image based on the region of interest to generate a first image block; Obtaining a second image block by adjusting the size of the first image block; Performing feature extraction processing on the plurality of second image blocks using a teacher network to obtain a first feature; the teacher network is a feature classification network used for classification tasks; The first image is subjected to feature extraction processing by using a student network to obtain a second feature; the student network is a network to be trained; the feature extraction processing by using the student network to the first image includes: extracting original features at multiple scales from the first image; performing feature fusion processing on the original features at multiple scales to obtain fused features; performing region of interest alignment processing on the fused features and the features obtained by performing target sampling on the first image to obtain target features; performing format conversion processing on the target features to obtain a second feature having the same format as the first features; The second feature and the first feature are subjected to knowledge distillation processing, and the student network is iteratively trained according to the result of the knowledge distillation processing, and the trained student network is used for target detection on the second image.

2. The image processing method according to claim 1, characterized in that: The extracting original features at multiple scales from the first image comprises: The first image is sequentially subjected to block processing and down-sampling processing to obtain the original features.

3. The image processing method according to claim 1, characterized in that: The performing feature fusion processing on the original features at the multiple scales comprises: Based on the convolution operation method, the original features at different scales have the same number of channels; The original features with the same number of channels are added pixel by pixel to perform feature fusion processing on the original features at different scales.

4. The image processing method according to claim 1, characterized in that: The performing region of interest alignment processing on the fused features and the features obtained by target sampling of the first image comprises: Determine a region of interest based on the features obtained by performing target sampling on the first image; The target feature is extracted from the fused features according to the region of interest.

5. The image processing method according to claim 1, characterized in that: The performing knowledge distillation processing on the second feature and the first feature, and iteratively training the student network according to the knowledge distillation processing result, includes: Determine a distillation loss result of the second feature and the first feature based on the loss function; Determine whether it is necessary to iteratively train the student network again according to the distillation loss result until the distillation loss result meets a preset condition.

6. The image processing method according to claim 1, characterized in that: The performing image cropping processing on the received first image based on the region of interest comprises: Determine a target frame by fusing superpixels in the first image, where the area surrounded by the target frame is the region of interest; The image at the position corresponding to the region of interest is cropped.

7. An image processing device, characterized in that: include: A first image cropping module, configured to perform image cropping processing on the received first image based on the region of interest to generate a first image block; An image resizing module, configured to obtain a second image block by resizing the first image block; A first feature extraction module, used for performing feature extraction processing on the plurality of second image blocks using a teacher network to obtain a first feature; the teacher network is a feature classification network used for classification tasks; A second feature extraction module is used to perform feature extraction processing on the first image using a student network to obtain a second feature; the student network is a network to be trained; the second feature extraction module is used to extract original features at multiple scales from the first image, and the second feature extraction module is used to perform feature fusion processing on the original features at multiple scales to obtain fused features; the second feature extraction module is used to perform region of interest alignment processing on the fused features and the features obtained by target sampling of the first image to obtain target features; the second feature extraction module is used to perform format conversion processing on the target features to obtain a second feature having the same format as the first feature; The knowledge distillation processing module is used to perform knowledge distillation processing on the second feature and the first feature, and iteratively train the student network according to the knowledge distillation processing result. The trained student network is used to perform target detection on the second image.

8. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the image processing method according to any one of claims 1 to 6.

9. A storage medium storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by one or more processors, the one or more processors are caused to perform the steps of the image processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image reduction method and system based on convolutional neural network

    CN111724306A

  • Label-free knowledge distillation method based on multi-target detection model and storage medium

    CN113610126A