A special operation recognition method based on visual detection

By designing multi-scale parallel branch feature extraction modules and annotation framing criteria in special operation operation recognition, the problem of inaccurate target detection of lightweight detection algorithms in special operation scenarios is solved, and high-resolution feature extraction and stable detection are achieved. The detection effect reduces the false detection rate.

CN118485881BActive Publication Date: 2024-10-25HANGZHOU SHENBANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410934012.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-10-25
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

In special operation business scenarios, the existing lightweight detection algorithms have inaccurate detection results for targets with similar characteristics, and there is the problem of target misdetection. Moreover, the design of the feature extraction network is serial and one-way, making it difficult to retain the characteristics of small targets. , resulting in failure to detect.

Method used

Design a special operation operation recognition method based on visual inspection. By designing annotation framing criteria during the annotation process, using a multi-scale parallel branch feature extraction module, maintaining a high-resolution representation of the network branch, integrating feature extraction, fusion and detection heads module to reduce the probability of false detection and adapt to the lightweight needs of the edge.

Benefits of technology

It significantly reduces the false detection rate, improves the detection ability of small targets, ensures the accuracy and stability of scoring, adapts to the data characteristics of special operations, and reduces computational overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118485881B_ABST
    Figure CN118485881B_ABST
Patent Text Reader

Abstract

The present invention discloses a special operation operation recognition method based on visual detection. In order to overcome the problem that the existing lightweight detection algorithm has inaccurate detection results of targets with similar features and there is a problem of target misdetection in specific special operation business scenarios; the present invention includes the following steps: automatically calibrate the targets in the collected image data according to the set annotation frame criteria; design a feature extraction module with parallel branches of different scales, and the feature graphs of each parallel branch are reduced and fused downward or increased and fused upward; fuse the feature graphs at different magnifications according to the output of the feature extraction module, and downsample the fused feature graphs to generate different feature fusion outputs; integrate and construct a special operation detection algorithm model. For the multi-scale fusion of different feature branches of the lightweight feature extraction network, the network branches with high-resolution representation are retained, and more detailed features can be retained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of practical operation examination recognition, and in particular to a special operation operation recognition method based on visual detection. Background Art

[0002] The special operation qualification examination consists of two parts: safety technology theory examination and practical operation examination. In the training and qualification examination of special operation personnel, practical operation (referred to as practical operation) is an indispensable content. However, there are some problems with the traditional practical operation examination method, including that the simulation of subjects such as welding operation practical operation is not realistic enough, and the practical operation examination content and intelligent scoring do not fully meet the examination standards. The existence of these problems may lead to inaccurate and lack of objectivity in the examination results.

[0003] In order to solve these problems, special operations AI recognition algorithms based on image processing and behavior recognition technology have been put on the agenda, aiming to provide an innovative method to evaluate the performance of special operations personnel in project operations. Take melting welding, one of the special operations subjects, as an example: by utilizing advanced algorithms and pattern recognition technology, it is possible to accurately analyze image data and the behavior of operators during the welding process, and realize automatic detection and scoring of welding quality and operating specifications. Compared with traditional practical examination methods, the melting welding AI scoring system has a higher degree of simulation and can simulate actual welding scenarios more realistically. At the same time, the system's intelligent scoring can quickly and accurately evaluate the practical performance of special operations personnel based on pre-set examination standards, and provide more objective and reliable examination results.

[0004] Due to the limitations of onboard AI computing power on the edge side, lightweight target detection algorithms represented by YOLOv1-v9, YOLOX, PP-Picodet, etc. are often used in similar scenarios. These algorithms are often composed of three modules: feature extraction module (backbone), feature fusion module (neck), and detection head module (head) for reasoning application.

[0005] Although existing lightweight detection algorithms have continuously achieved better performance, such as higher AP values, on some authoritative benchmark datasets (such as COCO), they still perform less than ideal in specific special operations business scenarios, such as detecting small targets and targets with similar features. For example, in artificially constructed test scenarios, existing algorithms are easily affected by background walls and different operating actions and angles. It is also difficult to eliminate the influence of other interferences. In addition, there are also problems such as false detection of targets, so higher requirements are needed for the accuracy of the algorithm.

