CBAM-FasterNet fusion module, personnel trajectory prediction method and system

By replacing the C2f module of YOLOv8n with the CBAM-FasterNet fusion module, the problems of blind channel selection and poor anti-interference ability of YOLOv8n in crane operation environment are solved, realizing efficient and accurate feature extraction and personnel trajectory prediction, and adapting to real-time detection under complex working conditions.

CN122369070APending Publication Date: 2026-07-10ANHUI UNIVERSITY OF ARCHITECTURE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610822180.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-09
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

The existing YOLOv8n lightweight model suffers from problems such as blind channel selection, low feature utilization, poor anti-interference ability in complex environments, and unreasonable computing power allocation in crane operation environments, and cannot meet the requirements of active safety protection.

Method used

The C2f module of YOLOv8n is replaced by the CBAM-FasterNet fusion module. The CBAM attention module is used to weight channels and spatial dimensions. Combined with the channel number determination module and the FasterNet lightweight module, key channels are dynamically selected and differential convolution operations are performed to enhance the anti-interference ability and feature utilization.

Benefits of technology

It improves the detection accuracy and anti-interference capability in the crane operating environment, optimizes the allocation of computing resources, realizes the efficient generation of lightweight feature maps and accurate prediction of personnel trajectories, and adapts to real-time detection under complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122369070A_ABST
    Figure CN122369070A_ABST
Patent Text Reader

Abstract

This invention relates to a CBAM-FasterNet fusion module, a personnel trajectory prediction method, and a system in the fields of computer vision target detection, lightweight neural networks, and engineering machinery safety protection. The fusion module uses the CBAM attention module to weight and label feature maps, determines a fixed number of channels by combining information retention ratio, dynamic threshold calculation, and percentile statistics, filters target convolutional channels, and achieves lightweight feature extraction through channel rearrangement and FasterNet differential convolution. An improved YOLOv8n network is constructed, paired with a ByteTrack correlation network and a Transformer prediction module, effectively solving the technical problems of blind channel selection, low feature utilization, poor anti-interference capability in complex industrial environments, and unreasonable computational power allocation that exist when traditional FasterNet replaces the YOLOv8n backbone network C2f module with fixed continuous channels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of computer vision target detection, lightweight neural networks and engineering machinery safety protection technology, specifically involving a CBAM-FasterNet fusion module for personnel status detection in crane operating areas, an improved YOLOv8n network, and a method and system for predicting personnel trajectories in crane working areas. Background Technology

[0002] Cranes, as core lifting and transportation equipment in industrial production and engineering construction, typically operate in open spaces and complex environments, often accompanied by problems such as dust, fog, light obstruction, and disordered personnel movement. Accidental entry into the work area or intersections of personnel's movements with the crane's lifting devices can easily lead to collision accidents. Traditional crane safety protection relies heavily on passive methods such as limit sensors and manual monitoring, which suffer from large blind spots, delayed response, and inability to predict risks, making it difficult to meet the active safety protection needs in complex operating environments.

[0003] Deep learning-based visual object detection technology offers a new approach to crane safety protection. Among these technologies, the lightweight YOLOv8n model, with its small parameter count and fast inference speed, has become the preferred solution for embedded deployment. However, the native YOLOv8n backbone network uses the C2f module, which still suffers from problems such as redundant standard convolutional computations, high hardware cache usage, and weak anti-interference capabilities in complex environments. It only supports real-time object detection and lacks object tracking and trajectory prediction capabilities, thus failing to achieve proactive safety protection.

[0004] To achieve model lightweighting, the industry often uses lightweight modules to replace the YOLOv8 backbone network. Existing related technology CN202410412629.0 describes a method for small target recognition in scenarios with limited computing power for drones, which uses the FasterNeXt lightweight module to improve YOLOv8n, enhancing small target detection accuracy through module reorganization and multi-scale branch optimization. Meanwhile, the FasterNet network, designed for general lightweight scenarios, has become the mainstream solution for lightweighting YOLOv8 thanks to its PConv partial convolutional core structure. It significantly reduces computational cost and memory access costs by performing convolutions only on a fixed number of continuous channels (C / 4, where C is the total number of channels in the feature map) and performing identity mapping on the remaining channels. It is often directly used to replace the C2f module of the YOLOv8n backbone network.

[0005] However, directly applying the solution of simply replacing C2f with FasterBlock from FasterNet and retaining the default C / 4 fixed continuous channel to crane operator identification scenarios has obvious technical flaws: 1. Blind channel selection and low feature utilization: FasterNet's default selection of the first C / 4 consecutive channels is only an empirical assumption and does not evaluate the importance of channels. It is easy to retain interfering channels such as dust and shadows, lose key features of personnel targets, and significantly reduce detection accuracy.

[0006] 2. Lack of anti-interference mechanism and poor scene robustness: The feature is not weighted by relevant mechanisms, which cannot suppress noise in industrial scenes and is prone to missed detection and false detection by personnel.

[0007] 3. Rigid channel configuration: Fixed C / 4 channels cannot adapt to the complexity of the screen. Simple scenes waste computing power, while complex scenes lack information, and it is impossible to balance lightweight and precision.

[0008] In summary, simply replacing FasterBlock with a lightweight solution that uses the default C / 4 fixed channel cannot meet the requirements of lightweight and anti-interference active safety protection in crane scenarios, and targeted improvements are urgently needed. Summary of the Invention

[0009] To address the technical problems of blind channel selection, low feature utilization, poor anti-interference capability in complex industrial environments, and unreasonable computing power allocation when only using the default C / 4 fixed continuous channels of FasterNet to replace the YOLOv8n backbone network, this invention provides a CBAM-FasterNet fusion module for personnel status detection in crane operating areas, an improved YOLOv8n network using the CBAM-FasterNet fusion module, a method for predicting personnel trajectories in crane operating areas using the improved YOLOv8n network, and a system for predicting personnel trajectories in crane operating areas by executing the method.

[0010] To achieve the above objectives, the present invention provides the following technical solution: A CBAM-FasterNet fusion module for personnel status detection in crane operating areas, used to replace the native C2f module in the YOLOv8n backbone network to improve the anti-interference capability of personnel detection and embedded inference efficiency, includes the following modules connected in sequence: The CBAM attention module sequentially performs channel and spatial dimension weighting on the input feature map representing the state of personnel in the crane operation area. This filters out noise in the crane operation scene while highlighting personnel target features, and outputs a channel weight vector. ; The channel number determination module is used to obtain a fixed number of channels k: a preset information retention ratio η of the input feature map, based on a percentile function. Calculate the dynamic threshold t of the input feature map for each frame. i The channel weights in the input feature map of each frame that are higher than t are statistically analyzed.i Number of channels k i The sequence of channel counts k is obtained by traversing the input feature map dataset. seq Take k seq The 95th percentile is a fixed number of channels k; and selects The top k channels with the highest weights are the target convolution channels; The channel rearrangement module is used to group the target convolutional channels to the front of the input feature map channel dimension; The FasterNet lightweight module uses a FasterBlock structure, which performs standard convolution only on the target convolutional channel and performs identity mapping on the remaining channels. The final output is a lightweight feature map with the same dimension as the input feature map and is suitable for embedded deployment.

