A method and terminal for improving flame image recognition accuracy

By segmenting and identifying the target, extracting and mapping image features, stitching the target color blocks and preset images, forming an updated image and training a neural network, the problem of low recognition accuracy in flame image recognition is solved and higher image recognition accuracy is achieved.

CN114782869BActive Publication Date: 2025-02-25XIAMEN HLWYMOBI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210453482.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-27
Publication Date
2025-02-25
Estimated Expiration
2042-04-27

AI Technical Summary

Technical Problem

In the prior art, in flame image recognition, there are problems in which the recognition target is not specified, background timing changes affect accuracy, and lack of preprocessing, resulting in difficult learning of feature changes.

Method used

By obtaining the preset image set, segmenting out the recognition target, extracting image features and mapping it to the color space, obtaining the target color block, stitching the target color block and the preset image, forming an updated image, and using the updated image to train the preset neural network.

Benefits of technology

Without destroying the preset image structure, the interpretability of image features is increased and the image recognition accuracy of neural networks is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114782869B_ABST
    Figure CN114782869B_ABST
Patent Text Reader

Abstract

The present invention provides a method and a terminal for improving the accuracy of flame image recognition, which comprises the following steps: obtaining a preset atlas, segmenting an identification target from each preset image in the preset atlas; extracting image features of the identification target, mapping the image features into a color space, and obtaining a target color block; splicing the target color block with the preset image to obtain an updated image; and training a preset neural network according to the updated image. The present invention maps the image features into a color space to obtain a target color block, splices the target color block with the original preset image to obtain an updated image, and uses the updated image to train the preset neural network, thereby increasing the interpretability of features in the preset image without destroying the structure of the preset image, and improving the accuracy of classification performed by the neural network that is finally trained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition processing, and in particular to a method and a terminal for improving flame image recognition accuracy. Background Art

[0002] TSN (Temporal Segment Networks) is a classic model for video classification. However, it learns the temporal changes of optical flow and RGB Diff (deviation), and has the following disadvantages: 1. It does not specify the region of interest, and the temporal changes of the background will affect the accuracy of learning; 2. It does not include pre-processing, and may not be able to learn some feature changes that experts consider appropriate. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a method and a terminal for improving the accuracy of flame image recognition, so as to achieve higher-precision image recognition.

[0004] In order to solve the above technical problems, a technical solution adopted by the present invention is:

[0005] A method for improving flame image recognition accuracy comprises the steps of:

[0006] Acquire a preset atlas, and segment a recognition target from each preset image in the preset atlas;

[0007] Extracting image features of the recognition target, mapping the image features into a color space, and obtaining a target color block;

[0008] Splicing the target color block with the preset image to obtain an updated image;

[0009] A preset neural network is trained according to the updated image.

[0010] In order to solve the above technical problems, another technical solution adopted by the present invention is:

[0011] A terminal for improving the accuracy of flame image recognition comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0012] Acquire a preset atlas, and segment a recognition target from each preset image in the preset atlas;

[0013] Extracting image features of the recognition target, mapping the image features into a color space, and obtaining a target color block;

[0014] Splicing the target color block with the preset image to obtain an updated image;

[0015] A preset neural network is trained according to the updated image.

[0016] The beneficial effects of the present invention are as follows: firstly, the recognition target of interest is segmented out in the image, the image features of the recognition target are obtained, the image features are mapped into the color space to obtain the target color block, the target color block and the original preset image are spliced ​​to obtain an updated image, and the preset neural network is trained using the updated image, which increases the interpretability of the features in the preset image without destroying the preset image structure, and improves the classification accuracy of the neural network that is finally trained. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flowchart of a method for improving flame image recognition accuracy according to an embodiment of the present invention;

[0018] Figure 2 A schematic diagram of the structure of a terminal for improving flame image recognition accuracy according to an embodiment of the present invention;

[0019] Figure 3 A schematic diagram of calculation of stitching a target color block and a preset image according to an embodiment of the present invention;

[0020] Figure 4 A schematic diagram of actual splicing of a target color block and a preset image according to an embodiment of the present invention;

[0021] Description of labels:

[0022] 1. A terminal for improving the accuracy of flame image recognition; 2. A processor; 3. A memory. DETAILED DESCRIPTION

[0023] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.

[0024] Please refer to Figure 1 , a method for improving the accuracy of flame image recognition, comprising the steps of:

[0025] Acquire a preset atlas, and segment a recognition target from each preset image in the preset atlas;

[0026] Extracting image features of the recognition target, mapping the image features into a color space, and obtaining a target color block;

[0027] Splicing the target color block with the preset image to obtain an updated image;

[0028] A preset neural network is trained according to the updated image.

[0029] From the above description, it can be seen that the beneficial effects of the present invention are: first, the recognition target of interest is segmented out in the image, the image features of the recognition target are obtained, the image features are mapped into the color space to obtain the target color block, the target color block and the original preset image are spliced ​​to obtain an updated image, and the preset neural network is trained using the updated image. The interpretability of the features in the preset image is increased without destroying the preset image structure, thereby improving the classification accuracy of the neural network that is finally trained.

[0030] Furthermore, it also includes:

[0031] Obtaining a marking category corresponding to the preset image;

[0032] The extracting of the image features of the recognition target comprises:

[0033] Acquire candidate features, and determine image features according to the strength of the correlation between the candidate features and the tag category;

[0034] Extract image features of the recognition target.

[0035] From the above description, it can be seen that by setting multiple post-selected features, the image features are first determined based on the strength of the correlation between the multiple candidate features and the marked categories, and then the corresponding image features of the identified target are extracted; there is no need to calculate the data with weak correlation with the marked category, which reduces the calculation time and improves the efficiency of image processing.

[0036] Further, mapping the image features into a color space includes:

[0037] Calculate the coordinates (r, g, b) of the image feature in the color space;

[0038] r=int(r1×256), g=int(g1×256), b=b1×256;

[0039] r1=float(r2 / 256), g1=float(g2 / 256), b1=float(b2 / 256);

[0040] r2=x%256, g2=(x-r2) / 256%256, b2=((x-r2-g2×256) / (256×256)%256);

[0041] x=the value of the image feature×256.

[0042] From the above description, it can be seen that converting image features into coordinates in the color space according to a certain calculation method and converting image features into color features that are easy to be understood and learned by the model enhances the interpretability of the features in the image.

[0043] Furthermore, obtaining the preset atlas includes:

[0044] A preset video is obtained, and video frames are extracted from the preset video as preset images, and the preset images constitute the preset atlas.

[0045] From the above description, it can be seen that video frames are obtained from the video as preset images to form a preset atlas. Since in the actual production process, most of the data generated is video data, such as monitoring data, obtaining the preset atlas from the video is more convenient for use in the actual production process.

[0046] Further, extracting a video frame from the preset video includes:

[0047] determining a preset interval;

[0048] Determining the number of video frames to be extracted according to the preset interval;

[0049] Determine whether the number of video frames is greater than or equal to a preset value, and if not, return to the step of determining the preset interval;

[0050] Video frames are extracted from the preset video according to the preset interval.

[0051] From the above description, it can be seen that by extracting video frames at fixed pre-review intervals, extraction from the video to a preset atlas is achieved while retaining the original content of the video as much as possible, which facilitates labeling and reduces the workload of labeling by controlling the number of video frames.

[0052] Furthermore, the step of splicing the target color block with the preset image to obtain an updated image includes:

[0053] Splicing the target color block with the preset image to obtain an updated image;

[0054] Replacing the video frame corresponding to the preset image in the preset video with the updated image to obtain an updated video;

[0055] The training of a preset neural network according to the updated image comprises:

[0056] A preset neural network is trained according to the updated video.

[0057] From the above description, it can be seen that the target color block and the preset image are spliced ​​to obtain an updated image, the extracted features are directly integrated into the original preset image, and finally restored to the original video. While adding readable features, it will not affect the original features in the video, so that the neural network finally trained can have a better classification effect.

[0058] Furthermore, after training the preset neural network according to the updated image, the method further includes:

[0059] Acquire a real-time image, and obtain a classification result by passing the real-time image through the trained preset neural network;

[0060] The classification result is compared with a preset result, and the fan speed is adjusted according to a difference between the classification result and the preset result.

[0061] It can be seen from the above description that after the classification result is obtained, the rotation speed of the fan is adjusted according to the difference between the classification result and the preset result, so as to achieve the purpose of effectively controlling the flame intensity.

[0062] Further, comparing the classification result with a preset value and adjusting the fan speed according to the difference between the classification result and the preset value includes:

[0063] Obtaining a preset correction value, and adjusting the classification result according to the preset correction value;

[0064] Searching a preset rule base according to the difference between the adjusted classification result and the preset result to obtain a search result;

