Dark light video processing method and device, electronic equipment, chip and storage medium

The jointly trained illumination and event fusion model processes dark-light videos, extracts and synthesizes image features and illumination, solves the problem of poor visual effects in dark-light video processing, and improves the accuracy of video feature extraction and processing efficiency. , suitable for multiple application fields.

CN118747864APending Publication Date: 2024-10-08BEIJING X RING TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410962455.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

When shooting video in a dim environment, it is difficult for devices such as smartphones to capture clear information, resulting in poor visual effects. Moreover, the application of low-light enhancement in different fields such as visual surveillance and autonomous driving is limited. Effective low-light video processing methods are needed to Optimize user experience and product competitiveness.

Method used

The jointly trained illumination model and event fusion model are used to obtain the dark light video and corresponding event information, extract image features and estimate the illumination, perform synthesis processing to enhance the dark light area of ​​the video, and generate the target video.

Benefits of technology

It improves the accuracy and processing efficiency of feature extraction in videos, enhances the visual effects of videos, optimizes user experience, and improves product performance in applications in different fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118747864A_ABST
    Figure CN118747864A_ABST
Patent Text Reader

Abstract

The invention provides a dark-light video processing method and device, electronic equipment, a chip and a storage medium, and relates to the fields of video image processing, computer vision, deep learning, artificial intelligence and the like. The method comprises the following steps: acquiring a to-be-processed dark light first video and a corresponding first event; inputting the first video into the generated illuminance model to obtain first illuminance corresponding to the first video; respectively inputting the first video and the first event into the generated event fusion model to obtain a first target image feature after the fusion event corresponding to the first video; and synthesizing the first target image feature set and the first illuminance to obtain a target video. Therefore, the accuracy of feature extraction in the video can be improved, the video processing efficiency is improved, the visual effect of the video is enhanced, and the use experience of a user is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of video image processing, computer vision, deep learning, and artificial intelligence, and in particular to a method, device, electronic device, chip, and storage medium for processing low-light videos. Background Art

[0002] With the popularity of smartphones, more and more users use their phones to take photos. However, when taking photos or videos with smartphone cameras in dim environments, the visual effect may be poor and clear information may not be captured. Therefore, low-light enhancement is needed to optimize the shooting effect. In addition, low-light enhancement is also widely used in different fields, including visual monitoring, autonomous driving, and computational photography. Therefore, how to process low-light videos to improve the visual effect of videos is crucial to optimizing user experience and improving product competitiveness. Summary of the invention

[0003] The present disclosure aims to solve one of the technical problems in the related art at least to some extent.

[0004] The first embodiment of the present disclosure provides a method for processing dark light video, including:

[0005] Obtain a first dark-light video to be processed and a corresponding first event;

[0006] Inputting the first video into the generated illumination model to obtain a first illumination corresponding to the first video;

[0007] Inputting the first video and the first event into the generated event fusion model respectively, and obtaining a first target image feature after the fusion event corresponding to the first video, wherein the event fusion model and the illumination model are generated by joint training;

[0008] The first target image feature and the first illumination are synthesized to obtain a target video.

[0009] A second aspect of the present disclosure provides a low-light video processing device, including:

[0010] A first acquisition module, used to acquire a first dark-light video to be processed and a corresponding first event;

[0011] A first processing module, configured to input the first video into a generated illumination model to obtain a first illumination corresponding to the first video;

[0012] A second processing module is used to input the first video and the first event into the generated event fusion model respectively, to obtain a first target image feature after the fusion event corresponding to the first video, wherein the event fusion model and the illumination model are generated by joint training;

[0013] The first synthesis module is used to synthesize the first target image feature and the first illumination to obtain a target video.

[0014] The third aspect of the present disclosure provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for processing low-light video provided in the first aspect of the present disclosure is implemented.

[0015] A fourth aspect of the present disclosure provides a chip, comprising a processing circuit, wherein the processing circuit is configured to execute the dark-light video processing method provided by the first aspect of the present disclosure.

[0016] The fifth aspect embodiment of the present disclosure proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the method for processing dark-light video proposed in the first aspect embodiment of the present disclosure is implemented.

[0017] The dark light video processing method, device, electronic device, chip and storage medium provided by the present disclosure have the following beneficial effects:

[0018] In the disclosed embodiment, by using the illumination model and the event fusion model, image features are extracted and illumination is estimated in the dark light video and the corresponding event information, and then the image features and illumination are synthesized to enhance the dark light area of ​​the video and obtain the target video. This improves the accuracy of feature extraction in the video, improves the efficiency of video processing, enhances the visual effect of the video, and optimizes the user experience.

[0019] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0021] Figure 1 A flowchart of a method for processing low-light video provided by an embodiment of the present disclosure;

[0022] Figure 2A flowchart of a method for processing low-light video provided by another embodiment of the present disclosure;

[0023] Figure 3 A flowchart of a method for processing low-light video provided by another embodiment of the present disclosure;

[0024] Figure 4 A flowchart of a method for processing low-light video provided by another embodiment of the present disclosure;

[0025] Figure 5 A schematic diagram of the structure of a low-light video processing device provided by an embodiment of the present disclosure;

[0026] Figure 6 A block diagram of an exemplary electronic device suitable for implementing the embodiments of the present disclosure is shown;

[0027] Figure 7 A schematic diagram of the structure of a chip proposed in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.

[0029] The following describes the dark-light video processing method, device, electronic device, chip and storage medium of the embodiments of the present disclosure with reference to the accompanying drawings.

[0030] Figure 1 A flowchart of a method for processing low-light video provided by an embodiment of the present disclosure is provided.

[0031] The embodiment of the present disclosure takes the dark-light video processing method as an example in which the dark-light video processing method is configured in a dark-light video processing device. The dark-light video processing device can be applied to any electronic device so that the electronic device can perform the function of enhancing the information of the dark-light area in the video to restore the details in the video.

[0032] like Figure 1 As shown, the dark light video processing method may include the following steps:

[0033] Step 101, obtaining a first low-light video to be processed and a corresponding first event.

[0034] The first video is a video frame sequence, and the first event is an event sequence consisting of events corresponding to each video frame.