[0011] As a further improvement to the above scheme: number of channels k i The acquisition process is as follows: ; ; Among them, M bool It is a one-dimensional Boolean vector; Count(·) is a statistical counting function; True is the Boolean truth value.

[0012] As a further improvement to the above scheme, the value of η is 70%~90%.

[0013] An improved YOLOv8n network, based on YOLOv8n, replaces at least one native C2f module in the YOLOv8n backbone network with a CBAM-FasterNet fusion module; Alternatively, replace any native C2f module in the YOLOv8n backbone network with a CBAM-FasterNet fusion module, and replace the remaining native C2f modules with the FasterNet lightweight module in the CBAM-FasterNet fusion module.

[0014] As a further improvement to the above scheme: the FasterNet lightweight module output concatenated channel inverse restoration module in the CBAM-FasterNet fusion module is used to perform channel order inverse restoration on the lightweight feature map to recover the input features. Figure 1 The original channel sorting is obtained.

[0015] A method for predicting personnel trajectories within a crane's working area includes the following prediction steps: Real-time images of personnel status within the crane's working area are collected, input into an improved YOLOv8n network for personnel target detection, and output personnel target detection boxes and corresponding feature information. By inputting the personnel target detection bounding box and feature information into the ByteTrack association network, the identity matching and trajectory stitching of multiple frames of personnel targets are completed, and the historical continuous trajectory of personnel is generated. Input the continuous historical trajectory of the personnel into the Transformer prediction module. After time-series feature extraction and trajectory extrapolation, the module outputs the trajectory prediction result of the personnel target for a preset future time.

[0016] As a further improvement to the above scheme, the identity matching process of the ByteTrack associated network is as follows: calculate the intersection-union ratio (IOU) of the detection boxes of people in adjacent frames. When the IOU is greater than a preset threshold, perform secondary matching by combining the similarity of the people's target features. For people targets that are occluded or move out of the screen and then re-enter, call the historical trajectory feature library for feature comparison to realize identity continuation and trajectory stitching.

[0017] As a further improvement to the above scheme: In the Transformer prediction module, the temporal encoder adopts a 4-6 layer self-attention mechanism to extract the temporal dependency features of the person's historical continuous trajectory; the trajectory decoder adopts a 2-3 layer cross-attention mechanism to infer the person's future movement trajectory based on the temporal features.

[0018] As a further improvement to the above scheme: the preset duration is 3s~10s, and the trajectory prediction result output is the personnel position coordinates of one frame every 0.5s, with the trajectory confidence score attached.

[0019] A personnel trajectory prediction system within a crane working area includes an image acquisition unit, an improved YOLOv8n detection unit, a ByteTrack association unit, and a Transformer prediction unit connected in sequence. The image acquisition unit is used to acquire real-time images of the personnel status within the crane's working area; The improved YOLOv8n detection unit is an improved YOLOv8n network equipped with a CBAM-FasterNet fusion module, used to detect people in real-time images and output detection features; The ByteTrack association unit is used to associate the identities of people targets in multiple frames and stitch their trajectories together to generate continuous historical trajectories of people. The Transformer prediction unit is used to extrapolate the temporal characteristics of a person's historical continuous trajectory and output the trajectory prediction result of the person for a preset future duration.

[0020] Compared with the prior art, the beneficial effects of the present invention are: 1. The CBAM-FasterNet fusion module of this invention abandons the traditional fixed-ratio channel truncation method. First, it uses the CBAM attention module to perform dual-dimensional weighted calibration of the input feature map in terms of both channels and space, outputting a weighted feature map and quantizing the weight vectors of each channel. This accurately distinguishes between effective personnel feature channels and background interference channels, strengthening target representation and suppressing noise interference in crane operation scenarios at the feature level, effectively improving the scene's anti-interference capability. Then, the channel number determination module adaptively determines the global fixed channel number k by combining information retention ratio, dynamic threshold calculation, and statistical screening methods, replacing the one-size-fits-all fixed value of C / 4. The module selects the highest weights based on the actual feature information content. The target convolutional channel completely solves the problem of blind channel selection, maximizes the retention of high-value and effective features, and improves the overall feature utilization rate. In conjunction with the channel rearrangement module, the target channels are centrally arranged to form a continuous memory block, optimizing the feature data read and write efficiency of embedded hardware. Combined with the differentiated operation logic of the FasterNet lightweight module, only partial convolution operations are performed on key target channels, and low-weight redundant channels are directly transmitted using identity mapping. This enables on-demand allocation of computing power, precise focus on core feature calculation, avoids invalid operation consumption, and reasonably optimizes the allocation of computing power resources. The output is a lightweight feature map adapted to embedded edge deployment, and finally systematically solves the various technical drawbacks brought about by the fixed continuous channel scheme.

[0021] 2. By constructing Boolean vectors to quickly compare channel weights with dynamic thresholds, it can accurately and intuitively distinguish between high-value effective feature channels and low-weight redundant interference channels. The judgment rules are concise and rigorous, and the operation logic is simple and efficient. Relying on statistical counting functions, it can quickly quantify and count the number of target channels that meet the requirements in a single frame, transforming the abstract channel weight differences into quantifiable numerical results, providing accurate and reliable basic data for the statistical analysis of a fixed number of global channels. This operation method has low overall computational overhead and strong real-time performance, adapting to the inference needs of lightweight networks, avoiding the screening errors caused by traditional coarse estimation methods, making the adaptive channel screening process more standardized and feasible, effectively ensuring that the fusion module can stably and efficiently complete dynamic channel screening in complex industrial scenarios such as cranes, and synergistically improving the feature screening accuracy and the overall operating efficiency of the module.

[0022] 3. Two differentiated modular replacement schemes are designed based on the native YOLOv8n network. These schemes allow for flexible selection of either overall replacement or tiered modification based on different hardware computing power and operational requirements, offering strong deployment adaptability. They can enhance the network's anti-interference feature extraction capabilities by leveraging the CBAM-FasterNet fusion module, or reduce tiered computing power by only using the FasterNet lightweight module. This balances target detection accuracy and model lightweighting without disrupting the original network architecture. Furthermore, a channel reverse restoration module is added to the backend of the FasterNet lightweight module to effectively offset channel order offsets caused by channel rearrangement operations, accurately restoring the original feature map arrangement. This ensures the coordination and integrity of feature fusion transmission at all network levels, avoiding feature parsing errors and detection defects caused by channel disorder, and significantly improving the operational stability and feature utilization accuracy of the improved YOLOv8n network in complex crane operating environments.