[0006] The design of the feature extraction network in the existing detection algorithm is a serial one-way design. The features are captured from the bottom layer to the top layer, and the features captured by different layers vary greatly. After layers of convolution, the features of some small targets may disappear completely, resulting in failure to detect them.

[0007] The existing authoritative comparative tests and design optimizations of algorithms are mainly implemented based on the COCO dataset. However, the data characteristics of the COCO dataset often have certain deviations from the business data in real scenarios. Simply applying the algorithms designed under this model may not produce satisfactory results. Summary of the invention

[0008] The present invention mainly solves the problem that the existing lightweight detection algorithms have inaccurate detection results of targets with similar features and the existence of target misdetection in specific special operation business scenarios; it provides a special operation operation recognition method based on visual detection, designs labeling framing criteria in the labeling process, automatically obtains appropriate labeling information through the algorithm, and performs multi-scale fusion of different feature branches of the lightweight feature extraction network, retains network branches with high-resolution representation, and can retain more detailed features.

[0009] The above technical problems of the present invention are mainly solved by the following technical solutions:

[0010] A special operation operation recognition method based on visual detection comprises the following steps:

[0011] S1: Collect special operation practical video and extract frames to save image data;

[0012] S2: Screening according to the image data quality, automatically calibrating the target in the image data according to the set annotation frame criteria, and obtaining annotation information;

[0013] S3: Design a feature extraction module with parallel branches of different scales, and the feature maps of each parallel branch are reduced and fused downward or enlarged and fused upward;

[0014] S4: according to the output of the feature extraction module, the feature maps are fused at different magnifications, and different feature fusion outputs are generated based on downsampling of the fused feature maps;

[0015] S5: Integrate the feature extraction module, feature fusion module and detection head module to construct a special operation detection algorithm model;

[0016] S6: Train the algorithm model using the data calibrated in step S2 and deploy the trained algorithm model.

[0017] This solution designs annotation framing criteria during the annotation process, automatically obtains appropriate annotation information through algorithms, and focuses on the multi-scale fusion of different feature branches of the lightweight feature extraction network. The network branches with high-resolution representation can retain more detailed features. The overall network design solution can better retain the characteristics of target objects with low resolution pixels, enable the network to better distinguish interfering objects with similar color and gloss, significantly reduce the probability of false detection, and better solve the problem of unreasonable scoring errors caused by corresponding target recognition errors. In addition, based on the data characteristics of special operations, the SODet algorithm retains three feature branches of different sizes, and does not blindly pursue the addition of detection heads to enhance performance, reducing this part of the computational overhead. At the same time, during the detection process, the effect remains more stable.

[0018] Preferably, the feature extraction module comprises three parallel branches for capturing feature maps of different sizes respectively; the parallel branches comprise a first branch, a second branch and a third branch in descending order according to the size of the captured feature maps.

[0019] The feature map size of the first branch is 120*120; the feature map size of the second branch is 60*60; the feature map size of the third branch is 30*30.

[0020] Preferably, the size of the feature map of each parallel branch does not change during the forward propagation process; the branch that captures the feature map with a large size reduces the resolution of the feature map and passes it to the branch that captures the feature map with a small size for fusion; the branch that captures the feature map with a small size increases the resolution of the feature map and passes it to the branch that captures the feature map with a large size for fusion.

[0021] The low-resolution (high-level representation) and high-resolution representation (low-resolution representation) are fused with each other, and its branches maintain high resolution from beginning to end.

[0022] As a preferred method, the feature extraction module divides the forward propagation process into three stages; the two operations of reducing resolution and increasing resolution can be performed simultaneously in the same stage. In order to meet the needs of lightweight edge terminals, the network structure of the feature extraction module is further streamlined, and a three-stage design is designed to achieve a balance between accuracy and efficiency.

[0023] Preferably, in the first stage, the feature map in the first branch is fused with the feature map in the second branch after reducing its resolution;

[0024] In the second stage, the feature maps in the first branch are down-scaled and fused with the feature maps in the second and third branches; the feature maps in the second branch are down-scaled and fused with the feature maps in the third branch; the feature maps in the second branch are up-scaled and fused with the feature maps in the first branch;

[0025] In the third stage, the feature maps in the first branch and the second branch are respectively downgraded and fused with the feature map in the third branch; the feature map in the second branch is upscaled and fused with the feature map in the first branch; the feature map in the third branch is upscaled and fused with the feature maps in the first branch and the second branch respectively.

