Image training data processing method and device, electronic equipment and chip

Through image combination and filling technology, a fusion training image group is generated, which solves the problem of poor image training data processing in the existing technology, improves the learning ability and training effect of the model, and expands the data distribution.

CN118674632APending Publication Date: 2024-09-20BEIJING X RING TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202310246352.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-14
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

It is difficult to effectively improve model generalization and capabilities in image training data processing with existing technologies. Especially in super-resolution reconstruction tasks, the commonly used random erasure and cutblur methods cannot generate meaningful brightness distribution areas, resulting in training effects. Difference.

Method used

By obtaining a combination of images of different sizes and resolutions, the corresponding areas are determined and filled, and a fusion training image group is generated, which is used to train the image enhancement model, expand the data distribution and improve the model learning ability.

Benefits of technology

Through the fusion of multiple data sets, the distribution of training data is expanded, the data enhancement effect is improved, the learning ability and training effect of the model are enhanced, and the problem of a large proportion of flat areas and small training errors caused by a single data set is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118674632A
    Figure CN118674632A
Patent Text Reader

Abstract

The invention provides an image training data processing method and device, electronic equipment, a storage medium and a chip, a first group of images and a second group of images are acquired, each group of images comprises at least two images, the number of the images in each group is the same, and the image size in the first group of images is smaller than the image size in the second group of images; determining a first region on the second group of images, the first region being a corresponding region of at least two images in the second group of images, the size of the first region being the same as the image size in the first group of images; and filling the first region with the first group of images to generate a fusion training image group which is used for training an image enhancement model. According to the scheme, training data distribution is expanded in a mode of fusing multiple data sets, and the learning ability and the training effect of the data enhancement model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image training data processing, and in particular to a method, device, electronic device, storage medium and chip for processing image training data. Background Art

[0002] With the popularization of smart terminal devices and the development of Internet of Things technology, users have put forward higher requirements for the imaging function of terminals. As the performance indicator most easily perceived by humans, detecting and improving the overall brightness and clarity of the image and improving data enhancement technology have become the basic configuration and improvement direction of various manufacturers. The quality of image enhancement model training is related to the effect of image enhancement processing, so higher requirements are put forward for the processing method of image training data. Summary of the invention

[0003] The present disclosure provides a method, device, electronic device, storage medium and chip for processing image training data to solve the problems in related technologies, expand the distribution of training data, and improve the learning ability and training effect of the data enhancement model.

[0004] A first aspect embodiment of the present disclosure proposes a method for processing image training data, the method comprising: acquiring a first group of images and a second group of images, wherein each group of images includes at least two images, the number of images in each group of images is the same, and the image size in the first group of images is smaller than the image size in the second group of images; determining a first area on the second group of images, the first area being a corresponding area of ​​at least two images in the second group of images, and the size of the first area being the same as the image size in the first group of images; and filling the first group of images into the first area respectively to generate a fused training image group, which is used to train an image enhancement model.

[0005] In some embodiments of the present disclosure, the first group of images includes at least a first image and a second image, the second group of images includes at least a third image and a fourth image, and determining the first area on the second group of images includes: determining a first sub-area on the fourth image, the size of the first sub-area being the same as the size of the second image; and determining a second sub-area corresponding to the first sub-area on the third image, the size of the second sub-area being the same as the size of the first image.

[0006] In an embodiment of the present disclosure, determining the first sub-region on the fourth image may be determined by randomly selecting a preset region. In some embodiments of the present disclosure, determining the second sub-region corresponding to the first sub-region on the third image includes: determining a scaling ratio based on the sizes of the first image and the second image; determining the size and position of the second sub-region based on the scaling ratio and the position of the first sub-region; and determining the second sub-region on the third image according to the size and position of the second sub-region.

[0007] In some embodiments of the present disclosure, filling the first group of images into the first area respectively to generate a fused training image group includes: fusing and filling the second image into the first sub-area to generate a fused low-resolution image; fusing and filling the first image into the second sub-area to generate a fused high-resolution image, wherein the resolution of the fused high-resolution image is higher than that of the fused low-resolution image, and the fused low-resolution image and the fused high-resolution image constitute a fused training image group.

[0008] In some embodiments of the present disclosure, a second area is determined on the fused training image group, and the size of the second area is the same as the size of the third group of images; the third group of images are filled into the second area respectively to generate an optimized training image group, and the optimized training image group is used to train the image enhancement model trained by the fused training image group.