[0023] 4. The trajectory prediction method relies on the optimized and improved YOLOv8n network to accurately detect personnel in complex crane operation scenarios. Leveraging its lightweight design and strong anti-interference capabilities, it can stably output high-quality target detection boxes and feature information, effectively adapting to harsh working conditions such as dust, occlusion, and equipment interference. Combined with the ByteTrack association network, it achieves cross-frame personnel identity matching and seamless trajectory stitching, avoiding target ID jumps and trajectory breaks, ensuring the integrity and continuity of historical movement trajectories. Furthermore, the Transformer prediction module deeply mines the temporal correlation features of the trajectory to accurately predict future personnel movement trends. The overall solution features tight logical connections and clear hierarchical division of labor, balancing real-time operation, target recognition accuracy, and trajectory prediction accuracy. It provides comprehensive and reliable data support for personnel risk assessment, safety warnings, and proactive protection in crane operation areas, significantly improving scenario adaptability and engineering practical value. Attached Figure Description

[0024] Figure 1 A schematic diagram of the hierarchical replacement architecture for the improved YOLOv8n network and the Transformer prediction network.

[0025] Figure 2 This is a schematic diagram of the CBAM-FasterNet fusion module.

[0026] Figure 3 A flowchart for a method of predicting and classifying early warning of personnel trajectories within the working area of ​​a crane. Detailed Implementation

[0027] 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.

[0028] like Figure 1 As shown, this invention is based on the sequential design of a CBAM-FasterNet fusion module, an improved YOLOv8n network, a personnel trajectory prediction method, and a supporting prediction system. Through an overall architecture that combines attention weighting, adaptive channel filtering, lightweight convolution optimization, multi-target correlation tracking, and temporal trajectory prediction, it enhances the representation of personnel features, simplifies redundant calculations, ensures the continuity of target tracking, and achieves accurate prediction of personnel movement trajectories without increasing the computational burden.

[0029] I. CBAM-FasterNet Fusion Module

[0030] like Figure 2 As shown, this invention provides a CBAM-FasterNet fusion module for personnel status detection in crane operation areas. This fusion module is a lightweight feature extraction core structure, consisting of four parts: a CBAM attention module, a channel number determination module, a channel rearrangement module, and a FasterNet lightweight module, which are sequentially connected along the feature transmission direction. Each unit works together and performs feature processing sequentially to achieve weighted calibration of crane operator features, adaptive channel filtering, orderly channel arrangement, and differentiated lightweight convolution operations.

[0031] 1. CBAM Attention Module

[0032] The CBAM attention module, as the front-end processing unit of the fusion module, is specifically designed to receive the input feature map representing the state of personnel in the crane operation area, output from the network's front-end. This module integrates dual processing logic of channel-weighted calibration and spatial-weighted calibration, performing comprehensive weighted calibration on the input feature map in the order of channel dimension first, followed by spatial dimension. Addressing the complex background and numerous interfering factors in crane scenarios, channel-dimensional weighting distinguishes the information contribution of different feature channels, while spatial-dimensional weighting strengthens key features of personnel targets and suppresses invalid features in non-target background areas. After completing the dual-dimensional weighted calibration, the CBAM attention module uniformly outputs the channel weight vector corresponding to the single-frame input feature map. The channel weight vector Quantify the proportion and importance of the effective personnel information contained in each feature channel to provide quantitative basis and data support for subsequent adaptive channel selection.

[0033] 2. Channel Count Determination Module

[0034] The channel number determination module is the core functional unit of the adaptive dynamic channel filtering in this invention. It is mainly used to adaptively calculate and lock the globally fixed number of channels k, so as to achieve accurate division and autonomous filtering of high and low value channels. In the specific calculation process, the information retention ratio η of the input feature map is preset and unified in advance. Combined with the range limited by this invention, η stably takes a value in the range of 70% to 90%. On the basis of ensuring that the effective features required for the accuracy of human detection are completely retained, the number of redundant channels is reasonably compressed, balancing the detection performance of the model and the lightweight effect.

[0035] For each frame of input feature map in real-time input, the channel number determination module calls the percentile function Percentile(·,·) based on the calculation formula. Solving for the current frame's specific dynamic threshold t yields the result. i The dynamic threshold t i It adapts to the scene complexity, personnel distribution, and environmental interference of each frame, unlike fixed threshold filtering methods, and is suitable for the dynamic operation scenarios of cranes.

[0036] After obtaining the dynamic threshold t i Then, construct a one-dimensional Boolean vector M. bool Element-by-element logical judgment operation This completes the binary partitioning of all feature channels. The channel weights are greater than the dynamic threshold t. i The channels identified are high-value valid channels, while the remaining channels are low-value redundant channels.

[0037] Then, the statistical counting function k is used. i =Count(M bool =True) (Count(·) is a statistical counting function, True is a Boolean truth value), counts the number of valid channels k frame by frame. i ;Continuously traverse the input feature map dataset of the complete crane operation scene, and summarize the number of single-frame channels k corresponding to all frames. i This forms a complete sequence of channel number k. seq To eliminate the problem of channel number fluctuations caused by occasional interference in single frames and extreme scene conditions, the channel number sequence k is adjusted. seq Statistical processing was performed, and the 95th percentile value was extracted as the globally unified fixed number of channels k.

[0038] Finally, combine the channel weight vector The internal numerical sorting results are used to select the top k channels with the highest channel weights and define them as target convolution channels. Only these high-value channels are retained for subsequent convolution operations; the remaining channels are defined as ordinary redundant channels.

[0039] Among them, the information retention ratio η, as the core parameter for dividing the boundary of feature channel selection, directly determines the calculation standard of dynamic threshold and the scale of effective features retained in a single frame. Stably limiting η to the range of 70% to 90% has strong rationality and scenario adaptability: if η is below 70%, the feature information retention ratio is too low, the channel selection standard is too stringent, and the feature dimension will be excessively compressed. A large number of key feature channels carrying pedestrian details and anti-interference capabilities will be eliminated. In complex industrial environments with crane dust obstruction, equipment interference, and cluttered backgrounds, this can easily lead to missing personnel target features, causing problems such as missed detections and insufficient feature expression, severely reducing target recognition accuracy. If η is above 90%, the channel selection threshold is greatly relaxed, only eliminating a very small number of redundant channels, which will include a large amount of background interference. Unnecessary channels, invalid noise channels, and useless feature information cannot effectively leverage the design benefits of adaptive channel simplification and lightweight optimization, significantly increasing the computational load and overhead of network convolution, resulting in wasted computing resources and failing to meet the deployment requirements of real-time detection for edge devices. However, a value range of 70% to 90% can achieve the optimal balance between detection accuracy, anti-interference capability, and model lightweighting. This not only reasonably eliminates redundant interference features while retaining sufficient core effective features required for pedestrian recognition in crane operation scenarios, ensuring the stability and robustness of target detection under complex working conditions, but also reasonably eliminates invalid and redundant channels, reducing unnecessary computational consumption. Combined with subsequent dynamic threshold calculation and channel statistical filtering logic, this allows the adaptive channel simplification mechanism to operate stably and adapt to the application requirements of real-time inference of the improved YOLOv8n network.