[0026] The branches of different scales communicate and fuse information through downscaling and upsampling of feature maps. This mechanism helps to complement features of different scales and improve the representation ability of the model.

[0027] Preferably, the output feature map of the first branch in the feature extraction module is fused at a rate of 1; the output feature map of the second branch in the feature extraction module is fused at a rate of 2; the output feature map of the third branch in the feature extraction module is fused at a rate of 4; based on the fused feature maps, they are downsampled separately to generate different feature fusion outputs and sent to the detection head module for target positioning and classification.

[0028] After the features of different scales derived by feature fusion are further fused, high-resolution features are output, and downsampling is performed based on this high-resolution feature to construct detection heads corresponding to objects of different sizes.

[0029] Preferably, the total loss function in the special operation detection algorithm model includes classification loss and regression positioning loss; wherein, the detection head classification loss is coupled with classification prediction.

[0030] The detection head classification loss couples the classification prediction loss and quality, and then uses the Varifocal loss (VFLLoss) to calculate it. In the regression loss function, GIoU loss and Distribution Focal Loss (DFLLoss) are used, and the loss is expressed as:

[0031] loss=loss_vfl+θ1*loss_giou+θ2*loss_dfl

[0032] Wherein, θ1 and θ2 are matching coefficients. In this embodiment, θ1 is 2 and θ2 is 0.2.

[0033] Preferably, the annotation frame criteria include keeping the areas of different objects in the target frame within a set error range and retaining distinguishing features.

[0034] During the labeling process, for some targets that are difficult to detect and classify, in order to ensure the final effect, the labeling scale is further standardized, including keeping the areas of different objects in the target box basically close and retaining as many distinguishable features as possible.

[0035] As a preferred method, the process of implementing the annotation framing criterion is:

[0036] For all targets, the corresponding smallest recognition frame that can include the target is set to obtain the corner coordinates of the target recognition frame; when the target recognition frames overlap, the cross frame of the two target recognition frames is obtained, and the height and width of the cross frame of the smaller target recognition frame are extended in the overlapping direction to obtain the final target recognition frame for annotation.

[0037] By extending the overlapping smaller target recognition frame to obtain the annotation frame, it is possible to balance the features of different targets when multiple targets overlap, ensuring the effectiveness of recognition. The area similarity scale criterion in the annotation process and the automatic determination of the annotation frame position by the algorithm make it more conducive to feature learning.

[0038] Preferably, the image data whose target definition is lower than a set definition threshold or whose number of repeated images is greater than a number threshold is screened and removed.

[0039] Image data with relatively blurred or excessively repeated targets are defined as image data of low quality.

[0040] The beneficial effects of the present invention are:

[0041] 1. One branch of the lightweight high-resolution feature extraction network can continuously obtain high-resolution representation of the target object, and at the same time, features of different scales can be integrated into the high-resolution representation branch, so that some small targets that are difficult to detect or even missed categories can be detected and distinguished.

[0042] 2. The network structure of the feature extraction module is designed in three stages to meet the needs of lightweight edge devices and achieve a balance between accuracy and efficiency.

[0043] 3. Branches of different scales can exchange and fuse information through resolution reduction and upsampling of feature maps, which helps to complement features of different scales and improve the representation ability of the model.

[0044] 4. Design a unified standard framework to ensure the final effect and facilitate feature learning for some targets that are difficult to detect and classify.

[0045] 5. By extending the overlapping smaller target recognition frames to obtain the annotation frame, it is possible to balance the characteristics of different targets when multiple targets overlap, thus ensuring the effectiveness of recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a flow chart of a special operation operation identification method based on visual detection of the present invention.

[0047] Figure 2 It is a picture annotation schematic diagram of the present invention.

[0048] Figure 3 It is a structural schematic diagram of the feature extraction module of the present invention.

[0049] Figure 4 It is a structural schematic diagram of the feature fusion module of the present invention. DETAILED DESCRIPTION

[0050] The technical solution of the present invention is further specifically described below through embodiments and in conjunction with the accompanying drawings.

[0051] Example:

[0052] In this embodiment, the practical identification of special operations takes melting welding and thermal cutting operations as an example. In the workshop application environment, many tools and devices related to special operation examinations are placed in fixed positions, including tool racks, welding machines, various cables and matching welding guns, welding tables and weldments, safety helmets and gloves, etc. On the four walls of the workshop workstations and on the welding tables, multiple USB surveillance cameras are deployed in certain positions and lens directions to obtain a full range of special operation operation videos to ensure comprehensive coverage.

[0053] In order to ensure the versatility of the scene and reduce the cost of deployment, the camera terminal data collection and monitoring in this embodiment use USB cameras of the same specifications and models. Specifically, each camera in the workshop station is connected to the corresponding development board via a USB cable, and each development board is powered by POE. The video, image and real-time recognition results of the algorithm of the special operation personnel's operation information collected by the camera can be saved locally in real time for subsequent export and viewing. The all-in-one machine can be used to display the detection results returned by the development board in real time.

[0054] A special operation operation recognition method based on visual detection in this embodiment, such as Figure 1 As shown, the following steps are included:

[0055] Step S1: The camera collects video data of the special operation personnel's practical operation process with high resolution, extracts frames and saves them as image data in png format.

[0056] Using the camera recording script, the avi format video data of the special operations personnel's operation process can be recorded based on the surveillance camera, and the frames can be extracted and saved as picture format according to the preset event interval.

[0057] In this embodiment, each frame of the image is extracted at intervals of 1000ms and exported and saved in a folder corresponding to the camera, and the format of the images is unified as png.

[0058] Obtain image data and use it for subsequent model training after processing, providing a large amount of data source for model training.

[0059] Step S2, screening and manually labeling the extracted and saved image data.

[0060] The png format image data collected and saved from multiple cameras are aggregated into the same folder, and a small amount of low-quality image data is screened and eliminated. In this embodiment, image data with relatively blurred or excessively repeated targets is defined as low-quality image data.

[0061] The remaining image data is imported into the image annotation platform for manual annotation of the image data.

[0062] Taking the melting welding scene as an example, different numbers of categories and category names are set according to different subjects, and the corresponding XML format annotation files are generated and exported based on the annotated categories and annotation boxes; one picture corresponds to one XML annotation file, and finally the picture data and the XML annotation file are organized into the format of training data (such as VOC, YOLO, COCO).

[0063] This example uses the VOC format to construct a dataset, which can also be converted to the YOLO or COCO training dataset format using a script. Finally, the conversion script is used to divide the dataset into a training set and a test set. The training set contains about 21,000 images, and the validation set contains 3,505 images.

[0064] During the labeling process, for some targets that are difficult to detect and classify, in order to ensure the final effect, the labeling scale is further standardized, including keeping the areas of different objects in the target box basically close and retaining as many distinguishable features as possible.

[0065] Take the wall switch and gas cylinder valve as an example:

[0066] Special operations personnel need to wear gloves throughout the process, but the area of ​​the gloves captured by the camera is relatively large compared to the device, and the gloves and the behavior of operating the corresponding device with gloves are also objects to be detected. Therefore, when operating switches and gas cylinder valves, due to the small area of ​​the device relative to the gloves, a large area of ​​the area will be covered by the gloves, making it difficult for the model to learn the features of the wall device, which further leads to detection and recognition errors. Therefore, in order to retain as many device features as possible, the device is framed as much as possible during annotation, and the area of ​​the gloves is appropriately reduced so that the areas of the two are roughly the same, which allows the model to better learn to distinguish the features of different target objects.

[0067] The specific process of implementing the above annotation mode includes:

[0068] The diagram of the labeling process is as follows: Figure 2 As shown, the outermost large frame is the image frame with a resolution of 1280×720; the solid filled boxes represent switches or some devices on the wall, and the pixel area of ​​the device on the wall has a resolution of about 40×40 when captured by a high-resolution camera.

[0069] During special operations, operators need to wear special gloves all the time to touch some key equipment. Since the pixel area of ​​gloves is relatively large, if they are not properly labeled, the detection effect will be greatly reduced. Therefore, the Yolox detection algorithm is used to accurately locate the position of the gloves.

[0070] (a, b) in the figure are the coordinates of the upper left corner of the switch device or equipment; (c, d) in the figure are the coordinates of the lower right corner of the switch device or equipment; (x1, y1) in the figure are the coordinates of the upper left corner of the glove identification frame, and (x2, y2) are the coordinates of the lower right corner of the glove identification frame.

