Search

CN-115134974-B - Model training method, illuminance determination method, device, and program product

CN115134974BCN 115134974 BCN115134974 BCN 115134974BCN-115134974-B

Abstract

The model training method, the illuminance determining method, the device and the program product relate to an image processing technology and comprise the steps of obtaining low dynamic range images of a preset environment, which are acquired based on different exposure values, and acquiring actual illuminance values of the preset environment when the low dynamic range images are acquired, and training a preset model according to the low dynamic range images and the actual illuminance values corresponding to the low dynamic range images to obtain an illuminance prediction model. According to the model training method, the illumination determining method, the device and the program product, the predicted illumination value can be obtained according to the acquired low dynamic range image in the store, special persons are not required to collect data, and the brightness of the illumination lamp in the store can be adjusted in real time according to the predicted illumination value.

Inventors

  • WEI WEI
  • LIU YUE
  • LI HAOXIANG
  • KANG HAO
  • GUAN LI
  • HUA GANG

Assignees

  • 虫极科技(北京)有限公司

Dates

Publication Date
20260512
Application Date
20210326

Claims (12)

  1. 1. A method of model training, comprising: acquiring low dynamic range images of a preset environment acquired based on different exposure values, and acquiring actual illuminance values of the preset environment when the low dynamic range images are acquired; Training a preset model according to the low dynamic range image, an actual illuminance value corresponding to the low dynamic range image, a predicted high dynamic range image, a predicted illuminance value and a standard high dynamic range image through two constraint conditions, wherein the two constraint conditions comprise comparing the standard high dynamic range image with the predicted high dynamic range image and comparing the actual illuminance value with the predicted illuminance value to obtain an illuminance prediction model; Wherein, training the preset model to obtain the illuminance prediction model includes: Performing preset fusion processing on the low dynamic range images with different exposure values corresponding to the same point to obtain the standard high dynamic range images corresponding to the point, wherein the preset fusion processing comprises the steps of performing fusion processing on the low dynamic range images with different exposure values corresponding to the same point to obtain a first high dynamic range image; inputting the low dynamic range image into a preset model to obtain a predicted high dynamic range image corresponding to the low dynamic range image; Determining the predicted illuminance value from the predicted high dynamic range image; Optimizing parameters in the preset model according to the standard high dynamic range image, the predicted high dynamic range image, the actual illuminance value corresponding to the low dynamic range image and the predicted illuminance value to obtain the illuminance prediction model; determining an illuminance prediction model, namely determining a first loss according to the standard high dynamic range image and the predicted high dynamic range image, determining a second loss according to an actual illuminance value corresponding to the low dynamic range image and the predicted illuminance value, and optimizing parameters in the preset model according to the first loss and the second loss to obtain the illuminance prediction model; The low dynamic range image is input to an illuminance recognition device which obtains a predicted high dynamic range image corresponding to the input low dynamic range image using the illuminance prediction model, and determines the predicted illuminance value from the predicted high dynamic range image.
  2. 2. The method of claim 1, wherein said determining a predicted illumination value from said predicted high dynamic range image comprises: Determining a brightness value corresponding to each pixel point according to the pixel information of the predicted high dynamic range image; And determining the predicted illumination value of the predicted high dynamic range image according to the brightness value of each pixel point.
  3. 3. The method of claim 2, wherein determining the predicted luminance value of the predicted high dynamic range image based on the luminance value of each pixel comprises: And carrying out integral processing on the brightness of each pixel point in the appointed area of the predicted high dynamic range image to obtain the predicted illumination value of the predicted high dynamic range image.
  4. 4. A method according to any one of claims 1-3, wherein said optimizing parameters in said predetermined model to obtain said luminance prediction model based on said standard high dynamic range image, said predicted high dynamic range image, an actual luminance value corresponding to said low dynamic range image, said predicted luminance value comprises: Taking a standard high dynamic range image of the low dynamic range image and an actual illuminance value as a label of the low dynamic range image; And optimizing parameters in the preset model according to the label of the low dynamic range image, the predicted high dynamic range image of the low dynamic range image determined based on the preset model and the predicted illuminance value determined based on the predicted high dynamic range image to obtain the illuminance prediction model.
  5. 5. A method according to any one of claims 1-3, further comprising: acquiring an exposure value when the low dynamic range image is acquired; inputting the low dynamic range image into a preset model to obtain a predicted high dynamic range image corresponding to the low dynamic range image, wherein the method comprises the following steps: And inputting the low dynamic range image and the exposure value corresponding to the low dynamic range image into a preset model to obtain a predicted high dynamic range image corresponding to the low dynamic range image.
  6. 6. A method for determining ambient illuminance, comprising: acquiring a single-frame low dynamic range image obtained by shooting a preset environment; Acquiring an exposure value when the single-frame low dynamic range image is acquired; inputting the single-frame low dynamic range image and the exposure value when the single-frame low dynamic range image is acquired into an illuminance prediction model to obtain a predicted high dynamic range image corresponding to the single-frame low dynamic range image; Determining a predicted illuminance value corresponding to the preset environment according to the predicted high dynamic range image; wherein the illuminance prediction model is obtained according to the model training method of any one of claims 1 to 5.
  7. 7. The method as recited in claim 6, further comprising: and adjusting the brightness of the illuminating lamp set in the preset environment according to the predicted illumination value.
  8. 8. A model training device, comprising: the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring low dynamic range images of a preset environment acquired based on different exposure values and acquiring actual illuminance values of the preset environment when the low dynamic range images are acquired; The processing unit is used for training a preset model according to each low dynamic range image, an actual illuminance value corresponding to the low dynamic range image, a predicted high dynamic range image, a predicted illuminance value and a standard high dynamic range image, and obtaining an illuminance prediction model by comparing the standard high dynamic range image with the predicted high dynamic range image and comparing the actual illuminance value with the predicted illuminance value through two constraint conditions; the method comprises the steps of training a preset model to obtain an illumination prediction model, inputting the low dynamic range image into the preset model to obtain a predicted high dynamic range image corresponding to the low dynamic range image, determining the predicted illumination value according to the predicted high dynamic range image, optimizing parameters in the preset model according to the standard high dynamic range image, the predicted high dynamic range image and the actual illumination value corresponding to the low dynamic range image to obtain the illumination prediction model, and determining the illumination prediction model according to the standard high dynamic range image, the predicted high dynamic range image, the actual illumination value corresponding to the low dynamic range image and the predicted illumination value, the method comprises the steps of predicting an illuminance value, determining a second loss, optimizing parameters in the preset model according to the first loss and the second loss to obtain an illuminance prediction model, inputting a low dynamic range image into an illuminance identification device, obtaining a predicted high dynamic range image corresponding to the input low dynamic range image by the illuminance identification device by using the illuminance prediction model, and determining the predicted illuminance value according to the predicted high dynamic range image; The illuminance prediction model is used for acquiring a predicted high dynamic range image corresponding to a low dynamic range image, and the predicted high dynamic range image is used for acquiring a predicted illuminance value corresponding to the low dynamic range image.
  9. 9. An ambient illuminance determination device, comprising: The acquisition unit is used for acquiring a single-frame low dynamic range image obtained by shooting a preset environment and acquiring an exposure value when the single-frame low dynamic range image is acquired; The identification unit is used for inputting the single-frame low dynamic range image and the exposure value obtained when the single-frame low dynamic range image is acquired into an illumination prediction model to obtain a predicted high dynamic range image corresponding to the single-frame low dynamic range image; The illumination value determining unit is used for obtaining a predicted illumination value corresponding to the preset environment according to the predicted high dynamic range image; wherein the illuminance prediction model is obtained by the model training apparatus according to claim 8.
  10. 10. The electronic device is characterized by comprising a memory and a processor, wherein the memory is used for storing a computer program; The processor being configured to read a computer program stored in the memory and to perform the method according to any of the preceding claims 1-5 or 6-7 according to the computer program in the memory.
  11. 11. A computer readable storage medium having stored therein computer executable instructions which, when executed by a processor, implement the method of any of the preceding claims 1-5 or 6-7.
  12. 12. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the method of any of the preceding claims 1-5 or 6-7.