[0009] In some embodiments of the present disclosure, the first group of images has a uniform brightness distribution, and the second group of images has a gradient greater than a preset threshold.

[0010] A second aspect embodiment of the present disclosure proposes a device for processing image training data, the device comprising: an acquisition unit, used to acquire a first group of images and a second group of images, wherein each group of images includes at least two images, the number of images in each group of images is the same, and the image size in the first group of images is smaller than the image size in the second group of images; a determination unit, used to determine a first area on the second group of images, the first area being a corresponding area of ​​at least two images in the second group of images, and the size of the first area being the same as the image size in the first group of images; and filling the first group of images into the first area respectively to generate a fused training image group, which is used to train an image enhancement model.

[0011] The third aspect embodiment of the present disclosure proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in the first aspect embodiment of the present disclosure.

[0012] The fourth aspect embodiment of the present disclosure proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method described in the first aspect embodiment of the present disclosure.

[0013] A fifth aspect embodiment of the present disclosure provides a computer program product, including a computer program, which executes the method described in the first aspect embodiment of the present disclosure when a processor is used to execute the computer program.

[0014] The sixth aspect embodiment of the present disclosure proposes a chip, which includes one or more interface circuits and one or more processors; the interface circuit is used to receive signals from a memory of an electronic device and send signals to the processor, the signals including computer instructions stored in the memory, and when the processor executes the computer instructions, the electronic device executes the method described in the first aspect embodiment of the present disclosure.

[0015] In summary, the present disclosure proposes a method for processing image training data, which includes: obtaining a first group of images and a second group of images, wherein each group of images includes at least two images, the number of images in each group of images is the same, and the image size in the first group of images is smaller than the image size in the second group of images; determining a first area on the second group of images, the first area is a corresponding area of ​​at least two images in the second group of images, and the size of the first area is the same as the image size in the first group of images; filling the first group of images into the first area respectively to generate a fused training image, and the fused training image is used to train the image enhancement model. This solution expands the distribution of training data by fusing multiple data sets, thereby improving the learning ability and training effect of the data enhancement model.

[0016] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0018] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0019] Figure 2 A flowchart of a method for processing image training data provided by an embodiment of the present disclosure;

[0020] Figure 3 A flowchart of a method for processing image training data provided by an embodiment of the present disclosure;

[0021] Figure 4 A flowchart of training an image enhancement processing model in an online manner provided by an embodiment of the present disclosure;

[0022] Figure 5 A flowchart of training an image enhancement processing model in an offline manner provided in an embodiment of the present disclosure;

[0023] Figure 6 An example flow chart of a method for processing image training data provided by an embodiment of the present disclosure;

[0024] Figure 7 A schematic diagram of the structure of an apparatus for processing image training data provided by an embodiment of the present disclosure;

[0025] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure.

[0026] Fig. 9 A schematic diagram of the structure of a chip provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] Embodiments of the present disclosure are described in detail below, and examples of the embodiments 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.

[0028] With the popularity and development of smart terminal devices in recent years, people's technical requirements for various aspects of terminals have also risen. Imaging technology, as one of the most commonly used technologies, has attracted much attention. The detection and improvement of image quality is the key breakthrough direction of terminal technology. The overall brightness and clarity of the image, as one of the basic indicators for image quality assessment, has a significant impact on the final presentation of the image. As the performance indicator that is most easily perceived by humans, detecting and improving the overall brightness and clarity of the image and improving data enhancement technology have become the basic configuration and improvement direction of various manufacturers, thus putting forward higher requirements for the processing methods of image training data.

[0029] As an important machine learning method, data augmentation generates more training data based on existing training sample data. Its purpose is to expand the training data and make it as close to the real distribution data as possible, thereby improving the detection accuracy. At present, in high-level tasks, random erase is often used for data augmentation. It selects random positions and sizes of areas from existing image data to fill random values ​​to form new training data. This method does not add meaningful brightness distribution areas and cannot effectively improve the generalization and ability of the model. Therefore, it is not suitable for low-level tasks such as SR (SuperResolution).

[0030] In low-level tasks, the cutblur method is often used for data enhancement, that is, in the existing training data image pairs, a group of corresponding position areas are randomly selected. The data pair includes a high-resolution image and a low-resolution image, and then either the selected area content of the low-resolution image is pasted to the corresponding area of ​​the high-resolution image, or vice versa, the selected area content of the high-resolution image is pasted to the corresponding area of ​​the low-resolution image, thereby generating a new training data pair. This method can only generate a single data set, resulting in a large proportion of flat areas in the data set, small training errors, and poor training effects.