[0035] In the disclosed embodiment, a traditional camera may be used to capture a first dark-light video to be processed, and an event camera may be used to record the first event corresponding to the first video at the same position and angle while the first video is being captured.

[0036] It should be noted that, in the present disclosure, each video frame in the first video can be represented by I t+j , j∈[-k, k], and each event in the first event can be expressed as E t+j , j∈[-k, k]. Where t+j represents the timestamp corresponding to the video frame or event, j represents the time radius, and k can be determined according to the available computing resources when actually processing the video.

[0037] Step 102: Input the first video into the generated illumination model to obtain a first illumination corresponding to the first video.

[0038] The illumination model is a model generated by pre-training and is used to estimate the light intensity in the video. The illumination model can be a model based on the U-NET neural network architecture, including an encoder and a decoder.

[0039] In the disclosed embodiment, the first video can be input into the generated illumination model, and the illumination model first encodes the first video using an encoder composed of multiple convolutional layers, and then decodes the first video according to the architecture of U-NET to obtain the first illumination corresponding to the first video. In addition, a residual connection can be used between the encoder and the decoder to improve the performance of video illumination estimation.

[0040] Step 103: Input the first video and the first event into the generated event fusion model respectively to obtain the first target image feature after the fusion event corresponding to the first video.

[0041] Among them, the event fusion model and the illumination model are generated by joint training.

[0042] It should be noted that in the present disclosure, the event fusion model and the illumination model are jointly trained and generated, which can not only improve the structural consistency between the image features output by the event fusion model and the illumination output by the illumination model, but also reduce errors and improve efficiency in subsequent synthesis. Moreover, joint training can avoid the problem of insufficient training data and improve the robustness and reliability of the model.

[0043] In the disclosed embodiment, the event fusion model may include a dual-branch structure, one branch is used to extract image features in the first video, and the other branch is used to extract event features in the first event. Moreover, the structure of each branch may have a multi-stage hierarchical structure to extract features in a loop for multiple times, thereby improving the accuracy and completeness of feature extraction.

[0044] It should be noted that after acquiring the first video and the first event, they can be projected into images of the same size through residual blocks, respectively, to facilitate subsequent feature extraction and fusion, reduce the consumption of computing resources, and provide conditions for improving the efficiency of video processing.

[0045] In the disclosed embodiment, the first video can be input into the branch for extracting image features in the event fusion model to obtain the first image features corresponding to the first video. The first event can be input into the branch for extracting event features in the event fusion model to obtain the first event features corresponding to the first event. Then, the first graphic features and the first event features can be matrix multiplied through the fusion network in the event fusion model, and the multiplied image features and the first image features can be element-wise added to obtain the first target image features after the fusion event corresponding to the first video.

[0046] It should be noted that, in the case where each branch structure of the event fusion model has a multi-stage hierarchical structure, after obtaining the target image features output by the current stage, the target image features output by the stage can be input into the next stage for encoding to extract new first image features. Then, combined with the first event features extracted previously, the feature fusion operation is repeated to obtain the target image features output by the next stage, until the feature extraction and fusion of all stages are completed, and the first target image features after the fusion event corresponding to the first video can be obtained.

[0047] Step 104: synthesize the first target image feature and the first illumination to obtain a target video.

[0048] The target video refers to a video with high brightness and clear video content.

[0049] In the disclosed embodiment, the first target image feature and the first illumination level may be aligned through a convolutional layer, and then the aligned features may be input into a decoder for synthesis to obtain a target video.

[0050] In the disclosed embodiment, firstly, a first dark-light video to be processed and a corresponding first event are obtained. Then, the first video is input into the generated illumination model to obtain the first illumination corresponding to the first video, and the first video and the first event are respectively input into the generated event fusion model to obtain the first target image feature after the fusion event corresponding to the first video. Afterwards, the first target image feature and the first illumination are synthesized to obtain the target video. Thus, by utilizing the illumination model and the event fusion model, image features are extracted and illumination is estimated in the dark-light video and the corresponding event information, and then the image features and illumination are synthesized to complete the enhancement processing of the dark-light area of ​​the video to obtain the target video. Thereby, the accuracy of feature extraction in the video is improved, the efficiency of video processing is improved, the visual effect of the video is enhanced, and the user experience is optimized.

[0051] Figure 2 A flowchart of another method for processing dark light video provided by an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the dark light video processing method may include the following steps:

[0052] Step 201, obtaining a first low-light video to be processed and a corresponding first event.

[0053] Step 202: Input the first video into the generated illumination model to obtain a first illumination corresponding to the first video.

[0054] For detailed description of the above steps 201 and 202, please refer to the above embodiments of the present disclosure, which will not be repeated here.

[0055] Step 203: Input the first video and the first event into the residual network in the event fusion model respectively to obtain the second video and the second event output by the residual network.

[0056] The number of channels included in the image in the second video is smaller than the number of channels included in the image in the first video.

[0057] In the disclosed embodiment, the first video and the images in the first event can be projected into images of the same size through a residual network to obtain a second video and a second event output by the residual network.

[0058] In the disclosed embodiment, by projecting the first video and the images in the first event into a uniform size, subsequent feature extraction and fusion thereof can be facilitated, the consumption of computing resources can be reduced, and conditions can be provided for improving the efficiency of video processing.

[0059] Step 204: Input the second video into the image feature extraction network in the event fusion model to obtain the first image feature.

[0060] In the embodiment of the present disclosure, an image feature extraction network can be used to extract the first image feature in the second video. The first image feature can be expressed as F I (0) ∈R H*W*C . The subscript I is used to indicate that the feature is an image feature, which is extracted from the video frame. The superscript 0 indicates that the first image feature is the original image feature, and H, W and C represent the height, width and number of channels of the feature image respectively.

[0061] Step 205: Input the second event into the event feature extraction network in the event fusion model to obtain the first event feature.

[0062] In the embodiment of the present disclosure, an event feature extraction network can be used to extract the first event feature in the second event. The first event feature can be expressed as The subscript E indicates that the feature is an event feature, which is extracted from the event. The superscript 0 indicates that the first event feature is the original event feature, and H, W and C respectively indicate the height, width and number of channels of the feature image.

[0063] Step 206: Input the first event feature and the first image feature into the fusion network in the event fusion model respectively to obtain the first target image feature after the fusion event.

