An image data enhancement method and device, electronic equipment and storage medium

CN117593230BActive Publication Date: 2026-11-03CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311418252.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-30
Publication Date
2026-11-03
Estimated Expiration
2043-10-30

AI Technical Summary

Technical Problem

Existing image data augmentation methods cannot effectively improve the performance of object detectors in nighttime scenes. In particular, traditional methods cannot convert daytime images into effective nighttime images, while deep learning-based methods deviate from the semantic content of the original scene.

Method used

By acquiring daytime and nighttime images of the target scene, a segmentation and recognition model is used to obtain object mask pairs, image parameters are calculated and transformation parameters are generated, and these parameters are used to perform data augmentation on the daytime images to generate new images with nighttime features.

Benefits of technology

It effectively expands the training dataset, improves the performance of the object detector under nighttime conditions, enhances the robustness and generalization ability of the model, reduces data collection costs, and maintains scene consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117593230B_ABST
    Figure CN117593230B_ABST
Patent Text Reader

Abstract

The application discloses an image data enhancement method and device, electronic equipment and storage medium, and the method comprises the following steps: acquiring picture data set of a target scene; performing segmentation identification based on the picture data set to obtain a mask pair of all objects in the target scene; the mask pair comprises a daytime mask and a nighttime mask; obtaining image parameters of each object in the target scene according to image values of the image part corresponding to the mask pair; obtaining conversion parameters based on the image parameters of the mask pair of each object; performing data enhancement on a target daytime picture to be processed through the conversion parameters to obtain a target nighttime picture. Through segmentation identification of daytime pictures and nighttime pictures, the conversion parameters are obtained by combining corresponding image processing, and then the daytime pictures can be generated into new images with nighttime characteristics based on the conversion parameters, so that the training data set can be effectively expanded, the performance of the target detector under nighttime conditions is improved, and the application can be widely applied to the technical field of image processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to an image data enhancement method, apparatus, electronic device, and storage medium. Background Technology

[0002] Object detection is a crucial task in computer vision, aiming to locate and identify different categories of objects in images. Its applications are numerous, including autonomous driving, facial recognition, and video surveillance. However, object detection performance is significantly affected by image acquisition conditions, such as lighting, weather, and season. Under different lighting conditions, image features like color, contrast, and texture change, leading to a decrease in the generalization ability of object detectors. Furthermore, acquiring object sample data for nighttime scenes is far more difficult than during the day; the lack of sufficient nighttime object sample data is the most significant reason affecting the performance and accuracy of object detectors.

[0003] To improve the performance of object detectors in nighttime scenes, a common approach is to use data augmentation techniques, which involve transforming or synthesizing training data to increase its diversity and complexity. Data augmentation techniques can be categorized into traditional methods and deep learning-based methods. Traditional methods include operations such as rotation, cropping, scaling, flipping, noise addition, and color transformation; deep learning-based methods include Generative Adversarial Networks (GANs) and Image-to-Image Translation Networks (IPNs). These methods utilize neural networks to learn the mapping relationships between images, thereby generating new images with nighttime style or attributes.

[0004] However, neither of the above methods can effectively improve the performance of object detectors in practice. This is because although traditional methods can change the geometry or pixel values ​​of an image, simple changes cannot convert daytime images into effective nighttime images. Deep learning-based methods change the semantic content of the image, deviating from the original scene semantics. Summary of the Invention

[0005] This invention aims to at least partially solve one of the technical problems in related technologies. To this end, this invention proposes an image data enhancement method, apparatus, electronic device, and storage medium capable of accurately enhancing image data.

[0006] On one hand, embodiments of the present invention provide an image data enhancement method, including:

[0007] Obtain the image dataset of the target scene; the image dataset includes daytime and nighttime images of the target scene;

[0008] Based on the image dataset, segmentation and recognition are performed to obtain mask pairs for all objects in the target scene; the mask pairs include daytime masks and nighttime masks;

[0009] Based on the image values ​​of the corresponding image portion of the mask, the image parameters of each object in the target scene are obtained;

[0010] Transformation parameters are obtained based on the image parameters of the mask pairs for each object;

[0011] By transforming parameters and performing data augmentation on the target daytime image, a target nighttime image is obtained.

[0012] Optionally, image values ​​include pixel values, color channel values, color component values, and grayscale values; image parameters include contrast, brightness, hue, saturation, and noise; based on the image values ​​of the corresponding image portion of the mask, image parameters of each object in the target scene are obtained, including:

[0013] The contrast of each object in the target scene is obtained by calculating the extreme values ​​of the pixel values ​​in the image portion corresponding to the mask pair.

[0014] The contrast of each object in the target scene is obtained by summing all the pixel values ​​of the image portion corresponding to the mask pair and then averaging the summation result.

[0015] Based on the values ​​of each color channel in the corresponding image portion of the mask pair, the hue of each object in the target scene is calculated.

[0016] Based on the extreme value calculation of the color component values ​​in the image part corresponding to the mask pair, the saturation of each object in the target scene is obtained.

[0017] Based on the mask, the structural similarity index is calculated for the gray values ​​of the corresponding image parts to obtain the noise of each object in the target scene.