[0065] The fan speed control value is output according to the search result.

[0066] From the above description, it can be seen that a correction value is introduced, and the obtained classification result is adjusted according to the correction value. The human experience value is introduced into the output result of the model to further improve the accuracy of the classification result. A preset rule base is set, and different fan speed control values ​​are matched to different classification results in the rule base. The corresponding fan speed control value is output according to the retrieval result to achieve effective control of the fan, thereby achieving effective control of the flame intensity.

[0067] Furthermore, segmenting the identification target from each preset image in the preset atlas includes:

[0068] The BiseNetV2 network is used to segment and identify the target from each preset image in the preset atlas.

[0069] From the above description, it can be seen that the segmentation of the recognition target in the preset image through the BiseNetV2 network can take into account both macro features and surrounding features, achieve high-precision recognition target extraction, and lay the foundation for subsequent steps.

[0070] Please refer to Figure 2 A terminal for improving the accuracy of flame image recognition includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned method for improving the accuracy of image recognition are implemented.

[0071] The method and terminal for improving the accuracy of flame image recognition of the present invention can be applied to the scene where the flame characteristics need to be recognized, such as the determination of the flame intensity in the steelmaking process. The following is an explanation of the specific implementation method.

[0072] Please refer to Figure 1 , Embodiment 1 of the present invention is:

[0073] A method for improving flame image recognition accuracy comprises the steps of:

[0074] S1, obtaining a preset atlas, and segmenting a recognition target from each preset image in the preset atlas. In this embodiment, the recognition target is a flame;

[0075] In an optional implementation, a label category corresponding to each preset image is obtained; for example, each preset atlas corresponds to a label category, and there are seven label categories in total, namely, severe over-excitation, severe anger, mild over-excitation, mild anger, moderate over-excitation, moderate anger, and normal. The number of preset images in each preset atlas is the same, for example, each label category corresponds to 500 preset images; labeling can be performed using a labeling tool, such as EISeg;

[0076] Among them, over-extraction is a state of flame, which evaluates the current converter fan speed and adjusts the fan speed accordingly; over-extraction in flame performance means that the flame does not overflow the furnace mouth within a period of time; big fire means that the flame overflows the furnace mouth within a period of time exceeding the first preset time period; normal means that the flame enters and exits the furnace mouth within a period of time, that is, the flame maintains overflowing the furnace mouth or does not overflow the furnace mouth within the range of the second preset time period;

[0077] In an optional implementation, obtaining a preset atlas includes: obtaining a preset video, extracting video frames from the preset video as preset images, and the preset images constitute the preset atlas; wherein extracting video frames from the preset video includes: S11, determining a preset interval; S12, determining the number of video frames to be extracted according to the preset interval; S13, judging whether the number of video frames is greater than or equal to a preset value, if not, returning to S11; if yes, extracting video frames from the preset video according to the preset interval;

[0078] In an optional embodiment, all preset images are divided into a training set, a validation set, and a test set according to a preset ratio, such as 6:2:2, and the BiseNetV2 network is adjusted through the divided training set, validation set, and test set to achieve the indicators Images: 808; mIoU: 0.9590; Acc: 0.9891; Kappa: 0.9578Dice: 0.9789; and the recognition target is segmented from each preset image of the preset atlas through the adjusted BiseNetV2 network;

[0079] Wherein, Images represents the number of images in the validation set, which is 808 in this embodiment;

[0080] mIOU represents the average value of the intersection-over-union ratio between the predicted area and the true area of ​​all classes;

[0081] Acc represents the ratio of the intersection of the predicted area and the true area of ​​all classes to the predicted area;

[0082] Kappa represents an indicator for consistency testing, which can be used to measure the effect of classification. Its main function is to give low scores to models with strong bias. The calculation of the kappa coefficient is based on the confusion matrix, with a value between -1 and 1, usually greater than 0. The calculation formula of kappa is:

[0083] p0-p e / 1-p e ;

[0084] in

[0085] dice represents the relationship between the predicted value set and the true value set, and the formula is

[0086]

[0087] Among them, pred is the set of predicted values, and true is the set of true values;

[0088] S2, extracting the image features of the recognition target, mapping the image features into a color space, and obtaining a target color block, including:

[0089] S21, obtaining candidate features, and determining image features according to the strength of the correlation between the candidate features and the tag category;