[0064] In the disclosed embodiment, the first event feature and the first image feature can be multiplied by a feature matrix through a fusion network in an event fusion model, and then the event feature and the first image feature obtained after the multiplication are element-wise added to obtain the first target image feature after the fusion event corresponding to the first video.

[0065] It should be noted that the event fusion model may include a multi-level fusion network, and each level of the fusion network includes an image processing branch and an event processing branch.

[0066] Among them, the image processing branch may include an image processing module and an event image fusion module, and the event processing branch may include an event encoder.

[0067] It should be noted that the number of levels of the fusion network can be determined based on experiments, that is, through experiments, it is determined that at what level, the image features output by the fusion network are most accurate and reliable. For example, the number of levels of the fusion network can be 4.

[0068] In the disclosed embodiment, the image processing module may be an image encoder, which is used to adjust the height, width and number of channels of the previous level image features input in each level of fusion network. And an event encoder, which is used to adjust the height, width and number of channels of the previous level event features input in each level of fusion network. The event image fusion module may fuse the adjusted image features and event features to obtain the image features output by the fusion network at this level as the input image features of the next level of fusion network. Moreover, the event features input by the next level of fusion network are the same as the event features input by this level.

[0069] In the disclosed embodiment, when the (i-1)th level image feature is And the (i-1)th level event characteristics are In the case of and They are respectively input into the image processing module and event encoder of the i-th level fusion network to obtain image features and event characteristics Then, the event image fusion module is used to and Fusion is performed to obtain the image features output by the i-th level fusion network Afterwards, you can As the input image feature of the (i+1)th level fusion network, As the input event feature of the (i+1)th level fusion network. The above operation is performed repeatedly until the image feature output by the last level fusion network is obtained, and the first target image feature after the fusion event can be determined.

[0070] It can be understood that the graphic features and event features input by the first-level fusion network are the first image features F extracted from the original video and event. I (0) ∈R H*W*C and first event characteristics

[0071] In the disclosed embodiment, a multi-level fusion network is provided in the event fusion model to realize cyclic extraction of image features and multiple fusions with event features, thereby improving the accuracy and completeness of the image features output by the fusion network.

[0072] Step 207: synthesize the first target image feature and the first illumination to obtain a target video.

[0073] For a detailed description of the above step 207, please refer to the above embodiments of the present disclosure, which will not be repeated here.

[0074] In the disclosed embodiment, the video frame sequence and event sequence are first processed by the residual network in the event fusion model, which ensures the uniformity of the size of the video image and the event image, facilitates the subsequent feature extraction and fusion, and reduces the consumption of computing resources. In addition, the two branches in the event fusion model respectively extract image features from the view, and after extracting event features from the event, the fusion network is used to fuse the image features and event features to obtain the target image features, which improves the accuracy and reliability of image feature extraction and provides conditions for improving the video enhancement effect.

[0075] Figure 3 A flowchart of another method for processing dark light video provided by an embodiment of the present disclosure is shown as follows: Figure 3 As shown, the dark light video processing method may include the following steps:

[0076] Step 301, obtaining a first dark-light video to be processed and a corresponding first event.

[0077] Step 302: Input the first video into the generated illumination model to obtain a first illumination corresponding to the first video.

[0078] Step 303: Input the first video and the first event into the residual network in the event fusion model respectively to obtain the second video and the second event output by the residual network.

[0079] Step 304: Input the second video into the image feature extraction network in the event fusion model to obtain the first image feature.

[0080] Step 305: Input the second event into the event feature extraction network in the event fusion model to obtain the first event feature.

[0081] For detailed description of the above steps 301 to 305, please refer to the above embodiments of the present disclosure, which will not be repeated here.

[0082] It should be noted that the fusion of event features and image features is the key to event-based dark light enhancement, and the relevant features of the image and the event need to be matched. Therefore, in the present disclosure, a window-based dark light area mask (i.e., mask) is designed to identify the area where the relevant features of the image and the event are located, and the signal-to-noise ratio (SIGNAL-NOISE RATIO, SNR) distribution and brightness distribution can be used to generate the mask to improve the fusion efficiency and accuracy of event features and image features.

[0083] It is understandable that when the event fusion model includes multiple levels of fusion networks, the height, width and number of channels of the image features input to each level of the fusion network may be different, so a corresponding mask needs to be determined for each level of feature matching and fusion.

[0084] Step 306: Obtain the image features output by the i-th level event image fusion module The corresponding brightness map G i And signal-to-noise ratio S i .

[0085] Among them, i is a positive integer, and the maximum value of i corresponds to the number of levels of the fusion network included in the event fusion model.

[0086] In the embodiment of the present disclosure, the brightness map G i Representing image features The brightness distribution in can be calculated by the following formula (1). i Representing image features The signal-to-noise ratio distribution in can be calculated by the following equations (2) and (3).

[0087] G=Gray(I t ) (1)

[0088]

[0089] Among them, I t Represents the image feature corresponding to the video frame at time t, which is the image feature Gray represents the process of obtaining a grayscale image, and denoise represents a non-learning-based denoising operation.

[0090] Step 307: convert the brightness map G i and signal-to-noise ratio S i Input the mask generation module respectively to obtain the i-th mask i .

[0091] In the embodiment of the present disclosure, the brightness map G i and signal-to-noise ratio S i After inputting the mask image generation module respectively, the corresponding binary images can be determined respectively, and then the two binary images are element-wise multiplied to obtain the i-th mask image mask i .

[0092] Optionally, the brightness map G can be firstly i and signal-to-noise ratio S i Divided into multiple brightness blocks and multiple signal-to-noise ratio tiles Where j is a positive integer.

[0093] The size of the preset window may be determined according to experience and specific scene requirements, and the present disclosure does not limit this.

[0094] In the embodiment of the present disclosure, a window of a preset size can be used to respectively i and signal-to-noise ratio S i Slide the window to split into multiple brightness blocks and multiple signal-to-noise ratio tiles j represents the brightness map G for each block i Or signal-to-noise ratio graph S i The maximum value of j is given by the brightness map G i and signal-to-noise ratio S i The size of the window is determined by the size of the

[0095] For example, the brightness map G i The size is 512*512. After segmentation using the window, each corresponding brightness block The size of is 64*64, then the maximum value of j is 64, and the value range of j is [1, 2, ..., 64].

