A stainless steel recognition method and system based on cutting spark visual features
By acquiring and processing video of cutting sparks, locating the active spark periods and filtering effective image blocks, and using a visual feature model for stainless steel identification, the problem of quickly distinguishing between 201, 304, and 316 stainless steel was solved, achieving automated and accurate identification results.
Patent Information
- Application Number
- CN202611398533.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-10
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies make it difficult to quickly and accurately distinguish between 201, 304, and 316 stainless steel without additional specialized equipment and standardized operating conditions. Furthermore, artificial spark identification relies on the operator's experience and is affected by the cutting conditions and ambient light.
By acquiring video of sparks during the cutting process, preprocessing it, retrieving the active spark periods, locating the spark regions, generating candidate image blocks, filtering valid spark image blocks, and using a visual feature extraction model to perform local steel profile discrimination, finally performing image group-level and video-level probability aggregation, and outputting the final recognition result.
It achieves automated and flexible stainless steel identification, reduces equipment costs and reliance on human experience, improves the stability and accuracy of identification, and reduces the impact of accidental changes in spark patterns.
Smart Images

Figure CN123181371A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of stainless steel identification technology, and in particular to a method and system for stainless steel identification based on the visual characteristics of cutting sparks. Background Technology
[0002] 201, 304, and 316 stainless steels are widely used in industrial production, material distribution, incoming material inspection, and scrap metal recycling. Their surface color, texture, and metallic luster are similar, making them difficult to distinguish reliably based on static appearance alone. In scenarios requiring rapid verification, automated sorting, or batch screening, it is often desirable to obtain repeatable identification results without the need for additional dedicated spectroscopic equipment.
[0003] Existing chemical reagent testing, X-ray fluorescence detection, direct-reading spark spectroscopy, and laser-induced breakdown spectroscopy can provide compositional or spectral information, but they often require specialized instruments, reagents, or standardized procedures. Artificial spark identification has lower deployment costs, but it relies on the operator's experience in judging spark brightness, length, forking, and burst morphology, and is easily affected by cutting conditions, observation angle, and ambient light.
[0004] The sparks generated during the cutting process contain dynamic information such as brightness, density, trajectory, wake, bifurcation, bursts, local texture, and spatial diffusion. This information is not stably concentrated in a single frame: the same frame may also include the cutting equipment, workpiece surface, background, reflections, and blank areas. Therefore, a suitable identification method should progressively locate spark information from the complete cutting video and form a sample conclusion based on local evidence from multiple temporal and spatial locations. Currently, existing stainless steel identification schemes can be summarized into the following four categories:
[0005] The first type is artificial spark testing. After the operator generates a spark in the steel, the steel type is judged based on the appearance characteristics such as the color, tail, forking, and bursting of the spark. This method has low equipment requirements, but the results are difficult to reproduce stably across operators, cutting conditions, and ambient light.
[0006] The second category is component or spectral detection. This type of method identifies material grades through elemental composition or spectral response. The accuracy is usually high, but the equipment cost, maintenance cost and deployment threshold are also high, making it unsuitable for all on-site rapid screening scenarios.
[0007] The third category is static visual recognition, which uses the appearance, texture or shape of the metal surface to make a judgment. For 201, 304 and 316 stainless steel with similar appearances, it is difficult to obtain a stable basis for judgment based solely on static surface images.
[0008] The fourth category is the classification of whole-frame spark images or single local image blocks. The whole frame contains a lot of background information unrelated to the steel pattern, and a single local image block may be affected by instantaneous spark changes. If the active spark period and spark area are not located first, invalid local blocks are screened out, and multiple local results are aggregated at the time level, the final conclusion is easily affected by accidental factors. Summary of the Invention
[0009] The purpose of this invention is to provide a stainless steel identification method and system based on the visual characteristics of cutting sparks. The detection process is highly automated, the equipment deployment is relatively flexible, and it can utilize multi-region and multi-frame information in the cutting spark video and convert local spark evidence into sample-level identification results, thereby solving the problems mentioned in the background art.
[0010] To achieve the above objectives, the present invention provides the following technical solution:
[0011] A method for identifying stainless steel based on the visual characteristics of cutting sparks includes the following steps:
[0012] S1: The stainless steel sample to be tested is cut using a cutting machine, and the complete spark video generated during the cutting process is captured by a camera.
[0013] S2: Preprocess the acquired spark video, converting the video frames into a unified visual processing input format;
[0014] S3: Calculate the frame-level spark response for the preprocessed video frame, retrieve the spark active period based on the frame-level spark response, and construct a continuous image group within the spark active period.
[0015] S4: Locate the spark region within each consecutive image group, and generate candidate spark image blocks based on the spark region;
[0016] S5: Determine the validity of candidate spark image blocks and filter out valid spark image blocks;
[0017] S6: Input each valid spark image block into the trained visual feature extraction model to obtain the local steel profile discrimination probability of the three types of stainless steel, 201, 304 and 316, corresponding to the image block;
[0018] S7: Aggregate the local steel profile discrimination probabilities within the same continuous image group to obtain the three-class probabilities at the image group level; then aggregate the three-class probabilities at the image group level within the same complete spark video to obtain the three-class probabilities at the video level, so as to reduce the impact of random changes in the spark morphology of a single image block;
[0019] S8: The category with the highest probability among the three video-level categories is used as the final identification result of the stainless steel sample to be tested; when no effective spark image block is selected or no effective continuous image group that can be aggregated is formed, the output is insufficient evidence / re-sampling is required.
[0020] Specifically, it can automatically identify three types of stainless steel—201, 304, and 316—using the sparks naturally generated during the cutting process, reducing reliance on experience in identifying sparks manually.
[0021] Preferably, in S1, the camera's field of view covers the cutting point and the spark spray area, and the acquired spark video includes the process of spark generation, spraying, diffusion and decay from the cutting point; each complete spark video corresponds to a sample to be identified, and the continuous image group is the time processing unit within the complete spark video.
[0022] Preferably, in step S2, the preprocessing of the acquired spark video includes: frame decoding of the video frames and preservation of the time sequence and acquired metadata; proportional reduction of video frames exceeding the preset processing limit according to the original aspect ratio; conversion of the video frames to RGB color representation and scaling to the input size required for subsequent visual processing; conversion of pixel values to the model input value range, and the preprocessed image retains the main visual information of the cutting point and the spark density, spray direction, trajectory length, and local bifurcation shape on the spark spray path; the preprocessing is used to unify data representation and does not change the source and time sequence of the spark video.
[0023] Preferably, in step S3, a frame-level spark response is calculated for the preprocessed video frame to form a spark response sequence that changes over time, and spark active periods are retrieved based on the spark response sequence to construct a continuous image group within each spark active period.
[0024] Within the continuous image group formed during the active spark period, the candidate spark image block covers multiple spatial locations near the cutting point and in the spark jet direction, and covers multiple time frames during the cutting process.
[0025] Wherein, the j-th consecutive image group is After spark region localization and candidate spark image patch generation, a set of candidate spark image patches is obtained. :
[0026] ;
[0027] in, This indicates the process of generating candidate spark image blocks.
[0028] Preferably, in step S4, the spatial range of spark jet is located within a continuous image group, and after associating the spark regions of each frame, the images near the spark regions are divided into regular grids; local blocks that are spatially associated with the spark regions constitute a set of candidate spark image blocks.
[0029] Local spark response scores are calculated for candidate spark image blocks. These scores characterize the effectiveness of spark information in the image blocks and comprehensively reflect the spark visual information, including spark brightness, spark density, spark texture, wake morphology, bifurcation morphology, burst area, and local contrast.
[0030] Among them, for the candidate spark image patch in the j-th consecutive image group Calculate its spark response score :
[0031] ;
[0032] in, This indicates the spark response scoring process.
[0033] Preferably, in step S5, spark validity is determined for candidate spark image blocks, and image blocks whose local spark response scores meet preset screening conditions and can be used for subsequent local steel profile determination are retained first, so as to reduce the influence of blank areas, background areas, reflective areas on the steel surface and low information spark areas on steel profile determination.
[0034] Candidate spark image blocks are filtered based on the local spark response scores to obtain a set of valid spark image blocks for the j-th consecutive image group; the image blocks in the set meet the preset filtering conditions and are used for subsequent local steel profile discrimination. The set of valid spark image blocks is as follows:
[0035] ;
[0036] in, This represents the effective spark image block screening process. This step prioritizes retaining image blocks containing obvious spark information, reducing the impact of blank areas, background areas, reflective areas on the steel surface, and low-information spark areas on steel profile judgment.
[0037] Preferably, in S6, the local steel pattern discrimination probability is not directly used as the final steel pattern output of the sample, but is used to describe the discrimination tendency of the local spark image block for the three types of stainless steel: 201, 304, and 316.
[0038] Local steel profile discrimination is performed on each valid spark image block to obtain the local steel profile discrimination probabilities corresponding to the three types of stainless steel: 201, 304, and 316.
[0039] For each valid spark image block within the j-th consecutive image group The local steel profile discrimination probability vector is obtained. :
[0040] ;
[0041] in, This represents the process of extracting the probability of local steel profile discrimination.
[0042] Preferably, in step S7, the local steel pattern discrimination probabilities of effective spark image blocks within the same continuous image group are first aggregated to form three types of probabilities at the image group level; then, the three types of probabilities at the image group level within the same complete spark video are aggregated to form three types of probabilities at the video level, so as to reduce the impact of accidental changes in the spark morphology of a single image block.
[0043] Among them, the image group-level three-class probabilities and the video-level three-class probabilities are respectively :
[0044] ;
[0045] in, These represent the probabilistic aggregation processes at the image group level and video level, respectively; J* represents the set of continuous image group indices that have at least one valid spark image block within the same complete cut video.
[0046] Preferably, in step S8, the steel profile category set is as follows: The final identification result is:
[0047] ;
[0048] in, Represents the category among the three types of probabilities at the video level. The corresponding probability.
[0049] It should be noted that the above , , , , and All of these are functional processes, and their specific algorithm implementations are not limited.
[0050] According to another aspect of the present invention, a stainless steel identification system based on the visual characteristics of cutting sparks is provided, for implementing the stainless steel identification method based on the visual characteristics of cutting sparks as described above, comprising:
[0051] The spark acquisition device is used to acquire continuous images of the cutting point and spark spray area using a camera when the stainless steel sample to be tested is being cut by a cutting machine, so as to determine the spark video during the cutting process.
[0052] The computing and processing unit is used to preprocess the spark video, perform frame-level spark response, spark active period retrieval, spark region localization, candidate spark image block generation, spark validity discrimination and local steel type discrimination probability extraction, and sequentially perform image group-level and video-level probability aggregation, outputting the identification results of three types of stainless steel: 201, 304 and 316, or the results of insufficient evidence / re-collection.
[0053] Specifically, the computing processing device can be deployed in local computing devices, edge computing devices, or industrial control computers, and output the category or score of the stainless steel sample to be tested as belonging to the three types of stainless steel: 201, 304, and 316 to display, recording, or sorting equipment.
[0054] Compared with the prior art, the beneficial effects of the present invention are:
[0055] This invention retrieves active spark periods through frame-level spark response, locates spark regions within consecutive image groups, and filters valid spark image blocks, enabling subsequent local steel profile discrimination to focus on spark evidence rather than background, equipment structure, or reflective areas; then, it sequentially performs image group-level and video-level probability aggregation, without directly outputting the final steel profile from a single image block, thereby reducing the impact of accidental changes in local spark morphology on sample-level judgment. Attached Figure Description
[0056] Figure 1 This is a flowchart of the stainless steel identification method based on the visual characteristics of cutting sparks according to the present invention;
[0057] Figure 2 This is a schematic diagram of the actual original spark video frames of samples 201, 304, and 316 of the present invention;
[0058] Figure 3 The images show a comparison of spark frames before and after pretreatment of samples 201, 304, and 316 of this invention.
[0059] Figure 4 These are example diagrams of the spark response of samples 201, 304, and 316 of the present invention;
[0060] Figure 5 This is an example diagram of candidate spark image blocks for the present invention;
[0061] Figure 6 This is an example diagram of effective spark image block screening according to the present invention;
[0062] Figure 7 This is a comparison chart of the local steel profile discrimination probability of samples 201, 304, and 316 of the present invention;
[0063] Figure 8 This is a device diagram of the stainless steel identification system based on the visual characteristics of cutting sparks according to the present invention. Detailed Implementation
[0064] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0065] To address the issues of existing methods requiring specialized equipment, reagents, or standardized operating procedures, resulting in high equipment and maintenance costs and high on-site deployment barriers, as well as the reliance of manual spark identification on operator experience and significant influence from cutting conditions, observation angles, ambient light, and subjective judgment, this embodiment provides the following technical solution:
[0066] A method for identifying stainless steel based on the visual features of cutting sparks is proposed. Instead of directly judging the steel type from the entire video or a single frame, this method first retrieves the active spark periods from the video and then forms candidate local image blocks around the spark areas. After filtering for spark validity, probabilistic evidence of three types of stainless steel (201, 304, and 316) is extracted from the valid local blocks and then aggregated into image group-level and video-level results.
[0067] In this embodiment, a complete segment of video corresponds to a sample to be identified. The processing starts from the video frame, first locating the active spark interval in the time dimension, then locating the spark region in the spatial dimension, and then obtaining local candidate blocks from the region. Only local blocks that pass the spark validity screening participate in the steel type discrimination. The local steel type probability is first aggregated in the continuous image group, and then aggregated in the complete video, thereby forming a sample-level conclusion.
[0068] like Figure 1 As shown, a flowchart for sample-level stainless steel identification based on cutting spark video is presented. Figure 1 The sequential relationship between the processing objects is explained: it is only necessary to continue analyzing the spatial spark region within the spark active period after finding the spark active period in time; only when the local block is simultaneously located in the spark region and passes the validity judgment can the steel profile judgment be entered; the following uses the same complete cut video as an example to explain how this link forms sample-level conclusions in sequence; spark response, spark region localization, spark validity judgment, local steel profile judgment and probability aggregation are all defined by input-output relationship, and can be implemented by functionally equivalent visual models, detection models, classification models or statistical methods, without being subject to a fixed model structure, version or training method as a necessary condition.
[0069] The stainless steel identification method based on the visual characteristics of cutting sparks includes the following steps:
[0070] Step 1: Use a camera to capture continuous video frames during the cutting process of the stainless steel sample to be tested. The camera's field of view should cover the cutting point and the spark spray area, allowing the video to record the generation, spray, diffusion, and attenuation of sparks. Each complete video segment corresponds to a sample to be identified and can be associated with records such as sample identification, acquisition time, cutting conditions, frame rate, duration, and resolution. Different steel samples will exhibit different brightness, density, trajectory, branching, and bursting appearances during cutting. Figure 2 As shown, the original spark video frames of three types of stainless steel samples (201, 304, and 316) are presented to qualitatively demonstrate the appearance of sparks in the video to be processed. However, a single frame image is not directly used as the final steel profile conclusion.
[0071] Step 2: Input unification of video frames. This step preserves the temporal order and metadata of the video frames, scales excessively large frames proportionally, performs color format conversion and input size unification, and converts pixel values to the range required for subsequent visual processing. Input unification is used to eliminate data representation discrepancies without redrawing or altering the spark content; for example... Figure 3 As shown, a comparison of spark frames before and after pretreatment of 201, 304, and 316 stainless steel samples is presented. Figure 3 The top row of the images shows the original frames, and the bottom row shows the visualization results after the corresponding frames have been scaled proportionally, converted to the color format, and had their input sizes unified. The top and bottom images in each column come from the same source frame of the same steel profile.
[0072] Step 3: Calculate the spark response for each unified video frame, forming a time-varying spark response sequence. Based on this sequence, retrieve time intervals with higher spark responses and construct consecutive image groups within these intervals. This ensures that subsequent spatial analysis is performed only within the time ranges most likely to contain cutting sparks. Figure 4 As shown, example spark response diagrams of 201, 304, and 316 stainless steel samples are presented. Figure 4 The top row of the images shows real video frames with low spark response and no cutting sparks; the bottom row shows real video frames with high spark response and cutting sparks.
[0073] It should be noted that the spark response only answers when it is worth processing, not which part of the image is the spark. Therefore, within the already retrieved consecutive image groups, the system continues to converge the temporal candidate range into spatial candidate local blocks through spark region localization and local grid division.
[0074] Step 4: Locate the spatial range of the spark spray within each consecutive image group. After associating the spark regions in each frame, divide the image near the region into local image blocks using a regular grid. Local blocks spatially associated with the spark region constitute a candidate spark image block set. Each candidate block simultaneously retains its source video, image group, time position, and grid position. Figure 5 As shown, an example image of candidate spark image patches is given, where the rectangles represent spark regions and the grid represents candidate spark image patches associated with spark regions.
[0075] Step 5: Perform spark validity discrimination on candidate spark image blocks. This discrimination distinguishes between background, reflective, no-spark, and weak-spark local blocks and image blocks whose local spark response scores meet preset screening criteria and can be used for subsequent local steel profile discrimination. Image blocks that pass the screening are called valid spark image blocks; image blocks that do not pass the screening do not enter steel profile discrimination and subsequent aggregation. After this step, the input has converged from video frames containing various image elements to local blocks containing valid spark information; subsequent steel profile discrimination is only performed on these valid local blocks, so that the local probability more directly represents spark evidence, rather than the background or device appearance; such as Figure 6 As shown, an example image of effective spark image patch selection is given. The top row shows complete video frames with the original background preserved. In the top row of images, the upper rectangles correspond to the selected local image patches, and the lower rectangles correspond to the excluded candidate spark image patches. The bottom row shows the magnified results of the corresponding image patches in the upper rectangles.
[0076] Step 6: Input each valid spark image block into the trained visual feature extraction model to obtain the local steel type discrimination probability vector corresponding to that valid spark image block. The three components of the probability vector correspond to the discrimination probabilities of 201, 304, and 316 stainless steel types, respectively. Statistically aggregate the local steel type discrimination probabilities of each valid spark image block within the same continuous image group to obtain the probabilities of 201, 304, and 316 stainless steel types corresponding to that image group. For example... Figure 7 As shown, a comparison of the local steel profile discrimination probabilities for samples 201, 304, and 316 is presented. Table 1 shows the quantization results corresponding to the three image blocks.
[0077] Table 1: Discrimination results of local spark image patches
[0078] Real steel profile Effective spark probability 201 probability 304 probability 316 probability Local discrimination results 201 0.9519 0.9401 0.0096 0.0504 201 304 0.9850 0.0010 0.9400 0.0590 304 316 1.0000 0.0518 0.0082 0.9400 316
[0079] Step 7: Each row in Table 1 only describes the tendency of a local block and cannot replace the sample conclusion. In order to avoid random sparks dominating the results, it is necessary to first aggregate the three types of probabilities of effective local blocks in the same continuous image group to form image group-level three types of probabilities; then, aggregate the probabilities of multiple image group levels in the same complete video to form video-level three types of probabilities. This two-level aggregation allows spark evidence from different time and space locations to participate in the sample conclusion.
[0080] Step 8: The category with the highest probability value among the three categories in the video is taken as the final steel profile of the sample; when there is no valid spark image block in the video, or no valid continuous image group that can be aggregated is formed, the system outputs insufficient evidence / re-sampling is required.
[0081] To avoid statistical aggregation remaining at the conceptual level, Table 2 lists the statistical objects actually used in this implementation method and their functions: the number of effective blocks determines whether the output conditions are met, the image group level probability preserves short-term continuous evidence, the video level probability forms overall evidence of the sample, and the category with the highest probability is the final steel type.
[0082] Table 2: Sample-level statistical characteristics and decision rules
[0083] Decision item Construction method Decision-making role Number of effective local image patches Count the number of local blocks that pass the spark validity screening. No steel pattern is output when the quantity is zero. Image group level three-class probability Aggregate the three types of probabilities for local blocks within the same continuous image group. Category evidence forming this image group Video-level three-class probabilities Aggregate the three types of probabilities for each valid image group in the same video. Forming evidence of overall sample category Maximum probability category Choose the category with the highest probability value among the three categories at the video level. As the final steel profile
[0084] After Table 2 presents the decision rules, Table 3 uses three anonymous samples to illustrate how the rules apply to actual videos: each row first lists the number of valid image groups, then lists the three video-level probabilities obtained from the two-level aggregation, and finally gives the final type.
[0085] Table 3: Examples of Anonymous Samples That Predicted Correctly in Independent Validation
[0086] Anonymous samples Realistic type Number of valid image groups 201 probability 304 probability 316 probability Final type Sample 1 201 19 0.9913 0.0049 0.0038 201 Sample 2 304 11 0.0023 0.9505 0.0472 304 Sample 3 316 14 0.0007 0.0049 0.9945 316
[0087] The aforementioned charts illustrate the processing objects and experimental results. To clarify and verify the relationship between frame-level response, image group-level probability, and video-level probability, the same implementation process is expressed mathematically as follows:
[0088] Let the complete segmented video corresponding to the sample to be identified be:
[0089]
[0090] in, For the first One video frame.
[0091] The spark response module outputs a spark response value for each frame:
[0092]
[0093] in, This represents the frame-level spark response process.
[0094] Retrieve the set of active spark periods based on the response sequence:
[0095]
[0096] in, This indicates the time period retrieval process.
[0097] For each active period, construct a continuous group of images from it. And locate the spark region within the group frame. :
[0098] in, This represents the l-th video frame in the j-th consecutive image group. The j-th consecutive image group consists of video frames that are temporally adjacent during the active period of the spark and have completed unified input processing, arranged in their original temporal order. This represents the number of video frames contained in the j-th consecutive image group; This indicates the process of locating the spark area.
[0099] A set of candidate spark image patches is generated for the grid cells associated with the spark region, and the local spark response score of each candidate spark image patch is calculated in turn. Then, a set of valid spark image patches is obtained based on the local spark response scores, specifically as follows:
[0100]
[0101]
[0102]
[0103] in, This represents the process of generating candidate spark image patches. This represents the local spark response scoring process. This describes the process of selecting effective spark image blocks based on local spark response scores.
[0104] For any valid local block The local steel profile discrimination process outputs three types of probability vectors:
[0105]
[0106] set up For a continuous set of image group indices that have at least one valid spark image block within the same complete spark video, the probabilistic aggregation relationship between image group level and video level can be expressed as:
[0107]
[0108] for For any consecutive image group, the three probabilities at the image group level are obtained through an image group-level probability aggregation process; in this embodiment, the arithmetic mean of the probabilities of valid spark image blocks within the group is used:
[0109]
[0110] when When not empty, the video-level three-class probabilities are obtained through a video-level probability aggregation process; this embodiment uses the arithmetic mean of the image group-level three-class probabilities of each effective continuous image group:
[0111]
[0112] The final steel profile identification result is:
[0113]
[0114] when When the result is empty (i.e. no valid spark blocks were extracted from the entire video), the system does not output the steel pattern, but instead outputs "insufficient evidence / re-extraction is required".
[0115] like Figure 8 As shown, to better demonstrate the stainless steel identification device based on the visual characteristics of cutting sparks, this embodiment now provides a stainless steel identification system based on the visual characteristics of cutting sparks, used to implement a stainless steel identification method based on the visual characteristics of cutting sparks, including:
[0116] The spark acquisition device is used to capture continuous images of the cutting point and spark spray area using a camera when a cutting machine is cutting a stainless steel sample to be tested, forming a complete spark video corresponding to a sample to be tested.
[0117] The computing processing unit is used to perform frame-level spark response, spark active period retrieval, spark region localization, candidate local block generation, spark validity screening, local steel profile probability extraction, image group-level probability aggregation, video-level probability aggregation, and maximum probability decision, and outputs the category, probability, or evidence insufficient / re-collection results.
[0118] The spark acquisition device acquires continuous images of the cutting point and the spark spray area; the computing and processing device performs frame-level spark response, active period retrieval, spark area localization, candidate local block generation, validity screening, local steel profile probability extraction and two-level probability aggregation, and outputs the category, probability or evidence insufficient / re-collection results for display, recording or sorting equipment.
[0119] In this embodiment, the spark acquisition device uses a mobile phone with high-definition camera capabilities. The mobile phone is fixed near the cutting point via a bracket, ensuring that the camera's field of view covers both the cutting point and the spark ejection area. The mobile phone continuously acquires complete spark videos corresponding to a sample to be identified and uploads these videos to a cloud computing processing device. The cloud computing processing device sequentially performs frame decoding and input unification, frame-level spark response and active period retrieval, continuous image group construction, spark region localization, candidate image block generation, spark validity screening, local steel profile probability extraction, and image group-level and video-level probability aggregation. It determines the sample as 201, 304, or 316 stainless steel with the highest probability at the video level, or outputs the result requiring re-acquisition if evidence is insufficient.
[0120] Sample-level results are derived from the re-aggregation of image group-level probabilities, rather than by adding a separate fixed classifier. To validate this approach, the data is divided into complete videos as the smallest unit: the training set contains 3081 videos, and the independent validation set contains 297 videos. All frames, consecutive image groups, and local image patches of the same video belong to only one set, avoiding the simultaneous inclusion of adjacent images in training and validation.
[0121] Table 4 illustrates the uses of these two video sets in this embodiment: the training set is used to form the discrimination ability of each functional module; the independent validation set is only used to form sample-level results and evaluate the recognition effect on videos that were not used in the training.
[0122] Table 4: Data sets divided by complete video
[0123] Video collection Number of videos use training set 3081 It is used for processing capabilities such as spark response, spark validity determination, and local steel profile determination. Validation set 297 Sample-level recognition results used for independent verification of complete videos.
[0124] After performing the aforementioned process on 297 independent verification videos, each video generated aggregateable video-level three-class probabilities and output the steel profile. Based on this, Table 5 presents the sample-level recognition accuracy and balanced accuracy, both of which are based on the 297 independent verification videos.
[0125] Table 5: Sample-level recognition metrics for verification videos
[0126] Statistical Items result accuracy 0.8418 Balanced accuracy 0.8632
[0127] The overall indicators describe the overall recognition level, but cannot show which steel types the errors occurred in. Therefore, Table 6 lists the correspondence between the actual steel types and the recognition results for 297 independent verification videos.
[0128] Table 6: Video-level obfuscation matrix of independently verified videos
[0129] Actual steel profile / recognition result 201 304 316 Number of verification videos of this type 201 65 1 0 66 304 3 98 24 125 316 0 19 87 106
[0130] As shown in Table 6, the video-level recall rates for 201, 304, and 316 are 0.9848, 0.7840, and 0.8208, respectively. This matrix indicates that 201 is relatively easy to distinguish in the independent verification videos of this embodiment, while 304 and 316 remain the main confusion pairs. The above results only describe the verification range of this set of independent verification videos and do not constitute a performance commitment under other acquisition conditions.
[0131] It should be noted that, compared with artificial spark testing, this embodiment does not rely on personnel's experience to directly judge sparks. Instead, it uses a complete cutting video as input and completes spark period retrieval, region localization, local evidence extraction, and video-level judgment through a computing processing device. Compared with spectral or component detection schemes, this embodiment uses visible light cutting spark video obtained by ordinary vision equipment as the main input, and does not require elemental spectra obtained by dedicated spectral equipment as a necessary condition. Compared with static metal appearance recognition schemes, this embodiment utilizes dynamic spark information during the cutting excitation process and incorporates both temporal continuity and spatial locality into the recognition process. Compared with whole-frame or single-image block classification schemes, this embodiment first retrieves the active spark period based on frame-level spark response, then locates the spark region in a continuous image group and generates candidate local blocks. Only after the spark validity is screened can the local steel profile probability be extracted and statistically aggregated according to the levels of local blocks, image groups, and complete videos.
[0132] Specifically, the implementation of each of the above functional modules can be replaced by equivalent visual models, detection models, classification models or statistical methods. As long as the alternative solution maintains the functional relationship from spark time period location, spark area extraction, effective local evidence screening, local steel type discrimination to video-level aggregation, it belongs to the alternative implementation of the technical idea of this invention.
[0133] In summary, this invention uses complete video segments as the sample-level decision unit. It first determines the time range to be processed through frame-by-frame spark response, and then converges to image regions whose local spark response scores meet preset screening conditions and can be used for subsequent local steel profile identification through spark region localization and local block screening. Compared to directly classifying entire frames, this method reduces the interference of background, equipment, workpiece surfaces, and reflective areas on steel profile identification. It does not use the category of a single local block as the final conclusion, but first forms image group-level probabilities, and then video-level probabilities. Spark evidence from multiple time segments and spatial locations participates in the decision-making process, reducing the impact of accidental changes in the shape of a single frame or single spark block on the sample conclusion, and preserving the evidence path from the final conclusion back to the image group and local spark blocks. It can be implemented using a camera and computing equipment, and is suitable for scenarios such as industrial production, material circulation, incoming material inspection, and scrap metal recycling.
[0134] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for identifying stainless steel based on the visual characteristics of cutting sparks, characterized in that, Includes the following steps: S1: The stainless steel sample to be tested is cut using a cutting machine, and the complete spark video generated during the cutting process is captured by a camera. S2: Preprocess the acquired spark video, converting the video frames into a unified visual processing input format; S3: Calculate the frame-level spark response for the preprocessed video frame, retrieve the spark active period based on the frame-level spark response, and construct a continuous image group within the spark active period. S4: Locate the spark region within each consecutive image group, and generate candidate spark image blocks based on the spark region; S5: Determine the validity of candidate spark image blocks and filter out valid spark image blocks; S6: Input each effective spark image block into the trained visual feature extraction model to obtain the local steel profile discrimination probability of 201, 304 and 316 stainless steel corresponding to each effective spark image block; S7: Aggregate the local steel profile discrimination probabilities within the same continuous image group to obtain the three-class probabilities at the image group level; then aggregate the three-class probabilities at the image group level within the same complete spark video to obtain the three-class probabilities at the video level. S8: The category with the highest probability value among the three video-level categories is taken as the final identification result of the stainless steel sample to be tested; When no valid spark image blocks are selected or no valid continuous image group that can be aggregated is formed, the output evidence is insufficient / re-collection is required.
2. The stainless steel identification method based on the visual characteristics of cutting sparks according to claim 1, characterized in that, In S1, the camera's field of view covers the cutting point and the spark spray area, and the collected spark video includes the process of sparks being generated, sprayed, diffused and decayed from the cutting point. Each complete segment of video corresponds to one sample to be identified, and the complete segment of video may contain multiple consecutive image groups.
3. The stainless steel identification method based on the visual characteristics of cutting sparks according to claim 1, characterized in that, In step S2, the acquired spark video is preprocessed, including: frame decoding of video frames and preservation of time sequence and acquired metadata; proportional reduction of video frames exceeding the preset processing limit according to the original aspect ratio; conversion of video frames to RGB color representation and scaling to the square input size required for spark response calculation; conversion of pixel values from the original numerical range to the model input numerical range, and the preprocessed image retains the main visual information of the cutting point and spark density, spray direction, trajectory length, and local bifurcation shape on the spark spray path.
4. The stainless steel identification method based on the visual characteristics of cutting sparks according to claim 1, characterized in that, Within the continuous image group formed during the active spark period, candidate spark image blocks cover multiple spatial locations near the cutting point and in the spark jet direction, and cover multiple time frames during the cutting process. Wherein, the j-th consecutive image group is After spark region localization and candidate spark image patch generation, a set of candidate spark image patches is obtained. : ; in, This indicates the process of generating candidate spark image blocks.
5. The stainless steel identification method based on the visual characteristics of cutting sparks according to claim 1, characterized in that, Local spark response scores are calculated for candidate spark image blocks. These scores characterize the effectiveness of spark information in the image blocks and comprehensively reflect the spark visual information, including spark brightness, spark density, spark texture, wake morphology, bifurcation morphology, burst area, and local contrast. Among them, for the candidate spark image patch in the j-th consecutive image group Calculate its spark response score : ; in, This indicates the spark response scoring process.
6. The stainless steel identification method based on the visual characteristics of cutting sparks according to claim 1, characterized in that, Candidate spark image blocks are filtered based on the local spark response scores to obtain a set of valid spark image blocks for the j-th consecutive image group; the image blocks in the set meet the preset filtering conditions and are used for subsequent local steel profile discrimination. The set of valid spark image blocks is as follows: ; in, This indicates the process of filtering valid spark image blocks.
7. The stainless steel identification method based on the visual characteristics of cutting sparks according to claim 1, characterized in that, Local steel profile discrimination is performed on each valid spark image block to obtain the local steel profile discrimination probabilities corresponding to the three types of stainless steel: 201, 304, and 316. For each valid spark image block within the j-th consecutive image group The local steel profile discrimination probability vector is obtained. : ; in, This represents the process of extracting the probability of local steel profile discrimination.
8. The stainless steel identification method based on the visual characteristics of cutting sparks according to claim 1, characterized in that, In S7, the local steel pattern discrimination probability of effective spark image blocks within the same continuous image group is statistically aggregated first, and then the image group-level results within the same complete cut video are statistically aggregated to reduce the impact of accidental changes in the spark morphology of a single image block. Among them, the image group-level three-class probabilities and the video-level three-class probabilities are respectively : ; in, These represent the probabilistic aggregation processes at the image group level and video level, respectively; J* represents the set of continuous image group indices that have at least one valid spark image block within the same complete cut video.
9. The stainless steel identification method based on the visual characteristics of cutting sparks according to claim 1, characterized in that, In S8, the set of steel profile categories is as follows: The final identification result is: ; in, Represents the category among the three types of probabilities at the video level. The corresponding probability.
10. A stainless steel identification system based on the visual characteristics of cutting sparks, used to implement the stainless steel identification method based on the visual characteristics of cutting sparks as described in any one of claims 1-9, characterized in that, include: The spark acquisition device is used to acquire continuous images of the cutting point and spark spray area using a camera when the stainless steel sample to be tested is being cut by a cutting machine, so as to determine the spark video during the cutting process. The computing and processing unit is used to preprocess the spark video, perform frame-level spark response, spark active period retrieval, spark region localization, candidate spark image block generation, spark validity discrimination and local steel type discrimination probability extraction, and sequentially perform image group-level and video-level probability aggregation, outputting the identification results of three types of stainless steel: 201, 304 and 316, or the results of insufficient evidence / requiring re-sampling.
