Model training method and device, electronic equipment and readable storage medium

By incorporating semantic segmentation and adaptive tone mapping algorithms into a neural network and performing end-to-end training using a training mask, the problem of poor image quality in low dynamic range in existing technologies is solved, achieving high-quality image display effects.

CN115272127BActive Publication Date: 2025-11-28VIVO MOBILE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210980190.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-16
Publication Date
2025-11-28
Estimated Expiration
2042-08-16

AI Technical Summary

Technical Problem

In existing technologies, high dynamic range imaging techniques obtain low dynamic range images through tone mapping, which have poor image quality and are difficult to meet users' requirements for image quality.

Method used

By inputting a reference high dynamic range image into the first training network, first and second training masks are obtained. The first and second training networks are then trained based on these masks. Semantic segmentation and adaptive tone mapping algorithms are combined, and the powerful computing capabilities of neural networks are utilized to achieve an end-to-end training process, generating the target training network.

Benefits of technology

It improves the quality of low dynamic range images, meets users' requirements for image quality, and achieves high-quality image display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115272127B_ABST
    Figure CN115272127B_ABST
Patent Text Reader

Abstract

The application discloses a model training method and device, an electronic device and a readable storage medium, and belongs to the technical field of shooting devices. The model training method comprises the following steps: inputting a reference high dynamic range image into a first training network to obtain a first training mask and a second training mask; training the first training network based on the first training mask, the second training mask and a reference training mask, and training a second training network based on the first training mask, the second training mask, the reference high dynamic range image and a reference low dynamic range image; obtaining a target training network in the case that the first training network and the second training network converge simultaneously; the first training mask is a mask corresponding to a first target object, the second training mask is a mask corresponding to a second target object, the first target object and the second target object are different objects in the reference high dynamic range image, and the target training network is used for processing a high dynamic range image into a low dynamic range image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of shooting equipment, and particularly relates to a model training method, a model training device, an electronic device and a readable storage medium. BACKGROUND

[0002] In related technologies, the high dynamic range imaging technology is a technology for capturing all luminance interval information in a shooting scene. In order to ensure that the display screen of the electronic device can accurately display the image, the high dynamic range image needs to be compressed to a low dynamic range through tone mapping.

[0003] At present, the image quality of the low dynamic range image obtained through tone mapping is poor, and it is difficult to meet the requirements of users on the image quality, and therefore a method capable of obtaining high-quality images needs to be provided. SUMMARY

[0004] The purpose of the embodiments of the application is to provide a model training method and device, an electronic device and a readable storage medium, which can solve the problem that users cannot obtain high-quality images.

[0005] In a first aspect, the embodiments of the application provide a model training method, comprising:

[0006] inputting a reference high dynamic range image into a first training network to obtain a first training mask and a second training mask;

[0007] training the first training network based on the first training mask, the second training mask and a reference training mask, and training the second training network based on the first training mask, the second training mask, the reference high dynamic range image and a reference low dynamic range image;

[0008] obtaining a target training network in a case where the first training network and the second training network converge at the same time;

[0009] The first training mask is a mask corresponding to a first target object, the second training mask is a mask corresponding to a second target object, the first target object and the second target object are different objects in the reference high dynamic range image, and the target training network is used for processing the high dynamic range image into a low dynamic range image.

[0010] In a second aspect, the embodiments of the application provide a model training device, comprising:

[0011] an input module configured to input a reference high dynamic range image into a first training network to obtain a first training mask and a second training mask;

[0012] The training module trains the first training network based on the first training mask, the second training mask and the reference training mask, and trains the second training network based on the first training mask, the second training mask, the reference high dynamic range image and the reference low dynamic range image;

[0013] The generating module obtains the target training network when the first training network and the second training network converge simultaneously.

[0014] The first training mask is a mask corresponding to the first target object, the second training mask is a mask corresponding to the second target object, the first target object and the second target object are different objects in the reference high dynamic range image, and the target training network is used for processing a high dynamic range image into a low dynamic range image.

[0015] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, the memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the method in the first aspect.