[0096] Then, for each brightness tile, The corresponding brightness mean and brightness threshold. And, determine each signal-to-noise ratio block The corresponding signal-to-noise ratio mean and signal-to-noise ratio threshold.

[0097] In the embodiment of the present disclosure, each brightness block can be calculated first The sum of the brightness values ​​of all pixels in the image is divided by the total number of pixels to obtain the brightness block. The corresponding brightness mean. i The last 10% of the brightness distribution of all pixels in is determined as the brightness threshold. Similarly, each signal-to-noise ratio block can be obtained The corresponding signal-to-noise ratio mean, and the signal-to-noise ratio map S i The last 30% of the signal-to-noise ratio distribution corresponding to all pixels in the image are determined as the signal-to-noise ratio threshold.

[0098] It should be noted that the ratio (i.e., 10% or 30%) based on which the brightness threshold and the signal-to-noise ratio threshold are determined can be determined based on experience. According to experience, it is known that the mask determined based on this ratio is more distinguishable, or other ratios can be selected, and the present disclosure does not limit this. In addition, since the selection of the threshold varies according to the brightness distribution and signal-to-noise ratio distribution of the video image, it is flexibly determined according to different videos.

[0099] Afterwards, the mask can be determined based on the brightness mean and brightness threshold corresponding to each brightness block, and the signal-to-noise ratio mean and signal-to-noise ratio threshold corresponding to the corresponding signal-to-noise ratio block. i .

[0100] In the disclosed embodiment, when enhancing a video, it is necessary to focus on the dark light area in the video, which has low brightness and low signal-to-noise ratio. Therefore, when generating a mask map for identifying the dark light area, it is necessary to mark in the mask map the blocks whose corresponding brightness mean is less than the brightness threshold and whose corresponding signal-to-noise ratio mean is less than the signal-to-noise ratio mean.

[0101] In the disclosed embodiment, the brightness and signal-to-noise ratio are integrated to generate a mask image, which can improve the generalization ability of the mask, and the elements in the mask image are at the window level, which is more efficient in fusing images and events compared to the pixel level.

[0102] Optionally, when the brightness mean corresponding to the j-th brightness block is less than the brightness threshold, and the signal-to-noise ratio mean corresponding to the j-th signal-to-noise ratio block is less than the signal-to-noise ratio threshold, the mask image mask is determined. i The j-th element in takes the first value.

[0103] The first value is 1, which is used to indicate that the area corresponding to the element needs to be enhanced.

[0104] In the embodiment of the present disclosure, when the brightness mean value corresponding to the j-th brightness block is less than the brightness threshold, and the signal-to-noise ratio mean value corresponding to the j-th signal-to-noise ratio block is less than the signal-to-noise ratio threshold, it means that the j-th block in the complete image corresponds to a dark light area that needs to be processed, so the mask image can be i The value of the j-th element in is determined as the first value, so as to subsequently extract the image features of the corresponding position.

[0105] Alternatively, when the brightness mean corresponding to the j-th brightness block is greater than or equal to the brightness threshold, or the signal-to-noise ratio mean corresponding to the j-th signal-to-noise ratio block is greater than or equal to the signal-to-noise ratio threshold, the mask is determined. i The j-th element in takes the second value.

[0106] The second value is 0, which is used to indicate that the area corresponding to the element does not need to be enhanced.

[0107] In the disclosed embodiment, the mask i The jth element in The value of can be expressed by the following formula (4).

[0108]

[0109] Among them, mean means taking the average value, express The corresponding brightness mean, express The corresponding signal-to-noise ratio mean. l is the brightness threshold, θ sis the signal-to-noise ratio threshold.

[0110] Step 308: mask i With image features Input the first fusion module respectively to obtain the dark area features

[0111] The first fusion module is a fusion module in the event image fusion module.

[0112] In the disclosed embodiment, the mask image i With image features After being input into the first fusion module, the first fusion module can mask i and By multiplying the elements at corresponding positions in Middle and mask i The features of the area corresponding to the element with the first value in are extracted to obtain the dark area features It can be expressed as the following formula (5).

[0113]

[0114] Step 309: Dark area features Image features and the first event features are input into the second fusion module respectively to obtain the image features Aligned Second Event Features

[0115] Among them, the second fusion module is another fusion module in the event image fusion module.

[0116] It should be noted that in the present disclosure, an event-image attention mechanism can be used to establish a spatial mapping relationship to improve the accuracy of alignment between event features and image features, and further improve the accuracy and reliability of feature fusion.

[0117] Optionally, the dark region features can be The first event features are input into the event aggregation layer in the second fusion module to obtain the aggregated event features

[0118] In the embodiment of the present disclosure, the dark area feature After the first event features are respectively input into the event aggregation layer in the second fusion module, the event aggregation layer can use multiple weight matrices trained in advance to aggregate the dark area features. Multiply it with the corresponding weight matrix to get the query vector Q id , and multiply the patch of the first event feature by the corresponding weight matrix to obtain the corresponding key vector Ke Sum value vector V e Then, based on the query vector Q id , key vector K e Sum value vector V e , determine the characteristics of the aggregated events The corresponding formula is shown in equation (6):

[0119]

[0120] Where c is the number of feature channels. Softmax represents the normalized exponential function.

[0121] It should be noted that the patches of the first event feature refer to features from different spatial positions in the first event feature. The weight matrix may be a matrix obtained by synchronous training during the training process of the event fusion model to which the second fusion module belongs.

[0122] Then, the first event feature and the image feature can be Input the attention layer in the second fusion module respectively to obtain the attention matrix W p .

[0123] In the embodiment of the present disclosure, in order to establish a spatial mapping relationship, the first event feature and the image feature Input the attention layer in the second fusion module respectively, and calculate the attention matrix W through the Softmax function p , and its calculation formula is shown in the following formula (7):

[0124]

[0125] Among them, Q i is the image feature The corresponding query vector.

[0126] In the disclosed embodiment, the attention matrix W p As a measure of the similarity between each image block and event block. For unaligned image and event features, the event block with the highest similarity to the image block can be considered as the event block that matches the image block. Therefore, the maximum value of each row in Wp can be set to 1, and the rest of the values ​​can be set to 0.