[0090] In an optional implementation, the candidate features are sorted from strong to weak according to the correlation with the marked category, and a preset number of candidate features are obtained as image features; for example, the area ratio, length ratio, width ratio and jitter ratio are obtained as image features, and their values ​​are all in the range of [0,1];

[0091] Among them, area ratio = recognition target area / single frame area, binary image contours are required, and contours with an area less than 100 are filtered, and then the bounding rectangles of all contours are calculated; length ratio = recognition target bounding rectangle width / single frame width; height ratio = recognition target bounding rectangle height / single frame height; jitter ratio = recognition target area / recognition target bounding rectangle area;

[0092] S22, extracting image features of the identified target;

[0093] S23, calculating the coordinates (r, g, b) of the image feature in the color space:

[0094] r=int(r1×256), g=int(g1×256), b=b1×256;

[0095] r1=float(r2 / 256), g1=float(g2 / 256), b1=float(b2 / 256);

[0096] r2=x%256, g2=(x-r2) / 256%256, b2=((x-r2-g2×256) / (256×256)%256);

[0097] x = the value of the image feature × 256;

[0098] S24, mapping the image into a color space according to the (r, g, b) to obtain a target color block;

[0099] S3, splicing the target color block with the preset image to obtain an updated image, including:

[0100] S31, determining the weight of the target color block and the preset image;

[0101] S32, determining the position of the target color block according to the weight and calculating the area of ​​the target color block;

[0102] S33, splicing the target color block around the preset image according to the position and area to obtain an updated image;

[0103] In an optional implementation, the updated image replaces a video frame corresponding to the preset image in the preset video to obtain an updated video;

[0104] S4, training a preset neural network according to the updated image;

[0105] In an optional implementation, a preset neural network is trained based on the updated video, the updated video is divided into a training set, a validation set, and a test set according to a preset ratio, and the preset neural network is trained based on the training set, the validation set, and the test set, and the trained neural network can obtain a classification result of one of the labeled categories based on the input video;

[0106] In an optional implementation, the preset neural network is TSN (Temporal Segment Networks, deep behavior recognition network);

[0107] S5, acquiring a real-time image, and obtaining a classification result by passing the real-time image through the trained preset neural network;

[0108] In an optional implementation, real-time video is acquired, and the steps experienced by the preset image in S1-S3 are executed, and then sent to a preset neural network to obtain a classification result;

[0109] S6, comparing the classification result with the preset result, and adjusting the fan speed according to the difference between the classification result and the preset result;

[0110] In an optional embodiment, it also includes obtaining a preset correction value, adjusting the classification result according to the preset correction value; searching a preset rule library according to the difference between the adjusted classification result and the preset result to obtain a search result; outputting a fan speed control value according to the search result, such as introducing converter smelting process control parameters (such as oxygen lance height, oxygen supply flow, oxygen consumption %, type and quantity of slag making materials), flue gas detection parameters (CO, CO2, O2), the speed of a primary dust removal fan, etc., to obtain a correction to the judgment of the converter furnace mouth flame characteristics.

[0111] Please refer to Figure 3 and Figure 4 , Embodiment 2 of the present invention is:

[0112] A method for improving flame image recognition accuracy, which is different from the first embodiment in that:

[0113] A specific scenario is used to illustrate how to stitch the target color block and the preset image, i.e., step S3:

[0114] S31, obtaining the length X and width Y of the preset image; obtaining the weight R of the target color block and the preset image: 1, and the weights of multiple target color blocks are equal;

[0115] S32, obtaining target color blocks A1, A2, A3 and A4 corresponding to the area ratio, length ratio, width ratio and jitter ratio respectively;

[0116] S33, please refer to Figure 3 ,If the four target color blocks are concatenated with the preset image, the width added on one side is x1, and the height added on one side is y1. When the weights of the four target color blocks are equal, (X+x1)×y1=(Y+y1)×x1, and simplification yields y1 / x1,=Y / X; Then A1, A2, A3 and A4 are spliced ​​with the preset image according to the calculated x1 and y1; please refer to Figure 4 , is a schematic diagram after the target color block and the preset image are spliced. It can be seen that the identification target, namely the flame, has been extracted in the figure, and the four surrounding target color blocks correspond to different features, so the colors are different;

[0117] In an optional implementation, if the number of target color blocks is a preset number, calculating the area includes the steps of:

[0118] A1. Determine the area ratio according to the weights between the target color blocks. For example, the ratio of the target color blocks B1, B2 and B3 is 2:1:1.