[0040] The channel number sequence k is obtained by traversing all image samples of the crane operation scene. seq It aggregates the effective channel count k for each frame under different lighting conditions, occlusion levels, personnel distribution, and equipment interference. i Due to the dynamic changes in the complex on-site environment, the single frame k i The numerical values ​​fluctuate significantly. The number of effective channels is relatively low for simple background images, but increases significantly under complex conditions with strong interference and multiple occlusions. Directly using single-frame values, sequence averages, or maximum values ​​to determine a fixed number of channels easily leads to adaptation defects. Values ​​that are too small will result in the deletion of key personnel feature channels under complex conditions, causing incomplete feature extraction; values ​​that are too large will introduce a large number of redundant channels, weakening the model's lightweight effect and wasting computational resources. This invention selects k... seqUsing the 95th percentile as the globally fixed number of channels k can statistically eliminate a small number of abnormally low values ​​in extremely simplified scenarios, comprehensively covering the channel requirements of most routine operating conditions and extremely complex interference scenarios. This ensures that the effective feature channels of personnel are fully preserved in high interference environments, avoiding the decrease in detection accuracy caused by excessive channel compression, while also reasonably limiting the total number of channels to prevent redundant consumption of computing resources. At the same time, this value method can output unique and fixed channel parameters, ensuring a fixed and unified structure of the CBAM-FasterNet fusion module, adapting to the operational requirements of modular replacement of the YOLOv8n network, and avoiding network operation disorder caused by dynamic changes in the number of inter-frame channels. It achieves a good balance between adapting to the changing industrial environment of cranes, ensuring feature utilization, maintaining stable model inference, and achieving lightweight optimization.

[0041] 3. Channel rearrangement module

[0042] The channel rearrangement module is connected to the backend of the channel number determination module. Its main function is to complete the orderly recombination and centralized arrangement of the target convolutional channels. After channel filtering, the original distribution of the k target convolutional channels is scattered, which is not conducive to the centralized operation of the lightweight module. The channel rearrangement module adjusts the position of all target convolutional channels, and uniformly arranges all target convolutional channels of the current input feature map to the front of the channel dimension of the current input feature map, forming a regular and continuous feature memory arrangement structure. Ordinary redundant channels are arranged sequentially after it in the original order. This continuous arrangement method can centrally aggregate the core features of the user, simplify the subsequent convolution operation logic, improve the efficiency of feature reading and writing and operation, and lay the structural foundation for the differentiated convolution processing of the FasterNet lightweight module.

[0043] 4. FasterNet Lightweight Module

[0044] The FasterNet lightweight module adopts the standard FasterBlock architecture and is the key structure for achieving lightweight inference in the fusion module. The FasterNet lightweight module employs a differentiated feature processing mechanism, strictly distinguishing between target convolutional channels and ordinary redundant channels: standard convolution operations are performed only on the k target convolutional channels concentrated at the front of the channel dimension, deeply mining fine-grained features of personnel targets and ensuring the ability to extract personnel features under complex working conditions; for the ordinary redundant channels arranged at the back, feature transfer is directly performed using an identity mapping method, skipping the convolution calculation process and reducing the model's computational load and parameter count from the root.

[0045] After completing the differential feature processing, the FasterNet lightweight module integrates the target channel features after convolution processing with the redundant channel features transmitted by the identity mapping, and finally outputs a lightweight feature map whose overall size, channel dimension, and feature scale are completely consistent with the original input feature map, ensuring the overall replaceability of the module and network compatibility.

[0046] 5. Complete Implementation Example of k-value Calculation Based on PyTorch Framework

[0047] This example uses the PyTorch deep learning framework to implement the full-process calculation of the fixed number of channels k and the dynamic threshold t in the CBAM-FasterNet fusion module, completely reproducing the statistical logic of "single frame energy statistics - dataset traversal - global percentile determination". The specific implementation steps are as follows: (1) Environment setup and hook registration An improved YOLOv8n network was built based on PyTorch, integrating the CBAM attention module into the backbone network. The register_forward_hook function in PyTorch was used to register a forward hook in the output layer of the CBAM attention module to capture the channel weight vector generated during inference of each frame. The shape of the channel weight vector is (B,C,1,1), where B is the batch size and C is the total number of channels. The forward hook caches the weight data of each frame in real time to a list, providing raw data for subsequent statistics.

[0048] (2) Single-frame channel weight vector processing

[0049] Taking the channel weight data of a certain frame of image as an example, the channel weight vector captured by the forward hook is flattened into a one-dimensional vector [3,2,4,1]. Then, it enters the file energy_based_k, first checking if it's all zeros, then sorting it from largest to smallest, resulting in a sorted value s_sorted=[4,3,2,1]. The most important channels are placed first, then normalized to "energy percentage" and the sum is calculated. This shows that the first channel contains 40% of the information, the first two channels contain 70% of the information, and so on. However, the goal of this embodiment is to contain 80% of the information, so the first three channels are selected. Therefore, k at this point... i =3, then take the third largest value in s_sorted as the dynamic threshold t. i =2, meaning that this image covers 80% of the energy by retaining only the top 3 strongest channels. The score of the 3rd channel is exactly greater than (or equal to) 80%, so the weight value of the 3rd channel can be regarded as the dynamic threshold t corresponding to this image. i .

[0050] (3) Dataset traversal and construction of statistical sequences

[0051] Iterate through all images in the crane operation scene training dataset. During batch inference in PyTorch DataLoader, continuously capture the channel weight data of each frame via hooks, repeat the single-frame calculation logic described above, and calculate the k-values ​​of all frames. i With t i Store the corresponding channel number sequence k respectively seq With dynamic threshold sequence t seq This forms a complete statistical sequence.

[0052] (4) Determination of the percentile of the fixed number of channels k

[0053] After traversal, for the channel number sequence k seq Statistical analysis was performed, and the 95th percentile value was selected as the fixed number of channels k globally. Taking the statistical sequence of this embodiment as an example, if k seq If the number of effective channels in 95% of single frames does not exceed this value, then this value is the fixed number of channels that adapts to most working conditions. Finally, the calculated k value is written into the configuration file of the PyTorch model for the CBAM-FasterNet fusion module to call.