[0127] Afterwards, the attention matrix W can be p and aggregate event characteristics Input the fusion layer in the second fusion module respectively to obtain the second event features

[0128] In the disclosed embodiment, the attention matrix W p and aggregate event characteristics After being input into the fusion layer in the second fusion module, W p and Multiply the feature matrix to get the second event feature As shown in the following formula (8), we can aggregate event features Event features aligned with image features are extracted.

[0129]

[0130] Step 310: The second event feature With image features Input the third fusion module respectively to obtain the first target image features after the fusion event

[0131] In the embodiment of the present disclosure, the second event feature With image features After being input into the third fusion module respectively, the third fusion module will and By adding the elements, the sum obtained by adding can be determined as the first target image feature after the fusion event Its formula is shown in the following formula (9):

[0132]

[0133] It should be noted that when the value of i is less than the maximum level of the fusion network in the event fusion model, the image features output by the third fusion module need to be input into the next level fusion network, and the above operation is repeated to obtain the image features output by the third fusion module in the next level fusion network. The above operation is performed repeatedly until the image features output by the third fusion module in the maximum level fusion network are obtained, and the first target image features after the fusion event are obtained.

[0134] Step 311, synthesizing the first target image feature and the first illumination to obtain a target video.

[0135] For a detailed description of the above step 311, please refer to the above embodiments of the present disclosure, which will not be repeated here.

[0136] In this embodiment, a mask image for extracting dark area features is constructed by acquiring a brightness image and a signal-to-noise ratio image. The dark area features are then extracted in a targeted manner from the image features based on the mask image, and the image features and event features are fused to obtain the target image features. This reduces the difficulty of matching image features and event features, avoids information interference outside the dark light area, and improves the fusion efficiency and accuracy of event features and image features.

[0137] Figure 4A flowchart of a method for processing dark light video provided by an embodiment of the present disclosure is shown as follows: Figure 4 As shown, the dark light video processing method may include the following steps:

[0138] Step 401, obtaining a training data set.

[0139] The training data set includes multiple groups of corresponding third videos and third events.

[0140] It should be noted that the third video and the third event may be real data collected or synthetic data generated by a simulator or emulator, and the present disclosure does not limit this.

[0141] It is understandable that real data is more reliable than synthetic data when used as training data, but it is difficult to obtain real data, which may result in insufficient data during training, resulting in low model training and affecting model stability. However, synthetic data is easy to obtain and has high acquisition efficiency, which can provide a large amount of training data and increase the amount of model training.

[0142] Step 402: Input the third video into the initial illumination model to obtain a second illumination corresponding to the third video.

[0143] The initial illumination model may be an existing public model or a model built by a user, and this disclosure does not limit this.

[0144] Step 403: Input the third video and the corresponding third event into the initial event fusion model respectively to obtain the second target image features after the fusion event corresponding to the third video.

[0145] The initial event fusion model may be an existing public model or a model built by a user, and this disclosure does not limit this.

[0146] Step 404, synthesizing the second target image feature and the second illumination to obtain a predicted video.

[0147] In the embodiment of the present disclosure, the detailed description of step 402 to step 404 can be determined by analogy with the above embodiment, and will not be repeated here.

[0148] Step 405, determining a loss value based on the predicted video, the third video and the third event.

[0149] It should be noted that multiple differences between the predicted video, the third video and the third event may be calculated from multiple aspects, and then the calculated multiple differences may be fused to obtain a loss value.

[0150] Optionally, the first motion trend and the second motion trend may be extracted from the third event and the predicted video respectively, and a first difference between the first motion trend and the second motion trend may be determined.

[0151] Among them, the first difference refers to the time domain consistency difference.

[0152] In the embodiment of the present disclosure, the event sequence E in the third event t-Δt~t+Δt The dynamic information between t-Δt and t+Δt can be recorded. When Δt approaches 0, it means that the amount of motion is small and can reflect the motion trend. Therefore, in order to better maintain the temporal stability between the frames of the output target video, in the present disclosure, the U-Net network can be used to estimate the second motion trend at time t from the frames of the predicted video, and the second motion trend is compared with the first motion trend extracted from the third event to calculate the temporal consistency loss L t .

[0153] It should be noted that when the training data is synthetic data, the third event is aligned with the frame in the predicted video, and the first difference can be expressed as the following formula (10):

[0154]

[0155] in, represents the predicted video, and v represents the U-Net structure that extracts the second motion trend from the frame of the predicted video. When Δt approaches 0, E t-Δt~t+Δt The first movement trend corresponding to the third event may be indicated.

[0156] Alternatively, when the training data is real data, the third event is not aligned with the frame in the predicted video, so it can be detected in frame I of the third video. t The first motion loss is extracted from the equation, and the first difference is calculated with the second motion trend, which can be expressed as the following formula (11):

[0157]

[0158] Then, a second difference between the predicted video and the third video may be determined.

[0159] Among them, the second difference refers to the difference in details.

[0160] It is understandable that in the third video to be enhanced, detailed information in the dark light area is lost, while the information in other areas is relatively complete. Therefore, when training the event fusion model, in the dark light area, there should be a large difference between the frame of the first video input to the model and the frame of the predicted video output by the model, while in other areas outside the dark light area, the difference should be reduced.

[0161] Optionally, a first area in the predicted video corresponding to the mask image and a second area in the third video corresponding to the mask image may be determined first.

[0162] It can be seen from the above embodiments that the area in the mask image where the element is marked as the first value is the dark light area that needs to be enhanced, so the correspondence between each pixel point of the mask image and the predicted video and the third video can be determined respectively, and then the area corresponding to the first value in the mask image in the predicted video is determined as the first area, and the area corresponding to the first value in the mask image in the third video is determined as the second area.

[0163] Then, the information difference between the predicted video and the third video can be determined based on the first sub-difference between the first area and the second area, and the second sub-difference between the third area outside the first area in the predicted video and the corresponding fourth area in the third video.

[0164] The third area and the fourth area refer to the non-dark light areas in the predicted video and the third video, that is, the areas corresponding to the elements in the mask image having the second value.