[0031] In order to solve the problems existing in the related technology, the present disclosure proposes a method for processing image training data, which expands the data distribution and increases the initial training error of the model by fusing the data sets used in different training stages, thereby solving the problem of poor training model effect of some data sets.

[0032] Before introducing the detailed solution of the present disclosure, the scenario to which the solution of the present disclosure is applied is described first. Figure 1 FIG. 1 is an application scenario diagram of a method for processing image training data in one embodiment. Figure 1 As shown, the application scenario includes an electronic device 104, in which a camera module and several applications can be installed. The application can initiate an image acquisition instruction to acquire an image, and the camera module acquires the image 102. Among them, the camera module can include a front camera module and / or a rear camera module. Finally, the target image is sent to the target application. Among them, the electronic device 104 can be a smart phone, a tablet computer, a personal digital assistant, a wearable device, etc.

[0033] In some optional embodiments, the electronic device may also be a vehicle-mounted device or a vehicle networking device, such as a smart car, etc. In the present disclosure, only a smart phone is taken as an example, but it does not limit the scope of the present disclosure.

[0034] A camera can be installed on an electronic device, and images can be acquired through the installed camera. Cameras can be divided into laser cameras, visible light cameras and other types according to the different images acquired. Laser cameras can acquire images formed by irradiating lasers onto objects, and visible light cameras can acquire images formed by irradiating visible light onto objects. Several cameras can be installed on an electronic device, and the installation locations are not limited. For example, a camera can be installed on the front panel of an electronic device, and two cameras can be installed on the back panel. The camera can also be installed inside the electronic device in an embedded manner, and then the camera can be opened by rotating or sliding. Specifically, a front camera and a rear camera can be installed on an electronic device. The front camera and the rear camera can acquire images from different perspectives. Generally, the front camera can acquire images from the front perspective of the electronic device, and the rear camera can acquire images from the back perspective of the electronic device.

[0035] It should be understood that in the present disclosure, the front camera or the rear camera is only used as an example to distinguish the shooting angles of different cameras, rather than to limit the functions of multiple cameras. The multiple cameras in the present disclosure can be rear cameras or front cameras at the same time, which is not limited in the present disclosure.

[0036] An electronic device can have several applications installed. An application is software written for a certain purpose in an electronic device. An electronic device can use an application to provide services to users. When an application needs to capture an image, it will initiate an image capture instruction. The electronic device will call the camera module to capture the image according to the image capture instruction. An image capture instruction is an instruction used to trigger an image capture operation.

[0037] The electronic device is also provided with a processor, and the image processing model in the processor can be trained through an offline database or an online data set to complete super-resolution reconstruction of the image collected by the camera module, thereby improving the terminal imaging effect, for example, using the image training data processing method provided in the present disclosure to train the model.

[0038] Figure 2 A flowchart of an image training data processing method provided in an embodiment of the present disclosure. The method can be applied to Figure 1 The application scenarios shown are, for example, executed by a terminal integrated with image data processing or an image data processor in the terminal, or by other devices suitable for processing the data set required for the image training model, and the present disclosure is not limited thereto. Figure 2 As shown, the method for processing image training data includes steps 201-203.

[0039] Step 201: Acquire a first set of images and a second set of images.

[0040] In the present disclosure, the size of the first group of images acquired is smaller than the size of the second group of images, the first group of images includes at least the first image and the second image, the second group of images includes at least the third image and the fourth image, each of the above groups of images includes at least two images, and the number of images in each group of images is the same. In the present disclosure, the resolution of the first image is higher than the resolution of the second image, and the resolution of the third image is higher than the resolution of the fourth image. The acquisition method and type of the above image groups are not limited in the present disclosure.

[0041] In one embodiment of the present disclosure, the first image may be referred to as a first high-resolution image, the second image may be referred to as a first low-resolution image, the third image may be referred to as a second high-resolution image, and the fourth image may be referred to as a second low-resolution image.

[0042] Step 202: determine a first area on the second set of images.

[0043] In some embodiments of the present disclosure, the determined first area is a corresponding area of ​​at least two images in the second group of images, and the size of the first area is the same as the image size in the first group of images to facilitate the fusion of the first group of images with the second group of images.

[0044] In some embodiments of the present disclosure, the first area may include a first sub-area and a second sub-area, wherein the first sub-area and the second sub-area respectively correspond to two images in the second group of images.

