Mars identification method capable of resisting interference of welding sparks

By preprocessing the light source video and training the data set, the YOLO model is optimized, and the misidentification problem caused by Mars interference during welding is solved, and the accuracy and real-timeness of flame recognition are improved.

CN119941620APending Publication Date: 2025-05-06SICHUAN ENVIRONMENTAL PROTECTION ENG CO LTD CNNC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411752648.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The existing flame recognition method has a high misidentification rate under Mars interference generated during welding, which affects the reliability and safety of the system.

Method used

By collecting light source video, dividing positive and negative example samples, converting them into original pictures for preprocessing and filtering, obtaining labeled data sets, and training the pre-trained YOLO model, obtaining the trained YOLO model and weight files, and importing them into the camera for real-time identification.

Benefits of technology

It improves the accuracy of flame recognition and anti-welding Mars interference capabilities, and enhances the real-time and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941620A_ABST
    Figure CN119941620A_ABST
Patent Text Reader

Abstract

The invention discloses a welding spark interference-resistant flame identification method, which comprises the following steps of: acquiring a light source video, and dividing the light source video into a positive example sample and a negative example sample; converting the videos of the positive example sample and the negative example sample into original pictures, and sequentially preprocessing and screening the original pictures to obtain picture samples; marking on the picture sample to obtain a marked data set; training the pre-trained YOLO model through the marked data set to obtain a trained YOLO model and a weight file; importing the trained YOLO model and the weight file into a camera for real-time identification; according to the welding spark interference-resistant flame identification method, a large amount of image data including flame and non-flame are collected, so that a model can accurately identify the flame and eliminate interference of other light sources; and on the basis of a flame identification model of the YOLO neural network, the distinguishing capability of the model on a light source is enhanced, and flame identification resisting welding spark interference is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of fire light recognition, in particular to a fire light recognition method capable of resisting interference from welding sparks. Background Art

[0002] Existing methods for fire recognition are widely used in various industrial scenarios, especially in welding operations, where fire recognition is of great significance for ensuring production safety and quality control. However, existing methods for fire recognition have obvious deficiencies in dealing with spark interference generated during welding, resulting in a high misrecognition rate, which affects the reliability and safety of the system.

[0003] The shortcomings of the existing technology are as follows: 1. Misidentification of welding flames: The existing flame recognition methods are mainly based on traditional image processing technology and machine learning algorithms, such as threshold segmentation, edge detection and feature extraction. These methods perform well when dealing with flame recognition in static backgrounds, but in dynamic welding environments, due to the large number of sparks generated during welding, these methods often cannot effectively distinguish between flames and sparks, resulting in frequent misidentification. 2. Inaccurate feature extraction: Traditional flame recognition methods rely on manually designed feature extraction methods, which have poor robustness in complex backgrounds. High temperature, smoke and spatter generated during welding will affect the accuracy of feature extraction, thereby reducing the performance of the recognition system. 3. Insufficient training data: Existing flame recognition models are usually trained based on limited training data sets, which often lack coverage of complex scenes in the welding process. Therefore, when the model faces a variety of welding environments in practical applications, it has weak generalization ability and is prone to misjudgment. 4. Poor real-time performance: Existing flame recognition systems have poor real-time performance when processing high frame rate video streams. The high-speed motion of sparks generated during the welding process requires the recognition system to have high real-time processing capabilities, but existing methods often fail to meet this requirement, resulting in delayed system response and affecting the real-time monitoring and control of the welding process. Summary of the invention

[0004] In view of the above problems existing in the prior art, the present invention is proposed.

[0005] Therefore, the technical problem to be solved by the present invention is a problem.

[0006] To achieve the above object, the present invention provides the following technical solutions: a method for fire light recognition with resistance to welding spark interference, comprising: collecting light source video, and dividing the light source video into positive samples and negative samples;

[0007] Convert the videos of positive samples and negative samples into original images, and perform preprocessing and screening on the original images in turn to obtain image samples;

[0008] Label the image samples to obtain a labeled data set;