[0071] Since the camera is fixed to capture the image, the coordinate value is fixed and does not change. Figure 2 As shown in case 1 in FIG, when the glove does not touch the device, that is, when the four corner coordinates of the glove frame (x1, y1), (x2, y1), (x1, y2) and (x2, y2) are not within the device frame, they are not marked.

[0072] When a hand with a glove touches a device, the labeling range needs to be automatically and reasonably determined. If both the device and the glove are framed, the proportion of the device in the target will be too small, which is not conducive to distinguishing features, resulting in the inability to distinguish different operating behaviors, and thus causing misidentification.

[0073] In order to keep the glove and device areas close and balance the characteristics of different targets, when the four corner coordinates of the glove frame (x1, y1), (x2, y1), (x1, y2) and (x2, y2) are within the device frame: a cross frame is obtained with a width of |x2-a| and a height of |d-y1|.

[0074] Further extend the switch device or equipment identification frame to obtain the reasonable coordinates of the annotation frame, which is:

[0075] The upper left horizontal coordinate of the annotation box is:

[0076] a-(x2-a)=2a-x2

[0077] The ordinate of the lower right corner of the annotation box is:

[0078] d+(d-y1)=2d-y1

[0079] The position information of the annotation box is obtained according to the above coordinates. The coordinates of the upper left corner of the annotation box are: (2a-x2, b), and the coordinates of the lower right corner of the annotation box are: (c, 2d-y1).

[0080] The annotation box obtained by extension can balance the characteristics of different targets when multiple targets overlap.

[0081] In this embodiment, similar processing is adopted when encountering other angle contact devices. That is, firstly, the corresponding smallest recognition frame that can include the target is set for all targets to obtain the target recognition frame corner coordinates; when the target recognition frames overlap, the cross frame of the two target recognition frames is obtained, and the height and width of the cross frame of the smaller target recognition frame are extended in the overlapping direction to obtain the final target recognition frame for marking.

[0082] By extending the overlapping smaller target recognition frames to obtain the annotation frames, it is possible to balance the characteristics of different targets when multiple targets overlap, thus ensuring the effectiveness of recognition.

[0083] The area similarity scale criterion in the annotation process and the automatic determination of the annotation box position through the algorithm make it more conducive to feature learning.

[0084] S3, design the feature extraction (backbone) module of the detection algorithm. The feature extraction module includes three parallel branches of different sizes; the feature graphs of each parallel branch are reduced and fused downward or increased and fused upward.

[0085] Specifically, the input of the feature extraction layer is a 640*640*3 RGB three-channel image. The network structure of the feature extraction module is as follows: Figure 3 As shown, there are three parallel branches with different feature map sizes. The feature map size of each branch does not change during the forward propagation process. In this embodiment, the feature map size of the first branch is 120*120; the feature map size of the second branch is 60*60; and the feature map size of the third branch is 30*30.

[0086] Although the three branches have feature maps of different sizes, there is information exchange and fusion between each branch. For example, in the forward process, the upper branch will halve the size of its feature map and then pass it to the lower branch, and the lower branch will also send the enlarged feature map to the upper branch through upsampling for fusion. The two operations can be performed simultaneously in the same stage.

[0087] Specifically, the feature extraction module of this embodiment divides the forward process into three stages, and the feature map of each branch adopts a 3*3 convolution with a step size of 1 in the forward process.

[0088] In the forward process of the first stage stage1, the feature map in the first branch is passed to the second branch after the feature map size is halved through a 3*3 convolution with a stride of 2.

[0089] In the forward process of the second stage stage2, the feature map in the first branch is halved by a 3*3 convolution with a step size of 2 and then passed to the second branch; the feature map in the first branch is halved by a 3*3 convolution with a step size of 2 and then passed to the third branch; the feature map in the second branch is halved by a 3*3 convolution with a step size of 2 and then passed to the third branch; the feature map in the second branch is enlarged by 1*1 upsampling and 1*1 convolution and transmitted to the first branch for fusion.

[0090] In the forward process of the third stage stage3, the feature map in the first branch is halved through a 3*3 convolution with a step size of 2 and then passed to the second branch; the feature map in the second branch is halved and then halved through a 3*3 convolution with a step size of 2 and then passed to the third branch; the feature map in the second branch is enlarged through 1*1 upsampling and 1*1 convolution and transmitted to the first branch for fusion.

