Image processing method and device, electronic equipment and storage medium
By using different downsampling and feature enhancement networks in image processing, the missed detection problem caused by poor light is solved, and the detection accuracy in traffic accident damage determination is improved.
Patent Information
- Application Number
- CN202411541761.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-30
AI Technical Summary
During the process of destruction of traffic accidents, poor light images will lead to missed detection problems and poor detection accuracy.
Through different downsampling and feature enhancement networks, different scale information is adapted to different scale information, so that the subsequent fusion of feature enhanced images include information from different scales, such as high-resolution details to low-resolution global structures.
Avoid missed detection problems caused by dark light in the image and improve detection accuracy.
Smart Images

Figure CN119418166A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of financial technology, and in particular to an image processing method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of society, private cars have become one of the indispensable means of transportation, and the increasing number of vehicles has undoubtedly increased the incidence of traffic accidents. After a traffic accident occurs, the insurance company usually goes to the accident site to assess the damage, that is, by observing the photos taken at the scene to determine the vehicle parts repair plan, which serves as the basis for the auto insurance company's claims. The damage assessment process consumes a lot of human resources and the results obtained are highly subjective.
[0003] In the related art, in order to improve the efficiency of damage assessment, it is proposed that the user take photos of the accident vehicle, upload the captured images to the claims system, and analyze the images to achieve rapid damage assessment. However, when the light at the accident site is poor, it will lead to missed detection problems due to the dark light in the image when assessing the damage of the vehicle in the image, and the detection accuracy is poor. Therefore, it is urgent to provide an image processing method to solve the above technical problems. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose an image processing method, device, electronic device and storage medium, which can adapt to information of different scales through different downsampling and feature enhancement networks, so that the feature-enhanced image obtained by subsequent fusion includes information of different scales from high-resolution details to low-resolution global structures, thereby avoiding missed detection problems caused by dim light in the image and improving detection accuracy.
[0005] To achieve the above object, a first aspect of an embodiment of the present application provides an image processing method, the method comprising:
[0006] Acquire an image to be processed, and perform different downsampling processes on the image to be processed to obtain multiple image representations with different resolutions;
[0007] Inputting each of the image representations into the trained feature enhancement network respectively to obtain image features corresponding to each of the image representations;
[0008] Filtering out a target image representation having a resolution greater than or equal to a preset resolution from the plurality of image representations, and performing feature aggregation on a target image feature corresponding to each of the target image representations to obtain an aggregated feature;
[0009] Inputting the aggregated features and image features corresponding to other image representations into the trained first convolutional network to obtain a multi-level feature map including each of the image features, wherein the other image representations are image representations other than the target image representation in the multiple image representations;
[0010] Inputting the image to be processed into the trained residual network to obtain a residual feature map;
[0011] The multi-level feature map and the residual feature map are fused to obtain a feature-enhanced image.
[0012] In some embodiments, the trained feature enhancement network includes a trained second convolutional network and a trained convolutional group, and the step of inputting each of the image representations into the trained feature enhancement network to obtain image features corresponding to each of the image representations includes:
[0013] Inputting each of the image representations into the trained second convolutional network respectively, and expanding the number of channels of each of the image representations from the original number of channels to a preset number of channels through the trained second convolutional network, to obtain an expanded image representation corresponding to each of the image representations;
[0014] Inputting each of the expanded image representations into the trained convolution group to obtain image features corresponding to each of the image representations;
[0015] The aggregated features and other image features of other image representations are input into the trained first convolutional network to obtain a multi-level feature map containing each image feature, including:
[0016] The aggregated features and other image features of other image representations are subjected to channel compression processing through the trained first convolutional network to obtain a multi-level feature map containing each image feature and having the same number of channels as the original number of channels.
[0017] In some embodiments, the trained convolution group includes a plurality of third convolutional networks connected in sequence, and there are symmetrical jump connections between the trained third convolutional networks, and inputting each of the expanded image representations into the trained convolution group to obtain image features corresponding to each of the image representations includes:
[0018] Inputting each of the expanded image representations into a trained third convolutional network to obtain output intermediate image features;
[0019] For each trained third convolutional network, the output intermediate image features are transmitted to the next trained third convolutional network and the trained third convolutional network with a jump connection respectively;
[0020] When the last trained third convolutional network outputs an intermediate image feature, the output intermediate image feature is determined as the image feature corresponding to the image representation.
[0021] In some embodiments, the step of performing feature aggregation on target image features corresponding to each target image representation to obtain aggregated features includes:
[0022] Performing different downsampling processing on the target image features corresponding to each of the target image representations to obtain the target feature representation corresponding to each of the target image features;
[0023] Fusing each of the target feature representations to obtain a fused feature;
[0024] Segmenting the fused feature to obtain multiple sub-features;
[0025] Input each of the sub-features into different attention networks respectively, and determine the weight value corresponding to each sub-feature;
[0026] An aggregate feature is determined according to each of the sub-features and the corresponding weight value.
[0027] In some embodiments, determining the aggregate feature according to each of the sub-features and the corresponding weight value includes:
[0028] Obtain the product of each of the sub-features and the corresponding weight value to obtain multiple features to be fused;
[0029] Each of the features to be fused is spliced to obtain an aggregated feature.
[0030] In some embodiments, the fusing the multi-level feature map with the residual feature map to obtain a feature-enhanced image includes:
[0031] Obtain a first pixel value corresponding to each pixel point in the multi-level feature map, and a second pixel value corresponding to each pixel point in the residual feature map;
[0032] Determine the sum of the first pixel value and the second pixel value corresponding to the same pixel point to obtain the target pixel value of each pixel point;
[0033] According to the target pixel value of each pixel, draw the feature enhanced image.
[0034] In some embodiments, after fusing the multi-level feature map with the residual feature map to obtain a feature-enhanced image, the method further includes:
[0035] The feature-enhanced image is input into the trained damage assessment model to determine the damaged location of the object in the feature-enhanced image and the corresponding repair strategy.
[0036] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides an image processing device, including:
[0037] A downsampling unit, used to obtain an image to be processed, and perform different downsampling processes on the image to be processed to obtain multiple image representations with different resolutions;
[0038] A first input unit, used to input each of the image representations into a trained feature enhancement network to obtain image features corresponding to each of the image representations;
[0039] a feature aggregation unit, configured to select a target image representation having a resolution greater than or equal to a preset resolution from the plurality of image representations, and perform feature aggregation on a target image feature corresponding to each of the target image representations to obtain an aggregated feature;
[0040] a second input unit, configured to input the aggregated features and image features corresponding to other image representations into the trained first convolutional network to obtain a multi-level feature map including each of the image features, wherein the other image representations are image representations other than the target image representation in the multiple image representations;
[0041] A third input unit is used to input the image to be processed into the trained residual network to obtain a residual feature map;
[0042] The fusion unit is used to fuse the multi-level feature map with the residual feature map to obtain a feature-enhanced image.
[0043] In some embodiments, the trained feature enhancement network includes a trained second convolutional network, and a trained convolutional group, a first input unit, including:
[0044] A channel expansion subunit, used to input each of the image representations into the trained second convolutional network, and expand the number of channels of each of the image representations from the original number of channels to a preset number of channels through the trained second convolutional network, so as to obtain an expanded image representation corresponding to each of the image representations;
[0045] A first input subunit, used for inputting each of the expanded image representations into the trained convolution group to obtain image features corresponding to each of the image representations;
[0046] The second input unit comprises:
[0047] The channel compression subunit is used to perform channel compression processing on the aggregated features and other image features of other image representations through the trained first convolutional network to obtain a multi-level feature map containing each image feature and with the same number of channels as the original number of channels.
[0048] In some embodiments, the trained convolution group includes a plurality of third convolutional networks connected in sequence, and there are symmetrical jump connections between the trained third convolutional networks, and the input subunit is used to:
[0049] Inputting each of the dilated image representations into the trained convolutional group;
[0050] For each trained third convolutional network, the output intermediate image features are transmitted to the next trained third convolutional network and the trained third convolutional network with a jump connection respectively;
[0051] When the last trained third convolutional network outputs an intermediate image feature, the output intermediate image feature is determined as the image feature corresponding to the image representation.
[0052] In some embodiments, the feature aggregation unit includes:
[0053] A downsampling subunit, configured to perform different downsampling processing on the target image features corresponding to each of the target image representations, so as to obtain a target feature representation corresponding to each of the target image features;
[0054] A fusion subunit, used for fusing each of the target feature representations to obtain a fused feature;
[0055] A segmentation subunit, used to segment the fused feature to obtain a plurality of sub-features;
[0056] A second input subunit is used to input each of the sub-features into different attention networks respectively to determine a weight value corresponding to each sub-feature;
[0057] The determination subunit is used to determine the aggregate feature according to each of the sub-features and the corresponding weight value.
[0058] In some embodiments, a subunit is determined to:
[0059] Obtain the product of each of the sub-features and the corresponding weight value to obtain multiple features to be fused;
[0060] Each of the features to be fused is spliced to obtain an aggregated feature.
[0061] In some embodiments, the fusion unit is used to:
[0062] Obtain a first pixel value corresponding to each pixel point in the multi-level feature map, and a second pixel value corresponding to each pixel point in the residual feature map;
[0063] Determine the sum of the first pixel value and the second pixel value corresponding to the same pixel point to obtain the target pixel value of each pixel point;
[0064] According to the target pixel value of each pixel, draw the feature enhanced image.
[0065] In some embodiments, the apparatus is further configured to:
[0066] The feature-enhanced image is input into the trained damage assessment model to determine the damaged location of the object in the feature-enhanced image and the corresponding repair strategy.
[0067] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0068] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0069] The image processing method, device, electronic device and storage medium proposed in the present application obtain an image to be processed, perform different downsampling processing on the image to be processed respectively, and obtain multiple image representations with different resolutions; input each of the image representations into a trained feature enhancement network respectively to obtain image features corresponding to each of the image representations; screen out target image representations with a resolution greater than or equal to a preset resolution from the multiple image representations, and perform feature aggregation on the target image features corresponding to each of the target image representations to obtain aggregated features; input the aggregated features and image features corresponding to other image representations into a trained first convolutional network to obtain a multi-level feature map containing each image feature, wherein the other image representations are image representations other than the target image representation in the multiple image representations; input the image to be processed into a trained residual network to obtain a residual feature map; and fuse the multi-level feature map with the residual feature map to obtain a feature-enhanced image. In this way, different downsampling and feature enhancement networks are used to adapt to different scale information, so that the feature-enhanced image obtained by subsequent fusion includes information of different scales, from high-resolution details to low-resolution global structures, avoiding missed detection problems caused by dim light in the image and improving detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 is a flowchart of an image processing method provided in an embodiment of the present application;
[0071] Figure 2 This is a process of performing feature enhancement on an image to be processed provided by an embodiment of the present application;
[0072] Figure 3 yes Figure 1 Flowchart of step S102 and step S104 in FIG. 1 ;
[0073] Figure 4 is a schematic diagram of the structure of a feature enhancement network provided in an embodiment of the present application;
[0074] Figure 5 yes Figure 3 Flow chart of step S202 in FIG.
[0075] Figure 6 yes Figure 1 Flow chart of step S103 in FIG.
[0076] Figure 7 yes Figure 6 Flow chart of step S405 in FIG.
[0077] Figure 8 yes Figure 1 Another flow chart of the image processing method in;
[0078] Fig. 9 is a schematic diagram of the structure of an image processing device provided in an embodiment of the present application;
[0079] Fig.10 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0080] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0081] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0082] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0083] First, some nouns involved in this application are analyzed:
[0084] Residual Network (ResNet): It is a deep neural network architecture that includes multiple stacked residual blocks. The core component of the residual network is the residual block. A typical residual block consists of two parts: one is a direct skip connection, and the other is the main path that passes through multiple convolutional layers and other operations. The skip connection can directly pass the input signal to the output of the residual block and add it to the output of the main path. This design makes it easier for the network to learn the residual mapping between input and output, rather than directly learning the target output.
[0085] Residual networks can automatically learn features at different levels, from low-level local features to high-level global features. By stacking multiple residual blocks, very deep networks can be constructed to extract richer and more abstract feature representations. In computer vision tasks such as image recognition, object detection, and semantic segmentation, residual networks have demonstrated powerful feature extraction capabilities and significantly improved the performance of tasks.
[0086] Skip connection: Also known as a quick connection, it is a special connection method. Skip connection is a connection method that directly connects the output of a layer or part of the network to the deeper layer behind it. It bypasses some of the intermediate layers and forms a direct path.
[0087] For example, in a residual block, the input can be directly added to the output after being processed by multiple convolutional layers. This direct connection from input to output is a skip connection.
[0088] When the input and output dimensions of the jump connection are the same, an identity mapping can be achieved, that is, the output is equal to the input. This identity mapping, combined with the nonlinear mapping after processing by the intermediate layers, makes it easier for the network to learn the residual mapping between input and output. If the input and output dimensions are different, the dimensions can be adjusted by using appropriate linear transformations to make the jump connection work properly.
[0089] Based on this, the embodiments of the present application provide an image processing method, device, electronic device and storage medium, which aim to avoid missed detection problems caused by dim light in the image and improve detection accuracy.
[0090] The image processing method, device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the image processing method in the embodiments of the present application is described.
[0091] The image processing method provided in the embodiment of the present application relates to the field of business processing technology. The image processing method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or can be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the image processing method, etc., but is not limited to the above forms.
[0092] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0093] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0094] Figure 1 is an optional flowchart of the image processing method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.
[0095] Step S101 , obtaining an image to be processed, and performing different downsampling processes on the image to be processed to obtain multiple image representations with different resolutions.
[0096] The original image input into the whole processing flow may be a photo of a vehicle or other image that needs to be inspected for a component repair plan. The image to be processed may be a user taking a photo of the vehicle and uploading the photo through a vehicle damage assessment application so that the electronic device can obtain the image to be processed.
[0097] For details, please refer to Figure 2 , Figure 2 The processing process for feature enhancement of the processed image provided in the embodiment of the present application. The processed image is downsampled at different levels to obtain image representations of multiple different resolutions. The downsampling process can be implemented in a variety of ways, such as pooling operation (average pooling, maximum pooling) or setting a larger step size in the convolution operation.
[0098] For example, when using max pooling to downsample an image, a 2×2 max pooling layer can reduce the length and width of the image by half, thereby reducing the resolution. By selecting different max pooling layers (such as 2×2, 3×3, 4×4) at each downsampling and repeating different degrees of downsampling operations, multiple images with different resolutions are obtained. Each downsampling process reduces the number of pixels in the image and extracts feature information of different scales. The image representation is the image representation obtained after downsampling, which contains the image feature information at a specific resolution.
[0099] Specifically, Figure 2 As shown in the figure, the original height of the image to be processed is H, the width is W, and the number of channels is 3, that is, H×W×3. After different downsampling processes, the image features with a height of H / 4, a width of W / 4, and a number of channels of 3, that is, H / 4×W / 4×3, and the image features with a height of H / 8, a width of W / 8, and a number of channels of 3, that is, H / 8×W / 8×3, are obtained.
[0100] Step S102, input each image representation into the trained feature enhancement network to obtain the image features corresponding to each image representation.
[0101] After downsampling to obtain a plurality of image representations of different resolutions in step S101, each image representation is input into a trained feature enhancement network, so as to obtain image features corresponding to the image representations of different resolutions through the trained feature enhancement network.
[0102] Specifically, each downsampled image representation enters the feature enhancement network in turn, and after a series of calculations and transformations, more discriminative features are extracted.
[0103] For example, local features are extracted through the convolution layer, and nonlinearity is added through the activation function, so that the network can learn more complex feature patterns.
[0104] Among them, the feature enhancement network will expand the number of channels from the original number of channels to the preset number of channels. For example, the 3 channels of H×W×3 will be expanded to 24 channels, becoming H×W×24.
[0105] Step S103 , selecting target image representations whose resolution is greater than or equal to a preset resolution from the multiple image representations, and performing feature aggregation on target image features corresponding to each target image representation to obtain aggregated features.
[0106] Among them, the preset resolution is used to screen out high-resolution image adjustments. For the high-resolution target image representation, the target image features corresponding to each target image representation are aggregated by scale-aware feature aggregation (SAFA) to obtain aggregated features. The main purpose of SAFA is to perform targeted aggregation of features of different scales to highlight features that are more valuable to the task and improve the accuracy of the network's detection of door component repair solutions.
[0107] Specifically, SAFA first identifies different scales of information in the input features to learn detail levels of different resolutions. Then, it introduces an attention mechanism to weight features of different scales according to their importance. The attention mechanism can automatically learn which features are more critical to the current task, thereby giving these features higher weights.
[0108] Aggregate the weighted features of different scales. The aggregation method can be a simple weighted summation or a more complex fusion method, such as the feature fusion method based on deep learning. Through feature aggregation, feature information of different scales can be fused together to form a more comprehensive and representative feature representation. This feature representation not only contains information of different scales, but also highlights the features that are more valuable to the task.
[0109] For example, Figure 2As shown, the image features of H×W×24 with higher resolution are aggregated with the image features of H / 4×W / 4×24.
[0110] Step S104, inputting the aggregated features and image features corresponding to other image representations into the trained first convolutional network to obtain a multi-level feature map containing each of the image features, wherein the other image representations are image representations other than the target image representation in the multiple image representations.
[0111] Among them, see Figure 2 For low-resolution image representations other than the target image representation, the corresponding image features are directly passed to the first convolutional network through skip connections, so that the input parameters of the first convolutional network are the aggregated features and the low-resolution image representation. The aggregated features and other image features of other image representations are input into the trained first convolutional network to obtain image details containing multiple high-resolution aggregated features and a multi-level feature map of low-resolution global information.
[0112] Step S105, inputting the image to be processed into the trained residual network to obtain a residual feature map.
[0113] The image to be processed is input into the trained residual network, which learns the residual mapping between the input image and the output through a series of convolutional layers and jump connections. Finally, a residual feature map is obtained, which captures the difference between the image and the expected output due to factors such as illumination changes.
[0114] Step S106, fusing the multi-level feature map and the residual feature map to obtain a feature-enhanced image.
[0115] Among them, fusing the multi-level feature map and the residual feature map refers to the process of combining the multi-level feature map and the residual feature map to integrate the advantages of different features and improve the expressiveness of features. The feature-enhanced image is an image representation obtained after the fusion process, which has richer and more discriminative feature information and is more suitable for subsequent analysis and processing.
[0116] In steps S101 to S106 shown in the embodiment of the present application, by acquiring an image to be processed, different downsampling processes are performed on the image to be processed respectively to obtain multiple image representations with different resolutions; each of the image representations is input into a trained feature enhancement network respectively to obtain image features corresponding to each of the image representations; a target image representation with a resolution greater than or equal to a preset resolution is screened out from the multiple image representations, and feature aggregation is performed on the target image features corresponding to each of the target image representations to obtain aggregated features; the aggregated features and image features corresponding to other image representations are input into a trained first convolutional network to obtain a multi-level feature map containing each of the image features, wherein the other image representations are image representations other than the target image representation in the multiple image representations; the image to be processed is input into a trained residual network to obtain a residual feature map; and the multi-level feature map and the residual feature map are fused to obtain a feature-enhanced image. In this way, through different levels of downsampling and feature enhancement networks, it can adapt to information of different scales, so that the feature-enhanced image obtained by subsequent fusion includes information of different scales, from high-resolution details to low-resolution global structures, avoiding missed detection problems caused by dim light in the image and improving detection accuracy.
[0117] See also Figure 3 In some embodiments, the trained feature enhancement network includes a trained second convolutional network and a trained convolutional group, step S102 may include but is not limited to steps S201 to S202, and step S104 may include but is not limited to step S203:
[0118] Step S201, respectively input each of the image representations into the trained second convolutional network, and expand the number of channels of each of the image representations from the original number of channels to a preset number of channels through the trained second convolutional network to obtain an expanded image representation corresponding to each of the image representations.
[0119] Among them, see Figure 4 , Figure 4 A schematic diagram of the structure of a feature enhancement network provided for an embodiment of the present application. The feature enhancement network includes a second convolutional network and a convolution group composed of multiple third convolutional networks after the second convolutional network. The main function of the second convolutional network is to expand the originally low number of channels to a higher number of channels so as to use more channels to record features. Therefore, each image representation is input into the trained feature enhancement network respectively, and the number of channels of each of the image representations is expanded from the original number of channels to the preset number of channels through the trained second convolutional network, so as to obtain the expanded image representation corresponding to each image representation.
[0120] For example, Figure 4As shown, the image features of H×W×24 with higher resolution are aggregated with the image features of H / 4×W / 4×24.
[0121] Step S202: input each of the expanded image representations into the trained convolution group to obtain image features corresponding to each of the image representations.
[0122] Among them, the convolution group is used to extract features from each expanded image representation of the input to learn image features of image representations of different resolutions.
[0123] Step S203, performing channel compression processing on the aggregated features and other image features of other image representations through the trained first convolutional network to obtain a multi-level feature map containing each image feature and having the same number of channels as the original number of channels.
[0124] Among them, since the number of channels is expanded, it is necessary to compress the number of channels and restore it to the original number of channels. Therefore, the role of the first convolutional network is to perform channel compression processing on the image features, and finally obtain a multi-level feature map containing each image feature and the number of channels being the original number of channels.
[0125] In this way, by expanding the number of channels of the image representation from the original number of channels to the preset number of channels, the network can use more channels to record feature information. This allows the network to capture richer image features and improve adaptability to different types of vehicle component features and lighting changes. The convolution group can extract features from each expanded image representation of the input, and can learn image features of image representations of different resolutions. This helps the network consider both local details and global structures of the image. Compressing the expanded channels and restoring them to the original number of channels can keep the output multi-level feature map consistent with the number of channels of the input image, facilitating subsequent processing and analysis.
[0126] See also Figure 5 In some embodiments, step S202 may include but is not limited to steps S301 to S303:
[0127] Step S301, input each of the expanded image representations into the trained third convolutional network to obtain output intermediate image features.
[0128] Among them, see Figure 4 The convolution group in the feature enhancement network is composed of multiple third convolutional networks connected in sequence, and there are symmetrical jump connections between the trained third convolutional networks, that is, the convolutional layer sequence numbers of every two jump-linked third convolutional networks after training are the same.
[0129] For example, Figure 4There are 6 third convolutional networks in the network. The third convolutional network of convolutional layer number 1 is connected to the third convolutional network of convolutional layer number 6 through a skip connection; the third convolutional network of convolutional layer number 2 is connected to the third convolutional network of convolutional layer number 5 through a skip connection; the third convolutional network of convolutional layer number 3 is connected to the third convolutional network of convolutional layer number 4 through a skip connection. The sum of the convolutional layer numbers with skip connections is 7, that is, the skip connections between multiple third convolutional networks are symmetrical.
[0130] Specifically, each of the expanded image representations output by the second convolutional network is input into the trained convolutional group.
[0131] Step S302, for each trained third convolutional network, respectively transmit the output intermediate image features to the next trained third convolutional network and the trained third convolutional network with a jump connection.
[0132] Among them, for each trained third convolutional network, the intermediate image features output by it are transmitted to the next trained third convolutional network, and the intermediate image features are transmitted to the trained third convolutional network with jump connection.
[0133] For example, Figure 4 In the figure, for the third convolutional network with convolutional layer number 2, the intermediate image features of its output will be transmitted to the third convolutional network with convolutional layer number 3, and will also be transmitted to the third convolutional network with convolutional layer number 5 that has a jump connection with convolutional layer number 2 based on the jump connection.
[0134] Step S303: When the last trained third convolutional network outputs an intermediate image feature, the output intermediate image feature is determined as the image feature corresponding to the image representation.
[0135] Among them, when the last trained third convolutional network outputs an intermediate image feature, it means that the convolution group processing is completed, and the intermediate image feature output by the last trained third convolutional network is determined as the image feature corresponding to the image representation.
[0136] For example, Figure 4 In the example, when the third convolutional network with the convolutional layer number 6 outputs the intermediate image features, it indicates that the convolution group processing is completed, and the intermediate image features output by the third convolutional network with the convolutional layer number 6 are determined as the image features corresponding to the image representation.
[0137] In this way, the convolution group consists of multiple third convolutional networks connected in sequence, which can gradually and deeply extract features from the expanded image representation. This structure allows the network to learn image features of different levels and complexity, and improve the understanding of vehicle component details and overall structure. The jump connections between multiple third convolutional networks are symmetrical, which helps the two-way flow of information in the network. Symmetrical jump connections can better integrate and interact features at different levels, improving the richness and accuracy of features.
[0138] See also Figure 6 In some embodiments, step S103 may include but is not limited to steps S401 to S405:
[0139] Step S401 , performing different downsampling processing on the target image features corresponding to each of the target image representations to obtain the target feature representation corresponding to each of the target image features.
[0140] Among them, different levels of target feature representations can be obtained through downsampling, which can cover information of different scales, from high-resolution details to low-resolution global structures. Different levels of downsampling can extract feature representations of target image features at different scales, providing richer information for subsequent fusion and attention mechanisms.
[0141] Step S402, fusing each of the target feature representations to obtain a fused feature.
[0142] Among them, fusing target feature representations at different levels can comprehensively consider the information of target image features at different scales to obtain a more comprehensive and representative fusion feature. The fused features can combine the advantages of different scales, which is helpful for subsequent attention mechanisms and feature aggregation. Various fusion methods can be used, such as element-by-element addition, splicing and other operations, to fuse target feature representations at different levels.
[0143] For example, concatenation is performed on the channel dimension to combine features of different scales to form a fused feature.
[0144] Step S403, segmenting the fused feature to obtain multiple sub-features.
[0145] Among them, the fusion feature is divided into multiple sub-features, and the attention mechanism can be processed for each sub-feature separately, so that different attention networks can focus on different sub-feature parts and extract more targeted information. The divided sub-features can provide more feature changes and diversity, providing more options and possibilities for subsequent feature aggregation.
[0146] According to a specific segmentation strategy, the fused features are segmented into multiple sub-features. For example, segmentation can be performed on the channel dimension to divide the fused features into several groups of sub-features.
[0147] Step S404: input each of the sub-features into different attention networks respectively to determine the weight value corresponding to each sub-feature.
[0148] Among them, the attention network can assign different weight values to each sub-feature according to its importance. This can highlight important sub-features, suppress unimportant parts, and improve the discriminability of features. Through the attention mechanism, the network can automatically learn and select sub-features that are more valuable to the current task, improving the performance and adaptability of the model.
[0149] Specifically, different attention networks can learn and determine the weight value of each sub-feature according to the characteristics of the sub-feature and task requirements. Attention networks usually generate the weight value of sub-features through a series of calculations and transformations, such as convolution, fully connected layers, activation functions, etc.
[0150] Step S405: determining an aggregate feature according to each of the sub-features and the corresponding weight value.
[0151] Among them, the weight values of different sub-features are combined to achieve scale-aware feature aggregation. This aggregation method can adaptively adjust the contribution of features according to the importance of different scales, and improve the robustness to different lighting conditions and changes in vehicle components. Aggregation through the weight values determined by the attention mechanism can make the aggregated features more prominent, improve the discriminability of features and the accuracy of repair plan detection.
[0152] In this way, by obtaining target feature representations of different scales, it is possible to adapt to the multi-scale changes presented by the vehicle under different lighting conditions. Features of different scales can make the fusion process more comprehensive, and the attention mechanism can also highlight the important parts more targeted, providing a richer source of information for subsequent fusion and attention mechanisms. Splitting the fused features into multiple sub-features allows different attention networks to focus on different sub-feature parts for more targeted processing. This allows more accurate extraction of important information in each sub-feature. The attention network assigns different weight values according to the importance of the sub-features, which can highlight important sub-features and suppress unimportant parts. This can improve the discriminability of features.
[0153] See also Figure 7 In some embodiments, step S405 may include but is not limited to steps S501 to S502:
[0154] Step S501, obtaining the product of each of the sub-features and the corresponding weight value to obtain a plurality of features to be fused.
[0155] Among them, for each sub-feature, it is multiplied element-wise with the corresponding weight value determined by the attention network.
[0156] For example, a sub-feature is a multidimensional vector, such as a feature map with a specific length, width, and number of channels in an image feature. The weight value can be another vector or matrix with the same dimension as the sub-feature. Element-by-element multiplication means multiplying the elements at corresponding positions respectively to obtain a new vector or feature map, which is the feature to be fused.
[0157] Specifically, by multiplying the weight value, the important part of the sub-feature is magnified, and the unimportant part is relatively reduced. This can highlight the feature information that is valuable to the current task. According to different sub-features and task requirements, the weight value can be automatically adjusted to achieve adaptive processing of sub-features and improve the discriminability and effectiveness of features.
[0158] Step S502, concatenating each of the features to be fused to obtain an aggregated feature.
[0159] Among them, the splicing operation is usually performed in a specific dimension, such as splicing in the channel dimension.
[0160] Assuming that each feature to be fused is a multidimensional feature map, if it is spliced in the channel dimension, then the channels of each feature to be fused are connected in sequence.
[0161] For example, there are two features to be fused, the shape of the first feature map is H×W×C1, and the shape of the second feature map is H×W×C2. After splicing, the shape of the aggregated feature is H×W×(C1+C2). Specifically, multiple weighted features to be fused are spliced together to obtain an aggregated feature, which integrates the information of different sub-features. In this way, the advantages of each sub-feature can be fully utilized to improve the richness and comprehensiveness of the features. The aggregated feature can be used as the input of subsequent processing steps (such as further convolution operations, classification tasks, etc.), providing a more powerful feature representation for the operation of the entire model, which helps to improve the performance and accuracy of the model.
[0162] In this way, by multiplying the sub-features by the corresponding weight values element by element, the important parts of the sub-features can be magnified and the unimportant parts can be reduced. This allows the model to pay more attention to the feature information that is valuable to the current task during the processing process, improving the pertinence and effectiveness of the features. Multiple weighted features to be fused are spliced together, and the resulting aggregated features integrate the information of different sub-features. In this way, the advantages of each sub-feature can be fully utilized, and features of different scales and angles can be fused together, improving the richness and comprehensiveness of the features.
[0163] See also Figure 8 In some embodiments, the image processing method may also include but is not limited to step S601:
[0164] Step S601, input the feature-enhanced image into the trained damage assessment model to determine the damaged location of the object in the feature-enhanced image and the corresponding repair strategy.
[0165] Among them, the damage assessment model is usually a deep learning model, which can be composed of a convolutional neural network (CNN), a fully connected layer, an activation function, etc. It is designed to extract effective features from the input image and determine the damage location and repair strategy of the object based on these features. The feature-enhanced image obtained in the previous step contains richer and more discriminative feature information. These features have undergone a series of processing such as downsampling, feature enhancement network, convolutional network, residual network, and SAFA feature aggregation, which can better adapt to different lighting conditions and object changes. The feature-enhanced image provides a better input for the damage assessment model, which helps to improve the accuracy and reliability of damage assessment.
[0166] The feature-enhanced image is used as the input of the damage assessment model. Images are usually represented in the form of a matrix, where the value of each pixel represents information such as color and brightness. The model receives this matrix and gradually extracts features from the image through a series of calculations and transformations.
[0167] Specifically, the damage assessment model first performs further feature extraction on the input image. Through the operation of convolutional layers and other layers, the model extracts high-level feature representations from the image, which can reflect information such as the shape, texture, color, and possible damage characteristics of the object.
[0168] These features are then mapped to specific damage locations and repair strategy categories through fully connected layers, etc. For example, the model may output the damage probability distribution of different areas in the image and the corresponding repair strategy recommendations.
[0169] Based on the results of the model output, the damage location of the object is determined. This can be done by analyzing the damage probability distribution and finding the area with a higher probability as the damage location.
[0170] For the determination of the repair strategy, the model can select the most appropriate strategy from a predefined set of repair strategies based on factors such as the type and extent of damage. For example, if the damage is a minor scratch, polishing is recommended; if it is a serious dent, sheet metal repair is recommended, etc.
[0171] As a result, the feature-enhanced image contains richer and more discriminative feature information, which enables the damage assessment model to better capture the details and key features of the object, improve the ability to identify the location and type of damage, and avoid missed detection.
[0172] See also Fig. 9 The present application also provides an image processing device that can implement the above-mentioned image processing method. The device includes:
[0173] A downsampling unit, used to obtain an image to be processed, and perform different downsampling processes on the image to be processed to obtain multiple image representations with different resolutions;
[0174] A first input unit, used to input each of the image representations into a trained feature enhancement network to obtain image features corresponding to each of the image representations;
[0175] a feature aggregation unit, configured to select a target image representation having a resolution greater than or equal to a preset resolution from the plurality of image representations, and perform feature aggregation on a target image feature corresponding to each of the target image representations to obtain an aggregated feature;
[0176] a second input unit, configured to input the aggregated features and image features corresponding to other image representations into the trained first convolutional network to obtain a multi-level feature map including each of the image features, wherein the other image representations are image representations other than the target image representation in the multiple image representations;
[0177] A third input unit is used to input the image to be processed into the trained residual network to obtain a residual feature map;
[0178] The fusion unit is used to fuse the multi-level feature map with the residual feature map to obtain a feature-enhanced image.
[0179] In some embodiments, the trained feature enhancement network includes a trained second convolutional network, and a trained convolutional group, a first input unit, including:
[0180] A channel expansion subunit, used to input each of the image representations into the trained second convolutional network, and expand the number of channels of each of the image representations from the original number of channels to a preset number of channels through the trained second convolutional network, so as to obtain an expanded image representation corresponding to each of the image representations;
[0181] A first input subunit, used for inputting each of the expanded image representations into the trained convolution group to obtain image features corresponding to each of the image representations;
[0182] The second input unit comprises:
[0183] The channel compression subunit is used to perform channel compression processing on the aggregated features and other image features of other image representations through the trained first convolutional network to obtain a multi-level feature map containing each image feature and with the same number of channels as the original number of channels.
[0184] In some embodiments, the trained convolution group includes a plurality of third convolutional networks connected in sequence, and there are symmetrical jump connections between the trained third convolutional networks, and the convolutional layer numbers of the trained third convolutional networks of every two jump links are the same, and the input subunit is used to:
[0185] Inputting each of the dilated image representations into the trained convolutional group;
[0186] For each trained third convolutional network, the output intermediate image features are transmitted to the next trained third convolutional network and the trained third convolutional network with a jump connection respectively;
[0187] When the last trained third convolutional network outputs an intermediate image feature, the output intermediate image feature is determined as the image feature corresponding to the image representation.
[0188] In some embodiments, the feature aggregation unit includes:
[0189] A downsampling subunit, configured to perform different downsampling processing on the target image features corresponding to each of the target image representations, so as to obtain a target feature representation corresponding to each of the target image features;
[0190] A fusion subunit, used for fusing each of the target feature representations to obtain a fused feature;
[0191] A segmentation subunit, used to segment the fused feature to obtain a plurality of sub-features;
[0192] A second input subunit is used to input each of the sub-features into different attention networks respectively to determine a weight value corresponding to each sub-feature;
[0193] The determination subunit is used to determine the aggregate feature according to each of the sub-features and the corresponding weight value.
[0194] In some embodiments, a subunit is determined to:
[0195] Obtain the product of each of the sub-features and the corresponding weight value to obtain multiple features to be fused;
[0196] Each of the features to be fused is spliced to obtain an aggregated feature.
[0197] In some embodiments, the fusion unit is used to:
[0198] Obtain a first pixel value corresponding to each pixel point in the multi-level feature map, and a second pixel value corresponding to each pixel point in the residual feature map;
[0199] Determine the sum of the first pixel value and the second pixel value corresponding to the same pixel point to obtain the target pixel value of each pixel point;
[0200] According to the target pixel value of each pixel, draw the feature enhanced image.
[0201] In some embodiments, the apparatus is further configured to:
[0202] The feature-enhanced image is input into the trained damage assessment model to determine the damaged location of the object in the feature-enhanced image and the corresponding repair strategy.
[0203] The image processing device provided by the embodiment of the present application obtains an image to be processed through a downsampling unit, and performs different downsampling processes on the image to be processed to obtain multiple image representations with different resolutions; the first input unit inputs each of the image representations into a trained feature enhancement network to obtain image features corresponding to each of the image representations; the feature aggregation unit selects target image representations with a resolution greater than or equal to a preset resolution from the multiple image representations, and performs feature aggregation on target image features corresponding to each of the target image representations to obtain aggregated features; the second input unit inputs the aggregated features and image features corresponding to other image representations into the trained first convolutional network to obtain a multi-level feature map containing each of the image features, and the other image representations are image representations other than the target image representation in the multiple image representations; the third input unit inputs the image to be processed into a trained residual network to obtain a residual feature map; the fusion unit fuses the multi-level feature map with the residual feature map to obtain a feature-enhanced image. In this way, through different levels of downsampling and feature enhancement networks, it can adapt to information of different scales, so that the feature-enhanced image obtained by subsequent fusion includes information of different scales, from high-resolution details to low-resolution global structures, avoiding missed detection problems caused by dim light in the image and improving detection accuracy.
[0204] The specific implementation of the image processing device is basically the same as the specific implementation of the above-mentioned image processing method, and will not be repeated here.
[0205] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above image processing method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0206] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0207] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0208] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the image processing method of the embodiment of this application;
[0209] Input / output interface 903, used to implement information input and output;
[0210] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0211] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0212] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0213] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program implements the above-mentioned image processing method when executed by a processor.
[0214] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0215] The image processing method, image processing device, electronic device and storage medium provided by the embodiments of the present application obtain an image to be processed, perform different downsampling processing on the image to be processed respectively, and obtain multiple image representations with different resolutions; input each of the image representations into a trained feature enhancement network respectively to obtain image features corresponding to each of the image representations; screen out target image representations with a resolution greater than or equal to a preset resolution from the multiple image representations, and perform feature aggregation on the target image features corresponding to each of the target image representations to obtain aggregated features; input the aggregated features and image features corresponding to other image representations into a trained first convolutional network to obtain a multi-level feature map containing each of the image features, wherein the other image representations are image representations other than the target image representation in the multiple image representations; input the image to be processed into a trained residual network to obtain a residual feature map; and fuse the multi-level feature map with the residual feature map to obtain a feature-enhanced image. In this way, through different levels of downsampling and feature enhancement networks, it can adapt to information of different scales, so that the feature-enhanced image obtained by subsequent fusion includes information of different scales, from high-resolution details to low-resolution global structures, avoiding missed detection problems caused by dim light in the image and improving detection accuracy.
[0216] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0217] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0218] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0219] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0220] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0221] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0222] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0223] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0224] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0225] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0226] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. An image processing method, characterized in that: include: Acquire an image to be processed, and perform different downsampling processes on the image to be processed to obtain multiple image representations with different resolutions; Inputting each of the image representations into the trained feature enhancement network respectively to obtain image features corresponding to each of the image representations; Filtering out a target image representation having a resolution greater than or equal to a preset resolution from the plurality of image representations, and performing feature aggregation on a target image feature corresponding to each of the target image representations to obtain an aggregated feature; Inputting the aggregated features and image features corresponding to other image representations into the trained first convolutional network to obtain a multi-level feature map including each of the image features, wherein the other image representations are image representations other than the target image representation in the multiple image representations; Inputting the image to be processed into the trained residual network to obtain a residual feature map; fusing the multi-level feature map with the residual feature map, Get the image after feature enhancement.
2. The image processing method according to claim 1, characterized in that: The trained feature enhancement network includes a trained second convolutional network and a trained convolutional group, and each of the image representations is input into the trained feature enhancement network to obtain image features corresponding to each of the image representations, including: Inputting each of the image representations into the trained second convolutional network respectively, and expanding the number of channels of each of the image representations from the original number of channels to a preset number of channels through the trained second convolutional network, to obtain an expanded image representation corresponding to each of the image representations; Inputting each of the expanded image representations into the trained convolution group to obtain image features corresponding to each of the image representations; The aggregated features and other image features of other image representations are input into the trained first convolutional network to obtain a multi-level feature map containing each image feature, including: The aggregated features and other image features of other image representations are subjected to channel compression processing through the trained first convolutional network to obtain a multi-level feature map containing each image feature and having the same number of channels as the original number of channels.
3. The image processing method according to claim 2, characterized in that: The trained convolution group includes a plurality of third convolution networks connected in sequence, and there are symmetrical jump connections between the trained third convolution networks, and each of the expanded image representations is input into the trained convolution group to obtain image features corresponding to each of the image representations, including: Inputting each of the expanded image representations into a trained third convolutional network to obtain output intermediate image features; For each trained third convolutional network, the output intermediate image features are transmitted to the next trained third convolutional network and the trained third convolutional network with a jump connection respectively; When the last trained third convolutional network outputs an intermediate image feature, the output intermediate image feature is determined as the image feature corresponding to the image representation.
4. The image processing method according to claim 1, characterized in that: The step of performing feature aggregation on the target image features corresponding to each of the target image representations to obtain aggregated features includes: Performing different downsampling processing on the target image features corresponding to each of the target image representations to obtain the target feature representation corresponding to each of the target image features; Fusing each of the target feature representations to obtain a fused feature; Segmenting the fused feature to obtain multiple sub-features; Input each of the sub-features into different attention networks respectively, and determine the weight value corresponding to each sub-feature; An aggregate feature is determined according to each of the sub-features and the corresponding weight value.
5. The image processing method according to claim 4, characterized in that: The determining of the aggregated feature according to each of the sub-features and the corresponding weight value includes: Obtain the product of each of the sub-features and the corresponding weight value to obtain multiple features to be fused; Each of the features to be fused is spliced to obtain an aggregated feature.
6. The image processing method according to claim 1, characterized in that: The fusing the multi-level feature map and the residual feature map to obtain a feature-enhanced image includes: Obtain a first pixel value corresponding to each pixel point in the multi-level feature map, and a second pixel value corresponding to each pixel point in the residual feature map; Determine the sum of the first pixel value and the second pixel value corresponding to the same pixel point to obtain the target pixel value of each pixel point; According to the target pixel value of each pixel, draw the feature enhanced image.
7. The image processing method according to claim 1, characterized in that: After fusing the multi-level feature map with the residual feature map to obtain a feature-enhanced image, the method further includes: The feature-enhanced image is input into the trained damage assessment model to determine the damaged location of the object in the feature-enhanced image and the corresponding repair strategy.
8. An image processing device, characterized in that: include: A downsampling unit, used to obtain an image to be processed, and perform different downsampling processes on the image to be processed to obtain multiple image representations with different resolutions; A first input unit, used to input each of the image representations into a trained feature enhancement network to obtain image features corresponding to each of the image representations; a feature aggregation unit, configured to select a target image representation having a resolution greater than or equal to a preset resolution from the plurality of image representations, and perform feature aggregation on a target image feature corresponding to each of the target image representations to obtain an aggregated feature; a second input unit, configured to input the aggregated features and image features corresponding to other image representations into the trained first convolutional network to obtain a multi-level feature map including each of the image features, wherein the other image representations are image representations other than the target image representation in the multiple image representations; A third input unit is used to input the image to be processed into the trained residual network to obtain a residual feature map; A fusion unit, used for fusing the multi-level feature map with the residual feature map, Get the image after feature enhancement.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the image processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the image processing method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Single image super-resolution reconstruction method and system
CN113298718A
Model training method and device, image conversion method and device, equipment and storage medium
CN113538225A
Insurance method and device based on remote sensing image, computer equipment and storage medium
CN117314756A
Medical image segmentation method based on perception attention module and depth supervision enhancement
CN118521597A
Image processing method and apparatus, portrait super-resolution reconstruction method and apparatus, and portrait super-resolution reconstruction model training method and apparatus, electronic device, and storage medium
WO2022057837A1