[0009] Train the pre-trained YOLO model using the labeled data set to obtain the trained YOLO model and weight file;

[0010] Import the trained YOLO model and weight file into the camera for real-time recognition.

[0011] As a further solution of the present invention: the light source video is retrieved and downloaded through a search engine.

[0012] As a further solution of the present invention: the positive example sample is fire video data.

[0013] As a further solution of the present invention: the negative example sample is non-fire video data;

[0014] Among them, the non-fire video data includes welding light video data and lighting video data.

[0015] As a further solution of the present invention: the positive sample and the negative sample are converted into pictures through the Fmpeg video editing tool.

[0016] As a further solution of the present invention: the process of preprocessing the image includes denoising, contrast enhancement and color space conversion.

[0017] As a further solution of the present invention: the pictures are screened to remove pictures with low resolution and irrelevant light sources;

[0018] Wherein, the low resolution is set at 640×640;

[0019] The light source irrelevant pictures include pictures of only houses, objects and smoke.

[0020] As a further solution of the present invention: the step of marking the image sample to obtain the marked data set includes:

[0021] Upload the screened image samples to the EasyData platform;

[0022] Start semi-automatic annotation on the EasyData platform to obtain pre-annotated images;

[0023] Manually modify and confirm the annotations of the pre-annotated and difficult images selected by the recognition model to obtain annotated datasets.

[0024] As a further solution of the present invention: the pre-trained YOLO model is trained by using a labeled data set, and the steps of obtaining the trained YOLO model and weight file include:

[0025] Divide the labeled data set into training set, validation set, and test set;

[0026] Configure the training parameters of the pre-trained YOLO model and use the training set for training;

[0027] Evaluate the performance of the trained model through the validation set, and adjust the parameters based on the validation results to optimize the YOLO model;

[0028] The optimized YOLO model is tested for recognition performance using the test set;

[0029] Extract the weights file from the YOLO model.

[0030] As a further solution of the present invention: the training parameters include learning rate, batch size and number of epochs.

[0031] Compared with the prior art, the beneficial effects of the present invention are: the fire light recognition method that is resistant to welding spark interference collects a large amount of image data including fire light and non-fire light (including welding and high-exposure light) of the light source by acquiring light source video and converting it into image data, so as to ensure that the model can accurately identify fire light and eliminate interference from other light sources; and the fire light recognition model based on the YOLO neural network enhances the model's ability to distinguish light sources, thereby improving the fire light recognition that is resistant to welding spark interference. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0033] Figure 1 This is a schematic diagram of the overall process described in the embodiment provided by the present invention.

[0034] Figure 2 This is a flow chart of step S3 described in the embodiment provided by the present invention.

[0035] Figure 3 This is a data processing diagram of the EasyData platform described in the embodiment provided by the present invention.

[0036] Figure 4 This is a schematic diagram of image annotation according to an embodiment of the present invention.

[0037] Figure 5 This is the picture object book data graph described in the embodiment provided by the present invention.

[0038] Figure 6Schematic diagram of image object annotation according to the embodiment of the present invention

[0039] Figure 7 This is a flow chart of step S4 described in the embodiment provided by the present invention. DETAILED DESCRIPTION

[0040] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0041] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0042] Secondly, the present invention is described in detail with reference to the schematic diagram. When describing the embodiments of the present invention in detail, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0043] Furthermore, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.

[0044] Example 1

[0045] like Figures 1 to 5As shown, the present invention provides a technical solution: a method for fire recognition that resists welding spark interference, including the steps of: S1: collecting light source video, and dividing the light source video into positive samples and negative samples; S2: converting the video of the positive sample and the negative sample into original pictures, and preprocessing and screening the original pictures in turn to obtain picture samples; S3: marking the picture samples to obtain a labeled data set; S4: training the pre-trained YOLO model through the labeled data set to obtain the trained YOLO model and weight file; S5: importing the trained YOLO model and weight file into the camera for real-time recognition. Through the above 5 steps, the YOLO neural network is trained to learn the characteristics of fire and distinguish it from non-fire images; a large amount of image data containing fire and non-fire (including welding and high exposure light) is collected to ensure that the model can accurately identify the fire and exclude interference from other light sources; the negative sample (non-fire but similar to fire) image data is trained, incorporated into the recognition process, and interference in the recognition process is eliminated. The light source video includes videos containing fire and non-fire.