[0091] The branches of different scales communicate and fuse information through downscaling and upsampling of feature maps. This mechanism helps to complement features of different scales and improve the representation ability of the model.

[0092] The low-resolution (high-level representation) and high-resolution representation (high-resolution representation) are fused with each other, and the branches maintain high resolution from beginning to end. The resolution is increased by using bilinear upsampling (bilinear) combined with 1x1 convolution to unify the number of feature map channels. The resolution is reduced by using 3x3 convolution with a stride of 2, and the three feature maps are fused by adding.

[0093] In the process of upscaling, bilinear upsampling and 1x1 convolution are used to increase the size of feature maps and unify the number of channels. This method is simple and effective. In the process of downscaling, 3x3 convolution with a stride of 2 is used to reduce the size of feature maps while retaining sufficient spatial information.

[0094] Three parallel branches of different scales are designed, which can simultaneously capture feature information of different scales, including high-resolution and low-resolution features.

[0095] In order to meet the needs of lightweight edge devices, the feature extraction module of this embodiment further simplifies the network structure of the feature extraction module and designs three-stage modules to achieve a balance between accuracy and efficiency.

[0096] In addition, considering that the effect of large-sized targets is better in this scenario, while the effect of small-sized targets is not very stable. From this perspective, the network links are modified and optimized. The receptive field of 30×30 corresponding to the original image corresponds to large-sized objects, and performs well. The feature distinction between large-sized objects is obvious and relatively easy. Therefore, in the stage 3 stage, the fusion of features in the 30×30 branch to the 60×60 and 120×120 branches is cancelled to further reduce the amount of calculation.

[0097] The lowest resolution branch also always maintains a relatively high resolution (such as 30×30), which helps to retain the capture of detail information, which is especially important for small target detection in target detection. The feature maps of three different scales are fused by adding them, which is simple and direct and can make full use of feature information of different scales.

[0098] The designed feature extraction module takes into account the influence of target size, especially the balance between large-sized targets and small targets, and optimizes the detection effect of small targets by modifying the link.

[0099] S4, designing a feature fusion (neck) module of the detection algorithm. According to the output of the feature extraction module, the feature maps are fused at different magnifications, and different feature fusion outputs are generated based on downsampling of the fused feature maps.

[0100] In the traditional feature extraction network, taking Darknet53 as an example, the feature extraction module outputs three feature maps of different resolution sizes and inputs them into the feature fusion module, and the feature maps of different scales are fused by upsampling. Different from it, the feature extraction part of this embodiment completes the fusion of most high- and low-resolution features, which includes the effects of spatial attention and channel attention. The feature fusion module determines the number of detection heads, and targets of different scales are assigned to different detection heads for learning.

[0101] In addition, the input of the feature fusion module is the feature map output by the previous feature extraction module. For feature maps at different levels, considering the operation efficiency, different upsampling ratios are used to further fuse the feature maps, such as Figure 4 As shown,

[0102] The output feature map of the first branch in the feature extraction module is fused at a rate of 1; the output feature map of the second branch in the feature extraction module is fused at a rate of 2; the output feature map of the third branch in the feature extraction module is fused at a rate of 4. Then, based on the fused feature map, different feature fusion outputs are generated by downsampling and sent to the subsequent detection head module for target positioning and classification.

[0103] The feature extraction part completes the fusion of high-resolution and low-resolution features. This fusion method can capture both detailed information and global information in the image, which helps improve the accuracy of target detection. The fusion of spatial attention and channel attention mechanisms enables the model to focus on important areas and channels in the image, thereby more accurately locating and identifying targets.

[0104] For feature maps at different levels, different upsampling ratios are used to further fuse the feature maps in consideration of operation efficiency. This efficient feature fusion method can reduce computational complexity and improve detection speed while ensuring accuracy.

[0105] Based on the fused feature maps, different feature fusion outputs are generated by downsampling and sent to the subsequent detection head module for target positioning and classification. This design enables the model to flexibly handle targets of different scales and shapes, improving the versatility and robustness of target detection.

[0106] S5, integrates the feature extraction module, feature fusion module and detection head module to construct the Special Operations Detection (SODet) algorithm.