[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, the readable storage medium stores programs or instructions, and the programs or instructions are executed by the processor to implement the steps of the method in the first aspect.

[0017] In a fifth aspect, an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, the processor is used to run programs or instructions to implement the steps of the method in the first aspect.

[0018] In a sixth aspect, an embodiment of the present application provides a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the method in the first aspect.

[0019] In the embodiment of the present application, the first training mask and the second training mask are taken as a part of the training set, that is, the result of semantic segmentation is taken as the prior input of the adaptive tone mapping algorithm, so as to make the neural network learn the global semantic information better and adjust the brightness and contrast more finely. Therefore, by adding the first training mask and the second training mask in the training set, the second training network trained can finely adjust the image, and the second training network can tone map the high dynamic range image into a high-quality low dynamic range, which is conducive to meeting the requirements of users on image quality.

[0020] The semantic segmentation task based on the first training mask and the second training mask and the adaptive tone mapping algorithm are combined into one neural network, and the powerful computing power of the neural network is fully utilized. The tone mapping algorithm based on the neural network has the characteristics of large parameter quantity, strong expression ability and self-adaptive adjustment, so that the target training network obtained by training can process the high dynamic range image, which is beneficial to obtain a high-quality low dynamic range image.

[0021] When training the second training network, a supervised learning method is also used, and the training set generated by the first training mask, the second training mask and the reference training mask is used to train the second training network, so that the second training network can accurately separate the first training mask and the second training mask.

[0022] The training of the first training network and the second training network has linkage, and the whole process is complete and unified. The training of the two training networks is carried out as a whole, the input is the original data, and the output is the final result, that is, the whole training process is end to end. By using the two training networks obtained by training, the quality of the low dynamic range image obtained by tone mapping can be further improved. BRIEF DESCRIPTION OF DRAWINGS

[0023] Figure 1 is a flowchart of a model training method according to an embodiment of the present application;

[0024] Figure 2 is a training process schematic diagram of model training according to an embodiment of the present application;

[0025] Figure 3 is a schematic block diagram of a model training device according to an embodiment of the present application;

[0026] Figure 4 is a schematic block diagram of an electronic device according to an embodiment of the present application;

[0027] Figure 5 is a hardware structure schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0028] The technical solutions in the embodiments of the present application will be described clearly below with reference to the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.

[0029] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally a class, not limited to the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims indicates at least one of the connected objects, and the character " / ", generally indicates that the objects before and after are in a "or" relationship.

[0030] The embodiments provided by the present application will be described in detail below with reference to the accompanying drawings, specific embodiments and application scenarios.

[0031] In combination with Figure 1 and Figure 2 As shown in the figure, in some embodiments of the present application, a model training method is proposed, comprising:

[0032] Step 102, input the reference high dynamic range image into the first training network to obtain the first training mask and the second training mask;

[0033] Step 104, training the first training network based on the first training mask, the second training mask and the reference training mask, and training the second training network based on the first training mask, the second training mask, the reference high dynamic range image and the reference low dynamic range image;

[0034] Step 106, in the case of simultaneous convergence of the first training network and the second training network, obtaining the target training network.

[0035] The first training mask is the mask corresponding to the first target object, the second training mask is the mask corresponding to the second target object, the first target object and the second target object are different objects in the reference high dynamic range image, and the target training network is used to process the high dynamic range image into the low dynamic range image.

[0036] The reference high dynamic range image can obtain the reference low dynamic range image after tone mapping, and the reference high dynamic range image and the reference low dynamic range image are used as the data pair required for neural network training.

[0037] Reference high dynamic range image includes a first target object and a second target object, and the first target object and the second target object are different objects. After obtaining the reference high dynamic range image, the reference high dynamic range image is input into the first training network to obtain a first training mask and a second training mask, and the first training mask is a mask obtained after image processing of the first target object, and the second training mask is a mask obtained after image processing of the second target object.

[0038] When training the second training network, the second training network is trained according to the first training mask, the second training mask, the reference high dynamic range image and the reference low dynamic range image. The first target object and the second target object are objects that need to be focused on in the reference high dynamic range image. The brightness and contrast adjustment process of the objects that need to be focused on is relatively complex, and in the case where the first training mask and the second training mask are obtained, the second training network can independently adjust the first target object and the second target object.