[0046] It should be noted that the light source video is downloaded and obtained by the trainees through search engine retrieval (for example, Baidu, Google and other search engines); the positive sample is the fire video data; the negative sample is the non-fire video data; among them, the non-fire video data includes welding light video data and lighting video data; the specific video data source is the fire video, such as Internet images, news reports, surveillance videos, etc.; the video requirement is to ensure that the video covers different environments (indoors, outdoors, etc.), time (day, night, dawn, dusk, etc.) and weather conditions (sunny, cloudy, rainy, snowy, etc.); the negative sample is the non-fire video data, and the data is required not to contain fire videos, especially those scenes that may be mistaken for fire, such as welding, lighting, etc. Also ensure that different environments and time conditions are covered.

[0047] Among them, the video of positive and negative samples is converted into images through the Fmpeg video editing tool; FFmpeg is a tool used to process video streams. It can process multiple video streams in parallel and can be used to convert, edit, extract frames of video and audio. The steps to convert video to images are as follows: first install the python library and FFmpeg library, then import the library, set the input video and output directory. Call the subprocess module to operate the FFmpeg tool to extract video frames into images

[0048] Furthermore, the image preprocessing process includes denoising, contrast enhancement and color space conversion. The original image is converted into image samples containing multiple features (for example, obtained through data processing operations such as image enhancement and filtering) through the data processing tools in the EasyData platform to improve the performance and accuracy of the model. This includes: denoising: the original image

[0049] Use filtering techniques, such as median filtering, Gaussian filtering, or bilateral filtering, to remove random noise from the image, specifically by converting to the frequency domain (such as using Fourier transform), and then applying filters to remove the noise frequency components; contrast enhancement: Apply histogram equalization to improve the contrast of the image and make the brightness distribution more uniform, specifically by adjusting the grayscale distribution, it can significantly improve the contrast of the image. Use contrast enhancement techniques, such as local contrast enhancement, to highlight potential fire features; color space conversion: Convert the image from the RGB color space to a color space that is more suitable for fire detection (specifically refers to the threshold set on the platform when the contrast between the fire and the surrounding environment is large) such as HSV (hue, saturation, brightness) or YCbCr; in the new color space, the brightness information can be better separated, which is convenient for subsequent fire detection; specifically use the color space conversion function provided by the image processing library (such as OpenCV) to convert the RGB image to a color space such as HSV or HSI.

[0050] It should be noted that the images were screened to remove low-resolution and light-irrelevant images. Specifically, the images were first screened by tools (e.g., Billfish software, etc.) to have resolutions that met the requirements, and then the trained personnel selected images that met the sample requirements. Among them, the low resolution was set at 640×640; images irrelevant to light sources included photos of only houses, objects, and smoke.

[0051] Furthermore, the steps of labeling the image samples and obtaining the labeled data set include:

[0052] S31: Upload the screened image samples to the EasyData platform; Figure 3 As shown, EasyData data processing and service platform - data processing - data cleaning - de-approximation, deblurring (tools). The image sample data is cleaned, sorted, converted and other operations are performed on the EasyData platform to improve data quality. The accuracy and completeness of the data are improved by removing duplicate data, processing missing values, correcting erroneous data and other operations.

[0053] S32: Start semi-automatic annotation on the EasyData platform to obtain pre-annotated images;

[0054] S33: Manually modify and confirm the annotations of the pre-annotated and difficult images selected by the recognition model to obtain annotated data sets;

