An algorithm for detecting the furnace cover of a magnesium reduction furnace in a large and complex environment
By simulating complex scenarios in magnesium reduction furnace cover inspection and using the lightweight MobileNetV3 network combined with the frame difference method, the technical problem of low image clarity that has not been effectively addressed in existing technologies during magnesium production was solved, thus achieving high-precision furnace cover inspection and automated control.
Patent Information
- Application Number
- CN202310158788.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-23
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2043-02-23
AI Technical Summary
In the magnesium production process, the complex working environment leads to low image clarity of the magnesium reduction furnace cover, affecting the detection accuracy and misleading the operation of dust collection vehicles. Existing technologies suffer from high labor costs and inaccurate position control.
Image preprocessing is used to simulate complex multi-target scenarios. The lightweight MobileNetV3 network is used to replace the yolov5s backbone network. The furnace cover status is determined by combining the specific frame difference method, thereby improving the detection accuracy.
It improves the accuracy of furnace cover recognition, reduces the amount of model calculation and storage requirements, and provides technical support for the fully automatic intelligent control of dust collection vehicles.
Smart Images

Figure CN116363475B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and specifically to a detection algorithm, namely, a detection algorithm for the furnace cover of a magnesium reduction furnace in a large and complex scene. Background Technology
[0002] The furnace tapping and slag removal processes in magnesium production generate significant amounts of dust pollutants, easily causing air pollution and harming the health of workers. Existing dust collection vehicles in magnesium production workshops can effectively handle dust pollutants, but their location control relies on manual scheduling, resulting in high labor costs, inaccurate location control, and limited working hours. An improved fully automated intelligent control device, using an intelligent detection module to monitor the status of the magnesium reduction furnace cover and guide the dust collection vehicle to the furnace opening area, can effectively improve work efficiency. However, the complexity of the actual working environment in magnesium plants, such as angles, lighting, and dust, can lead to obstructed vision, low environmental visibility, and insufficient lighting, affecting the clarity of the furnace cover image, reducing the accuracy of furnace cover detection, and misleading the dust collection vehicle's operation. Summary of the Invention
[0003] To address the shortcomings and deficiencies of existing technologies, the present invention aims to provide an algorithm for detecting the furnace cover of a magnesium reduction furnace in a large-space, complex scene. This method first uses image preprocessing to simulate a multi-target complex scene, generating spatial irregularities and simulating local irregular patterns to enrich sample information. Then, a lightweight network is applied to the first-stage target detection algorithm, reducing the model size and computational load while maintaining accuracy. Finally, the furnace cover state is further determined through specific frame differences, improving the furnace cover recognition accuracy and providing technical support for fully automated intelligent control devices for dust collection vehicles.
[0004] To achieve the above objectives, the present invention employs the following technical solution:
[0005] An algorithm for detecting the furnace cover of a magnesium reduction furnace in a large, complex environment, characterized by the following steps:
[0006] Step 1: Use a high-definition camera to acquire raw video data, filter out the valid frames from the video data and save them as images, manually calibrate the raw images in TXT format, where the TXT tag data includes the furnace cover status category and furnace cover position.
[0007] Step 2: Preprocess the original furnace cover image to obtain the enhanced image, merge the original image and the enhanced image, and divide them into training set, validation set and test set;
[0008] The specific implementation steps are as follows:
[0009] Step 2.1: Extract the furnace cover opening status information by analyzing the furnace cover status category and furnace cover position in the TXT tag data;
[0010] Step 2.2: After performing random data augmentation, the image is randomly pasted into a random position on one of the original images in the dataset. Random data augmentation operations include strong augmentation and weak augmentation. Strong augmentation includes image deformation, rotation, and scaling, while weak augmentation includes image brightness, contrast, and hue.
[0011] Step 2.3: After data augmentation is completed, merge the original image and the augmented image, and divide them into training set, validation set and test set in a ratio of 6:2:2.
[0012] Step 3: Input the merged training set images into the improved object detection network to obtain the object detection model;
[0013] The specific implementation steps are as follows:
[0014] Step 3.1: Construct the h_swish activation function suitable for mobile devices, with the following formula:
[0015]
[0016] In the formula, x is the input value, and the ReLU6 activation function formula is:
[0017] ReLU = min(6, max(0, X))
[0018] Step 3.2: Construct an attention channel module using the SE module. During denoising, the SE module assigns weights to each noise point, automatically removing noise points with lower weights and retaining those with higher weights, thus reducing parameter computation. The attention mechanism implemented by SE includes: a global average pooling module, a feature channel weight generation module, and a weight multiplication and fusion module. The global average pooling module compresses the two-dimensional features of each channel to obtain channel-level global features. Then, it uses two fully connected layers to build the correlation between channels, learns the relationships between channels, obtains the weights of different channels, and finally multiplies each channel by a weight coefficient.
[0019] Step 3.3: Combining Steps 3.1 and 3.2, construct the lightweight MobileNetV3 module. Conv3BN includes convolutional layers, batch normalization layers, and the h_swish activation function. The main module InvertedResidual includes convolutional layers, batch normalization layers, an attention module, and activation functions.
[0020] Step 3.4: Replace the backbone structure in the yolov5s.yaml file with the MobileNetV3 module from Step 3.3;
[0021] Step 3.5: Feed the train dataset from Step 2.3 into the improved object detection network from Step 3.4 for training, and adjust the parameters to obtain the optimal model.
[0022] Step 4: Analyze the detection results, select the feature frames when the furnace cover state changes, compare them, and determine the final state of the furnace cover.
[0023] According to the present invention, the specific operation of comparing the feature frame differences of the target detection results in step 4 is as follows:
[0024] Step 4.1: Use the optimal model to detect the test set and analyze the txt tag files in the detection results.
[0025] Step 4.2: When a change in the state of the furnace cover is detected in three consecutive frames, the change area between the last frame and the last frame before the change is extracted, and after Gaussian filtering to remove image noise, it is converted into a binary format for difference calculation. By analyzing the difference value, it is further determined whether the state of the furnace cover has changed.
[0026] This invention presents a large-space complex scene magnesium reduction furnace cover detection algorithm. It randomly extracts target category and location information from a manually labeled dataset, performs image enhancement operations such as rotation and scaling, and then randomly pastes this information into an image within the dataset. Compared to the commonly used method of directly enhancing the entire image, this dataset can simulate multi-target complex scene states, causing spatial irregularities in the furnace cover shape and simulating local irregular patterns, thus improving model detection performance. The algorithm, based on the one-stage detection algorithm YOLOv5, replaces the original feature extraction backbone network with a lightweight MobileNetV3 network, significantly reducing the model's parameter count and memory usage, providing technical support for mobile deployment. Furthermore, by analyzing the target detection results and performing image denoising at the detection location, interference from image noise can be avoided. Finally, a difference method is used to compare specific frame information to further determine the detection results, improving detection reliability. Attached Figure Description
[0027] Figure 1 This is a flowchart of the large-space complex scene magnesium reduction furnace cover detection algorithm of the present invention.
[0028] Figure 2 Flowchart for dataset preprocessing.
[0029] Figure 3 Example image of the results after preprocessing the dataset.
[0030] Figure 4 To improve the algorithm's network structure diagram.
[0031] Figure 5 This is a schematic diagram of the results from the frame difference method.
[0032] Figure 6 This is a comparison chart of the accuracy of the magnesium reduction furnace cover detection algorithm in large-space complex scenarios and the Yolov5 algorithm of the present invention.
[0033] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. Detailed Implementation
[0034] Reference Figure 1 This embodiment presents an algorithm for detecting the furnace cover of a magnesium reduction furnace in a large, complex environment, including the following steps:
[0035] Step 1: Acquire images of the furnace cover of a large-space, complex magnesium reduction furnace to be inspected, and manually annotate them. In Step 1, a high-definition camera is used to acquire raw video data, valid frames are selected from the video data and saved as images, and the raw images are manually calibrated. In this example, the furnace cover status includes two states: closed and open. The calibration format is TXT, where the TXT tag data contains the furnace cover status category and furnace cover position.
[0036] Step 2: As Figure 2 As shown, the original furnace cover image is preprocessed to obtain an enhanced image. The original image and the enhanced image are then merged and divided into training, validation, and test sets.
[0037] Step 2.1: Randomly select a target region in an image, obtain the target category and location through its corresponding TXT tag file, convert the location information into absolute location information, and extract the pixel information of the region;
[0038] Step 2.2: Perform random data augmentation on the extracted region information, and then randomly paste it into a random position on one of the original images in the dataset. Random data augmentation operations include strong augmentation and weak augmentation. Strong augmentation includes image deformation, rotation, and scaling, while weak augmentation includes adjusting image brightness, contrast, and hue, etc. Some example images are shown below. Figure 3 As shown;
[0039] Step 2.3: After data augmentation, merge the original and augmented images and divide them into training, validation, and test sets in a 6:2:2 ratio. This example collected 300 original valid images, resulting in a dataset of 600 images after data augmentation.
[0040] Step 3: Input the merged training set images into the improved object detection network to obtain the object detection model:
[0041] Step 3.1: Construct the h_swish activation function suitable for mobile devices, with the following formula:
[0042]
[0043] In the formula, x is the input value, and the ReLU6 activation function formula is:
[0044] ReLU = min(6, max(0, X))
[0045] Step 3.2: Construct an attention channel module using the SE module. During denoising, the SE module assigns weights to each noise point, automatically removing noise points with lower weights and retaining those with higher weights, thus reducing parameter computation. The attention mechanism implemented by SE includes: a global average pooling module, a feature channel weight generation module, and a weight multiplication and fusion module. The global average pooling module compresses the two-dimensional features of each channel to obtain channel-level global features. Then, it uses two fully connected layers to build the correlation between channels, learns the relationships between channels, obtains the weights of different channels, and finally multiplies each channel by a weight coefficient.
[0046] Step 3.3: Combining Steps 3.1 and 3.2, construct the lightweight MobileNetV3 network. Conv3BN includes convolutional layers, batch normalization layers, and the h_swish activation function. The main module InvertedResidual includes convolutional layers, batch normalization layers, an attention module, and activation functions. The overall network structure of MobileNetV3 is shown in the figure below. Figure 4 As shown, its parameters are: Input: Input size; Operate: Module name; ks: Kernel size; Exp size: Number of dilation channels; Out: Number of output channels; SE: Whether this layer uses the SE module; NL: Activation function: h_swish or ReLU; s: Convolution stride;
[0047] Step 3.4: Replace the backbone structure in the yolov5s.yaml file with the MobileNetV3 module from Step 3.3;
[0048] Step 3.5: Feed the train dataset from Step 2.3 into the improved object detection network from Step 3.4 for training, and adjust the parameters to obtain the optimal model. In this example, the network is trained for 1000 epochs using both the original and improved network structures. Using the improved network structure reduces the number of parameters to one-fifth of the original, and the model size decreases from 13.73MB to 2.88MB. Figure 6 As shown, the improved algorithm increases accuracy by 1.8%.
[0049] Step 4: Analyze the detection results, select the feature frames when the furnace cover state changes for comparison, and determine the final state of the furnace cover:
[0050] Step 4.1: Use the optimal model obtained in Step 3.5 to perform detection on the test set and obtain the detection result TXT tag file;
[0051] Step 4.2: When a change in the furnace cover status is detected, such as... Figure 5 As shown, the target regions of the frame before the change (Frame1) and the frame after the change (Frame2) are extracted, and after Gaussian filtering to remove image noise, they are converted into a binary format for difference calculation. By analyzing the difference values, it is further determined whether the state of the furnace cover has changed, and the final detection result is obtained.
Claims
1. A method for detecting the furnace cover of a magnesium reduction furnace in a large, complex environment, characterized in that, Includes the following steps: Step 1: Use a high-definition camera to acquire raw video data, filter out the valid frames in the video data and save them as images, manually calibrate the raw images, and the calibration format is TXT, where the TXT tag data includes the furnace cover status category and furnace cover position; Step 2: Preprocess the original furnace cover image to obtain the enhanced image, merge the original image and the enhanced image, and divide them into training set, validation set and test set; The specific implementation steps are as follows: Step 2.1: Extract the furnace cover opening status information by analyzing the furnace cover status category and furnace cover position in the TXT tag data; Step 2.2: After performing random data augmentation, the data is randomly pasted into a random position of an original image in the dataset. Random data augmentation operations include strong augmentation and weak augmentation. Strong augmentation includes image deformation, rotation, and scaling, while weak augmentation includes image brightness, contrast, and hue. Step 2.3: After data augmentation is completed, merge the original image and the augmented image, and divide them into training set, validation set and test set in a ratio of 6:2:2; Step 3: Input the merged training set images into the improved object detection network to obtain the object detection model; The specific implementation steps are as follows: Step 3.1: Construct the h_swish activation function suitable for mobile devices, with the following formula: In the formula, x is the input value, and the ReLU6 activation function formula is: ReLU=min(6,max(0,X)) Step 3.2: Construct an attention channel module using the SE module. During the denoising operation, the SE module can assign weights to each noise point, automatically remove noise points with low weights, and retain noise points with high weights, thereby reducing parameter calculations. The attention mechanism implemented by SE includes: a global average pooling module, a feature channel weight generation module, and a weight multiplication and fusion module. The global average pooling module compresses the two-dimensional features of each channel to obtain channel-level global features, then uses two fully connected layers to build the correlation between channels, learn the relationship between channels, obtain the weights of different channels, and finally multiply each channel by the weight coefficient. Step 3.3: Combine steps 3.1 and 3.2 to build the lightweight network MobileNetV3 module. Conv3BN includes convolutional layers, batch normalization layers, and the h_swish activation function; the main module InvertedResidual includes convolutional layers, batch normalization layers, attention modules, and activation functions. Step 3.4: Replace the backbone structure in the yolov5s.yaml file with the MobileNetV3 module from Step 3.3; Step 3.5: Feed the train dataset from Step 2.3 into the improved object detection network from Step 3.4 for training, and adjust the parameters to obtain the optimal model; Step 4: Analyze the detection results, select the feature frames when the furnace cover state changes for comparison, and determine the final state of the furnace cover.
2. The method as described in claim 1, characterized in that, The specific operation of comparing feature frames in step 4 of the target detection results is as follows: Step 4.1: Use the optimal model to detect on the test set and analyze the txt tag files in the detection results; Step 4.2: When a change in the state of the furnace cover is detected in three consecutive frames, the change area between the last frame and the last frame before the change is extracted, and after Gaussian filtering to remove image noise, it is converted into a binary format for difference calculation. By analyzing the difference value, it is further determined whether the state of the furnace cover has changed.
Citation Information
Patent Citations
Method and system for detecting working conditions in lead smelting furnace
CN112330612A
Lightweight anti-interference flame detection method based on improved YOLOv4-tiny
CN114743151A