[0018] Optionally, the color channels include red, green, and blue channels; based on the values ​​of each color channel in the corresponding image portion of the mask pair, the hue of each object in the target scene is calculated, including:

[0019] The hue of each object in the target scene is calculated based on the values ​​of each color channel in the corresponding image part of the mask pair, combined with the inverse trigonometric function.

[0020] The expression for hue is:

[0021]

[0022] In the formula, H represents hue; arctan represents the arctangent function in the inverse trigonometric functions; R represents the value of the red channel; G represents the value of the green channel; and B represents the value of the blue channel.

[0023] Optionally, based on the mask, a structural similarity index is calculated for the grayscale values ​​of the corresponding image portions to obtain the noise of each object in the target scene, including:

[0024] Based on the gray values ​​of the image portions corresponding to the daytime mask and the nighttime mask, the first mean and first standard deviation of the image portions corresponding to the daytime mask and the second mean and second standard deviation of the image portions corresponding to the nighttime mask are obtained respectively.

[0025] Based on the first and second average values, the covariance of the image portions corresponding to the daytime mask and the nighttime mask is obtained;

[0026] Based on the first mean, first standard deviation, second mean, second standard deviation and covariance, the noise of the image part corresponding to each object in the target scene under daytime mask and nighttime mask is calculated by the structural similarity index;

[0027] The expression for calculating the structural similarity index is:

[0028]

[0029] In the formula, SSIM(x,y) represents noise; x and y represent the image portions corresponding to the daytime mask and the nighttime mask, respectively; μ x Indicates the first average value; μ y σ represents the second average value; x σ represents the first standard deviation. y σ represents the second standard deviation. xy C1 and C2 represent the covariance; both are constants.

[0030] Optionally, the image parameters include first image parameters and second image parameters. The first image parameters include third image parameters corresponding to the image portion corresponding to the daytime mask and fourth image parameters corresponding to the image portion corresponding to the nighttime mask. Both the third and fourth image parameters include contrast, brightness, hue, and saturation. The second image parameters include noise. The transformation parameters include a first difference coefficient and a second difference coefficient. Based on the image parameters of the mask pairs for each object, the transformation parameters are obtained, including:

[0031] The first difference coefficient is obtained based on the third and fourth image parameters of each object in the target scene;

[0032] The second difference coefficient is obtained based on the second image parameters of each object in the target scene.

[0033] Optionally, a first difference coefficient is obtained based on the third and fourth image parameters of each object in the target scene, including:

[0034] The first difference coefficient is obtained by performing a first cumulative average calculation based on the third and fourth image parameters of each object in the target scene; the first difference coefficient includes the contrast difference coefficient, brightness difference coefficient, hue difference coefficient and saturation difference coefficient.

[0035] The expression for the first difference coefficient is:

[0036]

[0037] In the formula, X o X represents the first difference coefficient; od Indicates the third image parameter; X on This represents the fourth image parameter; n represents the number of objects in the target scene.

[0038] Optionally, a second difference coefficient is obtained based on the second image parameters of each object in the target scene, including:

[0039] A second cumulative average is calculated based on the second image parameters of each object in the target scene to obtain the second difference coefficient; the expression for the second difference coefficient is as follows:

[0040]

[0041] In the formula, SS o Indicates the second difference coefficient; SS oi The second image parameter represents the i-th object in the target scene; n represents the number of objects in the target scene.

[0042] On the other hand, embodiments of the present invention provide an image data enhancement apparatus, comprising:

[0043] The first module is used to acquire the image dataset of the target scene; the image dataset includes daytime and nighttime images of the target scene;

[0044] The second module is used for segmentation and recognition based on the image dataset to obtain mask pairs for all objects in the target scene; the mask pairs include daytime masks and nighttime masks.

[0045] The third module is used to obtain the image parameters of each object in the target scene based on the image values ​​of the corresponding image parts of the mask.

[0046] The fourth module is used to obtain transformation parameters based on the image parameters of the mask pairs for each object;

[0047] The fifth module is used to perform data augmentation on the target daytime image by transforming parameters to obtain the target nighttime image.

[0048] On the other hand, embodiments of the present invention provide an electronic device, including: a processor and a memory; the memory is used to store a program; the processor executes the program to implement the above-described image data enhancement method.

[0049] On the other hand, embodiments of the present invention provide a computer storage medium storing a processor-executable program, which, when executed by a processor, is used to implement the above-described image data enhancement method.

[0050] This invention provides an embodiment of the invention that acquires an image dataset of a target scene, including daytime and nighttime images of the target scene. Based on the image dataset, segmentation and recognition are performed to obtain mask pairs for all objects in the target scene. These mask pairs include daytime and nighttime masks. Image parameters for each object in the target scene are obtained based on the image values ​​of the corresponding image portions of the mask pairs. Transformation parameters are then obtained based on the image parameters of the mask pairs for each object. Data augmentation is performed on the target daytime image to be processed using these transformation parameters to obtain the target nighttime image. This invention, through segmentation and recognition of daytime and nighttime images, combined with appropriate image processing to obtain transformation parameters, can generate new images with nighttime features from daytime images. This effectively expands the training dataset and improves the performance of the object detector under nighttime conditions. Attached Figure Description