[0055] Need to explain, such as Figure 3 and Figure 4 As shown, the image data of the screened image sample data is annotated on Baidu EasyData intelligent data service platform; EasyData adopts active learning method, and the model can be trained based on existing data or a pre-trained model; EasyData platform will select a part of the data from the data set to be annotated as the annotation object of the current round according to the active learning strategy; these selected data are usually the most uncertain or most valuable data points of the model at present; the selected data are annotated with rectangular frames on the EasyData platform; during the annotation process, the annotator needs to carefully check the image content and accurately select the target object according to the annotation requirements; after completing a round of annotation, the annotated data will be added to the training set for updating the model; the performance of the updated model will be improved, and the prediction ability of unlabeled data will also be enhanced; until the preset annotation round is reached, the updated model will annotate all the unlabeled data in the data set;

[0056] It supports multiple types of annotations, including polygons, rectangles, circles, line segments, and points. When annotating positive samples (fire images), it is necessary to mark the area of ​​the fire and mark it as the positive sample label. When annotating negative samples (non-fire images), it is necessary to mark the area that may be mistaken for fire and indicate its negative sample label (such as welding, lighting, etc.). Figure 5 and 6 As shown, rectangular box annotation can be used for object detection to annotate the corresponding fire, non-fire, and smoke areas in the image. The annotation method is rectangular box annotation, and the rectangular box will be marked with corresponding labels, fire (fire), no_fire_smoke (non-fire), and smoke (smoke).

[0057] Overall data preparation: The dataset contains a total of 6,000 fire and non-fire images, including images of fire conditions in different environments; all images are uniformly scaled to uniform pixels (640x640 pixels and above) through Python image processing. This operation not only standardizes the size of the input data, but also reduces the range of changes that the model needs to handle; the application of data enhancement technology (cropping, rotation, flipping, color conversion, adding noise) further improves the model's adaptability to real-world changes. 4,200 of them are used to train deep learning models, 900 are used to verify the generalization ability of the model, and 900 are used to test the performance of the model on unknown data. This division ensures the comprehensiveness and fairness of the evaluation process and provides a rigorous benchmark for model optimization.

[0058] The original data includes pictures and video data. The video data needs to be split into separate pictures (the steps for converting videos to pictures are the same. Python's ffmpeg, opencv, and os libraries are used for frame extraction. FFmpeg is used in Python for video frame extraction. The following libraries are used: ffmpeg: This is a powerful cross-platform command line tool for processing audio and video files. OpenCV (cv2): This is an open source computer vision library that provides rich video and image processing functions. In video frame extraction, OpenCV can be used to read video files and access video content frame by frame through the VideoCapture function and the read method. os: This is Python's built-in library for interacting with the operating system. During the video frame extraction process, the os library can be used to create a directory to save frame images, as well as to construct frame image file names, etc.) and then label them. The data labels are generally divided into three types: fire, smoke, and no_fire_smoke. The EasyData data automatic annotation platform is used to annotate the fire areas in the image and the non-fire areas that are easily misidentified (lights, welding sparks, etc.). The fire areas on the image are marked with rectangular boxes to ensure that the image contains different types of fire, smoke, and background to improve the generalization ability of the model, and are represented by corresponding labels (0 for fire, 1 for smoke, and 2 for no_fire / no_smoke). Then, the annotated data is reviewed and checked multiple times to ensure the accuracy and consistency of the annotations. Finally, the annotated data is organized into a format suitable for YOLO model training. Ensure that the structure and labels of the data set can effectively support subsequent algorithm training and evaluation.

[0059] The dataset is organized in the following format:

[0060]

[0061] Example 2

[0062] like Figure 3 As shown, the present embodiment is different from the previous embodiment in that it further discloses a YOLO model based on the transfer learning method, combines the pre-trained YOLOv8 model with the local and open source fire smoke datasets, and further fine-tunes and optimizes it to achieve accurate recognition of fire and smoke; the pre-trained YOLO model is trained by the labeled dataset, and the steps of obtaining the trained YOLO model and weight file are specifically included,

[0063] S41: Divide the labeled data set into a training set, a validation set, and a test set; the specific training set, validation set, and test set are divided according to 7:2:1;