[0045] In some embodiments of the present disclosure, a region on one of the second set of images may be determined first, and then a corresponding region on another image may be determined. In some optional embodiments, the first region may be determined, for example, by randomly selecting a preset region in the second set of images.

[0046] In other optional embodiments, it is also possible to select areas that the user may focus on, such as portraits or environmental areas, based on different image contents, so that the processed training data can focus on the differences in the area, so that the image enhancement model trained with the training data can better process the areas that the user may focus on; in some other optional embodiments, it is also possible to select areas that may expand the data distribution, such as selecting areas with a larger gradient span on the second image pair, or areas with a more even brightness distribution, etc., so that the data after the fusion of the first image pair presents more obvious texture features, expands the distribution of the training data, and further improves the training effect of the image enhancement model.

[0047] Step 203: Fill the first group of images into the first area respectively to generate a fused training image group, where the fused training image group is used to train the image enhancement model.

[0048] In an embodiment of the present disclosure, two images in the first group of images can be respectively filled into the first area in the second group of images, that is, one image in the first group of images can be fused and filled into the first sub-area, and the image has the same size as the first sub-area, and another image in the first group of images can be fused and filled into the second sub-area, and the image has the same size as the second sub-area.

[0049] By filling the first group of images into the first area of ​​the second group of images respectively, a fused training image group is obtained, and the fused training image group can be used to train the image enhancement processing model. In the present disclosure, the image enhancement processing model can be an AI SR model or any other model for image enhancement processing, which is not limited by the present disclosure.

[0050] In some optional embodiments, the obtained fused training image group can be used to train the image enhancement processing model in different ways:

[0051] 1) Online method: For example, two training image groups data_pair1 / data_pair2 (i.e., the first group of images and the second group of images described in the present disclosure) are merged into one training image group (i.e., the fused training image group described in the present disclosure) after data enhancement processing in the present solution. The fused training image group directly trains the image enhancement processing model, that is, the generated fused training image group is used to train the image enhancement model in real time and online. This method has strong randomness and high real-time performance.

[0052] This embodiment takes the online training of the image enhancement processing model as an example. Figure 4 shown.

[0053] 2) Offline method: For example, the generated fusion training image group can be stored in a database first, the database can be generated offline, and then all or part of the data in the database can be used for training. This method has a fast training speed.

[0054] This embodiment takes the offline training of the image enhancement processing model as an example. Figure 5 shown.

[0055] In summary, according to the method for processing image training data proposed in the present disclosure, the method includes: obtaining a first group of images and a second group of images, wherein each group of images includes at least two images, the number of images in each group of images is the same, and the image size in the first group of images is smaller than the image size in the second group of images; determining a first area on the second group of images, the first area is a corresponding area of ​​at least two images in the second group of images, and the size of the first area is the same as the image size in the first group of images; filling the first group of images into the first area respectively to generate a fused training image group, and the fused training image group is used to train an image enhancement model. This solution expands the distribution of training data and improves the data enhancement effect by fusing multiple data sets.

[0056] based on Figure 2 The embodiment shown, Figure 3 A detailed flow chart of an image training data processing method proposed in the present disclosure is further shown. Figure 2 The embodiment shown, Figure 3 The following steps are included.

[0057] Step 301: Acquire a first set of images and a second set of images.

[0058] In the present disclosure, the size of the acquired first group of images is smaller than that of the second group of images, the first group of images includes at least a first image and a second image, the second group of images includes at least a third image and a fourth image, each group of images includes at least two images, and the number of images in each group of images is the same.

[0059] In an optional embodiment, the first group of images has a uniform brightness distribution, and the second group of images has a gradient greater than a preset threshold. For example, the brightness distribution of the pixels in the first group of images is relatively uniform, or has relatively rich textures and edges; the gradient span of the pixels in the second group of images is relatively large, for example, the gradient of some pixels is 0, and the gradient of some pixels is greater than a preset threshold, or in other words, the group of images has a relatively special distribution pattern. Therefore, the two groups of images selected are from different data sets, and different data sets usually have different data distribution characteristics, thereby improving the distribution range of the combined data.

[0060] In another optional embodiment, the first group of images may be the training data used in the previous stage of model training, and the second group of images may be the training data used in the current training stage of the model. For example, the model has completed the training of natural scenes in the previous stage, and the training effect is good in natural scenes, but the training effect is poor in scenes with higher sharpness. In order to achieve the training goal, the first group of images may be a natural scene image training data set, and the second group of images may be from a picture card scene image data set with higher sharpness. Therefore, the selected image group contains training data from different stages, so that the training model can retain the training characteristics of different stages, thereby improving the model learning ability. The acquisition method and type of the above-mentioned image group are not limited in the present disclosure.