[0054] This embodiment relies on the hook mechanism, tensor operations, and percentile statistics tools of the PyTorch framework to realize the complete calculation from single-frame data to global parameters, ensuring that the value of the fixed number of channels k is both adapted to the feature distribution of the complex working conditions of the crane and meets the dual requirements of model lightweighting and inference stability.

[0055] II. Improved YOLOv8n Network

[0056] 1. Network improvements

[0057] This invention further protects the improved YOLOv8n network, which uses the native YOLOv8n basic network as its main framework and addresses the shortcomings of the native network backbone network, such as low feature extraction efficiency, large redundant computation, and weak anti-interference ability of the C2f module, by modularly replacing and improving it.

[0058] The specific improvement process includes two optional modular replacement implementation methods: The first implementation method is to completely replace any one or more native C2f modules in the YOLOv8n backbone network with the CBAM-FasterNet fusion module of this invention, thereby comprehensively upgrading the backbone network's attention weighting, adaptive channel selection, and lightweight feature extraction capabilities.

[0059] The second implementation method is to selectively retain the local native structure, replace any native C2f module in the YOLOv8n backbone network with a complete CBAM-FasterNet fusion module, and replace only the independent FasterNet lightweight module in the fusion module with the remaining native C2f modules in the network, so as to achieve hierarchical lightweight transformation and adapt to the deployment requirements of different computing power devices.

[0060] like Figure 1The diagram shown is a schematic of the overall architecture of the improved YOLOv8n network and its accompanying Transformer prediction network using the second implementation method. Differential replacements were performed on the C2f modules of the native YOLOv8n backbone network to achieve hierarchical lightweight transformation to adapt to the deployment requirements of different computing power devices. Specifically, in the backbone network (the Backbone network replaced by FasterNet), the first three native C2f modules in the original YOLOv8n backbone network were replaced only with independent FasterNet lightweight modules (i.e., FasterBlock structures) in the CBAM-FasterNet fusion module. By relying on some convolution and identity mapping mechanisms, the number of network parameters was reduced to minimize computational overhead, and the lightweight optimization of the basic layer was completed. At the same time, the fourth native C2f module was completely replaced with the complete CBAM-FasterNet fusion module. The core functions of the CBAM attention module, such as channel-space dual-dimensional weighted calibration, adaptive channel selection of the channel number determination module, and orderly arrangement of the channel rearrangement module, were fully retained. While achieving lightweighting, the ability to extract key features of personnel in complex crane operation scenarios and the anti-interference performance were enhanced, taking into account both model inference efficiency and target detection accuracy. The modified backbone network sequentially performs PConv convolution, multi-stage FasterBlock feature extraction, CBAM attention weighting, and SPPF fast spatial pyramid pooling, outputting P3 and P4 multi-scale features. These are then fed into a Neck network (FPN+PAN feature fusion structure) to complete multi-scale feature fusion, and a Head network to achieve P3 / P4 / P5 multi-scale detection output. Finally, the detection results are fed into the ByteTrack association network to complete multi-frame person target identity matching and trajectory stitching. Then, the Positional Encoder and Transformer Encoder / Decoder modules complete temporal feature extraction and trajectory inference, forming a complete closed loop of "target detection - multi-target tracking - trajectory prediction." This tiered replacement scheme can flexibly adjust the modification level according to the computing power of the deployed equipment. On edge devices with limited computing power, extreme lightweighting can be achieved through multi-module FasterNet lightweight replacement. On devices with sufficient computing power, detection performance can be improved by increasing the number of CBAM-FasterNet fusion modules, achieving a flexible balance between lightweighting and detection accuracy, fully adapting to the deployment needs of various types of hardware at crane operation sites.

[0061] Based on this, the present invention further adds a channel reverse restoration optimization structure: at the output end of the FasterNet lightweight module of the CBAM-FasterNet fusion module, a fixed series channel reverse restoration module is added.

[0062] Because the pre-stage channel rearrangement module artificially alters the original channel arrangement order of the input feature map, direct output would cause subsequent network feature fusion errors and dimension matching anomalies. The channel reverse restoration module receives the lightweight feature map in real time and performs reverse restoration processing according to the channel rearrangement rules to restore the original arrangement order of the feature map channels. This ensures that the channel arrangement and structural form of the output feature map are completely consistent with the initial input feature map, enabling the improved YOLOv8n network to seamlessly connect to the original neck layer and detection head structure without additional modifications to the overall network architecture, achieving plug-and-play replacement of the native C2f module.

[0063] 2. Network performance comparison experiment and effect verification

[0064] To verify the effectiveness of the improved YOLOv8n network of this invention, this embodiment is based on the Ultralytics-YOLOv8.3.163 framework and the PyTorch deep learning platform. A control group and an experimental group are set up to conduct a fair comparison experiment. The experimental environment, dataset and training parameters are unified to ensure the objectivity and rigor of the comparison results.

[0065] (1) Control group (benchmark model in existing methods)

[0066] The control group uses a publicly available lightweight target detection scheme, namely the native YOLOv8n network implemented using the Ultralytics-YOLOv8.3.163 framework. This model constructs the backbone network with the native C2f module and does not incorporate the CBAM-FasterNet fusion module, adaptive channel selection, and hierarchical replacement mechanism of this invention. It serves as the performance baseline to measure the performance improvement of the improved scheme of this invention.

[0067] (2) Experimental group (improved model of the method of this invention)

[0068] The experimental group consists of an improved YOLOv8n network based on the same Ultralytics-YOLOv8.3.163 framework, which is the core technical solution of this invention. This solution uses the native YOLOv8.3.163 as a foundation, replacing the native C2f module in the backbone network with a CBAM-FasterNet fusion module according to the hierarchical replacement scheme of this invention. The specific replacement structure is as follows: Figure 1 As shown, the adaptive channel filtering, feature enhancement, and lightweight optimization improvements of this invention are fully implemented and used to verify the actual performance of the technical solution of this invention.

[0069] (3) Experimental verification

[0070] The Roboflow public dataset "person.v3i" was used for training. The training parameters were set as epochs=200, batch=16, imgsz=640, initial learning rate 1e-3, termination learning rate 1e-5, and the optimizer was AdamW. The performance was verified in terms of detection accuracy, anti-interference ability, and running speed.

[0071] Regarding detection accuracy, as shown in Table 1, the improved model of this invention has a stable mAP50 value of 87.8% and a peak value of 88.4%, a stable precision value of 92.3% and a peak value of 94.8%, and a stable recall value of 78.7% and a peak value of 83.0%, which are 4.28%, 3.3%, and 4.5% higher than the original model, respectively, indicating a significant improvement in detection accuracy.

[0072] Table 1 Comparison Results of Detection Accuracy Experiments