[0064] S42: Configure the training parameters of the pre-trained YOLO model and use the training set for training; here, you can select a suitable training model (YOLOv8n (nano), YOLOv8s (small) or YOLOv8m (medium)), and the specific selection basis is that for scenarios with small data volume and high real-time requirements, YOLOv8n is preferred; for scenarios with medium data volume and certain accuracy and speed, YOLOv8s is selected; for scenarios with large data volume and high accuracy requirements but less attention to real-time, YOLOv8m is selected; configure the training parameters to enter the corresponding values ​​in the python training script, and the configuration basis is to select the learning rate according to the complexity of the model and the batch size according to the memory limit. The number of epochs determines the number of times the entire training set is traversed, and the trained model converges;

[0065] It should be noted that the training set is read by the training script to the training set's images and label files; the training process of writing yolov8 in python using script training is as follows: 1. Load the pre-trained model: Select one from the pre-trained models provided by Ultralytics as the base model. 2. Set the training parameters: including the number of training rounds (epochs), input image size (imgsz), batch size (batch_size), the number of worker threads of the data loader (workers), and the GPU number used (device). 3. Start training: Use the training function provided by the Ultralytics YOLOv8 library to start training the model.

[0066] S43: Evaluate the performance of the trained model through the validation set, adjust the parameters according to the validation results, and optimize the YOLO model; specifically, load the trained model and use the model's val method to evaluate the validation set. After the evaluation is completed, a table of class evaluation indicators will be obtained, including class: the name of the category detected by the model; Images: the total number of validation set images; Instances: the total number of labeled targets in each category; P (Precision): precision, that is, the ratio of the number of samples predicted as positive samples to the number of all samples predicted as positive samples; R (Recall): recall rate, that is, the proportion of samples that are actually positive samples that are correctly predicted as positive samples; mAP50: Mean Average Precision when the IOU threshold is greater than 0.5; mAP50-95: the average mAP at different IOU thresholds (from 0.5 to 0.95, with a step size of 0.05).

[0067] S44: The optimized YOLO model is tested for recognition performance using the test set;

[0068] S45: Extract weights file from YOLO model.

[0069] Use the pre-trained model and local data sets to train the model, and adjust the learning rate, batch size, learning rate and other parameters to make the model training more efficient and accurate. After the training is completed, evaluate the model performance and make adjustments as needed.

[0070] Training parameters include learning rate, batch size, and number of epochs.

[0071] Among them, the weight file is generated during the training process of machine learning and deep learning models, and contains the parameter information of the model, such as weights and biases.

[0072] The overall training process is as follows: First, select a suitable pre-trained model version. Preprocess the image data, including resizing and normalization, and generate a label file for the training data. Configure training parameters (such as learning rate, batchsize, and number of epochs) (the basis for configuring training parameters is to select the learning rate according to the complexity of the model and the batch size according to the memory limit; the number of epochs determines the number of times the entire training set is traversed, and the trained model converges according to the training) and use the training script to start training (the specific steps of the training script are), while monitoring the training progress and loss value. Evaluate the performance of the trained model on the validation set, and adjust the parameters or data preprocessing methods according to the validation results. Use transfer learning and data enhancement to optimize the model and perform hyperparameter tuning. Export the trained model to a deployable format, deploy the model on the target device, and perform performance testing. The Yolov8 algorithm has excellent performance in target detection, can quickly and accurately detect fire smoke in images, and improve the efficiency and accuracy of fire detection. This algorithm research adopted the method of transfer learning, combining the pre-trained Yolov8 model with local and open source fire smoke datasets, and further fine-tuning and optimization to achieve accurate recognition of fire and smoke.

[0073] It should be noted that the YOLOv8 model is an existing technology and will not be described in detail here. The network structure of the YOLOv8 model in this solution has been improved as follows: 1. Backbone: the first layer of convolution is changed from the original 6x6 convolution to 3x3 convolution; 2. Neck: the channel reduction layer of the 1x1 convolution is removed; at the same time, the original c3 module is replaced by the C2f module; 3. Head: replaced with a decoupled head structure to decouple the classification task and the regression task; at the same time, Anchor-Based is replaced by Anchor-Free; 4. Loss: BCE Loss is used as the classification loss; DFL Loss+CIOU Loss is used as the regression loss; 5. Sample matching strategy: The Task-Aligned Assigner sample allocation strategy is adopted; 6. Training strategy: A new operation of closing the Mosaic data enhancement in the last 10 rounds is added, which can effectively improve the accuracy.