[0061] For example, Figure 6 Taking the example shown as an example, Figure 6 A specific example of a method for processing image training data is shown. Two sets of training images data_pair_A (LR_A, HR_A) (i.e., a first set of images, including a second image LR_A and a first image HR_A) and data_pair_B (LR_B, HR_B) (i.e., a second set of images, including a fourth image LR_B and a third image HR_B) can be obtained from an image acquisition device (e.g., a binocular camera). Usually, the sizes of the two sets of images are inconsistent, and size(LR_A) is agreed upon here. <size(LR_B),size(HR_A)<size(HR_B)。

[0062] Step 302: determine a first sub-region on the fourth image.

[0063] The first sub-region may be randomly selected, for example, selecting an area in the center of the image. It may also be selected in other ways, for example, selecting an area in the image where the gradient changes significantly, which is not limited in the present disclosure. The size of the first sub-region is the same as the size of the second image.

[0064] For example, Figure 6 Taking the example shown as an example, a patch_lr (ie, the first sub-region) may be selected in LR_B, the position of patch_lr may be random, and size(patch_lr)=size(LR_A).

[0065] Step 303: Determine a scaling ratio based on the sizes of the first image and the second image.

[0066] In an embodiment of the present disclosure, in order to determine the second sub-region according to the first sub-region, the scaling ratio may be determined according to the size ratio of two images in the image pair selected in the first region.

[0067] For example, Figure 6Taking the example shown as an example, in order to select patch_hr (ie, the second sub-region) corresponding to patch_lr on HR_B, in an optional manner, the scaling ratio scale = size(HR_B) / size(LR_B) can be determined according to the sizes of the two images in data_pair_B (LR_B, HR_B).

[0068] In another optional manner, the scaling ratio scale=size(HR_A) / size(LR_A) may also be determined according to the sizes of the two images in data_pair_A(LR_A, HR_A), that is, the scaling ratio scale=size(HR_A) / size(LR_A)=size(HR_B) / size(LR_B).

[0069] Step 304: Determine the size and position of the second sub-region based on the above-mentioned scaling ratio and the position of the first sub-region.

[0070] In the embodiment of the present disclosure, since the two images in the first group of images or the second group of images have different sizes, the size and position of the second sub-region may be determined according to the determined position and scaling ratio of the first sub-region.

[0071] Specifically, Figure 6 Taking the example shown as an example, the position of patch_hr = the position of patch_lr * scale, wherein the position of patch_hr or the position of patch_lr can be the starting position, the center position, or other positions, which are not limited in the present disclosure.

[0072] In addition, the size of the second sub-region may be determined according to the size and scaling ratio of the first sub-region, ie, size(patch_hr)=size(patch_lr)*scale.

[0073] Step 305: determine the second sub-region on the third image according to the size and position of the second sub-region.

[0074] In the embodiment of the present disclosure, since the two images in the first group of images or the second group of images have different sizes, the second sub-region may be determined on the third image according to the size and position of the second sub-region obtained by calculation.

[0075] Specifically, Figure 6 Taking the example shown as an example, the second sub-region is determined according to the calculated position of the second sub-region patch_hr and the size size (patch_hr) of the second sub-region.

[0076] Step 306: Fusing and filling the second image into the first sub-region to generate a fused low-resolution image.

[0077] In the embodiment of the present disclosure, the second image is filled into the first sub-region and alpha-fused with the fourth image to generate a fused low-resolution image. Alpha fusion is to superimpose the foreground onto the background through transparency, which can make the fusion effect more natural and weaken the boundary effect. It should be understood that other methods suitable for synthesizing or fusing multiple images are also applicable to the present disclosure and are not limited here.

[0078] Specifically, Figure 6 Taking the example shown as an example, patch_lr and LR_A are alpha-fused and filled into patch_lr, that is, patch_lr = patch_lr*alpha+LR_A*(1-alpha), and LR_new is obtained.

[0079] Step 307: Fusing and filling the first image into the second sub-region to generate a fused high-resolution image.

[0080] In the disclosed embodiment, the first image is filled into the second sub-region and alpha-fused with the third image to generate a fused high-resolution image. The resolution of the fused high-resolution image is higher than that of the fused low-resolution image, and the fused low-resolution image and the fused high-resolution image constitute a fused training image group.