[0073] In terms of anti-interference capability, Gaussian noise and random rectangular occlusion interference images were generated using process_images.py, and robustness testing was completed using robust_eval.py. A total of 82 test samples were used (41 clean images and 41 interference images), as shown in Table 2. After the improvement, the model's precision, recall, mAP50, and mAP50-95 retention rates were 89.8%, 69.3%, 77.6%, and 65.6%, respectively, which are much higher than the original 67%, 63.3%, 57.7%, and 47.5%, indicating a significant enhancement in anti-interference capability under complex working conditions.

[0074] Table 2 Comparison Results of Anti-interference Capability Experiment

[0075] In terms of running speed and lightweight design, tests were conducted using model_complexity.py and speed_eval_det.py. As shown in Table 3, the improved model has 191 layers, 3,363,522 parameters, and 9.3 GFLOPS. The weight file is only 6.65MB (compared to 17.59MB before the improvement). The single-graph inference latency is 9.37ms, and the FPS reaches 106.77. This achieves both performance improvement and lightweight design, as well as real-time optimization.

[0076] Table 3 Comparison of Operating Speed ​​and Lightweight Experiment Results

[0077] Comparative experiments have verified that this invention achieves comprehensive improvements over the native YOLOv8n network in terms of detection accuracy, anti-interference capability, running speed, and lightweight design. Specifically, mAP50, precision, and recall are improved by 4.28%, 3.3%, and 4.5%, respectively. The retention rate of various indicators under interference conditions is significantly improved. At the same time, the weight file size is significantly reduced, the inference latency is low, and the FPS is higher, achieving the optimal balance between accuracy, robustness, and real-time performance.

[0078] III. Methods for Predicting Personnel Trajectory within the Crane Working Area

[0079] The personnel trajectory prediction method disclosed in this invention for the working area of ​​a crane relies on the aforementioned improved YOLOv8n network as the detection basis, and connects the ByteTrack correlation network and the Transformer prediction module to form a complete closed-loop process of "target detection - multi-target tracking - temporal trajectory prediction", which is suitable for continuous video monitoring scenarios of cranes.

[0080] The first step is real-time data acquisition. Real-time image and video frame data containing personnel working status within the crane's working area are continuously acquired. The acquired continuous image sequence is input into the improved YOLOv8n network of this invention in real time. Relying on the CBAM-FasterNet fusion module built into the improved network, anti-interference feature extraction is performed to accurately locate the personnel target in the image. The coordinates of the personnel target detection box, target category attributes, and depth and appearance feature information are stably output, providing reliable detection results for subsequent tracking and association.

[0081] The second step is target association and trajectory stitching. The person target detection bounding boxes and corresponding feature information output by the improved YOLOv8n network are completely input into the ByteTrack association network for cross-frame target association processing.

[0082] The ByteTrack association network uses target matching between adjacent frames as its core logic. It prioritizes calculating the Intersection over Union (IOU) of the detection boxes of people in consecutive frames and pre-sets a matching judgment threshold. When the IOU of the detection boxes is greater than the preset threshold, they are initially judged to be the same target. Based on this, it combines the similarity of people's appearance features to complete a secondary precise matching, thereby improving the accuracy of target association.

[0083] For special working conditions that frequently occur in crane operation scenarios, such as partial occlusion of personnel, equipment occlusion, and reappearance of targets after briefly moving out of the frame, the ByteTrack associated network retrieves historical trajectory feature databases for feature comparison and identity continuation, effectively suppressing problems such as frequent changes in target IDs and interruptions in the trajectory, and coherently splicing fragmented detection results to generate a continuous and complete sequence of historical movement trajectories of personnel.

[0084] The third step is the extraction of temporal features and trajectory prediction. The stitched historical continuous trajectories of the personnel are then input into the Transformer prediction module.

[0085] The module consists of a collaborative architecture composed of a temporal encoder and a trajectory decoder. The temporal encoder is equipped with 4 to 6 layers of self-attention mechanism, which is specifically used to mine the temporal correlation features and motion pattern features within the historical trajectory of the person. The trajectory decoder is equipped with 2 to 3 layers of cross-attention mechanism, which fuses the encoded deep temporal features to complete the logical deduction and coordinate calculation of the person's future movement trend.

[0086] According to the scope of implementation, the future preset duration of trajectory prediction is controlled within the range of 3s to 10s. The model outputs a frame of predicted personnel position coordinates every 0.5s, and at the same time generates the confidence parameters of the corresponding trajectory results to quantify the effectiveness and reliability of the prediction results, providing data support for on-site safety management and hazard warning of cranes.

[0087] IV. Personnel Trajectory Prediction System within the Crane Working Area

[0088] This invention also protects a personnel trajectory prediction system for crane working areas adapted to the above prediction method. The system is a modular serial architecture, mainly including an image acquisition unit, an improved YOLOv8n detection unit, a ByteTrack association unit, and a Transformer prediction unit that are connected in sequence. Each unit has a clear division of labor and data is transmitted step by step to jointly complete the full-process monitoring and trajectory prediction of crane personnel.

[0089] The image acquisition unit is the front-end sensing component of the system, responsible for acquiring real-time images of the entire working area of ​​the crane and continuously outputting continuous image data including operators, crane equipment, and the on-site environment, providing raw input data sources for back-end algorithm processing.

[0090] The improved YOLOv8n detection unit is equipped with the improved YOLOv8n network of this invention. It has a built-in complete CBAM-FasterNet fusion module and channel inverse restoration module. It receives image data output by the image acquisition unit, completes anti-interference personnel feature extraction and target detection, and outputs accurate personnel detection boxes and target feature information in real time. It is the core carrier of the system's target recognition.

[0091] The ByteTrack association unit incorporates the ByteTrack tracking association algorithm. It receives target data output by the detection unit, performs cross-frame identity matching, occlusion compensation, trajectory repair, and continuous stitching, and outputs a smooth and stable historical continuous trajectory of personnel, eliminating the problem of unstable target tracking under complex working conditions.

[0092] The Transformer prediction unit connects to the tracking unit's trajectory output, completes temporal feature learning and motion trajectory deduction through a multi-layer attention mechanism, and finally outputs the trajectory prediction coordinates and confidence information of the personnel within a fixed time period in the future, enabling early prediction of the movement trend of crane operators.

[0093] V. Overall Workflow and Implementation Logic

[0094] In practical implementation, the overall process of this invention is coherent and unified: First, real-time images of the crane are acquired by the image acquisition unit and fed into the improved YOLOv8n network; the CBAM attention module performs dual-dimensional feature weighting, the channel number determination module adaptively calculates the fixed number of channels, the channel rearrangement module concentrates high-value channels, the FasterNet lightweight module completes lightweight feature output, and the channel inverse restoration module corrects the channel order; after the improved network completes accurate personnel detection, the ByteTrack association network achieves long-term stable tracking and stitches together to form historical trajectories; finally, the Transformer prediction module mines temporal features and outputs the prediction results of the personnel's future movement trajectory.