[0039] The first training mask and the second training mask are used as part of the training set, that is, the result of semantic segmentation is used as the prior input of the adaptive tone mapping algorithm, so that the neural network can better learn the global semantic information and the adjustment of brightness and contrast is more accurate. Therefore, by adding the first training mask and the second training mask to the training set, the second training network trained can perform fine adjustment on the image, and the second training network can map the high dynamic range image to a high-quality low dynamic range, which is conducive to meeting the user's requirements for image quality.

[0040] The semantic segmentation task based on the first training mask and the second training mask and the adaptive tone mapping algorithm are combined into one neural network, which fully utilizes the powerful computing power of the neural network. The tone mapping algorithm based on the neural network has the characteristics of large number of parameters, strong expression ability and self-adaptive adjustment, so that the target training network trained can process the high dynamic range image to obtain a high-quality low dynamic range image.

[0041] When training the second training network, a supervised learning method is also used, and the training set generated by the first training mask, the second training mask and the reference training mask is used to train the second training network, so that the second training network can accurately separate the first training mask and the second training mask.

[0042] The training of the first training network and the second training network has a linkage, and the whole process is complete and unified. The training of the two training networks is performed as a whole, that is, the whole training process is end to end. By using the two training networks trained, the quality of the low dynamic range image obtained through tone mapping can be further improved.

[0043] When the first training network and the second training network are trained, a loss function is used to determine whether the first training network and the second training network converge, for example, the loss function of the first training network can use a cross-entropy loss function or a dice loss loss function, and the loss function of the second training network can use L1loss, ssim loss or vgg loss.

[0044] In a possible embodiment, before training the second training network based on the first training mask, the second training mask, the reference high dynamic range image and the reference low dynamic range image, the method further includes: performing color adjustment on the reference low dynamic range image; and training the second training network based on the first training mask, the second training mask, the reference high dynamic range image and the reference low dynamic range image, including: training the second training network based on the first training mask, the second training mask, the reference high dynamic range image and the adjusted reference low dynamic range image.

[0045] Before training the second training network, the reference low dynamic range image in the data pair needs to be color adjusted, that is, the reference low dynamic range image needs to be beautified.

[0046] After obtaining the data pair, the reference low dynamic range image is further optimized to form an optimized data pair. The optimization methods include but are not limited to using Photoshop, contrast enhancement, brightness enhancement, to ensure that the target image of the neural network training is an image with a relatively ideal effect.

[0047] Optimizing the low dynamic range image obtained by the traditional tone mapping algorithm ensures that the result of the neural network can exceed the traditional algorithm. Further optimization of prior information and reference images is a key factor to improve the expression ability of the network and exceed the effect of the traditional algorithm.

[0048] In a possible embodiment, training the second training network based on the first training mask, the second training mask, the reference high dynamic range image and the reference low dynamic range image includes: stacking the first training mask, the second training mask and the reference high dynamic range image in the channel number to obtain combined data; and training the second training network based on the combined data and the reference low dynamic range image.

[0049] After the feature splicing of the first training mask and the second training mask, the feature splicing of the first training mask and the second training mask and the reference high dynamic range image is performed, and then the feature splicing is sent to the second training network. The above-mentioned feature splicing refers to the stacking on the channel. For example, the size of the first training mask is [1024, 1024, 1], the size of the second training mask is [1024, 1024, 1], and the size of the reference high dynamic range image is [1024, 1024, 3]. After the feature splicing, the input of the second training network is [1024, 1024, 5].

[0050] Of course, in other embodiments, the first training mask and the second training mask can also be combined and added, and then the feature splicing of the first training mask, the second training mask and the reference high dynamic range image is performed. The first training mask and the second training mask can also be multiplied or added with the reference high dynamic range image.

[0051] In a possible embodiment, the reference high dynamic range image is input into the first training network to obtain the first training mask and the second training mask, comprising: inputting the reference high dynamic range image into the first training network; performing image segmentation processing on the reference high dynamic range image based on the first training network to obtain a first target image and a second target image; and performing image processing on the first target image and the second target image respectively to obtain the first training mask and the second training mask.

[0052] The first target image and the second target image are obtained by performing semantic segmentation on the reference high dynamic range image, which is beneficial to accurately obtaining the first target image and the second target image, thereby ensuring the accuracy of the obtained first training mask and the second training mask. Therefore, the second training network can be more accurately trained by inputting the first training mask and the second training mask as priori.