[0165] In the disclosed embodiment, the first sub-difference can be determined by calculating the Euclidean norm between the first region and the second region. And the second sub-difference can be determined by calculating the Euclidean norm between the third region and the fourth region. Then, since the first sub-difference should be increased and the second sub-difference should be decreased when training the event fusion model, the calculation formula for the information difference between the predicted video and the third video can be determined based on the first sub-difference and the second sub-difference, as shown in the following formula (12):

[0166]

[0167] Among them, mask is the dark light area marked by the mask image, and (1-mask) is the other areas outside the dark light area. is the first subdifference, This is the second subdifference.

[0168] It can be understood that, from formula (12), when the first sub-difference increases and the second sub-difference decreases, the information difference between the predicted video and the third video decreases accordingly.

[0169] Then, the semantic difference between the predicted video and the third video is determined.

[0170] In the disclosed embodiment, the semantic difference between the predicted video and the third video can be calculated by using a deep learning model (such as a CLIP model), and the formula corresponding to the semantic difference can be shown in the following formula (13). By considering the semantic difference between the predicted video and the third video when training the model, the semantic integrity of the predicted video input by the model can be guaranteed.

[0171]

[0172] Among them, Φ image T represents the image encoder in the CLIP model, and w is the weight. n It is represented as a normal light image, that is, the output image that the event fusion model should learn, T p Indicates low-light images.

[0173] Afterwards, the second difference may be determined based on the information difference and the semantic difference.

[0174] In the disclosed embodiment, the information difference and the semantic difference may be fused (such as adding, or weighted summing, etc.) to obtain the second difference. Then, after obtaining the first difference and the second difference, the first difference and the second difference may be added to determine the loss value.

[0175] In the disclosed embodiment, the loss value corresponding to the model output is calculated by combining the temporal consistency difference and the detail contrast difference, which is beneficial to maintaining the temporal stability and semantic integrity of the model output results and provides conditions for improving the efficiency and reliability of model training.

[0176] Step 406 , based on the loss value, reversely correct the initial illumination model and the initial event fusion model until the target illumination model and the target event fusion model are obtained.

[0177] In the disclosed embodiment, starting from the output layer of the initial illumination model and the initial event fusion model, the correction gradient of the loss value to each parameter of the model can be calculated layer by layer, and then the parameters of the model are updated based on the correction gradient to reduce the loss value. Then, after multiple iterations of correction, until the number of iterations reaches a certain value or the loss value is less than a preset loss threshold, the model training is terminated to obtain the target illumination model and the target event fusion model.

[0178] In the disclosed embodiment, a training data set is first obtained, and then the third video is input into the initial illumination model to obtain the second illumination corresponding to the third video, and the third video and the corresponding third event are respectively input into the initial event fusion model to obtain the second target image feature after the fusion event corresponding to the third video. Afterwards, the second target image feature and the second illumination are synthesized to obtain a predicted video. Then, based on the predicted video, the third video and the third event, a loss value is determined, and based on the loss value, the initial illumination model and the initial event fusion model are reversely corrected until the target illumination model and the target event fusion model are obtained. Thus, by iteratively correcting the illumination model and the event fusion model based on the loss value, the target illumination model and the target event fusion model are obtained, thereby improving the robustness and reliability of the model, and providing conditions for further improving the efficiency and accuracy of video processing.

[0179] In order to implement the above embodiment, the present disclosure also proposes a dark light video processing device.

[0180] Figure 5 A schematic diagram of the structure of a low-light video processing device provided in an embodiment of the present disclosure.

[0181] like Figure 5 As shown, the dark light video processing device 500 may include:

[0182] A first acquisition module 501 is used to acquire a first dark-light video to be processed and a corresponding first event;

[0183] A first processing module 502 is used to input the first video into the generated illumination model to obtain a first illumination corresponding to the first video;

[0184] The second processing module 503 is used to input the first video and the first event into the generated event fusion model respectively, and obtain the first target image feature after the fusion event corresponding to the first video, wherein the event fusion model and the illumination model are generated by joint training;

[0185] The first synthesis module 504 is used to synthesize the first target image feature and the first illumination to obtain a target video.

[0186] Optionally, the second processing module 503 may be specifically configured to:

[0187] Inputting the first video and the first event into the residual network in the event fusion model respectively, obtaining a second video and a second event output by the residual network, wherein the number of channels included in the image in the second video is less than the number of channels included in the image in the first video;

[0188] Inputting the second video into the image feature extraction network in the event fusion model to obtain the first image feature;

[0189] Inputting the second event into an event feature extraction network in an event fusion model to obtain a first event feature;

[0190] The first event feature and the first image feature are respectively input into the fusion network in the event fusion model to obtain the first target image feature after the fusion event.

[0191] Optionally, the event fusion model may include a multi-level fusion network, wherein each level of the fusion network includes an image processing branch and an event processing branch, wherein the image processing branch includes an image processing module and an event image fusion module, and the event processing branch includes an event encoder.

[0192] Optionally, the second processing module 503 may be specifically configured to:

[0193] Get the image features output by the i-th level event image fusion module The corresponding brightness map G i And signal-to-noise ratio S i , where i is a positive integer;

[0194] The brightness map G i and signal-to-noise ratio S i Input the mask generation module respectively to obtain the i-th mask i ;

[0195] The mask i With image features Input the first fusion module respectively to obtain the dark area features

[0196] The dark area features Image features and the first event features are input into the second fusion module respectively to obtain the image features Aligned Second Event Features

[0197] The second event feature With image features Input the third fusion module respectively to obtain the first target image features after the fusion event

[0198] Optionally, the second processing module 503 may be specifically configured to:

[0199] Based on the preset window, the brightness map G i and signal-to-noise ratio S i Divided into multiple brightness blocks and multiple signal-to-noise ratio tiles Wherein, j is a positive integer;

[0200] Determine each brightness tile The corresponding brightness mean and brightness threshold;

[0201] Determine the signal-to-noise ratio mean and signal-to-noise ratio threshold corresponding to each signal-to-noise ratio block

[0202] Determine the mask according to the brightness mean and brightness threshold corresponding to each brightness block, and the signal-to-noise ratio mean and signal-to-noise ratio threshold corresponding to the corresponding signal-to-noise ratio block. i .

[0203] Optionally, the second processing module 503 may be specifically configured to:

[0204] When the brightness mean corresponding to the jth brightness block is less than the brightness threshold, and the signal-to-noise ratio mean corresponding to the jth signal-to-noise ratio block is less than the signal-to-noise ratio threshold, determine the mask i The j-th element in takes the first value;

[0205] When the brightness mean corresponding to the j-th brightness block is greater than or equal to the brightness threshold, or the signal-to-noise ratio mean corresponding to the j-th signal-to-noise ratio block is greater than or equal to the signal-to-noise ratio threshold, determine the mask i The j-th element in takes the second value.

[0206] Optionally, the second processing module 503 may be specifically configured to:

[0207] The dark area features The first event features are input into the event aggregation layer in the second fusion module to obtain the aggregated event features

[0208] The first event feature and image feature Input the attention layer in the second fusion module respectively to obtain the attention matrix W p ;

[0209] The attention matrix W p and aggregate event characteristics Input the fusion layer in the second fusion module respectively to obtain the second event features

[0210] Optionally, the dark light video processing device 500 may further include:

[0211] A second acquisition module is used to acquire a training data set, wherein the training data set includes a plurality of corresponding third videos and third events;

[0212] A third processing module, used for inputting the third video into the initial illumination model to obtain a second illumination corresponding to the third video;

[0213] A fourth processing module, used for inputting the third video and the corresponding third event into the initial event fusion model respectively, to obtain the second target image features after the fusion event corresponding to the third video;

[0214] A second synthesis module, used for synthesizing the second target image feature and the second illumination to obtain a predicted video;

[0215] A first determination module, configured to determine a loss value based on the predicted video, the third video, and the third event;

[0216] The correction module is used to reversely correct the initial illumination model and the initial event fusion model based on the loss value until the target illumination model and the target event fusion model are obtained.

[0217] Optionally, the first determining module may be specifically configured to:

[0218] extracting a first motion trend and a second motion trend from the third event and the predicted video respectively;

[0219] determining a first difference between the first motion trend and the second motion trend;

[0220] determining a second difference between the predicted video and the third video;

[0221] A loss value is determined based on the first difference and the second difference.

[0222] Optionally, the first determining module may be specifically configured to:

[0223] Determine a first area in the predicted video corresponding to the mask image, and a second area in the third video corresponding to the mask image;

[0224] Determine the information difference between the predicted video and the third video according to the first subdifference between the first area and the second area, and the second subdifference between the third area outside the first area in the predicted video and the corresponding fourth area in the third video;

[0225] determining a semantic difference between the predicted video and a third video;

[0226] The second difference is determined based on the information difference and the semantic difference.

[0227] The functions and specific implementation principles of the above modules in the embodiments of the present disclosure can be referred to the above method embodiments, and will not be repeated here.

[0228] The processing device of the low-light video of the embodiment of the present disclosure first obtains the low-light first video to be processed and the corresponding first event. Then, the first video is input into the generated illumination model to obtain the first illumination corresponding to the first video, and the first video and the first event are respectively input into the generated event fusion model to obtain the first target image feature after the fusion event corresponding to the first video. Afterwards, the first target image feature and the first illumination are synthesized to obtain the target video. Thus, by using the illumination model and the event fusion model, image features are extracted and illumination is estimated in the low-light video and the corresponding event information, and then the image features and illumination are synthesized to complete the enhancement processing of the low-light area of ​​the video to obtain the target video. Thereby, the accuracy of feature extraction in the video is improved, the efficiency of video processing is improved, the visual effect of the video is enhanced, and the user experience is optimized.

[0229] In order to implement the above embodiments, the present disclosure further proposes an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for processing low-light video proposed in the above embodiments of the present disclosure is implemented.

[0230] Figure 6 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present disclosure is shown. Figure 6 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0231] like Figure 6 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0232] The bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.

[0233] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0234] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (CD-ROM), a digital versatile disc read only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the various embodiments of the present disclosure.

[0235] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0236] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0237] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the methods mentioned in the above embodiments.

[0238] In order to implement the above embodiments, the present disclosure further proposes a chip, which includes a processing circuit, and the processing circuit is configured to execute the low-light video processing method provided by the above embodiments.

[0239] Figure 7 is a schematic diagram of the structure of the chip proposed in the embodiment of the present disclosure. Figure 7 The structure of the chip 700 is shown, but is not limited to this.

[0240] The chip 700 includes a processing circuit 701 , and the processing circuit 701 is configured to execute any of the above methods.

[0241] In some embodiments, the chip 700 further includes one or more interface circuits 702. Optionally, the interface circuit 702 is connected to the memory 703, and the interface circuit 702 can be used to receive signals from the memory 703 or other devices, and the interface circuit 702 can be used to send signals to the memory 703 or other devices. For example, the interface circuit 702 can read instructions stored in the memory 703 and send the instructions to the processing circuit 701.

[0242] In some embodiments, the interface circuit 702 performs at least one of the communication steps such as sending and / or receiving in the above method, and the processing circuit 701 performs other steps.

[0243] In some embodiments, terms such as interface circuit, interface, transceiver pin, and transceiver may be used interchangeably.

[0244] In some embodiments, the chip 700 further includes one or more memories 703 for storing instructions. Optionally, all or part of the memory 703 may be outside the chip 700.

[0245] In order to implement the above embodiments, the present disclosure further proposes a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the method for processing dark-light video proposed in the above embodiments of the present disclosure is implemented.

[0246] The technical solution disclosed in the present invention uses an illumination model and an event fusion model to extract image features and estimate illumination in dark-light videos and corresponding event information, and then synthesizes the image features and illumination to enhance the dark-light area of ​​the video and obtain the target video. This improves the accuracy of feature extraction in the video, improves the efficiency of video processing, enhances the visual effect of the video, and optimizes the user experience.

[0247] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this disclosure shall comply with the relevant laws and regulations and shall not violate public order and good morals.

[0248] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.

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

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

[0251] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present disclosure belong.

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

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

[0254] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0255] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0256] The storage medium mentioned above may be a read-only memory, a disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present disclosure. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present disclosure.

Claims