[0095] VI. Trajectory Prediction Examples

[0096] like Figure 3 As shown, the crane's operating trajectory model is first established, the work area is divided, and the system is initialized and visual parameters are verified. Then, the crane's operating parameters are collected in real time and the operating trajectory is dynamically drawn. Images are collected and personnel are detected through an improved YOLOv8n network equipped with a CBAM-FasterNet fusion module. If no personnel are detected, monitoring continues. If personnel are detected, a first-level warning is triggered. The pedestrian trajectory is tracked and stitched through the ByteTrack association network. Then, the future trajectory of the pedestrian is inferred through the Transformer prediction module and an elliptical simulated trajectory range is drawn. This range is compared with the crane's operating trajectory for overlap judgment. If there is no overlap, tracking continues. If there is overlap, a second-level warning is triggered. If the personnel have not left the work area or the crane has not stopped, an emergency stop is executed. After the risk is eliminated, normal monitoring is resumed, forming a complete closed loop of "monitoring-detection-early warning-prediction-prevention", realizing the proactive prevention and control of personnel collision risks. The specific content is as follows: This embodiment uses "crane operation status monitoring → personnel target detection → graded early warning triggering → trajectory tracking and prediction → trajectory conflict judgment → emergency braking control" as its core logic. It sets up a two-level safety protection mechanism of first-level early warning and second-level alarm, combined with the improved YOLOv8n detection network, ByteTrack association network, and Transformer prediction module of this invention, to achieve accurate prediction of personnel trajectories and proactive prevention of collision risks. The complete process corresponds to... Figure 3 The logic block diagram shown.

[0097] 1. Establishment of crane travel trajectory model and division of work area

[0098] This step is a preparatory step for system operation: For the target crane's operating conditions, establish a trajectory model of the crane's lifting equipment and boom, clarifying the crane's operating radius, slewing range, lifting stroke, and other core motion boundaries; based on the field of view of the visual acquisition cameras installed in the crane's operating area, and combined with the crane's motion boundaries, delineate the crane's dedicated working area, clarify the safety boundaries and hazardous operating range within the area, and complete the coordinate calibration of the image acquisition space and the crane's actual operating space, providing a unified spatial benchmark for subsequent target detection and trajectory comparison.

[0099] 2. System initialization and visual parameter verification

[0100] After the system starts, it executes a complete initialization process, completes the self-test of hardware devices (image acquisition unit, crane parameter acquisition module, early warning terminal, and brake control unit), verifies the intrinsic and extrinsic parameters of the vision acquisition system, confirms the coordinate calibration accuracy of the camera field of view and the crane working area, and ensures the consistency between the image acquisition information and the coordinates of the actual working space of the crane, so as to provide accuracy guarantee for subsequent target pose calculation and trajectory comparison. After the initialization verification is passed, the system enters the real-time monitoring loop process.

[0101] 3. Crane operating parameter acquisition and dynamic trajectory drawing

[0102] The system collects the crane's operating status parameters in real time through the crane's sensor unit, including core parameters such as the operating speed, direction of movement, acceleration, slewing angle, and lifting height of the spreader. Based on the crane's operating trajectory model established in step 1, and combined with the real-time collected parameters, the system dynamically draws the crane's current and short-term operating trajectory, updates the trajectory data in real time, and provides benchmark comparison data for subsequent judgment of the overlap of pedestrian trajectory ranges.

[0103] 4. Image Acquisition and Improved YOLOv8n Target Processing

[0104] (1) The image acquisition unit (industrial camera) acquires real-time images of the crane's working area, including real-time image information of the operators, crane equipment, and the on-site environment.

[0105] (2) Input the acquired images into the improved YOLOv8n network.

[0106] (3) The improved YOLOv8n network is based on lightweight feature maps to accurately obtain the status and pose information of each target (including operators and equipment components) in the working area of ​​the crane, and outputs the detection box, position coordinates and corresponding feature information of the personnel target to complete the preliminary identification of the personnel target.

[0107] 5. Pedestrian detection and recognition and process branch judgment

[0108] The system identifies and determines pedestrian targets in images based on the detection results of an improved YOLOv8n network. If no pedestrians are detected: it is determined that there is no risk of personnel entering the current crane working area, and the system returns to step 3 to continuously collect crane parameters and image information in a loop, maintaining a regular real-time monitoring status.

[0109] If a pedestrian is detected: if it is determined that there is a risk of personnel entering a hazardous work area, the system will initiate a tiered early warning process.

[0110] 6. Level 1 Early Warning Trigger and Pedestrian Trajectory Tracking and Data Collection

[0111] (1) When the system detects a pedestrian target, it immediately triggers a first-level warning and issues an initial warning to the crane operator through on-site audio and visual prompts, terminal pop-ups, etc., to remind the operator to pay attention to the personnel in the work area.

[0112] (2) Simultaneously, the person detection bounding boxes and feature information output by the improved YOLOv8n network are input into the ByteTrack association network: The ByteTrack network prioritizes calculating the Intersection over Union (IOU) of person target detection boxes in adjacent frames. When the IOU is greater than a preset threshold, it performs secondary matching by combining the similarity of person target features. To address common issues in crane scenarios, such as personnel obscuring the view or briefly leaving the frame before re-entering, a historical trajectory feature library is invoked for feature comparison to achieve identity continuation and trajectory stitching.

[0113] (3) Finally, the ByteTrack network completes the identity matching and trajectory stitching of pedestrian targets in multiple frames, continuously tracks and collects the real-time location coordinates, motion status and other trajectory information of pedestrians, and generates a continuous and complete historical trajectory sequence of pedestrians.

[0114] 7. Pedestrian future trajectory prediction

[0115] The system generates continuous historical pedestrian trajectories based on the ByteTrack correlation network, and inputs the trajectory data into the Transformer prediction module: Temporal encoder: Employs a 4-6 layer self-attention mechanism to fully extract temporal dependency features and movement pattern features from the continuous historical trajectory of pedestrians; Trajectory decoder: Employs a 2-3 layer cross-attention mechanism to infer the future movement trend of pedestrians based on extracted temporal features; Based on a preset future duration of 3s to 10s, the Transformer prediction module outputs a sequence of the pedestrian's future position coordinates every 0.5s, along with the confidence level of the corresponding trajectory, thus accurately predicting the pedestrian's future trajectory.

[0116] 8. Simulation and drawing of pedestrian trajectory range

[0117] Based on the pedestrian's future trajectory predicted in step 7 and combined with the pedestrian's historical trajectory information collected in step 6, the system draws an elliptical simulated pedestrian trajectory range with the pedestrian's current position as the reference and the predicted trajectory as the central axis. This range covers the fluctuation range of the pedestrian's historical movement and the potential activity area of ​​the future predicted trajectory, and is used for subsequent spatial overlap judgment with the crane trajectory.