[0074] Import the trained YOLO model and weight file into the camera for real-time recognition. During the recognition process:

[0075] The video data stream is acquired and the data frame is preprocessed. The fire light and smoke dual target detection model is used to perform image flame and smoke detection to obtain the areas of suspected open fire, sparks and smoke in the video image, that is, the candidate areas of interest. Different frame images of the same location area of ​​interest are extracted in the time dimension to form a new input sequence. The background elimination and image histogram methods are used to further suppress the misdetected areas and optimize the detection results. Finally, the detection results are visualized, and an alarm operation is performed when open fire or thick smoke appears. Alarm scenario: When an open fire or smoke appears at the monitoring site, the system prompts an alarm.

[0076] By training the YOLO neural network, the characteristics of fire can be learned and distinguished from non-fire images. Collect a large amount of image data containing fire and non-fire (including welding and high-exposure light) to ensure that the model can accurately identify fire and eliminate interference from other light sources. Train the model on negative sample (non-fire but similar to fire) image data and incorporate it into the recognition process to eliminate interference in the recognition process. Threshold setting and false alarm processing: Set a suitable threshold to distinguish between fire and non-fire and reduce false alarms. Use non-maximum suppression (NMS) to merge overlapping detection frames and retain only the most likely fire detection results. Reflow data from more actual application scenarios of the factory to improve the quality and accuracy of the labeled data and enrich the data features. The model can learn the previously missed scenarios and improve the missed rate. The model is trained in more actual scenarios, which can improve the robustness of the model and reduce sensitivity to noise and interference.

[0077] Example 3

[0078] In order to illustrate the beneficial effects of this solution, unlike the previous embodiment, this embodiment records a comparative experiment between this solution and other existing solutions, specifically:

[0079] Solution 1: Apply the yolov5 algorithm framework for fire recognition, add negative samples of welding light and lighting, and enhance the data;

[0080] Solution 2: Apply the yolov8 algorithm framework, without adding negative samples of welding light and lighting, without data enhancement, to identify the fire light;

[0081] Solution 3: Apply the yolov8 algorithm framework, without adding negative samples of welding light and lighting, to identify the fire light;

[0082] This solution: adopts the yolov8 algorithm framework, adds negative samples of welding light, strengthens the data, and identifies the fire light.

[0083] The different solutions are compared through the following indicators

[0084] Images: The total number of images involved in the evaluation process.

[0085] Instances: The total number of labeled instances of the category.

[0086] P (Precision): Precision, that is, the ratio of the number of samples predicted as positive samples to the number of all samples predicted as positive samples.

[0087] R (Recall): Recall rate, that is, the proportion of samples that are actually positive samples that are correctly predicted as positive samples.

[0088] mAP50: Mean Average Precision when the IOU threshold is greater than 0.5.

[0089] mAP50-95: Average mAP at different IOU thresholds (from 0.5 to 0.95, step size 0.05).

[0090]

[0091]

[0092] Compared with schemes 1 and 4, the yolov8 framework has higher average precision when the IOU threshold is greater than 0.5 and the average mAP at different IOU thresholds (from 0.5 to 0.95, with a step size of 0.05), and the effect is better.

[0093] Compared with Schemes 2, 3 and 4, Scheme 4 enhances the data and adds negative samples. The average precision when the IOU threshold is greater than 0.5 and the average mAP at different IOU thresholds (from 0.5 to 0.95, step size 0.05) is higher, and the effect of fire recognition is better.

[0094] The results verified the rationality of this scheme.