[0107] Specifically, the different scale features derived after feature fusion are further fused to output high-resolution features. Downsampling is performed based on this high-resolution feature to construct a detection head corresponding to objects of different sizes. The specific form of the detection head adopts a decoupled detection head similar to the YOLOX design pattern, which is more helpful to improve the classification and detection effects.

[0108] The constructed SODet algorithm model is trained. After the training is completed, the trained model file is converted into a model in the onnx format of the general platform, and then the onnx format model is fixed in shape and quantized to achieve a balance between accuracy and speed.

[0109] Specifically, the data from step S2 is input into the SODet detection algorithm for model training. The total loss function includes classification loss and regression positioning loss. Among them, the detection head classification loss is coupled with classification prediction loss and quality, and then calculated using Varifocal loss (VFL Loss). In the regression loss function, GIoU loss and Distribution Focal Loss (DFL Loss) are used, and the loss is expressed as:

[0110] loss=loss_vfl+θ1*loss_giou+θ2*loss_dfl

[0111] Wherein, θ1 and θ2 are matching coefficients. In this embodiment, θ1 is 2 and θ2 is 0.2.

[0112] During the training process of this embodiment, data enhancement is turned off in the last 20 epochs of training, and a total of 600 epochs are trained to allow the model to converge to the real domain of the target object to ensure the detection accuracy of the model in real scenes. The remaining flipping and cropping data enhancements are consistent with most methods; for the stability of the training process, the solution of this embodiment adopts the Adaw optimizer.

[0113] S6, convert the trained model, first into a model file in onnx format, and then into the final model file in rknn format; at the same time, convert the pre-trained human pose model into a rknn model file.

[0114] The trained model is subsequently optimized for accuracy and inference speed and finally deployed on the development board at the edge. The trained model is converted step by step into the general format of onnx through the conversion tool; on this basis, the model is converted into the model format of rknn using the official development kit of RKNN, while maintaining a balance between accuracy and speed as much as possible. The final detection program starts automatically when the development board is turned on to achieve real-time detection and output the detection box and its corresponding prediction category and confidence in real time on the panel.

[0115] The obtained dual models are deployed to the development board through C++. Specifically, the two obtained rknn models are placed in the specified path of the development board, and the two models are loaded and initialized at the same time. The picture frame data collected by the USB camera in real time through OpenCV is sent to the detection main program, and pre-processing, reasoning, and post-processing are performed successively to finally obtain the detection results, which include the four detection frame coordinates, categories, confidences of the target objects, and the information of the key points of the human posture of the special operation operator.

[0116] Preprocessing is different from the previous processing methods. The actual application of existing algorithms is often verified and applied based on the collected 640×480 resolution images. In the preprocessing stage, its width and height are resized to 640×640 for reasoning. The data collection of the scheme in this embodiment is collected at a resolution of 1080×720. In order to align the aspect ratio with 640×480, it is center-cropped to 960×720 and then resized to 640×640 for reasoning.

[0117] The reasoning process uses multi-threading, and the threads are bound to the three NPU cores on the development board. The confidence threshold during reasoning is set to 0.7, and the NMS is set to 0.45. A smaller NMS can suppress the repetition of redundant frames to a certain extent.

[0118] Then, all the results obtained from the model detection are sent to the software client in real time and visualized. The required detection results are uniformly converted into json format and sent to the server through HTTP service. After receiving the server, the detection results are visualized according to some customized parameters (such as confidence threshold, NMS threshold).

[0119] The entire solution of this embodiment adopts a modular design, including a feature extraction module, a feature fusion module and a detection head module, etc. Each module has clear functions and input and output, making the entire solution easy to understand and implement.

[0120] The existing feature extraction network is a serial design, abstracting from the bottom-level features to the high-level features. With continuous convolution, the corresponding receptive field of the original image is also constantly increasing. In order to obtain information about targets of different sizes, fusion is performed at different layers of feature extraction, but none of them are high-resolution representation features. One branch of the lightweight high-resolution feature extraction network proposed in this embodiment can continuously obtain high-resolution representation of the target object, and at the same time, features of different scales can be integrated into the high-resolution representation branch, so that some small targets that are not easy to detect or even missed categories can be detected and distinguished.