[0081] Specifically, Figure 6 Taking the example shown as an example, patch_hr and HR_A are alpha-fused and filled into patch_hr. That is, patch_hr = patch_hr*alpha+HR_A*(1-alpha), and HR_new is obtained. LR_new and HR_new are input into the AISR model as a new training image group.

[0082] Step 308: determine a second region on the above fused training image group, where the size of the second region is the same as the size of the third group of images.

[0083] Specifically, the third group of images includes at least a third high-resolution image and a third low-resolution image, the second region includes a third sub-region and a fourth sub-region, the method for determining the third sub-region is the same as the method for determining the first sub-region, and the method for determining the fourth sub-region is the same as the method for determining the second sub-region, and the relevant descriptions of steps 302 to 305 can be referred to, which will not be repeated here. The third high-resolution image is called the fifth image, and the third low-resolution image can be called the sixth image, wherein the resolution of the fifth image is higher than the resolution of the sixth image.

[0084] In some embodiments, a second region may also be determined on the third group of images, and the size of the second region is the same as the size of the fused image group.

[0085] Step 309: Fill the third group of images into the second area respectively to generate an optimized training image group.

[0086] In the disclosed embodiment, the third low-resolution image is filled into the third sub-region and Alpha-fused with the fused low-resolution image to generate an optimized low-resolution image. The third high-resolution image is filled into the fourth sub-region and Alpha-fused with the fused high-resolution image to generate an optimized high-resolution image.

[0087] In some embodiments, a second region is determined on the third set of images, and the fused image groups are filled into the second region to generate an optimized training image group. It should be understood that other methods suitable for synthesizing or fusing multiple images are also applicable to the present disclosure and are not limited here.

[0088] It should be understood that steps 308-309 are optional steps. The above-mentioned optimized training image group is used to train the image enhancement model trained by the fused training image group. The optimized training image group is used to train the image enhancement model trained by the fused training image group. By fusing and filling the training data sets of different stages, the characteristics of different training stages are retained, thereby improving the learning ability of the training model.

[0089] In summary, according to the processing method of image training data proposed in the present disclosure, the method includes: obtaining a first group of images and a second group of images, wherein each group of images includes at least two images, the number of images in each group of images is the same, and the image size in the first group of images is smaller than the image size in the second group of images; determining a first area on the second group of images, the first area is a corresponding area of ​​at least two images in the second group of images, and the size of the first area is the same as the image size in the first group of images; filling the first group of images into the first area respectively to generate a fused training image group, and the fused training image group is used to train an image enhancement model. This solution expands the distribution of training data and improves the data enhancement effect by fusing multiple data sets, while being able to retain the characteristics of different training stages, thereby improving the learning ability of the training model.

[0090] Therefore, the present disclosure has the following beneficial effects:

[0091] 1. This solution combines different data sets to expand the distribution of training data and improve data enhancement and model training effects.

[0092] 2. The present disclosure solves the problem that some training data sets, such as data sets with a large proportion of flat areas and a small proportion of edge textures, cannot directly and effectively train models by using special data sets to train models.

[0093] 3. The present invention can better retain the good results obtained in the previous stage of training by fusing the current stage data set with the previous stage data set.

[0094] Figure 7 FIG. 7 is a schematic diagram of a structure of an image training data processing device 700 provided in an embodiment of the present disclosure. Figure 7 As shown, the processing device of the image training data includes:

[0095] An acquisition unit 710 is configured to acquire a first group of images and a second group of images, wherein each group of images includes at least two images, each group of images has the same number of images, and the size of images in the first group of images is smaller than the size of images in the second group of images;

[0096] A determining unit 720 is configured to determine a first area on the second group of images, where the first area is a corresponding area of ​​at least two images in the second group of images, and a size of the first area is the same as a size of an image in the first group of images;

[0097] The fusion unit 730 is used to fill the first group of images into the first area respectively to generate a fused training image group, and the fused training image group is used to train the image enhancement model.

[0098] According to the processing device of image training data provided by the present disclosure, a first group of images and a second group of images are obtained, wherein each group of images includes at least two images, the number of images in each group of images is the same, and the image size in the first group of images is smaller than the image size in the second group of images; a first area is determined on the second group of images, the first area is the corresponding area of ​​at least two images in the second group of images, and the size of the first area is the same as the image size in the first group of images; the first group of images are filled into the first area respectively to generate a fused training image group, and the fused training image group is used to train an image enhancement model. This solution expands the distribution of training data and improves the data enhancement effect by fusing multiple data sets, while being able to retain the characteristics of different training stages, thereby improving the learning ability of the training model.