[0051] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.

[0052] Figure 1 This is a schematic diagram of an implementation environment for image data enhancement provided in an embodiment of the present invention;

[0053] Figure 2 This is a flowchart illustrating an image data enhancement method provided in an embodiment of the present invention;

[0054] Figure 3 A schematic diagram illustrating examples of daytime images provided in an embodiment of the present invention;

[0055] Figure 4 A schematic diagram illustrating an example of a nighttime image provided in an embodiment of the present invention;

[0056] Figure 5 A schematic diagram illustrating an example of image segmentation and recognition provided in an embodiment of the present invention;

[0057] Figure 6A schematic diagram illustrating the architectural principle of the Semantic-SAM model provided in this embodiment of the invention;

[0058] Figure 7 This is a schematic diagram of the overall process of image data enhancement provided in an embodiment of the present invention;

[0059] Figure 8 This is a schematic diagram of the structure of an image data enhancement device provided in an embodiment of the present invention;

[0060] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention;

[0061] Figure 10 A computer system architecture block diagram suitable for implementing electronic devices according to embodiments of the present invention is provided. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0063] It should be noted that although functional modules are divided in the system diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100," "second / S200," etc., in the specification, claims, and the aforementioned figures are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0064] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0065] To facilitate understanding of the technical solutions in the embodiments of the present invention, the technical names that may appear in the embodiments of the present invention are explained:

[0066] Semantic-SAM (Semantic Segment and Recognize Anything Model) is a general-purpose image segmentation and recognition model that can segment and recognize any object based on different input cues (such as text, images, boxes, etc.) and can perform segmentation at multiple granularities.

[0067] Mask: In image segmentation, a binary image mask is used to label and separate regions of interest. It can be used to represent one or more objects or categories in an image. A mask is typically a matrix of the same size as the original image, where each element (or pixel) has a value of 0 or 1, where 0 represents the background and 1 represents the foreground. Sometimes, a mask can also use different colors or grayscale values ​​to represent different objects or categories.

[0068] SSIM (Structural Similarity Index) is a metric used to measure image quality. It considers not only the brightness differences between pixels but also the structural information of the image.

[0069] It should also be noted that image processing is a technique for manipulating or transforming digital images. It can be used to improve image quality, extract information from images, and enhance the visual effects of images. The image processing techniques that may be applied in the embodiments of this invention are explained below:

[0070] (1) Contrast Ratio: Contrast ratio refers to the degree of difference between bright and dark areas in an image. The greater the contrast ratio, the clearer the image and the richer the details. Contrast ratio can be defined by the following formula:

[0071]

[0072] Among them, L max and L min These are the brightest and darkest pixel values ​​in the image, respectively. The contrast ratio ranges from [0,1], where 0 represents no contrast and 1 represents maximum contrast.

[0073] (2) Brightness: Brightness refers to the overall brightness level in an image. The higher the brightness, the brighter the image. Brightness can be defined by the following formula:

[0074]

[0075] Where N is the total number of pixels in the image, L i It is the brightness value of the i-th pixel. The range of brightness values ​​depends on the data type of the image. For example, for an 8-bit unsigned integer image, the brightness value range is [0, 255].

[0076] (3) Hue: Hue refers to the color attribute in an image. The higher the hue, the more vibrant the color. Hue can be defined using the following formula:

[0077]

[0078] Where R, G, and B are the values ​​of the red, green, and blue channels in the image, respectively. The hue value ranges from [0, 360], and the unit is angle.

[0079] (4) Saturation: Saturation refers to the purity of colors in an image. The higher the saturation, the purer the color. Saturation can be defined using the following formula:

[0080]

[0081] Among them, C max and C min These are the maximum and minimum color component values ​​in the image, respectively. The saturation value ranges from [0,1], where 0 represents no saturation and 1 represents maximum saturation.

[0082] (5) Noise: Noise here refers to the difference in imaging between nighttime and daytime images caused by changes in light, sensors, compression, etc. The greater the noise, the greater the image difference. Noise can be calculated using the structural similarity index.

[0083] Compared to peak signal-to-noise ratio (PSNR), SSIM better reflects the human eye's subjective perception of image quality because it takes into account factors such as contrast, brightness, and structure perceived by the human eye.

[0084] SSIM's calculations are based on three main factors: luminance, contrast, and structure. It uses a local window to compare the differences in luminance, contrast, and structure between the original and processed images within that window.

[0085] The formula for calculating SSIM is as follows:

[0086]

[0087] Where x and y are two images to be compared, μ x and μ y These are the average values ​​of the two images within the local window, σ and σ' are respectively. x and σ y It is their standard deviation, σ xy These are their covariances, and C1 and C2 are constants used to prevent the denominator from being zero.

[0088] The SSIM value ranges from -1 to 1. The closer it is to 1, the more similar the two images are; the closer it is to -1, the greater the difference.