[0121] The overall network design proposed in this embodiment can better retain the characteristics of target objects with low resolution pixels, enable the network to better distinguish interfering objects with similar colors and gloss, significantly reduce the probability of false detection, and better solve the problem of unreasonable scoring errors caused by corresponding target recognition errors. In addition, according to the data characteristics of special operations, the SODet algorithm retains three feature branches of different sizes, and does not blindly pursue the addition of detection heads to enhance performance, reducing this part of the computational overhead. At the same time, the effect remains more stable during the detection process.

[0122] It should be understood that the embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope limited by the appended claims of the application.

Claims

1. A special operation operation recognition method based on visual detection, characterized in that: The following steps are involved: S1: Collect special operation practical video and extract frames to save image data; S2: Screening according to the image data quality, automatically calibrating the target in the image data according to the set annotation frame criteria, and obtaining the annotation information; The process of implementing the annotation frame criterion is as follows: set the corresponding smallest recognition frame that can include the target for all targets, and obtain the target recognition frame corner coordinates; when the target recognition frames overlap, obtain the cross frame of the two target recognition frames, extend the height and width of the cross frame of the smaller target recognition frame in the overlapping direction, and obtain the final target recognition frame for annotation; S3: Design a feature extraction module with parallel branches of different scales, and the feature maps of each parallel branch are reduced and fused downward or enlarged and fused upward; S4: The feature extraction module consists of three parallel branches that capture feature maps of different sizes. The output feature maps of the three parallel branches are fused at different rates, and the fused feature maps are downsampled to generate different feature fusion outputs. S5: Integrate the feature extraction module, feature fusion module and detection head module to construct a special operation detection algorithm model; S6: Train the algorithm model using the calibration data from step S2 and deploy the trained algorithm model.

2. A method for identifying special operation operations based on visual detection according to claim 1, characterized in that: The parallel branches include a first branch, a second branch and a third branch in descending order according to the size of the captured feature map.

3. A method for identifying special operation operations based on visual detection according to claim 1 or 2, characterized in that: During the forward propagation process of each parallel branch, the size of the feature map does not change; the branch that captures the feature map with a large size reduces the resolution of the feature map and passes it to the branch that captures the feature map with a small size for fusion; the branch that captures the feature map with a small size increases the resolution of the feature map and passes it to the branch that captures the feature map with a large size for fusion.

4. A method for identifying special operation operations based on visual detection according to claim 3, characterized in that: The feature extraction module divides the forward propagation process into three stages; the down-resolution and up-resolution operations can be performed simultaneously in the same stage.

5. A method for identifying special operation operations based on visual detection according to claim 4, characterized in that: In the first stage, the feature map in the first branch is down-sampled and fused with the feature map in the second branch; In the second stage, the feature maps in the first branch are down-sampled and fused with the feature maps in the second and third branches. The feature map in the second branch is fused with the feature map of the third branch after the resolution is reduced, and the feature map in the second branch is fused with the feature map of the first branch after the resolution is increased; In the third stage, the feature maps in the first branch and the second branch are respectively downgraded and fused with the feature map in the third branch; the feature map in the second branch is upscaled and fused with the feature map in the first branch; the feature map in the third branch is upscaled and fused with the feature maps in the first branch and the second branch respectively.

6. A method for identifying special operation based on visual detection according to claim 1, 2, 4 or 5, characterized in that: The output feature map of the first branch in the feature extraction module is fused at a rate of 1; the output feature map of the second branch in the feature extraction module is fused at a rate of 2; the output feature map of the third branch in the feature extraction module is fused at a rate of 4; based on the fused feature maps, they are downsampled separately to generate different feature fusion outputs, which are sent to the detection head module for target positioning and classification.

7. The method for identifying special operation based on visual detection according to claim 1, characterized in that: The total loss function in the special operation detection algorithm model includes classification loss and regression positioning loss; among them, the detection head classification loss is coupled with classification prediction.

8. A method for identifying special operation operations based on visual detection according to claim 1 or 7, characterized in that: The annotation frame criteria include keeping the areas of different objects in the target frame within a set error range and retaining distinguishing features.

9. A method for identifying special operation operations based on visual detection according to claim 1 or 7, characterized in that: Filter and remove image data whose target clarity is lower than the set clarity threshold or whose number of repeated images is greater than the number threshold.