[0053] In a possible embodiment, the first training mask is a portrait training mask, and the second training mask is a sky training mask.

[0054] The brightness and contrast adjustment process of the portrait image and the sky image is relatively complex. In the case of obtaining the first training mask and the second training mask, the second training network can independently adjust the portrait image and the sky image. The target training network obtained by training the second training network in the above-mentioned manner can accurately process the portrait image and the sky image in the high dynamic range image, so that a more ideal low dynamic range image can be obtained.

[0055] The model training method provided in the embodiment of the application can be executed by the model training device. In the embodiment of the application, the model training method executed by the model training device is taken as an example to illustrate the model training device provided in the embodiment of the application.

[0056] As Figure 3As shown, in some embodiments of the present application, a model training apparatus 200 is provided, comprising:

[0057] An input module 210 is configured to input a reference high dynamic range image into the first training network to obtain a first training mask and a second training mask;

[0058] A training module 220 is configured to train the first training network based on the first training mask, the second training mask and the reference training mask, and train the second training network based on the first training mask, the second training mask, the reference high dynamic range image and the reference low dynamic range image;

[0059] A generation module 230 is configured to obtain a target training network when the first training network and the second training network converge simultaneously.

[0060] The first training mask is a mask corresponding to a first target object, the second training mask is a mask corresponding to a second target object, the first target object and the second target object are different objects in the reference high dynamic range image, and the target training network is used to process a high dynamic range image into a low dynamic range image.

[0061] The first training mask and the second training mask are used as part of the training set, i.e., the results of semantic segmentation are used as prior inputs of the adaptive tone mapping algorithm, which encourages the neural network to better learn global semantic information and make more precise adjustments to brightness and contrast. Therefore, by adding the first training mask and the second training mask to the training set, the second training network trained can make fine adjustments to the image, and the second training network can tone map the high dynamic range image to a high-quality low dynamic range, which is conducive to meeting the user's requirements for image quality.

[0062] The semantic segmentation task based on the first training mask and the second training mask and the adaptive tone mapping algorithm are combined into one neural network, which fully utilizes the powerful computing power of the neural network. The tone mapping algorithm based on the neural network has the characteristics of large number of parameters, strong expression ability and self-adaptive adjustment, so that the target training network obtained by training can process the high dynamic range image to obtain a high-quality low dynamic range image.

[0063] When training the second training network, a supervised learning method is also used, and the training set generated by the first training mask, the second training mask and the reference training mask is used to train the second training network, so that the second training network can accurately separate the first training mask and the second training mask.

[0064] The training of the first training network and the second training network has linkage, and the whole process is complete and unified. The training of the two training networks is performed as a whole, that is, the whole training process is end to end. By using the two training networks obtained through training, the quality of the low dynamic range image obtained through tone mapping can be further improved.

[0065] In a possible embodiment, the model training apparatus further includes an adjusting module; before training the second training network based on the first training mask, the second training mask, the reference high dynamic range image, and the reference low dynamic range image, the adjusting module is configured to perform color adjustment on the reference low dynamic range image; and the training module is specifically configured to train the second training network based on the first training mask, the second training mask, the reference high dynamic range image, and the adjusted reference low dynamic range image.

[0066] In a possible embodiment, the training module is specifically configured to stack the first training mask, the second training mask, and the reference high dynamic range image in the number of channels to obtain combined data; and train the second training network based on the combined data and the reference low dynamic range image.

[0067] In a possible embodiment, the input module is specifically configured to input the reference high dynamic range image into the first training network; perform image segmentation processing on the reference high dynamic range image based on the first training network to obtain a first target image and a second target image; and perform image processing on the first target image and the second target image respectively to obtain a first training mask and a second training mask.

[0068] In a possible embodiment, the first training mask is a portrait training mask, and the second training mask is a sky training mask.

[0069] The model training device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television set (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.

[0070] The model training device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system used.

[0071] The model training apparatus provided in this application embodiment can implement all the processes implemented in the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0072] Optionally, embodiments of this application also provide an electronic device. Figure 4 A structural block diagram of an electronic device 300 according to an embodiment of this application is shown, such as... Figure 4 As shown, it includes a processor 310, a memory 320, and a program or instructions stored in the memory 320 and executable on the processor 310. When the program or instructions are executed by the processor 310, they implement the various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.

