A method for measuring exposure distribution differences among multiple image sets
By measuring the exposure of a single grayscale image and the difference in exposure distribution between multiple image sets, it solves the problem of the recognition effect of the deep learning model declining when the production line changes, provides a method to measure the difference in exposure distribution, and improves the recognition effect of the model.
Patent Information
- Application Number
- CN202011086121.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-12
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-10-12
AI Technical Summary
The recognition effect of deep learning models in industrial production lines declines mainly because the exposure distribution of training data is inconsistent with the actual data, resulting in a decrease in recognition effect. It is difficult for existing technology to effectively measure the difference in exposure distribution of multiple picture sets.
A method for measuring the difference in exposure distribution of multiple image sets is adopted. By constructing an indicator to measure the exposure of a single grayscale image, the brightness enhancement network is used to calculate the exposure value, a distribution histogram is generated, and the K-S test and similarity calculation are used to measure the difference between multiple image sets. differences in exposure distribution.
It effectively measures the image exposure and the exposure distribution difference between multiple image sets, provides a reference for the improvement of deep learning models, and helps improve the recognition effect.
Smart Images

Figure CN112200743B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method for measuring exposure distribution differences of multiple picture sets. Background Art
[0002] With the rise of deep learning, technologies such as image recognition and detection based on deep learning have been widely used in industrial scenarios. On industrial production lines, industrial cameras often take grayscale photos to train recognition models. In the early stage of the model going online, a batch of data will be collected from the pre-batch production line for annotation and training, and the model will be adjusted to a higher recognition rate before being applied to other production lines. Then the recognition effect of the model trained by deep learning is often limited by the training data. After the production line changes, the distribution of the original collected data is not completely consistent with the data collected by the changed production line. At this time, when the pre-batch production line data is used to train the model recognition, the recognition effect decreases.
[0003] The overall collected data is affected by many factors. In grayscale images, the exposure of the image is an important factor affecting the change of the image. For example, overexposure or underexposure of the image will affect the change of the image. Therefore, it is very important to use the exposure of the image to measure the difference in the overall distribution of the collected data. Summary of the invention
[0004] To solve the above problems, the present invention provides a method for measuring exposure distribution differences of multiple picture sets.
[0005] The present invention adopts the following technical solutions:
[0006] A method for measuring exposure distribution differences of multiple image sets includes the following steps:
[0007] S1. Construct an index to measure the exposure of a single grayscale image;
[0008] S2, respectively calculating exposure values for all grayscale images of multiple image sets IA, IB, ..., IN, counting the exposure values of all images to obtain exposure value sets A, B, ..., N, and respectively counting the number of images under the same exposure value for different exposure value sets to obtain a distribution histogram;
[0009] S3, measure the statistical differences between multiple image sets.
[0010] Furthermore, step S1 is specifically as follows: inputting picture i into the brightness enhancement network to obtain a transformation matrix T(i), then bitwise multiplying T(i) by picture i to obtain a brightness enhanced picture i', and taking the square mean of the elements in the matrix T(i) as the exposure value of picture i.
[0011] Furthermore, the brightness enhancement network adopts Zero-DCE or EnlightenGAN.
[0012] Furthermore, the basic mathematical form of the matrix T(i) is as follows:
[0013] Where m is the height of input image i, and n is the width of input image i.
[0014] Furthermore, the step S3 is specifically as follows: performing a KS test on the exposure value set A, B, ..., N to obtain a p-value x, and then performing the following calculation on x: The final similarity value similarity(x) is used to measure the similarity of exposure distribution of multiple image sets IA, IB, …, IN.
[0015] After adopting the above technical solution, the present invention has the following advantages compared with the background technology:
[0016] The present invention starts from the exposure of grayscale images and proposes a method to measure the exposure of images and the differences in exposure distribution between image sets, which is used to measure whether the effect of the deep learning model decreases due to the change in exposure of the data set, and provides a reference for the improvement of the deep learning model. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a distribution histogram of the first embodiment of the present invention;
[0018] Figure 2 This is a distribution histogram of the second embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0020] Embodiment 1
[0021] This embodiment takes measuring the exposure distribution difference of two grayscale picture sets as an example, and adopts the following technical solution: comprising the following steps:
[0022] S1. Construct an index to measure the exposure of a single grayscale image;
[0023] The step S1 specifically includes: inputting the picture i into the brightness enhancement network to obtain the transformation matrix T(i), then performing bitwise multiplication of T(i) and the picture i to obtain the brightness enhanced picture i', and taking the square mean of the elements in the matrix T(i) as the exposure value of the picture i.
[0024] The brightness enhancement network adopts Zero-DCE.
[0025] The basic mathematical form of the matrix T(i) is as follows:
[0026] Where m is the height of input image i, and n is the width of input image i.
[0027] S2. Calculate the exposure values of all grayscale images in the two image sets IA and IB respectively, count the exposure values of all images, and obtain exposure value sets A and B. Count the number of images under the same exposure value for the two exposure value sets respectively to obtain the following: Figure 1 The distribution histogram shown;
[0028] S3, measure the statistical differences between multiple image sets.
[0029] The step S3 is specifically: performing a KS test on the exposure value set A, B, ..., N to obtain a p-value x, and then performing the following calculation on x: The final similarity(x) value is used to measure the similarity of exposure distribution of multiple image sets IA, IB,…,IN.
[0030] like Figure 1 As shown in the figure, the horizontal axis is the exposure value, and the vertical axis is the probability density under this value. The left and right figures are picture sets IA and IB respectively. The label above the left figure is the name of the picture set, and the label above the right figure is the similarity (x) of the exposure distribution of the two data sets and the average difference of the exposure values of the two sets. It can be seen that when the distributions of the two data sets are completely different, the similarity is 0.
[0031] Embodiment 2
[0032] This embodiment takes measuring the exposure distribution difference of two grayscale picture sets as an example, and adopts the following technical solution: comprising the following steps:
[0033] S1. Construct an index to measure the exposure of a single grayscale image;
[0034] The step S1 specifically includes: inputting the picture i into the brightness enhancement network to obtain the transformation matrix T(i), then performing bitwise multiplication of T(i) and the picture i to obtain the brightness enhanced picture i', and taking the square mean of the elements in the matrix T(i) as the exposure value of the picture i.
[0035] The brightness enhancement network adopts Zero-DCE.
[0036] The basic mathematical form of the matrix T(i) is as follows:
[0037] Where m is the height of input image i, and n is the width of input image i.
[0038] S2. Calculate the exposure values of all grayscale images in the two image sets IC and ID respectively, count the exposure values of all images, and obtain the exposure value sets C and D. Count the number of images under the same exposure value for the two exposure value sets respectively to obtain the following: Figure 2 The distribution histogram shown;
[0039] S3, measure the statistical differences between multiple image sets.
[0040] The step S3 specifically includes: performing a KS test on the exposure value sets C and D to obtain a p-value x, and then performing the following calculation on x: The final similarity(x) value is used to measure the similarity of exposure distribution of IC and ID multi-image sets.
[0041] like Figure 2 As shown in the figure, the horizontal axis is the exposure value, and the vertical axis is the probability density under this value. The left and right figures are picture sets IC and ID respectively. The label above the left figure is the picture set name, and the label above the right figure is the similarity (x) of the exposure distribution of the two data sets and the average difference of the exposure values of the two sets. It can be seen that when the distributions of the two data sets are very similar, the similarity is 1.
[0042] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for measuring exposure distribution differences of multiple image sets, characterized by: The steps include: S1. Construct an index to measure the exposure of a single grayscale image; The step S1 specifically includes: inputting the picture i into the brightness enhancement network to obtain the transformation matrix T(i), then performing bitwise multiplication of T(i) and the picture i to obtain the brightness enhanced picture i', and taking the square mean of the elements in the matrix T(i) as the exposure of the picture i; S2, respectively calculating exposure values for all grayscale images of multiple image sets IA, IB, ..., IN, counting the exposure values of all images to obtain exposure value sets A, B, ..., N, and respectively counting the number of images under the same exposure value for different exposure value sets to obtain a distribution histogram; S3, measure the statistical differences between multiple image sets; The step S3 is specifically: performing a KS test on the exposure value set A, B, ..., N to obtain a p-value x, and then performing the following calculation on x: The final similarity value similarity(x) is used to measure the similarity of exposure distribution of multiple image sets IA, IB, …, IN.
2. The method for measuring exposure distribution differences of multiple image sets according to claim 1, characterized in that: The brightness enhancement network adopts Zero-DCE or EnlightenGAN.
3. The method for measuring exposure distribution differences of multiple image sets according to claim 1, characterized in that: The basic mathematical form of the matrix T(i) is as follows: Where m is the height of input image i, and n is the width of input image i.
Citation Information
Patent Citations
Exposure method taking license plate as focus
CN103049909A
Image processing for merging images of a scene captured with differing camera parameters
US10009551B1
Image enhancement method based on multi-exposure generation and re-fusion frame
WO2019071981A1
Image capture method and device
WO2019183813A1