[0089] It is understood that the image data enhancement method provided in this embodiment of the invention can be applied to any computer device with data processing and computing capabilities, and this computer device can be various types of terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal can be a smartphone, tablet computer, laptop computer, or desktop computer, but it is not limited to these.

[0090] like Figure 1 The diagram shown is a schematic representation of an implementation environment provided by an embodiment of the invention. (Refer to...) Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected via a network, either wirelessly or via a wired connection, to complete data transmission and exchange.

[0091] Server 101 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0092] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.

[0093] Terminal 102 can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment of the invention does not impose any limitations.

[0094] Exemplary based on Figure 1The implementation environment shown in this embodiment of the invention provides an image data enhancement method. The following description uses the application of this image data enhancement method in server 101 as an example. It can be understood that this image data enhancement method can also be applied in terminal 102.

[0095] Reference Figure 2 , Figure 2 This is a flowchart illustrating an image data enhancement method applied to a server, provided in an embodiment of the present invention. The entity executing this image data enhancement method can be any of the aforementioned computer devices (including a server or a terminal). (Refer to...) Figure 2 The method includes the following steps:

[0096] S100. Obtain the image dataset of the target scene;

[0097] It should be noted that the image dataset includes both daytime and nighttime images of the target scene;

[0098] For example, in some specific embodiments, daytime and nighttime images of the same scene can be acquired separately by the camera, such as... Figure 3 (Daytime image) and Figure 4 (Nighttime image) is shown.

[0099] S200. Based on the image dataset, segmentation and recognition are performed to obtain mask pairs of all objects in the target scene;

[0100] It should be noted that the mask pair includes daytime masks and nighttime masks;

[0101] For example, in some specific embodiments, the Semantic-SAM large model can be used for image segmentation and recognition. First, the Semantic-SAM large model is used to segment and recognize daytime images, segmenting all objects in the daytime images and generating daytime masks for different objects. od That is, to segment out the outline of an object, such as Figure 5 As shown; since the size and position of the daytime and nighttime images correspond, the corresponding nighttime mask for the nighttime image is also obtained. on .

[0102] S300. Based on the image values ​​of the corresponding image portion of the mask, obtain the image parameters of each object in the target scene;

[0103] It should be noted that image values ​​include pixel values, color channel values, color component values, and grayscale values; image parameters include contrast, brightness, hue, saturation, and noise; in some embodiments, step S300 may include: calculating the contrast of each object in the target scene based on the extreme values ​​of pixel values ​​in the image portion corresponding to the mask pair; summing all pixel values ​​in the image portion corresponding to the mask pair, and then averaging the summed results to obtain the contrast of each object in the target scene; calculating the hue of each object in the target scene based on the values ​​of each color channel in the image portion corresponding to the mask pair; calculating the saturation of each object in the target scene based on the extreme values ​​of color component values ​​in the image portion corresponding to the mask pair; and calculating the structural similarity index based on the grayscale values ​​of the image portion corresponding to the mask pair to obtain the noise of each object in the target scene.

[0104] In some embodiments, the color channels include a red channel, a green channel, and a blue channel; the hue of each object in the target scene is calculated based on the values ​​of each color channel in the corresponding image portion of the mask pair, which may include: calculating the hue of each object in the target scene based on the values ​​of each color channel in the corresponding image portion of the mask pair, combined with an inverse trigonometric function.

[0105] The expression for hue is:

[0106]

[0107] In the formula, H represents hue; arctan represents the arctangent function in the inverse trigonometric functions; R represents the value of the red channel; G represents the value of the green channel; and B represents the value of the blue channel.

[0108] In some embodiments, the structural similarity index is calculated based on the gray values ​​of the corresponding image portions of the mask to obtain the noise of each object in the target scene. This may include: obtaining the first average value and first standard deviation of the image portion corresponding to the daytime mask and the second average value and second standard deviation of the image portion corresponding to the nighttime mask, based on the gray values ​​of the image portions corresponding to the daytime mask and the nighttime mask, respectively; obtaining the covariance of the image portions corresponding to the daytime mask and the nighttime mask based on the first average value and the second average value; and calculating the noise of each object in the target scene in the image portions corresponding to the daytime mask and the nighttime mask using the structural similarity index based on the first average value, the first standard deviation, the second average value, the second standard deviation, and the covariance. The expression for calculating the structural similarity index is:

[0109]

[0110] In the formula, SSIM(x,y) represents noise; x and y represent the image portions corresponding to the daytime mask and the nighttime mask, respectively; μ x Indicates the first average value; μ y σ represents the second average value; x σ represents the first standard deviation. y σ represents the second standard deviation. xy C1 and C2 represent the covariance; both are constants.

[0111] For example, in some specific embodiments, the Mask is calculated. o (i.e., mask pairs, including Mask) od and Mask on The contrast, brightness, hue, saturation, and noise values ​​of the mask are calculated according to the relevant image processing formulas explained above. od The contrast of some images is C. od Brightness is B od The color tone is H od saturation is S od ; Calculate the mask respectively on The contrast of some images is C. on Brightness is B on The color tone is H on saturation is S on ; Calculate the mask using the SSIM formula od With Mask on The noise in some images is SS. oi .