[0073] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.

[0074] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0075] The electronic device 400 includes, but is not limited to, a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a memory 409, and a processor 410, etc.

[0076] Those skilled in the art can understand that the electronic device 400 can further include a power supply (such as a battery) for supplying power to each component, and the power supply can be logically connected to the processor 410 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than shown, or combine certain components, or different component arrangements, which are not described here.

[0077] The processor 410 is configured to input the reference high dynamic range image into the first training network to obtain a first training mask and a second training mask; train the first training network based on the first training mask, the second training mask, and a reference training mask, and train the second training network based on the first training mask, the second training mask, the reference high dynamic range image, and a reference low dynamic range image; in a case where the first training network and the second training network converge simultaneously, obtain a target training network; the first training mask is a mask corresponding to a first target object, the second training mask is a mask corresponding to a second target object, the first target object and the second target object are different objects in the reference high dynamic range image, and the target training network is configured to process a high dynamic range image into a low dynamic range image.

[0078] The processor 410 is further configured to perform color adjustment on the reference low dynamic range image; and train the second training network based on the first training mask, the second training mask, the reference high dynamic range image, and the adjusted reference low dynamic range image.

[0079] The processor 410 is further configured to stack the first training mask, the second training mask, and the reference high dynamic range image in the number of channels to obtain combined data; and train the second training network based on the combined data and the reference low dynamic range image.

[0080] The processor 410 is further configured to input the reference high dynamic range image into the first training network; perform image segmentation processing on the reference high dynamic range image based on the first training network to obtain a first target image and a second target image; and perform image processing on the first target image and the second target image respectively to obtain the first training mask and the second training mask.

[0081] The first training mask and the second training mask are taken as part of the training set, that is, the result of semantic segmentation is taken as the prior input of the adaptive tone mapping algorithm, so that the neural network learns the global semantic information better and the adjustment of brightness and contrast is more accurate. Therefore, by adding the first training mask and the second training mask in the training set, the second training network obtained by training can perform fine adjustment on the image, and the second training network can map the high dynamic range image to a high-quality low dynamic range, which is beneficial to meet the requirements of users on image quality.

[0082] The semantic segmentation task based on the first training mask and the second training mask and the adaptive tone mapping algorithm are combined into one neural network, so that the powerful computing capability of the neural network is fully utilized. The tone mapping algorithm based on the neural network has the characteristics of large number of parameters, strong expression capability and self-adaptive adjustment, so that the target training network obtained by training can process the high dynamic range image and obtain a high-quality low dynamic range image.

[0083] When training the second training network, a supervised learning method is also used, and the training set generated by the first training mask, the second training mask and the reference training mask is used to train the second training network, so that the second training network can accurately separate the first training mask and the second training mask.

[0084] The training of the first training network and the second training network has linkage, and the whole process is complete and unified. The training of the two training networks is performed as a whole, that is, the whole training process is end to end. By using the two training networks obtained by training, the quality of the low dynamic range image obtained by tone mapping can be further improved.

[0085] It should be understood that in the embodiments of the present application, the input unit 404 can include a graphics processing unit (GPU) 4041 and a microphone 4042. The graphics processing unit 4041 processes image data of a still picture or a video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 406 can include a display panel 4061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 407 includes at least one of a touch panel 4071 and other input devices 4072. The touch panel 4071 is also called a touch screen. The touch panel 4071 can include a touch detection device and a touch controller. The other input devices 4072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), trackballs, mice, joysticks, etc., which will not be described here.

[0086] The memory 409 can be used to store software programs and various data. The memory 409 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 409 can include a volatile memory or a non-volatile memory, or the memory 409 can include both a volatile memory and a non-volatile memory. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 409 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.

[0087] The processor 410 can include one or more processing units; optionally, the processor 410 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 410.

[0088] The embodiments of the present application also provide a readable storage medium, and the readable storage medium stores programs or instructions, the programs or instructions are executed by a processor to realize various processes of the above-mentioned method embodiments and achieve the same technical effects. To avoid repetition, details are not described here.

[0089] The processor is a processor in the electronic device in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disc or an optical disc, and the like.

[0090] The embodiments of the present application further provide a chip, which includes a processor and a communication interface. The communication interface is coupled with the processor. The processor is configured to execute programs or instructions, implement various processes of the above method embodiments, and achieve the same technical effects. To avoid repetition, details are not described herein.