1. A method for processing dark light video, characterized in that: include: Obtain a first dark-light video to be processed and a corresponding first event; Inputting the first video into the generated illumination model to obtain a first illumination corresponding to the first video; Inputting the first video and the first event into the generated event fusion model respectively, and obtaining a first target image feature after the fusion event corresponding to the first video, wherein the event fusion model and the illumination model are generated by joint training; The first target image feature and the first illumination are synthesized to obtain a target video.

2. The method according to claim 1, characterized in that The step of inputting the first video and the first event into the generated event fusion model to obtain a first target image feature after the fusion event corresponding to the first video includes: Inputting the first video and the first event into the residual network in the event fusion model respectively, obtaining a second video and a second event output by the residual network, wherein the number of channels contained in the image in the second video is less than the number of channels contained in the image in the first video; Inputting the second video into the image feature extraction network in the event fusion model to obtain a first image feature; Inputting the second event into the event feature extraction network in the event fusion model to obtain the first event feature; The first event feature and the first image feature are respectively input into a fusion network in the event fusion model to obtain a first target image feature after the fusion event.

3. The method according to claim 2, characterized in that The event fusion model includes a multi-level fusion network, wherein each level of the fusion network includes an image processing branch and an event processing branch, wherein the image processing branch includes an image processing module and an event image fusion module, and the event processing branch includes an event encoder.

4. The method according to claim 3, characterized in that The step of inputting the first event feature and the first image feature into a fusion network in the event fusion model to obtain a first target image feature after the fusion event includes: Get the image features output by the i-th level event image fusion module The corresponding brightness map G i And signal-to-noise ratio S i , where i is a positive integer; The brightness map G i and signal-to-noise ratio S i Input the mask generation module respectively to obtain the i-th mask i ; The mask i With the image features Input the first fusion module respectively to obtain the dark area features The dark area features The image features and the first event feature are respectively input into the second fusion module to obtain the image feature Aligned Second Event Features The second event features With the image features Input the third fusion module respectively to obtain the first target image features after the fusion event 5. The method according to claim 4, characterized in that The brightness map G i and signal-to-noise ratio S i Input the mask generation module respectively to obtain the i-th mask i ,include: Based on a preset window, the brightness map G i and signal-to-noise ratio S i Divided into multiple brightness blocks and multiple signal-to-noise ratio tiles Wherein, j is a positive integer; Determine each of the brightness tiles The corresponding brightness mean and brightness threshold; Determine the signal-to-noise ratio mean and signal-to-noise ratio threshold corresponding to each signal-to-noise ratio block Determine the mask image mask according to the brightness mean and brightness threshold corresponding to each brightness image block, and the signal-to-noise ratio mean and signal-to-noise ratio threshold corresponding to the corresponding signal-to-noise ratio image block i .

6. The method according to claim 5, characterized in that The mask is determined according to the brightness mean and brightness threshold corresponding to each brightness block, and the signal-to-noise ratio mean and signal-to-noise ratio threshold corresponding to the corresponding signal-to-noise ratio block. i ,include: When the brightness mean value corresponding to the j-th brightness block is less than the brightness threshold, and the signal-to-noise ratio mean value corresponding to the j-th signal-to-noise ratio block is less than the signal-to-noise ratio threshold, the mask image mask is determined. i The j-th element in takes the first value; When the brightness mean corresponding to the j-th brightness block is greater than or equal to the brightness threshold, or the signal-to-noise ratio mean corresponding to the j-th signal-to-noise ratio block is greater than or equal to the signal-to-noise ratio threshold, the mask is determined. i The j-th element in takes the second value.

7. The method according to claim 4, characterized in that The dark area features The image features and the first event feature are respectively input into the second fusion module to obtain the image feature Aligned Second Event Features include: The dark area features and the first event features are respectively input into the event aggregation layer in the second fusion module to obtain the aggregated event features The first event feature and the image feature Input the attention layer in the second fusion module respectively to obtain the attention matrix W p ; The attention matrix W p And the aggregation event characteristics The second event features are respectively input into the fusion layer of the second fusion module to obtain the second event features 8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: Acquire a training data set, wherein the training data set includes a plurality of corresponding sets of third videos and third events; Inputting the third video into an initial illumination model to obtain a second illumination corresponding to the third video; Inputting the third video and the corresponding third event into the initial event fusion model respectively to obtain the second target image feature after the fusion event corresponding to the third video; Synthesizing the second target image feature and the second illumination to obtain a predicted video; Determining a loss value based on the predicted video, the third video, and the third event; Based on the loss value, the initial illumination model and the initial event fusion model are reversely corrected until a target illumination model and a target event fusion model are obtained.

9. The method according to claim 8, characterized in that The determining of the loss value based on the predicted video, the third video and the third event includes: extracting a first motion trend and a second motion trend from the third event and the predicted video respectively; determining a first difference between the first motion trend and the second motion trend; determining a second difference between the predicted video and the third video; The loss value is determined according to the first difference and the second difference.

10. The method according to claim 9, characterized in that The determining a second difference between the predicted video and the third video includes: Determine a first area in the predicted video corresponding to the mask image, and a second area in the third video corresponding to the mask image; Determine an information difference between the predicted video and the third video according to a first subdifference between the first area and the second area, and a second subdifference between a third area outside the first area in the predicted video and a corresponding fourth area in the third video; determining a semantic difference between the predicted video and the third video; The second difference is determined according to the information difference and the semantic difference.

11. A low-light video processing device, characterized in that: include: A first acquisition module, used to acquire a first dark-light video to be processed and a corresponding first event; A first processing module, configured to input the first video into a generated illumination model to obtain a first illumination corresponding to the first video; A second processing module is used to input the first video and the first event into the generated event fusion model respectively, to obtain a first target image feature after the fusion event corresponding to the first video, wherein the event fusion model and the illumination model are generated by joint training; The first synthesis module is used to synthesize the first target image feature and the first illumination to obtain a target video.

12. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for processing low-light video as described in any one of claims 1 to 10 is implemented.

13. A chip, characterized in that: The chip includes a processing circuit, and the processing circuit is configured to execute the low-light video processing method as described in any one of claims 1-10.

14. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for processing low-light video as described in any one of claims 1 to 10 is implemented.

Citation Information

Cited By

  • Photographing method and device, electronic equipment, chip and storage medium

    CN119653227A

  • Dark light scene data enhancement method and system

    CN119763016A