[0112] S400. Based on the image parameters of the mask pairs of each object, the transformation parameters are obtained;

[0113] It should be noted that the image parameters include first image parameters and second image parameters. The first image parameters include third image parameters corresponding to the image portion corresponding to the daytime mask and fourth image parameters corresponding to the image portion corresponding to the nighttime mask. Both the third and fourth image parameters include contrast, brightness, hue, and saturation. The second image parameters include noise. The conversion parameters include a first difference coefficient and a second difference coefficient. In some embodiments, step S400 may include: obtaining a first difference coefficient based on the third and fourth image parameters of each object in the target scene; and obtaining a second difference coefficient based on the second image parameters of each object in the target scene.

[0114] In some embodiments, obtaining the first difference coefficient based on the third and fourth image parameters of each object in the target scene may include: performing a first cumulative average calculation based on the third and fourth image parameters of each object in the target scene to obtain the first difference coefficient; the first difference coefficient includes a contrast difference coefficient, a brightness difference coefficient, a hue difference coefficient, and a saturation difference coefficient; wherein, the expression for the first difference coefficient is:

[0115]

[0116] In the formula, X o X represents the first difference coefficient; od Indicates the third image parameter; X on This represents the fourth image parameter; n represents the number of objects in the target scene.

[0117] In some embodiments, obtaining the second difference coefficient based on the second image parameters of each object in the target scene may include: performing a second cumulative average calculation based on the second image parameters of each object in the target scene to obtain the second difference coefficient; wherein the expression for the second difference coefficient is:

[0118]

[0119] In the formula, SS o Indicates the second difference coefficient; SS oi The second image parameter represents the i-th object in the target scene; n represents the number of objects in the target scene.

[0120] For example, in some specific embodiments, the Mask is first calculated. o (i.e., mask pairs, including Mask) od and Mask on Contrast difference coefficient, brightness difference coefficient, hue difference coefficient, and saturation difference coefficient: Calculate the contrast difference coefficient for different objects respectively. Brightness difference coefficient is The color difference coefficient is The saturation difference coefficient is

[0121] Then calculate Mask o The noise difference coefficient for different objects is calculated as follows:

[0122] S500 performs data augmentation on the target daytime image by transforming parameters to obtain the target nighttime image.

[0123] For example, in some specific embodiments, the Semantic-SAM large model is first applied to the (to be processed) daytime image (i.e., the target daytime image) to obtain the segmentation masks for all objects; then, the pixel values ​​of the mask range for different objects are multiplied by the contrast difference coefficient C. o Brightness difference coefficient B o Hue difference coefficient H o Saturation difference coefficient S o and noise difference coefficient SS o The new pixel values ​​are obtained, and finally combined to obtain the corresponding night image (i.e., the target night image).

[0124] To explain in detail the principle of the technical solution of the present invention, the overall process of the present invention will be described below with reference to some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and should not be regarded as a limitation of the present invention.

[0125] In view of the problems of existing image conversion and enhancement techniques, this invention proposes a data augmentation method for converting daytime images to nighttime images. Compared with traditional data augmentation methods, this method integrates a large segmentation and recognition model and image processing algorithms to generate new images with nighttime features. This can effectively expand the training dataset and improve the performance of the target detector under nighttime conditions.

[0126] The basic idea of ​​the technical solution of the present invention is as follows:

[0127] First, acquire daytime and nighttime images from the camera of the same scene, such as... Figure 3 (Daytime image) and Figure 4 (Nighttime image shown);

[0128] Next, the Semantic-SAM large model is used for image segmentation and recognition of daytime images to segment all objects in the daytime images and generate daytime mask images for different objects. od That is, to segment out the outline of an object, such as Figure 5 As shown; since the size and position of the daytime and nighttime images correspond, the corresponding nighttime mask for the nighttime image is also obtained. on ;

[0129] Then, calculate the Mask pairs (i.e., mask pairs, including Mask) separately. od and Mask on The brightness difference ratio, contrast difference ratio, hue difference ratio, saturation difference ratio, and noise of the mask pairs are calculated, and finally, the brightness difference coefficient, contrast difference coefficient, hue difference coefficient, saturation difference coefficient, and noise difference coefficient of all object mask pairs are obtained.

[0130] Finally, the masked pixels of the newly added daytime images are multiplied by the above parameters to generate the corresponding nighttime images, thereby achieving the purpose of data augmentation.

[0131] It is worth noting that the Semantic-SAM large model is as follows:

[0132] The Semantic-SAM model is a general-purpose image segmentation and recognition model that can segment and recognize arbitrary objects based on various input cues (such as text, images, bounding boxes, etc.) and can perform segmentation at multiple granularities, from the overall object to its details. The Semantic-SAM model has two main advantages:

[0133] (1) Semantic Awareness: The Semantic-SAM model utilizes multiple datasets, including SA-1B, COCO Panorama, ADE20k Panorama, PASCAL Parts, PACO, PartImageNet, and Objects365. These datasets provide rich semantic information, covering object-level and part-level masks and category labels. The Semantic-SAM model uses a shared text encoder to encode objects and parts and is trained on decoupled object and part classifications, thereby achieving knowledge transfer of semantic information.