[0091] It should be understood that the chip mentioned in the embodiments of the present application can also be referred to as a system-level chip, a system chip, a chip system, or a system-on-chip chip, and the like.

[0092] The embodiments of the present application provide a computer program product stored in a storage medium. The program product is executed by at least one processor to implement various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.

[0093] It should be noted that, in this document, the term "comprising" or "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to the order of performing the functions as shown or discussed, but can also include performing the functions in a substantially simultaneous manner or in a reverse order, for example, the described method can be performed in an order different from that described, and various steps can also be added, omitted or combined. In addition, the features described with reference to certain examples can be combined in other examples.

[0094] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned example methods can be realized by means of software and a necessary general hardware platform, and of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a computer software product in essence or in the form of a part that contributes to the prior art, which is stored in a storage medium (such as a ROM / RAM, a magnetic disc, an optical disc), and includes a plurality of instructions for causing a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present application.

[0095] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative, but not restrictive. Those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope protected by the claims.

Claims

1. A model training method, characterized in that, include: The reference high dynamic range image is input into the first training network to obtain the first training mask and the second training mask; The first training network is trained based on the first training mask, the second training mask, and the reference training mask, and the second training network is trained based on the first training mask, the second training mask, the reference high dynamic range image, and the reference low dynamic range image. The target training network is obtained when the first training network and the second training network converge simultaneously. Wherein, the first training mask is the mask corresponding to the first target object, the second training mask is the mask corresponding to the second target object, the first target object and the second target object are different objects in the reference high dynamic range image, and the target training network is used to process the high dynamic range image into a low dynamic range image; The step of inputting a reference high dynamic range image into the first training network to obtain a first training mask and a second training mask includes: The reference high dynamic range image is input into the first training network; Based on the first training network, the reference high dynamic range image is segmented to obtain a first target image and a second target image. Image processing is performed on the first target image and the second target image respectively to obtain the first training mask and the second training mask.

2. The model training method according to claim 1, characterized in that, Before training the second training network based on the first training mask, the second training mask, the reference high dynamic range image, and the reference low dynamic range image, the method further includes: Color adjustment is performed on the reference low dynamic range image; The training of the second training network based on the first training mask, the second training mask, the reference high dynamic range image, and the reference low dynamic range image includes: The second training network is trained based on the first training mask, the second training mask, the reference high dynamic range image, and the adjusted reference low dynamic range image.

3. The model training method according to claim 1 or 2, characterized in that, The first training mask is a portrait training mask, and the second training mask is a sky training mask.

4. A model training device, characterized in that, include: The input module is used to input a reference high dynamic range image into the first training network to obtain a first training mask and a second training mask; The training module is used to train the first training network based on the first training mask, the second training mask and the reference training mask, and to train the second training network based on the first training mask, the second training mask, the reference high dynamic range image and the reference low dynamic range image. The generation module is used to obtain the target training network when the first training network and the second training network converge simultaneously. Wherein, the first training mask is the mask corresponding to the first target object, the second training mask is the mask corresponding to the second target object, the first target object and the second target object are different objects in the reference high dynamic range image, and the target training network is used to process the high dynamic range image into a low dynamic range image; The input module is specifically used for: The reference high dynamic range image is input into the first training network; Based on the first training network, the reference high dynamic range image is segmented to obtain a first target image and a second target image. Image processing is performed on the first target image and the second target image respectively to obtain the first training mask and the second training mask.

5. The model training apparatus according to claim 4, characterized in that, The model training device further includes: an adjustment module; Before training the second training network based on the first training mask, the second training mask, the reference high dynamic range image, and the reference low dynamic range image, the adjustment module is used to: Color adjustment is performed on the reference low dynamic range image; The training module is specifically used for: The second training network is trained based on the first training mask, the second training mask, the reference high dynamic range image, and the adjusted reference low dynamic range image.

6. The model training apparatus according to claim 4 or 5, characterized in that, The first training mask is a portrait training mask, and the second training mask is a sky training mask.

7. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the model training method as described in any one of claims 1 to 3.

8. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the model training method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Image high dynamic range reconstruction method based on deep learning

    CN111292264A

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

    CN111415358A