A method and system for determining the uniformity of fog environments
By combining histogram statistics and gray-level co-occurrence matrix with convolutional neural networks, a fog image classification model was constructed and the loss function was optimized. This solved the problem of uniformity discrimination in foggy images, achieving accurate differentiation of fog images and improving defogging effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-03
AI Technical Summary
The lack of an effective scheme for determining the uniformity of foggy images in existing technologies makes it difficult to accurately adapt the processing strategy during the defogging process. Over-reliance on global defogging models can lead to the failure of local area processing or the abuse of local enhancement strategies, resulting in the distortion of details.
Feature extraction is performed using histogram statistics and gray-level co-occurrence matrix. A fog map classification model is constructed by combining convolutional neural networks. A loss function is constructed using the confidence of the predicted label and the binary cross-entropy of the prior weights. The model is then optimized to achieve accurate fog map discrimination.
It achieves accurate differentiation of foggy images, avoids the one-sidedness of single feature discrimination, and improves the adaptability of dehazing algorithms and image quality.
Smart Images

Figure CN121415166B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision technology, specifically relating to a method and system for determining the uniformity of fog environments. Background Technology
[0002] In the field of computer vision, image quality is one of the core factors determining system performance. However, the presence of fog significantly reduces image contrast and sharpness, leading to severe image quality degradation and hindering accurate perception and reliable analysis by the system.
[0003] Based on the differences in fog concentration distribution across image space, foggy images can be divided into two categories: uniform fog images and non-uniform fog images. While uniform fog images exhibit blurred details and reduced edge and texture sharpness, their fog concentration is uniformly distributed globally, making them easily dehazable using atmospheric scattering models or image enhancement techniques. In contrast, non-uniform fog images exhibit significant local heterogeneity, with a strong correlation between fog concentration distribution and scene depth. Regions at different scene depths show significant differences in contrast, sharpness, and color gamut, thus often requiring complex algorithms such as deep learning for processing, resulting in a more complex dehazing process.
[0004] In existing technologies, there is no effective discrimination scheme for determining whether foggy images exhibit a uniform distribution. This makes it difficult to accurately adapt the optimal processing strategy to different types of foggy images during the dehazing process, resulting in the following problems: over-reliance on global dehazing models to process non-uniform fog images can easily lead to processing failures in local areas; and misuse of local enhancement strategies to process uniform fog images can easily cause detail distortion. Therefore, constructing an accurate fog image uniformity discrimination mechanism is crucial for improving the adaptability of dehazing algorithms and enhancing the dehazing effect of foggy images. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a method and system for determining the uniformity of fog environment in order to solve the above-mentioned technical problems.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A method for determining the uniformity of a fog environment, the method comprising:
[0008] By using histogram statistics and gray-level co-occurrence matrix, features are extracted from each sample in the dataset, and the extracted features are used to label each sample with true labels for uniform fog and non-uniform fog.
[0009] The dataset is input into the fog map classification model for iterative training to obtain the predicted labels of uniform fog and non-uniform fog for each sample;
[0010] A loss function is constructed based on the confidence of the predicted label. The loss function is used to calculate the loss value and optimize the fog map classification model during iterative training until the fog map classification model meets the preset performance evaluation criteria.
[0011] Preferably, before extracting features from each sample in the dataset using histogram statistics and gray-level co-occurrence matrix, the method further includes:
[0012] For each sample, pixel size uniformity, pixel bit depth uniformity, pixel normalization and data augmentation are performed sequentially. The data augmentation includes random rotation, translation and flipping operations.
[0013] Preferably, the step of extracting features from each sample in the dataset using histogram statistics and gray-level co-occurrence matrix, and labeling each sample with true labels for uniform fog and non-uniform fog based on the extracted features, includes:
[0014] The histogram range and energy value of each sample are obtained by using the histogram statistics and the gray-level co-occurrence matrix, respectively.
[0015] For samples whose histogram range is greater than the histogram threshold and whose energy value is less than the energy value threshold, their true labels are marked as non-uniform fog; otherwise, they are marked as uniform fog.
[0016] Preferably, the method further includes:
[0017] The fog map classification model includes an input layer, a convolutional layer, a max pooling layer, a residual block group, a global average pooling layer, and a fully connected layer.
[0018] The input layer is used to receive the sample;
[0019] The convolutional layer is used to initially extract the basic visual features of the sample;
[0020] The max pooling layer is used to reduce the spatial dimension of the feature map;
[0021] The residual block group is used to extract the depth features of the sample hierarchically;
[0022] The global average pooling layer is used to aggregate the spatial dimensions of the feature map;
[0023] The fully connected layer is used to output the predicted label.
[0024] Preferably, the method further includes:
[0025] The residual block group includes a first residual group, a second residual group, a third residual group, and a fourth residual group;
[0026] The first residual set is used to extract the basic distribution characteristics of the fog concentration of the sample;
[0027] The second residual set is used to enhance gradient capture of the fog concentration;
[0028] The third residual set is used to learn the complex features of the fog concentration and scene interaction;
[0029] The fourth residual group is used to focus on the differential characteristics of the global fog concentration distribution.
[0030] Preferably, the step of constructing the loss function based on the confidence of the predicted label includes:
[0031] The confidence level is defined as the probability that the predicted label is the uniform fog.
[0032] Obtain the prior weights of the uniform fog and the non-uniform fog in the real labels;
[0033] The loss function is constructed by calculating the binary cross-entropy of the confidence level and the prior weights.
[0034] Preferably, the method further includes:
[0035] The prior weights include the ratio of the total number of training samples to the total number of samples whose true label is the non-uniform fog, and the ratio of the total number of training samples to the total number of samples whose true label is the uniform fog.
[0036] Preferably, the method further includes:
[0037] The maximum number of iterations in the iterative training process is set to 200;
[0038] An early stopping mechanism is introduced during the iterative training process. The early stopping mechanism includes stopping the iterative training when the loss value of the loss function does not decrease during 10 consecutive rounds of iterative training.
[0039] The preset performance evaluation criteria include triggering the early stop mechanism before reaching the maximum number of iterations or fully executing to the maximum number of iterations, then terminating the iterative training process, evaluating whether the matching degree of the predicted label exceeds the matching degree threshold, and if it does not exceed it, returning to re-execute the iterative training process.
[0040] Preferably, the method further includes:
[0041] The degree of fit includes the proportion of the total number of samples with the same predicted label and the same true label to the total number of test samples.
[0042] The present invention also provides a fog environment uniformity discrimination system, comprising the following modules:
[0043] Data labeling module: used to extract features from each sample in the dataset through histogram statistics and gray-level co-occurrence matrix, and to label each sample with the true labels of uniform fog and non-uniform fog based on the extracted features;
[0044] Model training module: used to input the dataset into the fog map classification model for iterative training, and obtain the predicted labels of uniform fog and non-uniform fog corresponding to each sample;
[0045] Model optimization module: used to construct a loss function based on the confidence of the predicted label, and use the loss function to calculate the loss value and optimize the fog map classification model during iterative training until the fog map classification model meets the preset performance evaluation criteria.
[0046] The advantages of this invention compared to existing methods are:
[0047] (1) This invention uses a combination of histogram statistics and gray-level co-occurrence matrix to construct the criteria for judging the uniformity of fog distribution in samples from two dimensions: pixel intensity distribution and texture uniformity. This avoids the one-sidedness of single feature judgment, captures the essential differences in fog distribution uniformity more accurately, and obtains the true label of the sample, providing reliable verification for subsequent model optimization and output.
[0048] (2) The present invention constructs a fog image classification model based on convolutional neural network, adopts a multi-level architecture to realize hierarchical feature extraction, realizes shallow and deep feature mining of fog distribution uniformity, and provides reliable support for the effective distinction between uniform fog images and non-uniform fog images.
[0049] (3) This invention constructs a loss function by calculating the confidence of the predicted label and the binary cross-entropy of the prior weights, which specifically solves the problem of class imbalance that may exist in the dataset. During the iterative training process, the fog map classification model is optimized by feedback, thereby achieving accurate discrimination and differentiation between uniform fog images and non-uniform fog images, and providing strong support for the accurate adaptation of subsequent image dehazing algorithms. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a flowchart illustrating a method for determining the uniformity of a fog environment in an embodiment of the present invention.
[0052] Figure 2 This is a schematic diagram of the architecture of the fog map classification model in an embodiment of the present invention;
[0053] Figure 3 This is a schematic diagram of the structure of a fog environment uniformity discrimination system according to an embodiment of the present invention. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this invention more apparent and understandable, the technical solutions of this invention will be clearly and completely described below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the described embodiments are only a part of the embodiments of this invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0055] Please see Figure 1 As shown, the present invention provides a method for determining the uniformity of a fog environment, comprising the following steps:
[0056] S1. Obtain fog images under different environments, preprocess the fog images, construct a dataset based on the preprocessed fog images, extract features from each sample in the dataset through histogram statistics and gray-level co-occurrence matrix, and label each sample with real labels for uniform fog and non-uniform fog based on the extracted features.
[0057] Step S1 in this embodiment of the invention specifically includes:
[0058] Foggy images under different environments are acquired. The foggy images are then subjected to pixel size unification, pixel depth unification, pixel normalization, and data augmentation processing in sequence to obtain preprocessed foggy images. A dataset is constructed based on the preprocessed foggy images. Histogram statistics and gray-level co-occurrence matrix are used to extract the histogram range and energy value of each sample in the dataset. Based on the histogram range and the energy value, the true label of the sample is marked as uniform fog or non-uniform fog.
[0059] In this embodiment of the invention, the fog image includes a uniform fog image and a non-uniform fog image. First, the pixel size of the fog image is adjusted to a 224×224×3 RGB image through edge pixel filling, redundant background removal, and bilinear interpolation scaling to ensure the consistency of the fog image. Second, the pixel bit depth of the fog image is adjusted to 8 bits to limit the pixel range to the range of 0 to 255, reducing computational complexity. Then, the pixel range is normalized using a linear transformation, mapping it to the range of 0 to 1 to reduce scale interference during the descent process and improve the model convergence speed and generalization ability. Finally, the fog image is randomly rotated, translated, and flipped to expand the number and diversity of fog images.
[0060] The histogram range for each sample, i.e., the difference between the maximum and minimum values in the histogram, is used to measure the pixel intensity distribution. A larger value indicates a more dispersed pixel intensity distribution, and vice versa. The gray-level co-occurrence matrix is used to calculate the energy value for each sample, which reflects the texture uniformity of the sample. The energy value ranges from 0 to 1; a higher value indicates a more uniform texture, and vice versa. For a uniform fog image, the pixel intensity distribution is relatively concentrated and exhibits a uniform texture, while in a non-uniform fog image, the pixel intensity distribution is dispersed and exhibits a complex, non-uniform texture.
[0061] The histogram threshold is set to 16000 and the energy value threshold is set to 0.075. If the histogram range of the sample is greater than the histogram threshold and the energy value is lower than the energy value threshold, then the sample's true label is marked as non-uniform fog; otherwise, it is marked as uniform fog.
[0062] This step uses the histogram statistics and the gray-level co-occurrence matrix to comprehensively judge the uniformity of the sample from two perspectives: pixel intensity distribution and texture uniformity. This avoids the one-sidedness of a single judgment method, thereby obtaining the true label of the sample more accurately and providing reliable verification for subsequent model optimization and output.
[0063] S2. Construct a fog map classification model based on a convolutional neural network to obtain the predicted labels of uniform fog and non-uniform fog corresponding to the sample.
[0064] Step S2 in this embodiment of the invention specifically includes:
[0065] A fog map classification model is constructed based on the ResNet50 convolutional neural network. It includes an input layer, a convolutional layer, a max pooling layer, a residual block group, a global average pooling layer, and a fully connected layer. The input layer is used to receive the samples. The convolutional layer is used to initially extract the basic visual features of the samples. The max pooling layer is used to reduce the spatial dimension of the feature map. The residual block group is used to extract the depth features of the samples hierarchically. The global average pooling layer is used to aggregate the spatial dimension of the feature map. The fully connected layer is used to output the predicted label of uniform fog or non-uniform fog corresponding to the samples.
[0066] In the embodiments of the present invention, please refer to Figure 2 As shown, the input layer is used to receive the sample with a pixel size of 224×224×3 and input it into the fog map classification model.
[0067] The convolutional layer uses a 7×7×64 kernel with a stride of 2 to perform preliminary extraction of basic visual features such as edges and textures of the sample. Its output is a 112×112×64 feature map.
[0068] The max pooling layer uses a 3×3 pooling kernel with a stride of 2 to reduce the spatial dimension of the feature map and output a 56×56×64 feature map, aiming to reduce computation while retaining the maximum feature information.
[0069] The residual block group is used to extract the depth features of the sample hierarchically. It includes a first residual group, a second residual group, a third residual group, and a fourth residual group. Each residual group is composed of residual blocks. The residual blocks adopt a Bottleneck structure of "1×1 convolutional layer-3×3 convolutional layer-1×1 convolutional layer", and the residual blocks are connected by skip connections to alleviate the gradient vanishing problem.
[0070] The first residual group includes 64 input channels, 256 output channels, and 3 residual blocks, which are used to extract the basic distribution features of the fog concentration of the sample. The basic distribution features include the coverage range and regional distribution of the fog concentration, while maintaining the size of the feature map at 56×56×256.
[0071] The second residual group includes 256 input channels, 512 output channels, and 4 residual blocks, which are used to enhance the gradient capture of the fog concentration. The gradient represents the rate of change of the fog concentration in the sample space. The feature map is downsampled by setting a stride of 2 and the size of the feature map is converted to 28×28×512.
[0072] The third residual group includes 512 input channels, 1024 output channels, and 6 residual blocks, which are used to learn the complex features of fog concentration and scene interaction. The complex features include the difference of fog concentration at different scene depths. The convolution with a stride of 2 is set to further downsample, reducing the size of the feature map to 14×14×1024.
[0073] The fourth residual group includes 1024 input channels, 2048 output channels, and 3 residual blocks, which are designed to focus on the differential features of the global fog concentration distribution. The differential features include significant difference regions in the global fog concentration distribution, and the size of the feature map is compressed to 7×7×2048.
[0074] The global average pooling layer mainly aggregates the spatial dimensions of the feature map output by the fourth residual group, transforms the size of the feature map into 1×1×2048, enhances the expression of the overall distribution characteristics of the fog concentration in the sample, and then uses a flattening operation to obtain a 1×2048 global feature vector.
[0075] The fully connected layer includes a first connected layer, a Dropout layer, a second connected layer, and an output layer, which is used to output the predicted label corresponding to the sample.
[0076] The first connection layer introduces a nonlinear transformation through the ReLU activation function, mapping the global feature vector to 1024 dimensions, further mining key features related to the sample, and strengthening the expression of information such as the distribution of fog concentration in the sample.
[0077] The Dropout layer is used to adjust the degree of fitting of local details of the sample. Its Dropout rate is set to 0.5 to improve the model's generalization ability.
[0078] The second connection layer further compresses the global feature vector to 256 dimensions and uses the ReLU activation function to maintain its nonlinear characteristics. This aims to reduce the number of parameters while focusing on retaining strongly correlated core features, thereby enhancing the discriminativeness and compactness of the features.
[0079] The output layer comprises two neurons, which generate probability values p0 and p1 using the sigmoid activation function. p0 and p1 represent the probabilities that the predicted label is non-uniform fog and uniform fog, respectively, and both values range from (0,1), with a sum of 1. The closer p0 is to 1, the more likely the predicted label is non-uniform fog; conversely, the closer p1 is to 1, the more likely the predicted label is uniform fog.
[0080] This step constructs the fog image classification model using the ResNet50 convolutional neural network, achieving accurate feature extraction of the samples. At the same time, the residual block group and the skip connection are used to ensure the stability of the features, which can effectively distinguish subtle uniformity differences in the foggy image. Combined with the Sigmoid activation function, the predicted label of the sample is obtained.
[0081] S3. The dataset is randomly divided into a training set and a test set according to a certain ratio. The fog map classification model is iteratively trained using the training set. A loss function is constructed based on the confidence of the predicted label. The loss function is used to calculate the loss value and optimize the fog map classification model during the iterative training process until the fog map classification model meets the preset performance evaluation criteria.
[0082] Step S3 in this embodiment of the invention specifically includes:
[0083] The dataset is randomly divided into a training set and a test set in an 8:2 ratio. The fog map classification model is trained using the training set. The probability p1 of the predicted label being uniform fog is set as the confidence level. The prior weights of uniform fog and non-uniform fog in the training set are obtained. A loss function is constructed by calculating the binary cross-entropy of the confidence level and the prior weights. The trained fog map classification model is optimized using the loss function. A maximum number of iterations is set and an early stopping mechanism is introduced to obtain the trained fog map classification model. The test set is input into the trained fog map classification model to obtain the degree of agreement between the predicted label and the true label. By setting a degree of agreement threshold, the trained fog map classification model is obtained.
[0084] The loss function L described in this embodiment OSS The expression is:
[0085]
[0086] In the formula, N TN y represents the total number of training samples, i.e., the number of samples in the training set. i This represents the true label of the i-th sample, and its value is either 0 or 1, where 0 and 1 represent the true label as non-uniform fog and uniform fog, respectively. This represents the confidence level p1. and Both represent the prior weights used to adjust the loss contribution, where N1 is the total number of samples in the training set whose true label is the non-uniform fog, and N2 is the total number of samples in the training set whose true label is the uniform fog.
[0087] The Adam optimizer was selected as the optimization algorithm during training. The learning rate of the Adam optimizer was set to 1e-4, the decay rate for first-order moment estimation was set to 0.9, the decay rate for second-order moment estimation was set to 0.999, and the numerical stability parameter was set to 1e-7. The parameters of the Adam optimizer were dynamically adjusted after each round of training iterations.
[0088] The batch size is set to 32 and the maximum number of iterations is set to 200. An early stopping mechanism is introduced during the iterative training process to prevent overfitting. The early stopping mechanism includes stopping the iterative training if the loss value of the loss function does not decrease in 10 consecutive rounds of iterative training, saving the current optimal model parameters, and obtaining the trained fog map classification model. Otherwise, the parameters of the last round of iteration are used as the model parameters of the trained fog map classification model.
[0089] The test set is input into the trained fog map classification model to generate the predicted label corresponding to the sample in the test set. The proportion of the total number of samples in the test set whose predicted label and the true label are the same to the total number of samples in the test set is used as the degree of fit.
[0090] The matching degree threshold is set to 90%. If the matching degree exceeds the matching degree threshold, the trained fog map classification model is obtained; otherwise, the iterative training is re-executed.
[0091] The expression for the degree of fit is:
[0092]
[0093] In the formula, N TS F represents the total number of test samples, that is, the total number of samples in the test set. R This represents the total number of samples in the test set whose predicted labels and true labels are the same.
[0094] This step constructs the loss function by calculating the confidence score of the predicted label and the binary cross-entropy of the prior weights. This enables the calculation and feedback optimization of the loss value for the fog map classification model, effectively addressing the problem of imbalanced proportions of different classes in the samples. It prevents the model from biasing towards predicting the class with a larger proportion during iterative training, while ignoring the other class, thus improving the model's accurate recognition ability. The consistency score can be used to effectively evaluate the performance of the fog map classification model, truly reflecting its generalization ability and verifying its reliability and stability.
[0095] This invention acquires foggy images under different environments, preprocesses them to construct a dataset, and extracts the histogram range and energy value of each sample in the dataset through histogram statistics and gray-level co-occurrence matrix, thereby achieving true labeling of each sample for uniform fog and non-uniform fog. A fog image classification model is constructed using a convolutional neural network, and a binary cross-entropy is calculated using the confidence of the predicted label and prior weights to construct a loss function. The loss value of the fog image classification model is calculated and feedback optimization is performed until the fog image classification model meets the preset performance evaluation criteria, and the predicted label corresponding to each sample is output, thereby achieving accurate discrimination between uniform fog images and non-uniform fog images.
[0096] This method uses histogram statistics and gray-level co-occurrence matrix to label samples from two perspectives: pixel intensity distribution and texture uniformity. This avoids the one-sidedness of a single discrimination method. By constructing a loss function through binary cross-entropy calculation, the fog image classification model is optimized, thereby achieving accurate discrimination of uniformity in foggy images and providing strong support for the accurate adaptation of image dehazing algorithms.
[0097] The following describes a fog environment uniformity discrimination system provided by the present invention. The fog environment uniformity discrimination system described below and the fog environment uniformity discrimination method described above can be compared and referenced with each other.
[0098] Please see Figure 3 As shown, it includes: a data annotation module 31, a model training module 32, and a model optimization module 33, wherein:
[0099] Data labeling module: used to extract features from each sample in the dataset through histogram statistics and gray-level co-occurrence matrix, and to label each sample with the true labels of uniform fog and non-uniform fog based on the extracted features;
[0100] Model training module: used to input the dataset into the fog map classification model for iterative training, and obtain the predicted labels of uniform fog and non-uniform fog corresponding to each sample;
[0101] Model optimization module: used to construct a loss function based on the confidence of the predicted label, and use the loss function to calculate the loss value and optimize the fog map classification model during iterative training until the fog map classification model meets the preset performance evaluation criteria.
[0102] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of the present invention.
Claims
1. A method for determining the uniformity of a fog environment, characterized in that, The method includes: By using histogram statistics and gray-level co-occurrence matrix, features are extracted from each sample in the dataset, and the extracted features are used to label each sample with true labels for uniform fog and non-uniform fog. The histogram range and energy value of each sample are obtained by using the histogram statistics and the gray-level co-occurrence matrix, respectively. For samples whose histogram range is greater than the histogram threshold and whose energy value is less than the energy value threshold, their true labels are marked as non-uniform fog; otherwise, they are marked as uniform fog. The dataset is input into the fog map classification model for iterative training to obtain the predicted labels of uniform fog and non-uniform fog for each sample; A loss function is constructed based on the confidence of the predicted label. The loss function is used to calculate the loss value and optimize the fog map classification model during iterative training until the fog map classification model meets the preset performance evaluation criteria.
2. The method according to claim 1, characterized in that, Before extracting features from each sample in the dataset using histogram statistics and gray-level co-occurrence matrix, the method further includes: For each sample, pixel size uniformity, pixel bit depth uniformity, pixel normalization and data augmentation are performed sequentially. The data augmentation includes random rotation, translation and flipping operations.
3. The method according to claim 1, characterized in that, The method further includes: The fog map classification model includes an input layer, a convolutional layer, a max pooling layer, a residual block group, a global average pooling layer, and a fully connected layer. The input layer is used to receive the sample; The convolutional layer is used to initially extract the basic visual features of the sample; The max pooling layer is used to reduce the spatial dimension of the feature map; The residual block group is used to extract the depth features of the sample hierarchically; The global average pooling layer is used to aggregate the spatial dimensions of the feature map; The fully connected layer is used to output the predicted label.
4. The method according to claim 3, characterized in that, The method further includes: The residual block group includes a first residual group, a second residual group, a third residual group, and a fourth residual group; The first residual set is used to extract the basic distribution characteristics of the fog concentration of the sample; The second residual set is used to enhance gradient capture of the fog concentration; The third residual set is used to learn the complex features of the fog concentration and scene interaction; The fourth residual group is used to focus on the differential characteristics of the global fog concentration distribution.
5. The method according to claim 1, characterized in that, The loss function constructed based on the confidence of the predicted label includes: The confidence level is defined as the probability that the predicted label is the uniform fog. Obtain the prior weights of the uniform fog and the non-uniform fog in the real labels; The loss function is constructed by calculating the binary cross-entropy of the confidence level and the prior weights.
6. The method according to claim 5, characterized in that, The method further includes: The prior weights include the ratio of the total number of training samples to the total number of samples whose true label is the non-uniform fog, and the ratio of the total number of training samples to the total number of samples whose true label is the uniform fog.
7. The method according to claim 1, characterized in that, The method further includes: The maximum number of iterations in the iterative training process is set to 200; An early stopping mechanism is introduced during the iterative training process. The early stopping mechanism includes stopping the iterative training when the loss value of the loss function does not decrease during 10 consecutive rounds of iterative training. The preset performance evaluation criteria include triggering the early stop mechanism before reaching the maximum number of iterations or fully executing to the maximum number of iterations, then terminating the iterative training process, evaluating whether the matching degree of the predicted label exceeds the matching degree threshold, and if it does not exceed it, returning to re-execute the iterative training process.
8. The method according to claim 7, characterized in that, The method further includes: The degree of fit includes the proportion of the total number of samples with the same predicted label and the same true label to the total number of test samples.
9. A fog environment uniformity discrimination system, characterized in that, For performing the method as described in any one of claims 1 to 8, comprising: Data labeling module: used to extract features from each sample in the dataset through histogram statistics and gray-level co-occurrence matrix, and to label each sample with the true labels of uniform fog and non-uniform fog based on the extracted features; The histogram range and energy value of each sample are obtained by using the histogram statistics and the gray-level co-occurrence matrix, respectively. For samples whose histogram range is greater than the histogram threshold and whose energy value is less than the energy value threshold, their true labels are marked as non-uniform fog; otherwise, they are marked as uniform fog. Model training module: used to input the dataset into the fog map classification model for iterative training, and obtain the predicted labels of uniform fog and non-uniform fog corresponding to each sample; Model optimization module: used to construct a loss function based on the confidence of the predicted label, and use the loss function to calculate the loss value and optimize the fog map classification model during iterative training until the fog map classification model meets the preset performance evaluation criteria.
Citation Information
Patent Citations
Particle material mixing uniformity detection method based on image statistical characteristics and LSTM composite network
CN112686881A