Description

Model training method, illuminance determination method, device, and program product Technical Field The present disclosure relates to image processing technology, and in particular, to a model training method, an illuminance determination method, an apparatus, and a program product. Background Currently, lighting lamps are provided in many shops to provide a suitable lighting environment. Since the change in the brightness of the external environment affects the illumination environment in the store, it is necessary to adjust the brightness of the illumination lamp so that the illumination environment is suitable for the user to stay. In the prior art, a special person uses an illuminance measuring instrument to collect the ambient illuminance in a store, and then adjusts the brightness of an illuminating lamp based on the actual illuminance in the store. However, in this method, a person is required to collect the illuminance of the store, the efficiency of collecting the illuminance of the store is low, and the brightness of the illumination lamp in the store cannot be adjusted in real time. Disclosure of Invention The disclosure provides a model training method, an illumination determining method, equipment and a program product, which are used for solving the problems that a special person is required to collect illumination of a store and the brightness of an illumination lamp in the store cannot be adjusted in real time in the prior art. According to a first aspect of the present application, there is provided a model training method comprising: acquiring low dynamic range images of a preset environment acquired based on different exposure values, and acquiring actual illuminance values of the preset environment when the low dynamic range images are acquired; training a preset model according to the low dynamic range images and the actual illuminance values corresponding to the low dynamic range images to obtain an illuminance prediction model, wherein the illuminance prediction model is used for obtaining high dynamic range images corresponding to the low dynamic range images, and the high dynamic range images are used for obtaining predicted illuminance values corresponding to the low dynamic range images. According to a second aspect of the present application, there is provided an ambient illuminance determination method including: acquiring a single-frame low dynamic range image obtained by shooting a preset environment; Inputting the single-frame low dynamic range image into an illuminance prediction model to obtain a predicted high dynamic range image corresponding to the single-frame low dynamic range image; Determining a predicted illuminance value corresponding to the preset environment according to the predicted high dynamic range image; the illumination prediction model is obtained by training a low dynamic range image of a training environment based on different exposure values and an actual illumination value of the training environment when the low dynamic range image is acquired. According to a third aspect of the present application, there is provided a model training apparatus comprising: the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring low dynamic range images of a preset environment acquired based on different exposure values and acquiring actual illuminance values of the preset environment when the low dynamic range images are acquired; The processing unit is used for training a preset model according to each low dynamic range image and the actual illuminance value corresponding to the low dynamic range image to obtain an illuminance prediction model, wherein the illuminance prediction model is used for acquiring a high dynamic range image corresponding to the low dynamic range image, and the high dynamic range image is used for acquiring a predicted illuminance value corresponding to the low dynamic range image. According to a fourth aspect of the present application, there is provided an ambient illuminance determination apparatus comprising: The acquisition unit is used for acquiring a single-frame low dynamic range image obtained by shooting a preset environment; The identification unit is used for inputting the single-frame low dynamic range image into an illumination prediction model to obtain a predicted high dynamic range image corresponding to the single-frame low dynamic range image; and the illumination value determining unit is used for obtaining a predicted illumination value corresponding to the preset environment according to the predicted high dynamic range image. The illumination prediction model is obtained by training a low dynamic range image of a training environment based on different exposure values and an actual illumination value of the training environment when the low dynamic range image is acquired. According to a fifth aspect of the present application, there is provided an