[0119] A2. Calculate the area of ​​a unit and determine the area of ​​the color block based on the area of ​​a unit and the area ratio:

[0120] Total area of ​​color block: B = 2Yy1 + 2Xx1 + 4x1y1;

[0121] Unit color block area unitB = A / n; n is the total number of proportions, which is 2+1+1=4 in this process;

[0122] The ratio of the unit color block to the original image is recorded as R:1. In this process, the weight ratio of the target color block to the original image is 4:R;

[0123] Keep the ratio between the length and width of the stitched image the same as the original image, then y1 / x1,=Y / X;

[0124] According to the above four formulas, simplify get:

[0125]

[0126]

[0127] Embodiment 3 of the present invention is:

[0128] Provide the pseudo code of BiseNetV2 network:

[0129] Step 1: Build the model:

[0130] batch_size:4 [The size of the mini-batch (the number of training sets used for a gradient descent) on the GPU or CPU]

[0131] iters:50000 [number of iterations for training the model]

[0132] train_dataset: [training data set]

[0133] type:Dataset

Custom dataset

[0134] dataset_root:custom_dataset [dataset storage directory]

[0135] train_path:custom_dataset / train.txt [path of training dataset]

[0136] num_classes:2 [number of pixel categories]

[0137] Step 2: Construct a method to change the image:

[0138] transforms: [Transformation method of the image]

[0139] -type:Resize

Adjust image size

[0140] target_size:[1280,720] [The size of the target image, adjust the images of different resolutions to the same resolution, so as to facilitate the training in the network model]

[0141] -type:RandomHorizontalFlip

Flip the image horizontally with a certain probability, which can increase the number of preset images in the preset atlas and increase the amount of data available for training the model

[0142] -type:Normalize

Normalize the image

[0143] mode:train [Which dataset to use]

[0144] val_dataset: [Validation dataset]

[0145] type:Dataset

Custom dataset

[0146] dataset_root:custom_dataset [dataset storage directory]

[0147] val_path:custom_dataset / val.txt [Path of the validation dataset]

[0148] num_classes:2 [number of pixel categories]

[0149] transforms: [Transformation method of the image]

[0150] -type:Resize

Adjust image size

[0151] target_size:[1280,720] [target image size]

[0152] -type:Normalize

Normalize the image

[0153] mode:val [which dataset to use]

[0154] Step 3: Build the optimizer:

[0155] optimizer: [training optimizer]

[0156] type:sgd [optimizer type, set to stochastic gradient descent]

[0157] momentum:0.9 [Momentum optimization method, set momentum to 0.9]

[0158] weight_decay:4.0e-5 [L2 regularization value, set to 4.0e-5]

[0159] Step 4: Construct learning rate

[0160] lr_scheduler: [Learning rate]

[0161] type:PolynomialDecay [The learning rate type is set to PolynomialDecay, polynomial decay, that is, the learning rate obtained is the interpolation of the weighted ratio points calculated by the polynomial between the initial learning rate and the given final learning rate]

[0162] learning_rate:0.01 [initial learning rate]

[0163] end_lr:0 [final learning rate]

[0164] power:0.9

attenuation rate

[0165] Step 5: Construct loss function:

[0166] loss: [loss function]

[0167] types:

[0168] -type:CrossEntropyLoss [the type of loss function is cross entropy]

[0169] coef:[1,1,1,1,1] [coefficient list corresponding to the loss function list]

[0170] Step 6: Train the model according to the set parameters:

[0171] model:

[0172] type:BiSeNetV2

model

[0173] pretrained:xxx

pre-trained model

[0174] Embodiment 4 of the present invention is:

[0175] Provide a TSN network implementation steps and pseudo code:

[0176] Step 1: input a video training set, a video verification set and hyperparameters. In an optional implementation, the number of video training sets is 1533, and the number of video verification sets is 511; read in a hyperparameter file and establish a hyperparameter dictionary;

[0177] Step 2: Read in the basic model and build a model based on the basic model:

[0178] Step 201, read in layers (network layer) and select the number of layers of ResNet;

[0179] Step 202: reorganize the video data;

[0180] Step 203: Establish a two-dimensional convolutional layer. In this embodiment, the number of output channels of the convolutional layer is 64, the convolution kernel size is 7, the step size is 2, and the padding size is 3;

[0181] Step 204, establish a batch normalization layer and activation function Relu;