[0095] Importantly, it should be noted that the construction and arrangement of the present application shown in a number of different exemplary embodiments are only exemplary. Although only a few embodiments are described in detail in this disclosure, it should be readily understood by those who refer to this disclosure that many modifications are possible, for example, the size, scale, structure, shape and proportion of various elements, and parameter values ​​such as temperature, pressure, etc., mounting arrangements, use of materials, color, directional changes, etc., without substantially departing from the novel teachings and advantages of the subject matter described in the application. For example, the element shown as integrally formed can be composed of multiple parts or elements, the position of the element can be inverted or otherwise changed, and the nature or number or position of the discrete element can be changed or changed. Therefore, all such modifications are intended to be included in the scope of the present invention. The order or sequence of any process or method steps can be changed or reordered according to alternative embodiments. In the claims, any "device plus function" clause is intended to cover the structure of the execution function described herein, and is not only structurally equivalent but also equivalent structure. Without departing from the scope of the present invention, other substitutions, modifications, changes and omissions can be made in the design, operating conditions and arrangement of the exemplary embodiments. Therefore, the invention is not limited to a specific embodiment, but extends to numerous modifications still falling within the scope of the appended claims.

[0096] Furthermore, in order to provide a concise description of exemplary embodiments, all features of an actual embodiment may not be described, i.e., those features that are not relevant to the best mode presently contemplated for carrying out the invention or those features that are not relevant to implementing the invention.

[0097] It should be understood that in the development of any actual implementation, as in any engineering or design project, numerous implementation-specific decisions may be made. Such a development effort may be complex and time-consuming, but for those of ordinary skill having the benefit of this disclosure, the development effort will be a routine task of design, fabrication, and production without undue experimentation.

[0098] 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 preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for identifying firelight against spark interference caused by welding, characterized in that: include, Collect light source videos and divide the light source videos into positive samples and negative samples; Convert the videos of positive samples and negative samples into original images, and perform preprocessing and screening on the original images in turn to obtain image samples; Label the image samples to obtain a labeled data set; Train the pre-trained YOLO model using the labeled data set to obtain the trained YOLO model and weight file; Import the trained YOLO model and weight file into the camera for real-time recognition.

2. The method for identifying firelight against spark interference during welding as claimed in claim 1, characterized in that: The light source video is retrieved and downloaded through a search engine.

3. The method for identifying firelight against spark interference during welding as claimed in claim 1 or 2, characterized in that: The positive example sample is fire video data.

4. The method for identifying firelight against spark interference during welding as claimed in claim 3, characterized in that: The negative example samples are non-fire video data; Among them, the non-fire video data includes welding light video data and lighting video data.

5. The method for identifying firelight against spark interference during welding as claimed in claim 4, characterized in that: The positive sample and the negative sample video are converted into images through the Fmpeg video editing tool.

6. The method for identifying firelight against spark interference during welding as claimed in claim 4 or 5, characterized in that: The process of preprocessing the image includes denoising, contrast enhancement and color space conversion.

7. The method for identifying firelight against spark interference during welding as claimed in claim 6, characterized in that: The pictures are screened to remove pictures with low resolution and irrelevant light sources; Wherein, the low resolution is set at 640×640; The light source irrelevant pictures include pictures of only houses, objects and smoke.

8. The method for identifying firelight against spark interference during welding as claimed in claim 7, characterized in that: The steps of labeling image samples and obtaining a labeled dataset include: Upload the screened image samples to the EasyData platform; Start semi-automatic annotation on the EasyData platform to obtain pre-annotated images; Manually modify and confirm the annotations of the pre-annotated and difficult images selected by the recognition model to obtain annotated datasets.

9. The method for identifying firelight against spark interference during welding as claimed in claim 8, characterized in that: The steps to train the pre-trained YOLO model using the labeled data set and obtain the trained YOLO model and weight file include: Divide the labeled data set into training set, validation set, and test set; Configure the training parameters of the pre-trained YOLO model and use the training set for training; Evaluate the performance of the trained model through the validation set, and adjust the parameters based on the validation results to optimize the YOLO model; The optimized YOLO model is tested for recognition performance using the test set; Extract the weights file from the YOLO model.

10. The method for identifying firelight against spark interference during welding as claimed in claim 9, characterized in that: The training parameters include learning rate, batch size and number of epochs.