[0134] (2) Multi-granularity richness: The Semantic-SAM model uses a multi-choice learning scheme, enabling each click point to generate multiple levels of masks corresponding to multiple ground truth masks. This multi-granularity richness allows the Semantic-SAM model to better adapt to different segmentation tasks and application scenarios.

[0135] The Semantic-SAM model is based on the DETR framework and uses a deformable decoder to generate query features, each containing a predicted semantic category and a mask. The overall process of the Semantic-SAM model is as follows: Figure 6 As shown;

[0136] In Semantic-SAM, the uniformly formatted anchor boxes b = (x, y, w, h) representing clicks are encoded into K content embeddings and one position embedding. The content embeddings are represented as a set of query vectors Q = (q1, ..., q...). K ), where each query vector q i Embedded at the granular level and query type embedding Composition. Position embedding is implemented through sine coding:

[0137]

[0138] Using the output features F of the image encoder as input, the Semantic-SAM mask decoder represents clicks on the input image as:

[0139] O=DeformDec(Q,b,F)withO=(o1,...,o K );

[0140] `DeformDec(.,.,.)` is a deformable decoder that takes query features, bounding boxes, and image features, and outputs query features. Each query feature o i =(c i ,m i ) Contains the predicted semantic category c i and mask m i It is used to construct the concept recognition loss and mask prediction loss.

[0141] In some specific embodiments, to better suit real-world application environments, noise simulation can be performed on the image dataset. This noise simulation can be achieved through the following technical principles:

[0142] Poisson noise is a common type of image noise, often used to simulate noise in images taken under low-light conditions. Its generation is based on the Poisson distribution, which describes the probability distribution of the number of sparse events occurring. In an image, Poisson noise can be viewed as random fluctuations in the number of photons, and is therefore more noticeable in darker regions.

[0143] The generation process of Poisson noise is as follows:

[0144] 1) For each pixel location, first calculate the average number of photons at that location (which can be the original image pixel value divided by a constant).

[0145] 2) Then, generate a Poisson-distributed random number at that location, representing the number of photons generated at that location.

[0146] 3) Add the generated Poisson random number to the original pixel value to obtain a noisy pixel value.

[0147] The mathematical expression for Poisson noise is as follows:

[0148] Let I be the pixel value (brightness) of the original image, λ be the average number of photons, and k be a Poisson random number. Then we have:

[0149] I noisy =Poisson(I*λ)+k

[0150] Where Poisson(I*λ) represents a Poisson random number at the pixel location, and k represents an additional noise term with a mean of 0.

[0151] In practical applications, the value of λ can be adjusted to simulate Poisson noise of varying intensities. A larger λ value results in less noticeable noise, while a smaller λ value results in more noticeable noise.

[0152] Exemplary examples, such as in some specific embodiments, Figure 7 As shown, the steps for image data enhancement in this embodiment of the invention are as follows:

[0153] S1. Data Preparation: Collect daytime and nighttime image datasets D from cameras in the same scene, with a total of 2n images. The daytime images are denoted as P. d Nighttime images are denoted as P. n ;

[0154] S2, Image Segmentation and Recognition:

[0155] S2-1, Obtain the mask for all objects. o Label o : P for daytime images d The Semantic-SAM large model is used to obtain the mask after segmentation of all objects. od and label name o Because the size and position of the daytime and nighttime images correspond perfectly, the corresponding mask for the nighttime image is also obtained. on ;

[0156] S2-2, Calculate Mask o The values ​​of contrast, brightness, hue, saturation, and noise are calculated separately for the mask according to the formula in the technical solution. od The contrast of some images is C. od Brightness is B od The color tone is H od saturation is S od ; Calculate the mask respectively on The contrast of some images is C. on Brightness is B on The color tone is H on saturation is S on ; Calculate the mask using the SSIM formula od With Mask on The noise in some images is SS. oi ;

[0157] S3. Calculation of conversion parameters:

[0158] S3-1, Calculate Mask oContrast difference coefficient, brightness difference coefficient, hue difference coefficient, and saturation difference coefficient: Calculate the contrast difference coefficient for different objects respectively. Brightness difference coefficient is The color difference coefficient is The saturation difference coefficient is Among them, the parameters of different objects at different times can be distinguished by the label name.

[0159] S3-2, Calculate Mask o The noise difference coefficient for different objects is calculated as follows:

[0160] S4. Application for converting daytime images to nighttime images:

[0161] S4-1. Apply the Semantic-SAM large model to the daytime image to obtain all object segmentation masks and recognition labels;

[0162] S4-2. Multiply the pixel values ​​of the Mask range for different objects by the contrast difference coefficient C. o Brightness difference coefficient B o Hue difference coefficient H o Saturation difference coefficient S o and noise difference coefficient SS o The new pixel values ​​are obtained, and finally combined to obtain the corresponding nighttime image.

[0163] Compared to existing technologies, the beneficial effects of the embodiments of the present invention include at least the following:

[0164] 1) Data augmentation: By generating corresponding nighttime images, data augmentation was achieved, thereby improving the stability, robustness, and generalization performance of the model.

[0165] 2) Illumination adaptation: By adjusting pixel values ​​using the difference coefficient, the model can make better predictions under different illumination conditions, thus enhancing the model's adaptability.

[0166] 3) Reduce data acquisition costs: By synthesizing nighttime images, the cost of actually acquiring images under different lighting conditions is reduced, saving time and resources.

[0167] 5) High customizability: By adjusting the calculation method and weight of the difference coefficient, different degrees of data augmentation can be achieved to meet the needs of different application scenarios.

[0168] 6) Maintaining scene consistency: Since daytime and nighttime images correspond in size and location, the generated nighttime images can maintain scene consistency, increasing the effectiveness of data augmentation.

[0169] In summary, this invention effectively augments data by calculating the difference coefficient and synthesizing nighttime images, improving the robustness, generalization, and stability of the model, while reducing data acquisition costs and promoting the practical application of the model.

[0170] On the other hand, such as Figure 8 As shown, this embodiment of the invention provides an image data enhancement device 800, comprising: a first module 810 for acquiring an image dataset of a target scene; the image dataset includes daytime and nighttime images of the target scene; a second module 820 for performing segmentation and recognition based on the image dataset to obtain mask pairs for all objects in the target scene; the mask pairs include daytime masks and nighttime masks; a third module 830 for obtaining image parameters of each object in the target scene based on the image values ​​of the image portions corresponding to the mask pairs; a fourth module 840 for obtaining transformation parameters based on the image parameters of the mask pairs of each object; and a fifth module 850 for performing data enhancement on the target daytime image to be processed using the transformation parameters to obtain the target nighttime image.

[0171] The content of the method embodiments of the present invention is applicable to the device embodiments. The specific functions implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0172] On the other hand, such as Figure 9 As shown, this embodiment of the invention also provides an electronic device 900, which includes at least one processor 910 and at least one memory 920 for storing at least one program. The processor is used to execute the program to implement the aforementioned image data enhancement method; taking one processor 910 and one memory 920 as an example.

[0173] The processor 910 and memory 920 can be connected via a bus or other means.

[0174] Memory 920, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory 920 may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 920 may optionally include memory remotely located relative to the processor, and this remote memory can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0175] The electronic device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0176] Specifically, Figure 10 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present invention is shown.

[0177] It should be noted that, Figure 10 The computer system 1000 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0178] like Figure 10 As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1002 or programs loaded from storage section 1008 into random access memory (RAM). The RAM 1003 also stores various programs and data required for system operation. The CPU 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output interface 1005 (I / O interface) is also connected to the bus 1004.

[0179] The following components are connected to the input / output interface 1005: an input section 1006 including a keyboard, mouse, etc.; an output section 1007 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a local area network card, modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the input / output interface 1005 as needed. A removable medium 1011, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1010 as needed so that computer programs read from it can be installed into the storage section 1008 as needed.

[0180] In particular, according to embodiments of the present invention, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1009, and / or installed from removable medium 1011. When the computer program is executed by central processing unit 1001, it performs various functions defined in the system of the present invention.

[0181] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, wherein computer-readable program code is carried. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0182] The content of the method embodiments of the present invention is applicable to the system embodiments. The specific functions implemented in the system embodiments are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0183] Another aspect of this invention provides a computer-readable storage medium storing a program that is executed by a processor to implement the aforementioned method.

[0184] The content of the method embodiments of the present invention is applicable to the computer-readable storage medium embodiments. The specific functions implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0185] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.

[0186] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0187] It should be noted that although several modules for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0188] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of the present invention.

[0189] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.

[0190] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.

[0191] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0192] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution means, apparatus, or device (such as a computer-based device, a processor-including device, or other means that can fetch and execute instructions from, or in conjunction with, an instruction execution means, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution means, apparatus, or device.

[0193] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0194] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution device. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0195] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0196] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

[0197] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. An image data enhancement method, characterized in that, include: Obtain the image dataset of the target scene; The image dataset includes daytime and nighttime images of the target scene; Based on the image dataset, segmentation and recognition are performed to obtain mask pairs for all objects in the target scene; the mask pairs include daytime masks and nighttime masks; Based on the image values ​​of the corresponding image portion of the mask, image parameters of each object in the target scene are obtained; wherein, the image values ​​include pixel values, color channel values, color component values, and grayscale values; the image parameters include contrast, brightness, hue, saturation, and noise; Based on the image parameters of the mask pairs of each of the objects, transformation parameters are obtained; The target daytime image is augmented using the aforementioned transformation parameters to obtain the target nighttime image; The image parameters include a first image parameter and a second image parameter. The first image parameter includes a third image parameter corresponding to the image portion corresponding to the daytime mask and a fourth image parameter corresponding to the image portion corresponding to the nighttime mask. Both the third and fourth image parameters include contrast, brightness, hue, and saturation. The second image parameter includes noise. The conversion parameters include a first difference coefficient and a second difference coefficient. The conversion parameters are obtained based on the image parameters of the mask pairs for each object, including: The first difference coefficient is obtained based on the third image parameters and the fourth image parameters of each object in the target scene; The second difference coefficient is obtained based on the second image parameters of each object in the target scene; The step of performing data augmentation on the target daytime image to be processed using the transformation parameters to obtain the target nighttime image includes: The Semantic-SAM large model is applied to the target daytime image to obtain the segmentation mask of all objects; the pixel values ​​of the mask range of different objects are multiplied by the first difference coefficient and the second difference coefficient respectively to obtain new pixel values, and finally combined to obtain the corresponding target nighttime image.