[0182] Step 205: Establish a pooling layer. In this embodiment, the size of the pooling kernel is 3, the step size is 2, the padding size is 1, and the pooling type is max-pooling.

[0183] Step 206, establish each module Bottleneckblock (residual block) of ResNet;

[0184] Step 207, establish a pooling layer in ResNet, and the pooling type is avg-pooling (global pooling);

[0185] Step 208, reshape features according to seg_num; wherein, the segmented sampling strategy of TSN divides a video data into seg_num segments, wherein each segment has a sampling length of seglen frames, performs data enhancement and then inserts it back, and finally splices the seg_num segment features;

[0186] Step 209, establish a fully connected layer, the output unit is the number of categories 7, the activation function is softmax, and the variance of the random initialization parameter is set according to the feature shape;

[0187] Step 3: Read the loss function, optimizer, data reader, and evaluation index attached to the model;

[0188] Step 4: Read the GPU amount, thread amount, total number of rounds, print the number of rounds, and save the number of rounds;

[0189] Step 5: Read in the data and perform data enhancement, and input the enhanced data into the model;

[0190] Step 6: Train and record the process, save the process model and the best verification model;

[0191] MODEL:

[0192] name:"TSN"

[0193] format:"video"#["video","frames"]

Input is video

[0194] #num_classes:400

[0195] num_classes:7 [7 labeled categories]

[0196] seglen:1 [number of frames sampled per segment]

[0197] image_mean:[0.485,0.456,0.406][data enhancement z-score]

[0198] image_std:[0.229,0.224,0.225][data enhancement z-score]

[0199] num_layers:101 [number of layers in ResNet]

[0200] topk:1 [evaluation indicator, the hit rate of the highest accuracy in a batch]

[0201] TRAIN:

[0202] seg_num:3#training with 3segments [The number of segments in the segment sampling strategy proposed by TSN]

[0203] epoch:45

Training discussion

[0204] short_size:256 [Data enhancement, adjust the short side of the frame to a certain number of pixels, and the long side to an integer of *4 / 3]

[0205] target_size:224 [Data enhancement, cropping, resizing the frame to the target size]

[0206] num_reader_threads: 12 [number of threads for processing the original input mapping]

[0207] buf_size:1024 [queue size for reading data]

[0208] batch_size:8 [batch size]

[0209] use_gpu:True [Whether to use GPU, default is not used]

[0210] num_gpus:1 [Number of GPUs]

[0211] filelist:". / data / dataset / tsn / train.list"[training data list]

[0212] learning_rate:0.00125 [initial learning rate]

[0213] learning_rate_decay:0.1 [Learning rate decay]

[0214] l2_weight_decay:1e-4 [L2 regularized weight decay]

[0215] momentum:0.9 [Optimizer, making the gradient swing smaller]

[0216] total_videos:1533 [step = total videos / batch_size + 1]

[0217] VALID:

[0218] seg_num:3 [The number of segments in the segment sampling strategy proposed by TSN]

[0219] short_size:256 [Data enhancement, adjust the short side of the frame to a certain number of pixels, and the long side to an integer of *4 / 3]

[0220] target_size:224 [Data enhancement, cropping, resizing the frame to the target size]

[0221] num_reader_threads: 12 [number of threads for processing the original input mapping]

[0222] buf_size:1024 [queue size for reading data]

[0223] batch_size:32 [batch size]

[0224] filelist:". / data / dataset / tsn / val.list"[Verification data list]

[0225] TEST:

[0226] seg_num:7 [The number of segments in the segment sampling strategy proposed by TSN]

[0227] short_size:256 [Data enhancement, adjust the short side of the frame to a certain number of pixels, and the long side to an integer of *4 / 3]

[0228] target_size:224 [Data enhancement, cropping, resizing the frame to the target size]

[0229] num_reader_threads: 12 [number of threads for processing the original input mapping]

[0230] buf_size:1024 [queue size for reading data]

[0231] batch_size:1 [batch size]

[0232] filelist:". / data / dataset / tsn / test.list"

test data list

[0233] INFER:

[0234] seg_num:3#infer using 300segments [The number of segments in the segment sampling strategy proposed by TSN]

[0235] short_size:256 [Data enhancement, adjust the short side of the frame to a certain number of pixels, and the long side to an integer of *4 / 3]

[0236] target_size:224 [Data enhancement, cropping, resizing the frame to the target size]

