Human body recognition method in indoor fire smoke scene
Through Gaussian pyramid and multi-scale Retinex color recovery processing, YOLO v8 neural network and non-maximum suppression technology, the problem of image quality reduction in fire smoke environments is solved, and efficient human body recognition and accuracy of detection results is achieved.
Patent Information
- Application Number
- CN202411106942.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-13
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-08-13
AI Technical Summary
In fire scenes, thick smoke occlusion significantly reduces image quality and affects the detection of trapped people. Traditional image enhancement algorithms such as histogram equalization and dark channel prior methods have limited effects when dealing with smoke environments.
The Gaussian pyramid construction is used to reduce the dimensionality of data, and combined with multi-scale Retinex color recovery processing, black smoke removal threshold processing is introduced, image features are extracted using YOLO v8 neural network, human detection is performed, and non-maximum suppression is performed to remove redundancy. Detection box.
Effectively remove thick smoke, improve image sharpening enhancement, and significantly improve the accuracy of human body recognition in complex environments, accuracy and efficiency of detection results.
Smart Images

Figure CN118968557A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent fire monitoring, and in particular to a human body recognition method in an indoor fire smoke scene. Background Art
[0002] In a fire scene, the occlusion of thick smoke significantly reduces the image quality, thus affecting the detection of trapped people. Traditional image enhancement algorithms, such as histogram equalization and dark channel prior methods, have limited effect when processing images in a smoky environment. Although the histogram equalization algorithm can improve the contrast of the image, it is not effective under thick smoke occlusion; the dark channel prior method has a certain effect in defogging, but its performance is still insufficient in complex fire environments. Summary of the invention
[0003] The present invention discloses a human body recognition method in an indoor fire smoke scene, and the specific method is as follows:
[0004] Obtain fire images;
[0005] Construct a Gaussian pyramid with fire images to reduce data dimensionality;
[0006] Perform multi-scale Retinex color restoration on the reduced-dimensional image;
[0007] In the multi-scale Retinex color restoration process, black smoke removal threshold processing is introduced;
[0008] Use YOLO v8 neural network to extract image features and perform human body detection;
[0009] The detection results are processed by non-maximum suppression to remove redundant detection frames and obtain the final human detection results.
[0010] Furthermore, a Gaussian pyramid is constructed, and the specific formula is as follows:
[0011]
[0012] Where p is the order of the Gaussian pyramid; G p (x, y) represents the p-order pyramid filtered image, and F(u, v) represents the Gaussian envelope function.
[0013] Furthermore, multi-scale Retinex color restoration processing is performed on the reduced-dimensional image. The specific method is as follows:
[0014] Input the reduced dimension image, convert the input image to floating point type, normalize it to the [0,1] interval and perform logarithmic transformation on each channel of the input image:
[0015] L(x,y,c)=log(I(x,y,c))
[0016] Where I(x,y,c) is the pixel value of the cth channel at the input image position (x,y), and L(x,y,c) is the pixel value after logarithmic transformation;
[0017] Convolve the image using Gaussian filters of different scales to obtain images of different scales:
[0018] F x (x,y,c,s)=L(x,y,c)-log(G s *I(x,y,c)
[0019] In the formula, G s represents a Gaussian filter of scale s, F s (x, y, c) are Retinex outputs at different scales;
[0020] The results of each scale are weighted summed to obtain the multi-scale Retinex output image:
[0021]
[0022] In the formula, ω s is the weight of the corresponding scale, satisfying It is the output after multi-scale Retinex processing.
[0023] Furthermore, black smoke removal threshold processing is introduced, and the specific method is as follows:
[0024] Calculate the color restoration gain coefficient:
[0025] C(x,y,c)=log(αI(x,y,c)+β)
[0026] Where α and β are the adjustment parameters for color restoration, and the gain coefficient is used to calculate the image. This coefficient is used to adjust the brightness and contrast of the image during the color restoration process;
[0027] Set the adaptive black smoke removal threshold:
[0028] τ(x,y,c)=τ0+k·σ(I(x,y,c))
[0029] τ0 is the basic threshold value, k is the adjustment coefficient representing the standard deviation of the pixel values in the local area; σ(I(x,y,c)) can dynamically adjust the threshold value according to the local characteristics of the image by combining the adaptive threshold. The initial black threshold value can be set in the range of [5,50];
[0030] Calculate the gain factor after threshold processing:
[0031] G′(x,y,c)=max(G(x,y,c)-τ(x,y,c),0)
[0032] Where G′(x,y,c) is the gain coefficient after threshold processing; the gain coefficient below the threshold τ is set to 0;
[0033] Perform color restoration and inverse logarithmic transformation on the multi-scale Retinex output image:
[0034] C(x,y,z)=R(x,y,z)·G′(x,y,c)
[0035] O(x,y,c)=exp(C(x,y,c))-1
[0036] Where C(x, y, c) is the image after color restoration and threshold processing, and the improved gain coefficient G′(x, y, c) is used for the final adjustment of the image; O(x, y, c) represents the enhanced output image, which is restored to the linear domain after inverse logarithmic transformation.
[0037] Furthermore, the image features are extracted using the YOLO v8 neural network. The specific method is as follows:
[0038] Perform feature extraction on the image after color restoration to generate a feature map, input the preprocessed enhanced image I, and output the feature image F based on the feature extraction module of the neural network;
[0039] F=FeatureExtractor(I)
[0040] In the formula, FeatureExtractor represents the feature extraction module of the neural network, which is used to extract multi-level feature information from the input image;
[0041] The feature map F is processed by the detection head, and the bounding box B and its corresponding confidence score C and category label L are output;
[0042] (B,C,L)=DetectionHead(F)
[0043] Where DetectionHead represents the detection head module, which processes the feature map to generate bounding boxes, confidence scores, and category labels.
[0044] Furthermore, the detection results are subjected to non-maximum suppression processing, and the specific method is as follows:
[0045] Sort bounding boxes B by confidence score C, input bounding box set B and corresponding confidence score C, and output bounding box B sorted by confidence score s ;
[0046] B s =Sort(B,C)
[0047] In the formula, Sort indicates the sorting operation, which sorts the bounding boxes in descending order according to the confidence scores;
[0048] Starting from the bounding box with the highest confidence, process each bounding box in turn; if the current bounding box overlaps with a higher confidence bounding box, that is, the IoU is greater than the set threshold, then suppress the current bounding box and input the sorted bounding box B s , after processing, the output suppression bounding box B n ;
[0049]
[0050] IoU(b i ,b j )=b i ∩b j / b i ∪b j
[0051] Where NMS represents the non-maximum suppression operation, which is used to remove bounding boxes that overlap with higher confidence bounding boxes, that is, bounding boxes whose IoU is greater than the set threshold, and IoU represents the overlap measure between two bounding boxes.
[0052] Furthermore, the final detection results are post-processed and visualized. The specific method is as follows:
[0053] Input the bounding box B after non-maximum suppression processing n , confidence score C and category label L, filter, optimize and format the processed results to output the final detection result R;
[0054] R = PostProcess(B n , C, L)
[0055] Input the final detection result R and the original image I, and draw the final detection result on the original image to generate a visualization image V;
[0056] V=Visualize(I,R)
[0057] In the formula, Visualize represents the visualization operation, which draws the final detection result on the original image to generate a visualized image.
[0058] Due to the adoption of the above technical solution, the present invention has the following beneficial effects:
[0059] 1. The multi-scale Retinex color restoration algorithm constructed by the Gaussian pyramid in the present invention can effectively remove the dense smoke in the fire smoke environment and enhance the image sharpness. By constructing a Gaussian pyramid to continuously perform Gaussian filtering and Gaussian dimension reduction on the image, the image processing speed is greatly improved, which is more than 25 times faster than the simple multi-scale Retinex algorithm.
[0060] 2. Through the improved YOLO v8 algorithm, a deeper network can be added to the Backbone part to obtain more features, a more complex multi-scale feature fusion method can be introduced in the Neck part, more detection heads can be added to the DetectionHead part to improve the detection accuracy, and a more optimized NMS algorithm and post-processing steps can be introduced to improve the accuracy of the final detection results.
[0061] 3. The efficient human body recognition method in indoor fire and smoke scenes adopted by the present invention can improve the accuracy of human body recognition in complex environments.
[0062] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings of the present invention are as follows.
[0064] Figure 1 is the overall flow chart of the method;
[0065] Figure 2 Construct MSRCR for Gaussian pyramid and introduce black smoke removal threshold processing flow chart;
[0066] Figure 3 This is the YOLO v8 network architecture diagram;
[0067] Figure 4 This is an example of a fire and smoke scene;
[0068] Figure 5 This is a visualization example of a fire smoke scene before image processing;
[0069] Figure 6 This is a visualization example of an image processed in a fire smoke scene; DETAILED DESCRIPTION
[0070] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0071] A human body recognition method in indoor fire smoke scene, such as Figure 1 As shown, the specific steps are as follows:
[0072] S1. Obtain fire images.
[0073] S2. Construct a Gaussian pyramid based on the fire image to perform data dimensionality reduction.
[0074] like Figure 2 As shown, in step S2, a Gaussian pyramid function is constructed to filter and reduce the dimension of the image. The specific formula is as follows:
[0075]
[0076] Where p is the order of the Gaussian pyramid; G p (x, y) represents the p-order pyramid filtered image, and F(u, v) represents the Gaussian envelope function.
[0077] Input the reduced dimension image and perform logarithmic transformation on each channel of the input image:
[0078] L(x,y,c)=log(I(x,y,c))
[0079] Where I(x,y,c) is the pixel value of the cth channel at the input image position (x,y), and L(x,y,c) is the pixel value after logarithmic transformation.
[0080] S3. Perform multi-scale Retinex color restoration processing on the image after dimensionality reduction.
[0081] In step S3, the specific processing method is as follows:
[0082] S31. Use Gaussian filters of different scales to convolve the image to obtain images of different scales:
[0083] F x (x,y,c,s)=L(x,y,c)-log(G s *I(x,y,c)
[0084] In the formula, G s represents a Gaussian filter of scale s, F s (x, y, c) are Retinex outputs at different scales.
[0085] S32. Perform weighted summation on the results of each scale to obtain a multi-scale Retinex output image:
[0086]
[0087] In the formula, ω s is the weight of the corresponding scale, satisfying It is the output after multi-scale Retinex processing.
[0088] S4. During the multi-scale Retinex color restoration process, black smoke removal threshold processing is introduced.
[0089] In step S4, the color restoration step includes calculating the gain coefficient and performing color restoration on the Retinex output image. The specific method is as follows:
[0090] S41, calculate the color restoration gain coefficient:
[0091] C(x,y,c)=log(αI(x,y,c)+β)
[0092] Where α and β are the adjustment parameters for color restoration, and β is used to calculate the gain coefficient of the image. This coefficient is used to adjust the brightness and contrast of the image during the color restoration process.
[0093] S42. Set adaptive black smoke removal threshold:
[0094] τ(x,y,c)=τ0+k·σ(I(x,y,c))
[0095] τ0 is the basic threshold value, k is the adjustment coefficient representing the standard deviation of the pixel values in the local area. σ(I(x,y,c)) can dynamically adjust the threshold value according to the local characteristics of the image by combining the adaptive threshold. The initial black threshold value can be in the range of [5,50].
[0096] S43, calculate the gain coefficient after threshold processing:
[0097] G′(x,y,c)=max(G(x,y,c)-τ(x,y,c),0)
[0098] Among them, G′(x, y, c) is the gain coefficient after threshold processing. This step sets the gain coefficient below the threshold τ to 0, thereby reducing the impact of black smoke on image enhancement.
[0099] S44. Perform color restoration and inverse logarithmic transformation on the multi-scale Retinex output image:
[0100] C(x,y,z)=R(x,y,z)·G′(x,y,c)
[0101] O(x,y,c)=exp(C(x,y,c))-1
[0102] Where C(x,y,c) is the image after color restoration and threshold processing. The improved gain coefficient G′(x,y,c) is used for the final adjustment of the image. O(x,y,c) represents the enhanced output image. After inverse logarithmic transformation, it is restored to the linear domain for further processing and analysis, and finally the image after smoke removal is obtained.
[0103] S5. Use YOLO v8 neural network to extract image features and perform human body detection.
[0104] Step S5 is as follows Figure 3 As shown, the specific method is as follows:
[0105] S51, extracting features from the preprocessed enhanced image to generate a feature map. The preprocessed enhanced image I is input, and a feature extraction module based on a neural network outputs a feature image F;
[0106] F=FeatureExtractor(I)
[0107] In the formula, FeatureExtractor represents the feature extraction module of the neural network, which is used to extract multi-level feature information from the input image.
[0108] S52, processing the feature map F through the detection head, and outputting the bounding box B and its corresponding confidence score C and category label L;
[0109] (B,C,L)=DetectionHead(F)
[0110] Where DetectionHead represents the detection head module, which processes the feature map to generate bounding boxes, confidence scores, and category labels.
[0111] S6. Perform non-maximum suppression processing on the detection results to remove redundant detection frames and obtain the final human body detection results.
[0112] In step S6, the specific steps are as follows:
[0113] S61, sort the bounding boxes B by confidence score C, input the bounding box set B and the corresponding confidence score C, and output the bounding box B sorted by confidence score s ;
[0114] B s =Sort(B,C)
[0115] Where Sort represents the sorting operation, which sorts the bounding boxes in descending order according to the confidence scores.
[0116] S62, starting from the bounding box with the highest confidence, process each bounding box in turn. If the current bounding box overlaps with a bounding box with a higher confidence, that is, the IoU is greater than the set threshold, the current bounding box is suppressed. Input the sorted bounding box B s , after processing, the output suppression bounding box B n ;
[0117]
[0118] IoU(b i ,b j )=b i ∩b j / b i ∪b j
[0119] Where NMS represents the non-maximum suppression operation, which is used to remove bounding boxes that overlap with higher confidence bounding boxes, and IoU represents the overlap measure between two bounding boxes.
[0120] S7. Post-process and visualize the final detection results.
[0121] In step S7, the specific method is as follows:
[0122] S71. Input the bounding box B after NMS processing n , confidence score C and category label L, filter, optimize and format the processed results to output the final detection result R:
[0123] R = PostProcess(B n , C, L)
[0124] Where PostProcess represents the post-processing operation, including screening, optimization and formatting of the detection results.
[0125] S72, input the final detection result R and the original image I, and draw the final detection result on the original image to generate a visual image V:
[0126] V=Visualize(I,R)
[0127] In the formula, Visualize represents the visualization operation, which draws the final detection result on the original image to generate a visualized image.
[0128] In this embodiment, if Figure 4 , 5 , 6, Figure 4 is the original image, Figure 5 is the visualization image before image processing, Figure 6 is the visualized image after image processing. Figure 4 The image confidence is greatly improved by constructing MSRCR processing with Gaussian pyramid and then recognizing it with the improved YOLO v8 algorithm. Figure 5 The person detection on the far left is not obvious. After image processing and visualization, Figure 6 The image details and contrast of the leftmost detected person have been processed, which greatly improves the recognition efficiency.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A human body recognition method in an indoor fire smoke scene, characterized in that: The specific method is as follows: Obtain fire images; Construct a Gaussian pyramid with fire images to reduce data dimensionality; Perform multi-scale Retinex color restoration on the reduced-dimensional image; In the multi-scale Retinex color restoration process, black smoke removal threshold processing is introduced; Use YOLO v8 neural network to extract image features and perform human body detection; The detection results are processed by non-maximum suppression to remove redundant detection frames and obtain the final human detection results.
2. The human body recognition method in an indoor fire smoke scene according to claim 1, characterized in that: Construct a Gaussian pyramid. The specific formula is as follows: Where p is the order of the Gaussian pyramid; G p (x, y) represents the p-order pyramid filtered image, and F(u, v) represents the Gaussian envelope function.
3. The human body recognition method in an indoor fire smoke scene according to claim 1, characterized in that: Perform multi-scale Retinex color restoration on the reduced-dimensional image. The specific method is as follows: Input the reduced dimension image, convert the input image to floating point type, normalize it to the [0,1] interval and perform logarithmic transformation on each channel of the input image: L(x,y,c)=log(I(x,y,c)) Where I(x,y,c) is the pixel value of the cth channel at the input image position (x,y), and L(x,y,c) is the pixel value after logarithmic transformation; Convolve the image using Gaussian filters of different scales to obtain images of different scales: F x (x,y,c,s)=L(x,y,c)-log(G s *I(x,y,c)) In the formula, G s represents a Gaussian filter of scale s, F s (x, y, c) are Retinex outputs at different scales; The results of each scale are weighted summed to obtain the multi-scale Retinex output image: In the formula, ω s is the weight of the corresponding scale, satisfying It is the output after multi-scale Retinex processing.
4. The human body recognition method in an indoor fire smoke scene according to claim 3, characterized in that: Introduce black smoke removal threshold processing, the specific method is as follows: Calculate the color restoration gain coefficient: C(x,y,c)=log(αI(x,y,c)+β) Where α and β are the adjustment parameters for color restoration, and the gain coefficient is used to calculate the image. This coefficient is used to adjust the brightness and contrast of the image during the color restoration process; Set the adaptive black smoke removal threshold: τ(x,y,c)=τ0+k·σ(I(x,y,c)) τ0 is the basic threshold value, k is the adjustment coefficient representing the standard deviation of the pixel values in the local area; σ(I(x,y,c)) can dynamically adjust the threshold value according to the local characteristics of the image by combining the adaptive threshold. The initial black threshold value can be set in the range of [5,50]; Calculate the gain factor after threshold processing: G′(x,y,c)=max(G(x,y,c)-τ(x,y,c),0) Where G′(x,y,c) is the gain coefficient after threshold processing; the gain coefficient below the threshold τ is set to 0; Perform color restoration and inverse logarithmic transformation on the multi-scale Retinex output image: C(x,y,z)=R(x,y,z)·G′(x,y,c) O(x,y,c)=exp(C(x,y,c))-1 Where C(x, y, c) is the image after color restoration and threshold processing, and the improved gain coefficient G′(x, y, c) is used for the final adjustment of the image; O(x, y, c) represents the enhanced output image, which is restored to the linear domain after inverse logarithmic transformation.
5. The human body recognition method in an indoor fire smoke scene according to claim 1, characterized in that: The image features are extracted using the YOLO v8 neural network. The specific method is as follows: Perform feature extraction on the image after color restoration to generate a feature map, input the preprocessed enhanced image I, and output the feature image F based on the feature extraction module of the neural network; F=FeatureExtractor(I) In the formula, FeatureExtractor represents the feature extraction module of the neural network, which is used to extract multi-level feature information from the input image; The feature map F is processed by the detection head, and the bounding box B and its corresponding confidence score C and category label L are output; (B,C,L)=DetectionHead(F) Where DetectionHead represents the detection head module, which processes the feature map to generate bounding boxes, confidence scores, and category labels.
6. The human body recognition method in an indoor fire smoke scene as claimed in claim 5, characterized in that: The detection results are processed by non-maximum suppression. The specific method is as follows: Sort bounding boxes B by confidence score C, input bounding box set B and corresponding confidence score C, and output bounding box B sorted by confidence score s ; B s =Sort(B,C) In the formula, Sort indicates the sorting operation, which sorts the bounding boxes in descending order according to the confidence scores; Starting from the bounding box with the highest confidence, process each bounding box in turn; if the current bounding box overlaps with a higher confidence bounding box, that is, the IoU is greater than the set threshold, then suppress the current bounding box and input the sorted bounding box B s , after processing, the output suppression bounding box B n ; IoU(b i ,b j )=b i ∩b j / b i ∪b j Where NMS represents the non-maximum suppression operation, which is used to remove bounding boxes that overlap with higher confidence bounding boxes, that is, bounding boxes whose IoU is greater than the set threshold, and IoU represents the overlap measure between two bounding boxes.
7. The human body recognition method in an indoor fire smoke scene according to claim 1, characterized in that: It also includes post-processing and visualization of the final detection results. The specific methods are as follows: Input the bounding box B after non-maximum suppression processing n , confidence score C and category label L, filter, optimize and format the processed results to output the final detection result R; R=PostProcess(B n ,C,L) Input the final detection result R and the original image I, and draw the final detection result on the original image to generate a visualization image V; V=Visualize(I,R) In the formula, Visualize represents the visualization operation, which draws the final detection result on the original image to generate a visualized image.
Citation Information
Patent Citations
Target detection and image definition combined learning method based on multi-scale feature fusion
CN113537397A
Image enhancement method and system
US20080101719A1
Cited By
Human body recognition method and system in dense smoke environment, electronic equipment and medium
CN120126185A
A method, system, electronic device and medium for human body recognition in a thick smoke environment
CN120126185B