2. The image data enhancement method according to claim 1, characterized in that, The step of obtaining image parameters of each object in the target scene based on the image values ​​of the corresponding image portion of the mask includes: The contrast of each object in the target scene is obtained by calculating the extreme values ​​of the pixel values ​​in the image portion corresponding to the mask pair. The contrast of each object in the target scene is obtained by summing all pixel values ​​of the image portion corresponding to the mask pair and then averaging the summed result. Based on the values ​​of each color channel in the corresponding image portion of the mask pair, the hue of each object in the target scene is calculated; The saturation of each object in the target scene is obtained by calculating the extreme values ​​of the color components in the image portion corresponding to the mask pair. Based on the mask, the structural similarity index is calculated for the gray values ​​of the corresponding image parts to obtain the noise of each object in the target scene.

3. The image data enhancement method according to claim 2, characterized in that, The color channels include a red channel, a green channel, and a blue channel; calculating the hue of each object in the target scene based on the values ​​of each color channel in the corresponding image portion of the mask includes: Based on the values ​​of each color channel in the corresponding image portion of the mask pair, the hue of each object in the target scene is calculated by combining the inverse trigonometric function; The expression for the hue is: In the formula, H Indicates hue; arctan represents the arctangent function in the inverse trigonometric functions; R This represents the value of the red channel; G This represents the value of the green channel; B This represents the value of the blue channel.

4. The image data enhancement method according to claim 2, characterized in that, The step of calculating the structural similarity index based on the grayscale values ​​of the corresponding image portion using the mask to obtain the noise of each object in the target scene includes: Based on the grayscale values ​​of the image portions corresponding to the daytime mask and the nighttime mask, the first average value and the first standard deviation of the image portion corresponding to the daytime mask, and the second average value and the second standard deviation of the image portion corresponding to the nighttime mask are obtained respectively. Based on the first average value and the second average value, the covariance of the image portions corresponding to the daytime mask and the nighttime mask is obtained; Based on the first average value, the first standard deviation, the second average value, the second standard deviation, and the covariance, the noise of each object in the target scene in the image portion corresponding to the daytime mask and the nighttime mask is calculated using the structural similarity index; The expression for calculating the structural similarity index is: In the formula, SSIM ( x , y () indicates noise; x and y These represent the image portions corresponding to daytime and nighttime masks, respectively. μ x This represents the first average value; μ y This represents the second average value; σ x Indicates the first standard deviation; σ y Indicates the second standard deviation; σ xy Represents covariance; C 1 and C Both 2 are constants.

5. The image data enhancement method according to claim 1, characterized in that, The process of obtaining the first difference coefficient based on the third image parameters and the fourth image parameters of each object in the target scene includes: The first difference coefficient is obtained by performing a first cumulative average calculation based on the third image parameters and the fourth image parameters of each object in the target scene; the first difference coefficient includes contrast difference coefficient, brightness difference coefficient, hue difference coefficient and saturation difference coefficient. The expression for the first difference coefficient is: In the formula, Indicates the first difference coefficient; Indicates the third image parameter; Indicates the fourth image parameter; This indicates the number of objects in the target scene.

6. The image data enhancement method according to claim 1, characterized in that, The process of obtaining the second difference coefficient based on the second image parameters of each object in the target scene includes: The second cumulative average is calculated based on the second image parameters of each object in the target scene to obtain the second difference coefficient; The expression for the second difference coefficient is as follows: In the formula, Indicates the second difference coefficient; Indicates the first in the target scene Second image parameters of each object; This indicates the number of objects in the target scene.

7. An image data enhancement device, characterized in that, The apparatus for implementing the method of claim 1 includes: The first module is used to acquire an image dataset of the target scene; the image dataset includes daytime and nighttime images of the target scene; The second module is used to perform segmentation and recognition based on the image dataset to obtain mask pairs for all objects in the target scene; the mask pairs include daytime masks and nighttime masks; The third module is used to obtain the image parameters of each object in the target scene based on the image values ​​of the corresponding image portion of the mask. The fourth module is used to obtain transformation parameters based on the image parameters of the mask pairs of each of the objects; The fifth module is used to perform data augmentation on the target daytime image to be processed using the transformation parameters to obtain the target nighttime image.

8. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the method as described in any one of claims 1 to 6.

9. A computer storage medium storing a processor-executable program, characterized in that, The processor-executable program, when executed by the processor, is used to implement the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image style conversion method and device, electronic equipment and storage medium

    CN114758026A

  • RGB-T image semantic segmentation method and device

    CN116091765A