Method and device for enhancing image data in power scene and readable storage medium
By establishing an image enhancement model in the power scenario, using a variety of data enhancement technologies and word-meta-mixing enhancement modules, the problem of scarcity of samples in the power scenario is solved, the generalization ability and robustness of the model are improved, and better model performance is achieved.
Patent Information
- Application Number
- CN202411812672.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-10
AI Technical Summary
The disaster samples in the power scenario are limited, and the labeling is time-consuming and labor-intensive, and it is impossible to provide sufficient training samples, resulting in severe challenges in the training of the detection model of the disaster-affected equipment.
By establishing an image enhancement model, using image data in the power scene for processing, generating enhanced image data, solving the problem of sample scarcity. The model includes a variety of data augmentation techniques, such as rotation, translation, scaling, flip, cropping, color jitter, random erasing and cutting, and uses word-meta hybrid enhancement modules in the reconstructed Transformer network to further enhance feature-level enhancement effects.
By enhancing image data, the generalization ability and robustness of the model are improved, which significantly alleviates the negative impact of insufficient sample on model training and improves the performance of the model in specific scenarios.
Smart Images

Figure CN119741219A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data enhancement technology, and in particular to a method, device and readable storage medium for enhancing image data in an electric power scene. Background Art
[0002] Currently, in power emergency rescue missions, drones carry cameras to collect large-scale high-resolution images along the transmission lines, and automatically locate and identify power facilities and damaged components through detection algorithms in the background. However, due to the limited number of disaster samples in power scenarios and the time-consuming and labor-intensive labeling, it is impossible to provide enough training samples, and the training of disaster-affected equipment detection models faces severe challenges.
[0003] In the related technologies, data enhancement technology has many deficiencies in enhancing samples of power disasters. First, traditional image data enhancement usually only uses single strategies such as rotation, flipping, and scaling, which cannot cope with complex power disaster relief scenarios, thereby reducing the generalization ability and robustness of the model. Second, the current technology cannot cope with domain migration caused by various environmental factors (lighting, weather, shooting angle, etc.), and does not flexibly adjust the enhancement strategy according to different data types and training requirements, resulting in poor results when processing data types of multiple scenarios, affecting the performance and reliability of the model. Third, the existing sample enhancement methods are mostly focused on the instance level, and feature-level enhancement in deep learning networks is not considered. Therefore, the existing data enhancement methods have limited enhancement effects when the number of power samples is small, and cannot significantly alleviate the negative impact of insufficient samples on model training. In addition, the existing methods are usually general enhancement strategies, lack optimization for power disaster relief scenarios, and cannot exert enhancement effects, thereby affecting the performance of the model in specific scenarios. Therefore, there is a technical problem of sample scarcity in power scenarios.
[0004] With regard to the above-mentioned technical problem of sample scarcity in power scenarios, no effective solution has been proposed so far. Summary of the invention
[0005] The embodiments of the present invention provide a method, device and readable storage medium for enhancing image data in an electric power scene, so as to at least solve the technical problem of sample scarcity in the electric power scene.
[0006] According to one aspect of an embodiment of the present invention, a method for enhancing image data in an electric power scene is provided. The method may include: acquiring image data in an electric power scene; filtering out electric power image data from the image data; inputting the electric power image data into an image enhancement model for analysis to obtain enhanced image data in the electric power scene, wherein the image enhancement model is trained using image data samples in the electric power scene.
[0007] Optionally, before inputting the power image data into the image enhancement model for analysis to obtain enhanced image data in the power scene, the method for enhancing image data in the power scene further includes: performing enhancement preprocessing on the power image data.
[0008] Optionally, the power image data is input into an image enhancement model for analysis to obtain enhanced image data in the power scene, including: inputting the power image data into the image enhancement model to decompose it into multiple power image sub-data; and determining enhanced image data based on the multiple power image sub-data.
[0009] Optionally, based on multiple power image sub-data, enhanced image data is determined, including: extracting image features of the power image sub-data, wherein the image features are used to indicate structural features and / or texture features of the power image sub-data; sampling the image features to obtain sampled image features; and determining enhanced image data based on the sampled image features.
[0010] Optionally, based on the sampled image features, enhanced image data is determined, including: based on the image features, generating residual image data, wherein the residual image is used to indicate difference data between the power image data and the power image sub-data; based on the residual image data and the power image data, enhancing image data is determined.
[0011] Optionally, determining enhanced image data based on the residual image data and the power image data includes: fusing the residual image data with the power image data to obtain the enhanced image data.
[0012] According to another aspect of an embodiment of the present invention, a device for enhancing image data in an electric power scene is also provided. The device may include: an acquisition unit for acquiring image data in an electric power scene; a screening unit for screening out electric power image data from the image data; and an analysis unit for inputting the electric power image data into an image enhancement model for analysis to obtain enhanced image data in the electric power scene, wherein the image enhancement model is trained using image data samples in the electric power scene.
[0013] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein when the program is executed by a processor, the device where the storage medium is located is controlled to execute the method for enhancing image data in the power scene in an embodiment of the present invention.
[0014] According to another aspect of an embodiment of the present invention, a processor is further provided. The processor is used to run a program, wherein when the program is run, the method for enhancing image data in a power scene in an embodiment of the present invention is executed.
[0015] According to another aspect of an embodiment of the present invention, a computer program product is also provided, which includes computer instructions, and when the computer instructions are executed by a processor, the method for enhancing image data in a power scene in an embodiment of the present invention is implemented.
[0016] In an embodiment of the present invention, image data in an electric power scene is obtained; electric power image data is filtered out from the image data; the electric power image data is input into an image enhancement model for analysis to obtain enhanced image data in the electric power scene, wherein the image enhancement model is trained using image data samples in the electric power scene. That is to say, the embodiment of the present invention solves the technical problem of sample scarcity in the electric power scene by establishing an image enhancement model and using the image enhancement model to process the image data in the electric power scene to obtain enhanced image data in the electric power scene, thereby achieving the technical effect of enhancing samples in the electric power scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0018] Figure 1 is a flow chart of a method for enhancing image data in a power scene according to an embodiment of the present invention;
[0019] Figure 2 is a flowchart of a combined power data enhancement method based on Transformer according to an embodiment of the present invention;
[0020] FIG3( a ) is a schematic diagram of a reconstructed Transformer architecture according to an embodiment of the present invention; FIG3( b ) is a schematic diagram of a gated deep convolutional feedforward network architecture according to an embodiment of the present invention; FIG3( c ) is a schematic diagram of a multi-depth convolutional head switch attention mechanism architecture according to an embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of an overall process of word unit mixing enhancement according to an embodiment of the present invention;
[0022] Figure 5 is a schematic diagram of a device for enhancing image data in a power scene according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, functional component or device that includes 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, functional components or devices.
[0025] According to an embodiment of the present invention, an embodiment of a method for enhancing image data in an electric power scenario is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0026] Figure 1 is a flow chart of a method for enhancing image data in a power scene according to an embodiment of the present invention. Figure 1 As shown, the method may include the following steps:
[0027] Step S101, acquiring image data in a power scene.
[0028] In the technical solution provided in the above step S101 of the present invention, image data in the power scene is obtained. For example, remote sensing technology such as satellite remote sensing and drones are used to obtain patrol images of power equipment in the power scene, high-definition images of the appearance of the equipment, and other data. This is only an illustrative example and does not limit the specific method of obtaining image data in the power scene.
[0029] Step S102: Filter out power image data from the image data.
[0030] In the technical solution provided in the above step S102 of the present invention, the power image data may also be called a power sample.
[0031] In this embodiment, after the image data in the power scene is acquired in step S101, the power image data is filtered out from the image data. For example, different power image data are filtered out from the image data. This is only an illustrative example and does not limit the specific method of filtering out the power image data from the image data.
[0032] For example, similar image data are deleted from the image data to obtain power image data, ensuring that the power samples have low correlation, thereby improving the diversity and representativeness of the data.
[0033] Step S103: input the power image data into the image enhancement model for analysis to obtain enhanced image data in the power scene.
[0034] In the technical solution provided in the above step S103 of the present invention, the image enhancement model is trained using image data samples in the power scene.
[0035] In this embodiment, after filtering out the power image data from the image data in step S102, the power image data is input into the image enhancement model for analysis to obtain enhanced image data in the power scene. The image enhancement model may also be a reconstructed Transformer network.
[0036] For example, the reconstructed Transformer network uses convolutional layers to extract low-level features of power image data, generates low-level feature embedding tensors, and performs word-meta hybrid enhancement. The reconstructed Transformer network then processes high-resolution images in an encoder-decoder structure through multiple deep convolutional head transposed attention mechanism modules and gated deep convolutional feedforward networks. The multi-layer encoder extracts and fuses features step by step, and the decoder restores the high-resolution image through skip connections and refinement stages, and finally generates a residual image and adds it to the degraded image to obtain a restored high-quality image, that is, enhanced image data.
[0037] It should be noted that the above embodiment can be implemented by a load control device evaluation system.
[0038] In the above steps S101 to S103 of the present invention, image data in the electric power scene is obtained; the electric power image data is filtered out from the image data; the electric power image data is input into the image enhancement model for analysis to obtain enhanced image data in the electric power scene, wherein the image enhancement model is trained using image data samples in the electric power scene. In other words, the embodiment of the present invention solves the technical problem of sample scarcity in the electric power scene by establishing an image enhancement model and using the image enhancement model to process the image data in the electric power scene to obtain enhanced image data in the electric power scene, thereby achieving the technical effect of enhancing samples in the electric power scene.
[0039] The above method of this embodiment is further introduced below.
[0040] As an optional implementation manner, before inputting the power image data into the image enhancement model for analysis to obtain enhanced image data in the power scene, the method for enhancing image data in the power scene also includes: performing enhancement preprocessing on the power image data.
[0041] In this embodiment, the power image data is enhanced and pre-processed, wherein the pre-processing includes but is not limited to: rotation, translation, scaling, flipping, cropping, color dithering, random erasing and shearing.
[0042] For example, when rotating an image, the angle is randomly set between -30 and 30 degrees to increase the diversity of angle changes; when translating an image, it is translated by -20% to 20% in the horizontal and vertical directions respectively to simulate objects in different positions; the image is scaled between 0.8 and 1.2 times to simulate local features of different scenes; when cropping an image, 70% to 100% of the area is randomly cropped and then scaled back to the original size to simulate local features of different scenes; color jittering can increase color diversity by changing brightness, contrast, saturation and hue, with each parameter varying in the range of 0.2; when randomly erasing, a small area is randomly erased on the image, with the erased area being 2% to 10% of the image, to enhance the model's robustness to partial missing information; finally, when shearing an image, the shearing angle is randomly set between -20 and 20 degrees to increase the diversity of deformation.
[0043] As an optional implementation method, the power image data is input into an image enhancement model for analysis to obtain enhanced image data in the power scene, including: inputting the power image data into the image enhancement model to decompose it into multiple power image sub-data; based on the multiple power image sub-data, determining the enhanced image data.
[0044] In this embodiment, the power image data is input into the image enhancement model and decomposed into a plurality of power image sub-data. For example, the input power image data is divided into non-overlapping blocks.
[0045] For example, the input image x is divided into non-overlapping blocks, which can be expressed using the following formula (1):
[0046]
[0047] Optionally, after decomposing the power image data into a plurality of power image sub-data, the enhanced image data is determined according to the plurality of power image sub-data, and the specific determination method is as shown below.
[0048] As an optional implementation method, enhanced image data is determined based on multiple power image sub-data, including: extracting image features of the power image sub-data, wherein the image features are used to indicate structural features and / or texture features of the power image sub-data; sampling the image features to obtain sampled image features; and determining enhanced image data based on the sampled image features.
[0049] In this embodiment, the image features of the power image sub-data are extracted, for example, by using a gated deep convolutional feed-forward network.
[0050] For example, after dividing the input image x into non-overlapping blocks, it is linearly projected to the visual markers. A random mask is generated at the marker level according to the mask ratio λ Mixed new training samples The creation of is shown in the following formula (2):
[0051]
[0052] in, represents the set of all tags, ⊙ represents element-by-element multiplication, M ti Indicates mask M t The i-th mark, A ai and A bi They are x a and x b The spatially normalized neural activation map of the ith marker of . The neural activation map is generated by the last layer of the pre-trained network before the classification head. The masked area is divided into multiple separated parts. For each part, the number of masked markers and the aspect ratio are randomly selected. Here, the minimum number of markers is set to 14 and Repeatedly mask a portion of the image until the total number of masked markers reaches a predefined ratio. Set λ to 0.5. Set the target score by combining the neural activation maps of the two mixed images from the teacher network. The target score of the two mixed regions is calculated as the x a or mask outside x b The two objectness scores are combined as the final objectness of the mixed image.
[0053] As another example, through a symmetrical four-stage encoder-decoder structure, the encoder gradually reduces the spatial resolution and increases the number of channels, and uses pixel unpacking operations to downsample features at the end of each encoder level. The decoder starts with low-resolution latent features and gradually recovers to high-resolution representations, and uses pixel reordering operations to upsample features at the end of each level. The encoder features are passed to the corresponding decoder layers through skip connections, and after the connection, a 1×1 convolution layer is used to reduce the number of channels (except the top layer). Pixel unpacking and pixel reordering operations are used in the feature downsampling and upsampling processes, respectively. To assist the recovery process, the encoder features are concatenated with the decoder features through skip connections. After concatenation, 1×1 convolutions are used to reduce the number of channels at all levels (except the top level), thereby halving the process. Transformer blocks are used in the first level to aggregate the low-level image features of the encoder with the high-level image features of the decoder, which helps preserve fine structural and texture details in the restored image.
[0054] For example, to get a layer normalized tensor After that, first, a gated deep convolutional feedforward network is forward propagated to generate queries (Q), keys (K), and values (V). This process is achieved by using 1×1 convolutions to aggregate pixel-level and cross-channel contexts and 3×3 deep convolutions to encode channel-level spatial contexts to generate Y and is a 1×1 point-wise convolution, refers to a 3×3 depthwise convolution. Unbiased convolutional layers are used in the network. Next, the query (Q) and key (K) projections are reshaped so that their dot product interaction generates a vector of size The transposed attention map a of size In summary, the gated deep convolutional feedforward network process is defined as the following formula (3):
[0055]
[0056] Among them, X and are the input and output feature maps, i.e., image features; the matrix as well as is from Obtained after transforming the tensor. Softmax is a normalized exponential function, and α is a learnable scaling parameter used to control before applying the normalized exponential function. The size of the dot product.
[0057] Optionally, after the image features are extracted, the image features are sampled to obtain sampled image features. For example, the image features are sampled through an encoder-decoder structure.
[0058] Optionally, enhanced image data is determined according to the sampled image features, and a specific determination method is shown as follows.
[0059] As an optional implementation method, enhanced image data is determined based on sampled image features, including: generating residual image data based on the image features, wherein the residual image is used to indicate difference data between power image data and power image sub-data; and determining enhanced image data based on the residual image data and the power image data.
[0060] In this embodiment, residual image data is generated according to the sampled image features, wherein the residual image data may also be referred to as a residual image.
[0061] For example, in the refinement stage operating at high spatial resolution, the deep features F d Finally, the convolutional layer is used to generate the residual image for the refined features.
[0062] Optionally, after the residual image is generated, the enhanced image data is determined according to the residual image data and the power image data. The specific determination method is as shown below.
[0063] As an optional implementation manner, based on the residual image data and the power image data, the enhanced image data is determined, including: fusing the residual image data with the power image data to obtain the enhanced image data.
[0064] In this embodiment, the residual image data is fused with the power image data to obtain enhanced image data. For example, the degraded image is added to the residual image. To get the restored image: That is, the image data is enhanced.
[0065] It should be noted that the above embodiment can be implemented by a load control device evaluation system.
[0066] In this embodiment, image data in the power scene is obtained; power image data is filtered out from the image data; the power image data is input into the image enhancement model for analysis to obtain enhanced image data in the power scene, wherein the image enhancement model is trained using image data samples in the power scene. That is to say, the embodiment of the present invention solves the technical problem of sample scarcity in the power scene by establishing an image enhancement model and using the image enhancement model to process the image data in the power scene to obtain enhanced image data in the power scene, thereby achieving the technical effect of enhancing samples in the power scene.
[0067] The technical solution of the embodiment of the present invention is illustrated below in conjunction with preferred implementation modes.
[0068] Currently, in power emergency rescue missions, drones carry cameras to collect large-scale high-resolution images along the transmission lines, and automatically locate and identify power facilities and damaged components through detection algorithms in the background. However, due to the limited number of disaster samples in power scenarios and the time-consuming and labor-intensive labeling, it is impossible to provide enough training samples, and the training of disaster-affected equipment detection models faces severe challenges.
[0069] In the related technologies, data enhancement technology has many deficiencies in enhancing samples of power disasters. First, traditional image data enhancement usually only uses single strategies such as rotation, flipping, and scaling, which cannot cope with complex power disaster relief scenarios, thereby reducing the generalization ability and robustness of the model. Second, the current technology cannot cope with domain migration caused by various environmental factors (lighting, weather, shooting angle, etc.), and does not flexibly adjust the enhancement strategy according to different data types and training requirements, resulting in poor results when processing data types of multiple scenarios, affecting the performance and reliability of the model. Third, the existing sample enhancement methods are mostly focused on the instance level, and feature-level enhancement in deep learning networks is not considered. Therefore, the existing data enhancement methods have limited enhancement effects when the number of power samples is small, and cannot significantly alleviate the negative impact of insufficient samples on model training. In addition, the existing methods are usually general enhancement strategies, lack optimization for power disaster relief scenarios, and cannot exert enhancement effects, thereby affecting the performance of the model in specific scenarios. Therefore, there is a technical problem of sample scarcity in power scenarios. For the above-mentioned technical problem of sample scarcity in power scenarios, no effective solution has been proposed.
[0070] However, an embodiment of the present invention proposes a combined power data enhancement method based on Transformer. First, the enhancement weights are determined for the existing power data according to the data attributes, and preliminary combined enhancement is performed according to the weights. Through basic-level enhancement, the training samples are made more diversified, thereby reducing the impact of too many labels on the training. Then, the enhanced samples are input into the reconstructed Transformer enhancement network to further enhance the features. The enhanced network uses a word-meta hybrid enhancement module, which is used to capture and model dependencies between features, thereby effectively solving the problem of sample scarcity in power scenarios and generating samples with stronger generalization capabilities. The technical problem of sample scarcity in power scenarios is solved. The technical effect of enhancing samples in power scenarios is achieved.
[0071] The embodiments of the present invention are further described below.
[0072] Figure 2 is a flowchart of a combined power data enhancement method based on Transformer according to an embodiment of the present invention. Figure 2 As shown, the Transformer-based combined power data enhancement method includes the following steps.
[0073] Step S201, data input and screening.
[0074] In this embodiment, inputting data into the network includes preparing and loading image data to be processed.
[0075] Optionally, by screening and extracting power samples, the correlation between samples can be ensured to be low, thereby improving the diversity and representativeness of the data and enhancing the effect of model training. This can effectively avoid the overfitting problem caused by the high correlation of samples.
[0076] Step S202, performing combined enhancement on the input data.
[0077] In this embodiment, multiple data enhancement techniques are used to enhance the image during image processing. Eight common data enhancement methods include rotation, translation, scaling, flipping, cropping, color jittering, random erasing, and shearing.
[0078] Optionally, in order to ensure balanced application of each enhancement method, the weight of each method is set to 0.125, and the specific parameters are as follows: When rotating the image, the angle is randomly set between -30 degrees and 30 degrees to increase the diversity of angle changes.
[0079] Optionally, when panning the image, pan by -20% to 20% in both horizontal and vertical directions to simulate objects in different positions.
[0080] Optionally, the image is scaled between 0.8 and 1.2 times to simulate local features of different scenes.
[0081] Optionally, when cropping the image, 70% to 100% of the area is randomly cropped and then scaled back to the original size to simulate local features of different scenes.
[0082] Optionally, color dithering can be used to increase color diversity by varying brightness, contrast, saturation, and hue by a factor of 0.2 each.
[0083] Optionally, during random erasing, a small area is randomly erased on the image, with the erased area being 2% to 10% of the image, to enhance the robustness of the model to partial missing information.
[0084] Optionally, when cropping the image, randomly set the cropping angle between -20 degrees and 20 degrees to increase the diversity of the deformation.
[0085] Step S203: The enhanced data is input into the reconstruction Transformer network to obtain a restored high-quality image.
[0086] In this embodiment, convolutional layers are used to extract low-level features, generate low-level feature embedding tensors, and perform word-unit mixing enhancement. Then, the Transformer is reconstructed to process high-resolution images in an encoder-decoder structure through multiple deep convolutional head transposition attention mechanism modules and gated deep convolutional feedforward networks. The multi-layer encoder extracts and fuses features step by step, and the decoder restores the high-resolution image through skip connections and refinement stages, and finally generates a residual image and adds it to the degraded image to obtain a restored high-quality image.
[0087] Optionally, the purpose of reconstructing the Transformer network is to enhance the image quality, and the purpose of adding word-meta hybrid enhancement is to enhance the image at the feature level. FIG3 is a schematic diagram of a reconstructed Transformer architecture according to an embodiment of the present invention. As shown in FIG3, first, the reconstructed Transformer applies a convolutional layer to extract low-level feature embeddings and generates low-level feature embeddings. Then perform word-unit mixing enhancement.
[0088] Optionally, Figure 4 FIG. 1 is a schematic diagram of the overall process of word unit mixing enhancement according to an embodiment of the present invention. Figure 4 As shown, the input image x is first divided into non-overlapping blocks It is then linearly projected to the visual marker. A random mask is generated at the marker level according to the mask ratio λ Mixed new training samples The creation of is shown in the above formula (1), which will not be repeated here.
[0089] Optionally, the neural activation map is generated by the last layer of the pre-trained network before the classification head. The masked area is divided into multiple separated parts. For each part, the number of masked markers and the aspect ratio are randomly selected. Here, the minimum number of markers is set to 14 and Aspect ratios are sampled logarithmically evenly within the range.
[0090] Optionally, repeatedly mask a portion of the image until the total number of masked markers reaches a predefined ratio Set λ to 0.5. Set the target score by combining the neural activation maps of the two mixed images from the teacher network. The target score of the two mixed regions is calculated as the x a or mask outside x b The two objectness scores are combined as the final objectness of the mixed image.
[0091] Optionally, through a symmetric four-stage encoder-decoder structure, the encoder gradually reduces the spatial resolution and increases the number of channels, and uses pixel unpacking operations to downsample features at the end of each encoder stage. The decoder starts with low-resolution latent features, gradually recovers to a high-resolution representation, and uses pixel reordering operations to upsample features at the end of each stage.
[0092] Optionally, the encoder features are passed to the corresponding decoder layers via skip connections, and a 1×1 convolutional layer is used after the connection to reduce the number of channels (except the top layer). Pixel unpacking and pixel rearrangement operations are used in the feature downsampling and upsampling processes, respectively.
[0093] Optionally, to assist the recovery process, the features of the encoder are concatenated with the features of the decoder via skip connections. After concatenation, 1×1 convolutions are used to reduce the number of channels at all levels (except the top level), thereby halving the processing.
[0094] Optionally, a Transformer block is used at the first stage to aggregate low-level image features from the encoder with high-level image features from the decoder, which helps preserve fine structural and texture details in the restored image.
[0095] Optionally, get a layer normalization tensor Afterwards, a gated deep convolutional feed-forward network performs forward propagation to generate queries (Q), keys (K), and values (V).
[0096] Optionally, this process is accomplished by using 1×1 convolutions to aggregate pixel-level and cross-channel context, and 3×3 depth-wise convolutions to encode channel-level spatial context, thereby generating as well as is a 1×1 point-wise convolution, Refers to a 3×3 depthwise convolution. Unbiased convolutional layers are used in the network.
[0097] Optionally, reshape the query (Q) and key (K) projections so that their dot product interaction generates a vector of size The transposed attention map a of size In summary, the gated deep convolutional feedforward network process is defined as the aforementioned formula (2), which will not be repeated here.
[0098] Optionally, Softmax is a normalized exponential function and α is a learnable scaling parameter that controls the value of The size of the dot product.
[0099] Optionally, in a multi-depth convolutional head transposed attention mechanism architecture, the gating mechanism is implemented by the element-wise product of two parallel paths of the linear transformation layer, one of which undergoes a non-linear activation.
[0100] Optionally, similar to the gated deep convolutional feed-forward network, deep convolution is also introduced in the multi-depth convolutional head transposed attention mechanism to encode information from spatially neighboring pixel positions, which is very helpful for learning local image structures and achieving effective image restoration.
[0101] Optionally, given an input tensor The process of the multi-depth convolution head transposed attention mechanism is defined as the aforementioned formula (3), which will not be repeated here.
[0102] Optionally, a multi-depth convolutional head transposed attention mechanism controls the flow of information through the various layers in the pipeline, allowing each layer to focus on details that complement other layers. Because the multi-depth convolutional head transposed attention mechanism performs more operations than a regular feed-forward network, the expansion rate is reduced when it is used to ensure that its parameters and computational burden are similar.
[0103] Optionally, in a refinement stage operating at high spatial resolution, the deep features F d Finally, the convolutional layer is used to generate the residual image for the refined features. Add the degraded image to the residual image To get the restored image:
[0104] Optionally, the present invention adopts multiple enhancement methods to improve data diversity and representativeness, prevent overfitting, and enhance the robustness of the model so that it can better handle various image changes, thereby improving the performance and efficiency of the model in training and practical applications.
[0105] Optionally, the present invention further improves the features by using a word-meta hybrid enhancement module in the reconstructed Transformer enhancement network. This architecture is used to capture and model the dependencies between features, which can effectively solve the problem of sample scarcity in power scenarios and generate samples with stronger generalization capabilities, thereby ensuring the stable and reliable operation of data-driven artificial intelligence models in practical applications of power disaster relief.
[0106] In this embodiment, the enhancement weights are first determined for the existing power data according to the data attributes, and preliminary combined enhancement is performed according to the weights. Through basic-level enhancement, the training samples are made more diversified, thereby reducing the impact of too many labels on the training. Then, the enhanced samples are input into the reconstructed Transformer enhancement network to further enhance the features. The word-meta hybrid enhancement module is used in the enhancement network. This structure is used to capture and model the dependencies between features, thereby effectively solving the problem of sample scarcity in power scenarios and generating samples with stronger generalization capabilities. The technical problem of sample scarcity in power scenarios is solved. The technical effect of enhancing samples in power scenarios is achieved.
[0107] According to an embodiment of the present invention, a device for enhancing image data in a power scene is also provided. It should be noted that the device for enhancing image data in a power scene can be used to execute the method for enhancing image data in a power scene in the method embodiment.
[0108] Figure 5 FIG. 1 is a schematic diagram of a device for enhancing image data in a power scene according to an embodiment of the present invention. Figure 5 As shown, the device 500 for enhancing image data in the power scene may include: an acquisition unit 501 , a screening unit 502 and an analysis unit 503 .
[0109] The acquisition unit 501 is used to acquire image data in the power scene.
[0110] The screening unit 502 is used to screen out power image data from the image data.
[0111] The analysis unit 503 is used to input the power image data into the image enhancement model for analysis to obtain enhanced image data in the power scene, wherein the image enhancement model is trained using image data samples in the power scene.
[0112] Optionally, the device 500 for enhancing image data in a power scene may further include: a preprocessing unit, configured to perform enhancement preprocessing on the power image data.
[0113] Optionally, the analysis unit 503 may include: an input module, used to input the power image data into the image enhancement model to decompose it into multiple power image sub-data; and a first determination module, used to determine the enhanced image data based on the multiple power image sub-data.
[0114] Optionally, the first determination module may include: an extraction submodule, used to extract image features of the power image sub-data, wherein the image features are used to indicate structural features and / or texture features of the power image sub-data; a sampling submodule, used to sample the image features to obtain sampled image features; and a determination submodule, used to determine enhanced image data based on the sampled image features.
[0115] Optionally, the determination submodule may also be used to generate residual image data based on image features, wherein the residual image is used to indicate difference data between the power image data and the power image sub-data; and to determine enhanced image data based on the residual image data and the power image data.
[0116] Optionally, the determination submodule may also be used to fuse the residual image data with the power image data to obtain enhanced image data.
[0117] In this embodiment, image data in the power scene is obtained; power image data is filtered out from the image data; the power image data is input into the image enhancement model for analysis to obtain enhanced image data in the power scene, wherein the image enhancement model is trained using image data samples in the power scene. That is to say, the embodiment of the present invention solves the technical problem of sample scarcity in the power scene by establishing an image enhancement model and using the image enhancement model to process the image data in the power scene to obtain enhanced image data in the power scene, thereby achieving the technical effect of enhancing samples in the power scene.
[0118] According to an embodiment of the present invention, a computer-readable storage medium is further provided. The storage medium includes a stored program, wherein the program executes the method for enhancing image data in a power scene in the method embodiment.
[0119] According to an embodiment of the present invention, a processor is further provided. The processor is used to run a program, wherein when the program is run, the method for enhancing image data in a power scene in the method embodiment is executed.
[0120] According to an embodiment of the present invention, a computer program product is further provided. The computer program product includes computer instructions. When the computer instructions are executed by a processor, the method for enhancing image data in a power scene in the method embodiment is implemented.
[0121] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0122] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0123] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, 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 units or modules, which can be electrical or other forms.
[0124] The units described 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 over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0125] In addition, each functional unit in each embodiment of the present invention 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.
[0126] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent functional component, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, 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 functional component, which is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc., which can store program code.
[0127] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for enhancing image data in an electric power scene, characterized in that: include: Acquire image data in power scenes; Filtering out power image data from the image data; The power image data is input into an image enhancement model for analysis to obtain enhanced image data in the power scene, wherein the image enhancement model is trained using image data samples in the power scene.
2. The method according to claim 1, characterized in that Before inputting the power image data into the image enhancement model for analysis to obtain enhanced image data in the power scene, the method further includes: The power image data is enhanced and pre-processed.
3. The method according to claim 1, characterized in that Inputting the power image data into an image enhancement model for analysis to obtain enhanced image data in the power scene includes: Inputting the power image data into an image enhancement model to decompose the data into a plurality of power image sub-data; The enhanced image data is determined based on a plurality of the power image sub-data.
4. The method according to claim 3, characterized in that Determining the enhanced image data based on the plurality of power image sub-data includes: Extracting image features of the power image sub-data, wherein the image features are used to indicate structural features and / or texture features of the power image sub-data; Performing sampling processing on the image features to obtain the sampled image features; The enhanced image data is determined based on the sampled image features.
5. The method according to claim 4, characterized in that Determining the enhanced image data based on the sampled image features includes: Based on the image features, generating residual image data, wherein the residual image is used to indicate difference data between the power image data and the power image sub-data; The enhanced image data is determined based on the residual image data and the power image data.
6. The method according to claim 5, characterized in that Determining the enhanced image data based on the residual image data and the power image data includes: The residual image data is fused with the power image data to obtain the enhanced image data.
7. A device for enhancing image data in an electric power scene, characterized in that: include: An acquisition unit, used for acquiring image data in a power scene; A screening unit, used for screening out power image data from the image data; An analysis unit is used to input the power image data into an image enhancement model for analysis to obtain enhanced image data in the power scene, wherein the image enhancement model is trained using image data samples in the power scene.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed by a processor, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 6.
9. A processor, characterized in that: The processor is used to run a program, wherein the program executes the method according to any one of claims 1 to 6 when running.
10. A computer program product, characterized in that The computer program product comprises computer instructions, which implement the method according to any one of claims 1 to 6 when executed by a processor.
Citation Information
Patent Citations
Image enhancement device and system
CN112288638A
Airport large-scale scene image feature enhancement method and device
CN118097174A