[0099] In some embodiments of the present disclosure, the image group acquired by the acquisition unit 710 has the following characteristics: the first group of images has a uniform brightness distribution, and the second group of images has a gradient greater than a preset threshold.

[0100] In some embodiments of the present disclosure, the determination unit 720 is specifically used to: determine a first sub-region on the fourth image, the size of the first sub-region is the same as the size of the second image; determine a second sub-region corresponding to the first sub-region on the third image, the size of the second sub-region is the same as the size of the first image.

[0101] In some embodiments of the present disclosure, the determination unit 720 is also used to: determine a scaling ratio based on the sizes of the first image and the second image; determine the size and position of the second sub-region based on the scaling ratio and the position of the first sub-region; and determine the second sub-region on the third image according to the size and position of the second sub-region.

[0102] In some embodiments of the present disclosure, the fusion unit 730 is specifically used to: fuse and fill the second image into the first sub-region to generate a fused low-resolution image; fuse and fill the first image into the second sub-region to generate a fused high-resolution image, wherein the fused low-resolution image and the fused high-resolution image constitute the fused training image group.

[0103] In some embodiments of the present disclosure, the trained model contains a multi-stage learning process, and the device also includes: an iterative unit, used to determine a second area on the fused training image group, the size of the second area is the same as the image size in the third group of images; fill the third group of images into the second area respectively to generate an optimized training image group, and the optimized training image group is used to train the image enhancement model trained by the fused training image group.

[0104] In summary, according to the processing device of image training data proposed in the present disclosure, based on obtaining a first group of images and a second group of images, wherein each group of images includes at least two images, the number of images in each group of images is the same, and the image size in the first group of images is smaller than the image size in the second group of images, a first area is determined on the second group of images, the first area is the corresponding area of ​​at least two images in the second group of images, and the size of the first area is the same as the image size in the first group of images; wherein the first area includes: a first sub-area randomly selected on a fourth image, the size of the first sub-area is the same as the size of the second image; a second sub-area corresponding to the first sub-area determined on a third image, the size of the second sub-area is the same as the size of the first image; and the first group of images are respectively filled into the first area to generate a fused training image group, and the fused training image group is used to train an image enhancement model, thereby obtaining a comprehensive and effective method for processing image training data.

[0105] This solution expands the distribution of training data through the fusion of multiple data sets through the disclosed solution, improves the data enhancement effect, and can retain the characteristics of different training stages, thereby improving the learning ability of the training model.

[0106] In addition, the image training data processing methods in the related art, such as the random erase method for data enhancement, do not add meaningful brightness distribution areas, so they cannot effectively improve the generalization and capabilities of the model. For example, the cutblur method for data enhancement does not solve how to reasonably fill the low-resolution image area into the high-resolution image area or the high-resolution image area into the low-resolution image area in actual operation, and can only generate a single data set. At the same time, in model training, multiple rounds of fine-tuning are often required. According to the results of each round of training, a new data set is selected for adjustment. This method of using a single data set to train and adjust the model in each round can improve the learning effect of the model in this round, but it will cause the performance of the model obtained in the previous stage to degrade.

[0107] Compared with related technologies, this solution overcomes the problem of random erase method filling random numbers and failing to effectively improve the generalization and capability of the model by selecting multiple data sets. The performance degradation obtained in the previous training stage under the multi-stage training scenario is improved by reasonably selecting data sets. At the same time, the texture of another data set is introduced by fusion, which increases the initial training error of the model and improves the model training effect.

[0108] Since the device provided in the embodiment of the present disclosure corresponds to the methods provided in the above-mentioned embodiments, the implementation of the method is also applicable to the device provided in the embodiment and will not be described in detail in this embodiment.

[0109] In the embodiments provided in the present application, the methods and devices provided in the embodiments of the present application are introduced. In order to implement the functions in the methods provided in the embodiments of the present application, the electronic device may include a hardware structure and a software module, and implement the functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. A function of the functions may be executed in the form of a hardware structure, a software module, or a hardware structure plus a software module.

[0110] Figure 8 8 is a block diagram of an electronic device 800 for implementing the above-mentioned image training data processing method according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0111] Reference Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0112] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0113] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0114] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.

[0115] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0116] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0117] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0118] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0119] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (NewRadio) or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0120] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0121] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the above instructions can be executed by the processor 820 of the electronic device 800 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0122] The embodiments of the present disclosure further provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the image training data processing method described in the above embodiments of the present disclosure.