[0237] num_reader_threads: 12 [number of threads for processing the original input mapping]

[0238] buf_size:1024 [queue size for reading data]

[0239] batch_size:32 [batch size]

[0240] filelist:". / data / dataset / tsn / infer.list"[Inference data list]

[0241] Please refer to Figure 2 , Embodiment 5 of the present invention is:

[0242] A terminal 1 for improving image recognition accuracy includes a processor 2, a memory 3, and a computer program stored in the memory 3 and executable on the processor 2. When the processor 2 executes the computer program, each step in the first embodiment is implemented.

[0243] In summary, the present invention provides a method and terminal for improving image recognition accuracy. By using a feature fusion method, the traditional single-frame index is added as a color block to the original image. Figure 4 Zhou increased the interpretability of image features without destroying the structure of the original image, and introduced empirical values ​​as a reference to provide correction values ​​for the model results, further improving the accuracy of image detection. In view of the fact that most scenes are surveillance videos, the video frames are extracted from the video as the original image for obtaining the target color block, and the video is directly recognized through the TSN network, which is more in line with the actual usage scenario. At the same time, after obtaining the recognition result, the fan is controlled according to the difference between the recognition result and the preset result, so as to adjust the flame size and realize automatic control.

[0244] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for improving flame image recognition accuracy, characterized in that: Includes steps: Acquire a preset atlas, and segment a recognition target from each preset image in the preset atlas; Extracting image features of the recognition target, mapping the image features into a color space, and obtaining a target color block; Splicing the target color block with the preset image to obtain an updated image; Training a preset neural network according to the updated image; Also includes: Obtaining a marking category corresponding to the preset image; The extracting of the image features of the recognition target comprises: Acquire candidate features, and determine image features according to the strength of the correlation between the candidate features and the tag category; Extract image features of the recognition target.

2. A method for improving flame image recognition accuracy according to claim 1, characterized in that: Mapping the image features into a color space comprises: Calculate the coordinates (r, g, b) of the image feature in the color space; r=int(r1×256), g=int(g1×256), b=b1×256; r1=float(r2 / 256), g1=float(g2 / 256), b1=float(b2 / 256); r2=x%256, g2=(x-r2) / 256%256, b2=((x-r2-g2×256) / (256×256)%256); x = the value of the image feature × 256.

3. A method for improving flame image recognition accuracy according to any one of claims 1-2, characterized in that: The obtaining of the preset atlas comprises: A preset video is obtained, and video frames are extracted from the preset video as preset images, and the preset images constitute the preset atlas.

4. A method for improving flame image recognition accuracy according to claim 3, characterized in that: The extracting a video frame from the preset video comprises: determining a preset interval; Determining the number of video frames to be extracted according to the preset interval; Determine whether the number of video frames is greater than or equal to a preset value, and if not, return to the step of determining the preset interval; Video frames are extracted from the preset video according to the preset interval.

5. A method for improving flame image recognition accuracy according to claim 3, characterized in that: The step of splicing the target color block with the preset image to obtain an updated image includes: Splicing the target color block with the preset image to obtain an updated image; Replacing the video frame corresponding to the preset image in the preset video with the updated image to obtain an updated video; The training of a preset neural network according to the updated image comprises: A preset neural network is trained according to the updated video.

6. A method for improving flame image recognition accuracy according to claim 1, characterized in that: After training the preset neural network according to the update image, the following step further includes: Acquire a real-time image, and obtain a classification result by passing the real-time image through the trained preset neural network; The classification result is compared with a preset result, and the fan speed is adjusted according to a difference between the classification result and the preset result.

7. A method for improving flame image recognition accuracy according to claim 6, characterized in that: Comparing the classification result with the preset value and adjusting the fan speed according to the difference between the classification result and the preset value comprises: Obtaining a preset correction value, and adjusting the classification result according to the preset correction value; Searching a preset rule base according to the difference between the adjusted classification result and the preset result to obtain a search result; The fan speed control value is output according to the search result.

8. A method for improving flame image recognition accuracy according to claim 1, characterized in that: The step of segmenting the recognition target from each preset image in the preset atlas comprises: The BiseNetV2 network is used to segment and identify the target from each preset image in the preset atlas.

9. A terminal for improving the accuracy of flame image recognition, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for improving the accuracy of flame image recognition according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • A pathological image classification method and computer equipment

    CN109740652A

  • NBI image processing method based on deep learning and image enhancement and application thereof

    CN110189303A