[0118] 9. Trajectory range overlap judgment and secondary alarm triggering

[0119] The system will determine the spatial overlap between the simulated pedestrian trajectory range obtained in step 8 and the crane running trajectory dynamically drawn in step 3. If the two do not overlap: it is determined that the pedestrian's current trajectory will not collide with the crane's operation. The system returns to step 6, continues to track the pedestrian's trajectory, updates the prediction results, and maintains the monitoring status. If the two conditions coincide: if it is determined that there is a high risk of a pedestrian entering the dangerous working area of ​​the crane and colliding with it, the system will immediately activate a level two alarm and issue an emergency response prompt to the operator through high-level audible and visual warnings and strong terminal reminders.

[0120] 10. Post-warning tracking and emergency braking control

[0121] After a Level 2 alarm is triggered, the system continuously tracks the pedestrian's real-time status and trajectory information, and simultaneously performs two judgments: (1) Whether the pedestrian has completely left the crane's working area; (2) Has the crane completed the shutdown operation? If the determination result is yes (pedestrian has left / crane has stopped): the collision risk is determined to be completely eliminated, the system returns to step 3, and resumes the normal real-time monitoring process; If the judgment result is negative (pedestrian not left / crane not stopped): the collision risk is determined to exist, the system immediately outputs an emergency braking control signal, controls the crane to perform an emergency braking operation, completely avoids the risk of personnel collision, and ensures the safety of operators and equipment.

[0122] The entire process relies on the improved network, correlation algorithm, prediction module and hierarchical early warning mechanism provided by this invention, closely matching the complex working conditions of crane operations, and realizing proactive prevention and control of personnel safety.

[0123] 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 CBAM-FasterNet fusion module for personnel status detection in crane operating areas, used to replace the native C2f module in the YOLOv8n backbone network to improve the anti-interference capability and embedded inference efficiency of personnel detection, characterized in that, Includes the following modules connected in sequence: The CBAM attention module sequentially performs channel and spatial dimension weighting on the input feature map representing the state of personnel in the crane operation area. This filters out noise in the crane operation scene while highlighting personnel target features, and outputs a channel weight vector. ; The channel number determination module is used to obtain a fixed number of channels k: a preset information retention ratio η of the input feature map, based on a percentile function. Calculate the dynamic threshold t of the input feature map for each frame. i The channel weights in the input feature map of each frame that are higher than t are statistically analyzed. i Number of channels k i The sequence of channel counts k is obtained by traversing the input feature map dataset. seq Take k seq The 95th percentile is a fixed number of channels k; and selects The top k channels with the highest weights are the target convolution channels; The channel rearrangement module is used to group the target convolutional channels to the front of the input feature map channel dimension; The FasterNet lightweight module uses a FasterBlock structure, which performs standard convolution only on the target convolutional channel and performs identity mapping on the remaining channels. The final output is a lightweight feature map with the same dimension as the input feature map and is suitable for embedded deployment.

2. The CBAM-FasterNet fusion module for personnel status detection in crane operating areas according to claim 1, characterized in that, Number of channels k i The acquisition process is as follows: ; ; Among them, M bool It is a one-dimensional Boolean vector; Count(·) is a statistical counting function; True is the Boolean truth value.

3. The CBAM-FasterNet fusion module for personnel status detection in crane operating areas according to claim 1, characterized in that, The value of η is 70% to 90%.

4. An improved YOLOv8n network, characterized in that, Using YOLOv8n as the base network, at least one native C2f module in the YOLOv8n backbone network is replaced with the CBAM-FasterNet fusion module as described in any one of claims 1-3; Alternatively, any native C2f module in the YOLOv8n backbone network can be replaced with the CBAM-FasterNet fusion module as described in any one of claims 1-3, while the remaining native C2f modules can be replaced with the FasterNet lightweight module in the CBAM-FasterNet fusion module as described in any one of claims 1-3.

5. An improved YOLOv8n network according to claim 4, characterized in that, The FasterNet lightweight module output concatenated channel inverse restoration module in the CBAM-FasterNet fusion module is used to perform channel order inverse restoration on the lightweight feature map, restoring the original channel order consistent with the input feature map.

6. A method for predicting personnel trajectories within the working area of ​​a crane, characterized in that, The prediction steps include the following: Real-time images of personnel status within the crane's working area are collected, input into the improved YOLOv8n network described in claim 4 or 5 for personnel target detection, and output personnel target detection boxes and corresponding feature information; By inputting the personnel target detection bounding box and feature information into the ByteTrack association network, the identity matching and trajectory stitching of multiple frames of personnel targets are completed, and the historical continuous trajectory of personnel is generated. Input the continuous historical trajectory of the personnel into the Transformer prediction module. After time-series feature extraction and trajectory extrapolation, the module outputs the trajectory prediction result of the personnel target for a preset future time.

7. The method for predicting personnel trajectories within a crane working area according to claim 6, characterized in that, The identity matching process of the ByteTrack network is as follows: calculate the intersection-union ratio (IOU) of the detection boxes of people in adjacent frames. When the IOU is greater than a preset threshold, perform secondary matching by combining the similarity of the people's target features. For people who are occluded or move out of the frame and then re-enter, call the historical trajectory feature library to perform feature comparison, so as to realize identity continuation and trajectory stitching.

8. The method for predicting personnel trajectories within a crane working area according to claim 6, characterized in that, In the Transformer prediction module, the temporal encoder uses a 4-6 layer self-attention mechanism to extract the temporal dependency features of the person's historical continuous trajectory; the trajectory decoder uses a 2-3 layer cross-attention mechanism to infer the person's future movement trajectory based on the temporal features.

9. A method for predicting personnel trajectories within a crane's working area according to claim 6, characterized in that, The preset duration is 3s to 10s, and the trajectory prediction results are output as the personnel position coordinates every 0.5s, along with the trajectory confidence score.

10. A personnel trajectory prediction system within the working area of ​​a crane, characterized in that, It includes an image acquisition unit, an improved YOLOv8n detection unit, a ByteTrack correlation unit, and a Transformer prediction unit connected in sequence; The image acquisition unit is used to acquire real-time images of the personnel status within the crane's working area; The improved YOLOv8n detection unit is the improved YOLOv8n network as described in claim 4 or 5, equipped with the CBAM-FasterNet fusion module as described in any one of claims 1-3, used to detect people targets in real-time images and output detection features; The ByteTrack association unit is used to associate the identities of people targets in multiple frames and stitch their trajectories together to generate continuous historical trajectories of people. The Transformer prediction unit is used to extrapolate the temporal characteristics of a person's historical continuous trajectory and output the trajectory prediction result of the person for a preset future duration.

Citation Information

Patent Citations

  • Tiny target identification method for unmanned aerial vehicle lightweight network under limited capability

    CN118212554A