[0123] An embodiment of the present disclosure further provides a computer program product, including a computer program, which, when executed by a processor, performs the method for processing image training data described in the above embodiment of the present disclosure.

[0124] The embodiment of the present disclosure also provides a chip, which can be seen in Fig. 9 Schematic diagram of the chip structure shown. Fig. 9 The chip shown includes a processor 501 and an interface 502. The number of the processor 501 may be one or more, and the number of the interface 502 may be multiple.

[0125] Optionally, the chip further includes a memory 503, and the memory 503 is used to store necessary computer programs and data.

[0126] Those skilled in the art may also understand that the various illustrative logical blocks and steps listed in the embodiments of the present application may be implemented by electronic hardware, computer software, or a combination of the two. Whether such functions are implemented by hardware or software depends on the specific application and the design requirements of the entire system. Those skilled in the art may use various methods to implement the functions for each specific application, but such implementation should not be understood as exceeding the scope of protection of the embodiments of the present application.

[0127] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0128] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does 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.

[0129] 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 specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0130] 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 processing module, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes 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 (control method), 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.

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

[0132] 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.

[0133] In addition, each functional unit in each embodiment of the present invention 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. The above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0134] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for processing image training data, characterized in that: The method comprises: Acquire a first group of images and a second group of images, wherein each group of images includes at least two images, each group of images has the same number of images, and the size of images in the first group of images is smaller than the size of images in the second group of images; Determine a first area on the second group of images, where the first area is a corresponding area of ​​at least two images in the second group of images, and a size of the first area is the same as a size of an image in the first group of images; The first group of images are filled into the first region respectively to generate a fused training image group, where the fused training image group is used to train an image enhancement model.

2. The method according to claim 1, characterized in that The first group of images includes at least a first image and a second image, and the second group of images includes at least a third image and a fourth image, wherein a resolution of the first image is higher than a resolution of the second image, and a resolution of the third image is higher than a resolution of the fourth image, and determining the first area on the second group of images includes: determining a first sub-region on the fourth image, wherein a size of the first sub-region is the same as a size of the second image; A second sub-region corresponding to the first sub-region is determined on the third image, and a size of the second sub-region is the same as a size of the first image.

3. The method according to claim 2, characterized in that Determining a second sub-region corresponding to the first sub-region on the third image includes: determining a scaling ratio based on sizes of the first image and the second image; Determining a size and a position of a second sub-region based on the scaling ratio and the position of the first sub-region; The second sub-region is determined on the third image according to the size and position of the second sub-region.

4. The method according to claim 2, characterized in that: Filling the first group of images into the first region respectively to generate a fused training image group includes: Fusing and filling the second image into the first sub-region to generate a fused low-resolution image; Fusing and filling the first image into the second sub-region to generate a fused high-resolution image, wherein the resolution of the fused high-resolution image is higher than that of the fused low-resolution image; The fused low-resolution image and the fused high-resolution image constitute the fused training image group.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Determine a second region on the fused training image group, wherein a size of the second region is the same as a size of the third group of images; The third group of images are filled into the second area respectively to generate an optimized training image group, and the optimized training image group is used to train the image enhancement model trained by the fused training image group.

6. The method according to any one of claims 1 to 4, characterized in that The first group of images has a uniform brightness distribution, and the second group of images has a gradient greater than a preset threshold.

7. A device for processing image training data, characterized in that: The device comprises: an acquisition unit, configured to acquire a first group of images and a second group of images, wherein each group of images includes at least two images, each group of images has the same number of images, and the size of images in the first group of images is smaller than the size of images in the second group of images; a determining unit, configured to determine a first area on the second group of images, where the first area is a corresponding area of ​​at least two images in the second group of images, and a size of the first area is the same as a size of an image in the first group of images; A fusion unit is used to fill the first group of images into the first area respectively to generate a fused training image group, and the fused training image group is used to train the image enhancement model.

8. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.

10. A chip, characterized in that: It comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, the signal includes a computer instruction stored in the memory, and when the processor executes the computer instruction, the electronic device executes the method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Multi-sensor image enhancement method and device

    CN110689558A

  • Method for generating super-resolution image and related device

    CN113196334A

  • Image processing method and device, electronic equipment and storage medium

    CN115205106A

  • Super-resolution single image construction method and device

    CN115330593A

  • Model training method and device, electronic equipment and medium

    CN115619642A