Crowd counting method based on adaptive global perception and multi-scale feature fusion
By introducing an adaptive global perception module, a multi-scale Mamba aggregation module and a channel-aware Mamba decoder into the population counting model, combined with a composite loss function, the high computational complexity, insufficient detailed feature capture and inter-channel information utilization in the prior art is solved. Inadequate problems achieve efficient and accurate population counting, which is suitable for the deployment of resource-constrained devices.
Patent Information
- Application Number
- CN202411545016.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-11-01
AI Technical Summary
The existing population counting method requires a large computing resource requirement during high-resolution image processing, slow inference speed, and difficult to meet real-time requirements. It lacks detailed information for high-level feature modeling, and insufficient information correlation between feature channels, which affects counting accuracy. Model computing resources are expensive and difficult to deploy on resource-constrained devices.
The population counting method based on the adaptive global perception module, multi-scale Mamba aggregation module and channel-aware Mamba decoder is adopted. The adaptive global perception module reduces the calculation complexity of the self-attention mechanism. The multi-scale Mamba aggregation module integrates different scale features, and the channel Perceived Mamba decoder enhances information correlation between channels and designs composite loss functions to improve the fast convergence and high-precision performance of the model.
It significantly reduces the consumption of computing resources, improves the accuracy and inference speed of population counting, realizes the lightweight model, has good versatility and deployment potential, and is suitable for scenarios such as public safety and urban management.
Smart Images

Figure CN119048993A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer vision and deep learning technology, and specifically relates to a crowd counting method based on adaptive global perception and multi-scale feature fusion. The method is particularly suitable for application scenarios such as security monitoring, urban management, and crowd flow monitoring in public places, which require estimating the number of people in images or video frames. Background Art
[0002] Crowd counting, as a technology for counting and estimating the density of people in images or videos, has become an important means to ensure public safety, optimize traffic flow management, and improve urban management efficiency.
[0003] At present, crowd counting methods are mainly based on technological developments in the field of computer vision and are divided into two categories: those based on Convolutional Neural Networks (CNN) and those based on Transformer.
[0004] CNN-based methods extract local features from images and generate density maps to achieve crowd counting. They are well-suited for dense and multi-scale crowd scenes, but their ability to capture global contextual information is weak and they are easily affected by perspective distortion and background interference, resulting in large counting errors. Transformer-based methods capture long-range dependencies in images through a self-attention mechanism, excelling in global feature modeling and effectively processing crowd images with complex backgrounds and perspective changes. However, the Transformer's self-attention mechanism has a computational complexity of up to O(N²), resulting in high computational resource requirements and slow inference speed when processing high-resolution images, making it difficult to meet the real-time requirements of practical applications.
[0005] With the development of state-space models in visual tasks, some researchers have attempted to apply selective scanning mechanisms to crowd counting tasks, reducing the computational complexity of the self-attention mechanism to linear complexity and solving the computational efficiency issues of traditional Transformers in crowd counting. However, existing methods still have some problems that need to be solved: First, in the modeling of high-level features, detailed information is lacking, resulting in poor counting results in scenarios with sparse crowds or large scale variations. Second, the information correlation between feature channels is often ignored in existing models, resulting in insufficient utilization of channel information and affecting counting accuracy. Third, existing models consume large amounts of computational resources and have a high number of parameters. Although the computational complexity has been reduced, it is still difficult to achieve lightweightness while maintaining counting accuracy, and it cannot be effectively deployed in resource-constrained mobile or embedded devices, ultimately limiting the performance and wide application of crowd counting methods in practical applications. Summary of the Invention
[0006] The purpose of the present invention is to propose a crowd counting method based on adaptive global perception and multi-scale feature fusion. By introducing an adaptive global perception module, a multi-scale Mamba aggregation module, and a channel-aware Mamba decoder into the constructed crowd counting model, this method aims to improve the counting accuracy and inference speed in crowded scenes. At the same time, it helps to reduce computing resource consumption and achieve lightweight model, thus having good versatility and deployment potential.
[0007] In order to achieve the above-mentioned purpose, the present invention adopts the following technical solutions: The crowd counting method based on adaptive global perception and multi-scale feature fusion includes the following steps: Step 1. Preprocess the image data to construct a dataset for training the crowd counting model based on adaptive global perception and multi-scale feature fusion in step 2 below. Step 2. Build a crowd counting model based on adaptive global perception and multi-scale feature fusion, which includes a stem module, an adaptive global perception module, a multi-scale Mamba aggregation module, and a channel-aware Mamba decoder. The processing of the adaptive global perception module is divided into four stages: the first, second, third and fourth stages; First, the input image is processed by the stem module to segment the input image into patches. Then, in the first stage, the adaptive global perception module is applied to process the features to generate initial features with global long-range dependencies. In the second, third, and fourth stages, the adaptive global perception module is cascaded with the downsampling operation to extract multi-scale features with linear complexity. The features at different scales output from the second, third, and fourth stages are then fed into a multi-scale Mamba aggregation module, which effectively integrates information at different levels and outputs aggregated features. Finally, the aggregated features are fed into a channel-aware Mamba decoder, which enhances inter-channel information and generates a crowd density map. Step 3. Based on the data set constructed in step 1, train the crowd counting model built in step 2 to obtain a trained crowd counting model, and use the trained crowd counting model to estimate the number of people.
[0008] The present invention has the following advantages: As described above, the present invention discloses a crowd counting method, in which a crowd counting model based on adaptive global perception and multi-scale feature fusion is constructed. The model primarily comprises an adaptive global perception module (AGP), a multi-scale Mamba aggregation module, and a channel-aware Mamba decoder. The AGP efficiently extracts global image information, reducing the computational complexity of the self-attention mechanism to linear, thereby improving inference speed. The multi-scale Mamba aggregation module effectively fuses features at different scales, enhancing the ability to capture both details and global features, and improving crowd counting accuracy. Furthermore, the channel-aware Mamba decoder (CMD) strengthens the correlation between information between channels, further enhancing the model's counting accuracy. Furthermore, the present invention also designs a composite loss function, which ensures rapid convergence and high-precision performance of the network in crowd counting tasks. While ensuring the model inference speed and counting accuracy, the method of the present invention significantly reduces the consumption of computing resources, realizes the lightweight of the model, has good versatility and deployment potential on mobile or embedded devices, and is particularly suitable for practical scenarios such as public safety, urban management, and monitoring and management of crowded places. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 This is a network structure diagram of a crowd counting model based on adaptive global perception and multi-scale feature fusion in an embodiment of the present invention; Figure 2 This is a network structure diagram of the adaptive global perception module in an embodiment of the present invention; Figure 3 This is a network structure diagram of the multi-scale Mamba fusion module in an embodiment of the present invention; Figure 4 This is a network structure diagram of the channel-aware Mamba decoder in an embodiment of the present invention. DETAILED DESCRIPTION
[0010] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments: This embodiment proposes a crowd counting method based on adaptive global perception and multi-scale feature fusion to solve the problems of high computational complexity, large number of model parameters, insufficient capture of detail features, and insufficient utilization of inter-channel information in crowd counting tasks in existing methods. The method of the present invention proposes a crowd counting model that, through modular design, adaptively extracts global and detail information from images, solving the problems of high computational complexity, slow inference speed, and insufficient counting accuracy in crowd counting tasks in existing technologies. Specifically, the crowd counting model reduces the computational complexity of the traditional self-attention mechanism by designing an adaptive global perception module AGP, which is conducive to achieving efficient global feature extraction; by introducing a multi-scale Mamba aggregation module, it effectively integrates features at different levels and improves the ability to capture detail information; by designing a channel-aware Mamba decoder CMD, it enhances the utilization of channel information, which is conducive to improving counting accuracy.
[0011] The crowd counting method based on adaptive global perception and multi-scale feature fusion in this embodiment includes the following steps: Step 1. Obtain a public dataset and preprocess the images in the dataset to construct a dataset for training the crowd counting model based on adaptive global perception and multi-scale feature fusion in the following step 2.
[0012] The data in this embodiment are all derived from the public dataset ShanghaiTech, which includes two parts, Part A and Part B. Part A is an extremely crowded crowd, while Part B is a relatively sparse crowd.
[0013] Each part of the dataset is divided into training data and test data. PartA contains 300 training images and 182 test images, and PartB contains 400 training images and 316 test images.
[0014] First, the dataset needs to be preprocessed according to the process of the present invention. The image is resized and split into 256×256 and written into a new folder. The preprocessed image is represented as .
[0015] Step 2. Build a crowd counting model based on adaptive global perception and multi-scale feature fusion.
[0016] like Figure 2 As shown, the crowd counting model constructed in this embodiment includes a stem module, an adaptive global perception module AGP, a multi-scale Mamba aggregation module, and a channel-aware Mamba decoder CMD.
[0017] The processing of the adaptive global perception module is divided into four stages: the first, second, third and fourth stages.
[0018] Given an input image ,in and Represent the height and width of the input image respectively, and 3 represents the number of channels. The overall processing flow of the input image in the crowd counting model is as follows: First, the input image is processed by the stem module to segment the input image into patches. Then, the adaptive global perception module is applied to process the features in the first stage to generate initial features with global long-range dependencies. .
[0019] Initial features Feature processing is carried out in the second, third and fourth stages in sequence.
[0020] Among them, the adaptive global perception module AGP is cascaded with the downsampling operation in the second, third and fourth stages respectively to extract multi-scale features with linear complexity.
[0021] The features output in the second, third and fourth stages are 、 、 ,in, 、 、 、 Both indicate the number of channels.
[0022] Then the features of different scales output by the second, third and fourth stages are 、 、 The information is fed into the multi-scale Mamba aggregation module to effectively integrate information at different levels and output the aggregated features.
[0023] Finally, the features aggregated by the multi-scale Mamba aggregation module are input into the channel-aware Mamba decoder, and the channel-aware Mamba decoder enhances the inter-channel information and generates a crowd density map.
[0024] like Figure 2 As shown, the processing flow of the adaptive global perception module AGP is as follows: For the input feature map ,in 、 and They represent the height, width, and number of channels of the input feature map, which are first normalized by a layer normalization.
[0025] Features after normalization It is divided into three information flows, which are defined as the first, second and third information flows.
[0026] First information flow First, a linear transformation is performed to convert it into a new feature : ; .
[0027] in is the weight matrix for linear transformation, Representation layer normalization processing, .
[0028] The linearly transformed feature map It is processed by a 3×3 depthwise separable convolutional layer that performs spatial convolution on each input channel separately.
[0029] The features output by the depthwise separable convolutional layer are passed into the selective scanning 2D module, which scans the input data along multiple directions and selectively processes the information in the feature map to capture spatial dependencies.
[0030] The output features of the selective scanning 2D module are normalized by a layer and then combined with the second information flow The linearly transformed features are multiplied element by element to obtain the multiplied features. The multiplied features After a linear transformation, the third information flow Add element by element to generate the final feature .
[0031] The process is represented as follows: ; .
[0032] in, represents depth-wise separable convolution processing, Indicates selective scan 2D processing.
[0033] The AGP module proposed in this paper adopts a selective scanning strategy to reduce the computational complexity of the traditional self-attention mechanism from O(N²) to linear complexity, achieving efficient extraction of global features and significantly improving the inference speed of the model.
[0034] In order to make up for the lack of detailed information in high-level features, the present invention designs a multi-scale Mamba aggregation module, which can fuse feature information of different scales, enhance the network's ability to capture details and global features, and improve the accuracy of crowd counting.
[0035] like Figure 3 As shown in Figure 2, the processing flow of the multi-scale Mamba aggregation module is as follows: First, the multi-scale Mamba aggregation module receives the features of different scales output by the second, third and fourth stages 、 and , and the features output by the third and fourth stages and Upsample separately.
[0036] Then, the processed features of the three different scales are preliminarily fused through element-by-element addition operation to integrate feature information at different levels and obtain the fused features.
[0037] The fused features are then subjected to three sets of convolution operations with different kernel sizes: 1×1, 3×3, and 5×5, to extract rich local information. A dilated convolution is introduced after each set of convolution operations to further expand the receptive field, enhance the model's ability to capture spatial information, and thus increase feature diversity.
[0038] The 1×1 convolution processing is followed by a dilated convolution processing with a convolution kernel size of 1, the 3×3 convolution processing is followed by a dilated convolution processing with a convolution kernel size of 3, and the 5×5 convolution processing is followed by a dilated convolution processing with a convolution kernel size of 5.
[0039] Finally, the features after element-wise multiplication of the three dilated convolutions of 1×1, 3×3, and 5×5 are further added element-wise to the fused features after 1×1 convolution to generate the final fused features. .
[0040] The above process can be expressed as: .
[0041] in, represents upsampling, represents the fused features, Represents convolution operations with different convolution kernel sizes, Represents dilated convolution operations with different kernel sizes.
[0042] Through multi-scale feature fusion, the model can combine information from different scales, further enhance the network's perception and processing capabilities of global information, improve the network's accuracy and robustness, while maintaining efficient computing performance.
[0043] like Figure 4 As shown, the processing flow of the channel-aware Mamba decoder CMD is as follows: First, the fusion features of the input channel-aware Mamba decoder are , input the adaptive global perception module to capture the long-range dependencies in space and obtain the features .
[0044] Then the features Layer normalization is performed to improve the balance of feature distribution. The standardized features are further extracted through depthwise separable convolution operations. The processing process is expressed as: .
[0045] in, Represents fusion features The result processed by the adaptive global perception module.
[0046] A channel-aware mechanism consisting of average pooling and maximum pooling is introduced in the channel-aware Mamba decoder to process the features after the depth-wise separable convolution operation and generate the maximum pooling feature. and average pooling features .
[0047] Then, the maximum pooling feature and average pooling features Perform element-by-element addition and generate channel weights through the Sigmoid function to weight the input features, thereby enhancing important information and suppressing irrelevant information. The process is expressed as: .
[0048] in, Represents the Sigmoid activation function, MP represents the maximum pooling operation, and AP represents the average pooling operation.
[0049] Finally, the weighted features are multiplied element-by-element with the features after the depthwise separable convolution operation, and the multiplied features are added element-by-element with the output features of the adaptive global perception module to obtain the final output features. .
[0050] .
[0051] Output features After adjusting the number of channels through 1×1 convolution, the crowd density map with a channel number of 1 is output. The values of each pixel in the crowd density map are added together to obtain the final predicted number of people.
[0052] To address the problem that traditional methods are unable to capture enough information between channels, the present invention introduces the CMD module, dynamically adjusts channel weights, strengthens the information correlation between channels, and further improves the counting accuracy and robustness of the model.
[0053] Step 3. Based on the data set constructed in step 1, train the crowd counting model built in step 2 to obtain a trained crowd counting model, and use the trained crowd counting model to estimate the number of people.
[0054] During the crowd counting model training process, a composite loss function is constructed.
[0055] The loss function consists of the weighted sum of counting loss, optimal distribution loss (ODA) and mean square error loss.
[0056] First, the core goal of crowd counting is to make the predicted number of people as close as possible to the actual number of people. Therefore, this paper uses counting loss to measure the gap by calculating the absolute difference between the predicted number of people and the actual number of people. The calculation formula is as follows: ; in is the counting loss, For vector norm, and represent the actual number of people and the predicted number of people respectively.
[0057] In addition, in order to further narrow the distribution gap between the predicted density map and the true density map and enhance the network's ability to fit spatial information, the present invention designs the optimal distribution assignment loss (ODA).
[0058] This loss normalizes the predicted density map and the true density map into probability distributions and calculates the minimum transmission cost between the two to measure their difference in global distribution; the ODA loss is defined as follows: ; in, represents ODA losses, represents the probability distribution of the normalized true density map, Represents the normalized probability distribution of the predicted density map.
[0059] Represents a probability distribution and The optimal transmission cost between is calculated as follows: ; in, is the transmission scheme matrix, represents the transmission scheme from point i to point j, Represents the transmission cost from point i to point j, usually expressed as the square of the Euclidean distance, Represents a set of transmission schemes.
[0060] Because ODA loss focuses on the global gap between the two distributions, it can effectively align the predicted density map and the true density map when dealing with high-density scenes. However, in sparse areas, due to the small number of data points, ODA loss has difficulty accurately capturing subtle changes in low-density areas, resulting in poor performance of the network in sparse areas.
[0061] In order to solve this problem, the present invention introduces the mean square error, i.e. loss to make up for the defect that ODA loss is insensitive to sparse areas. The loss can more accurately capture the density changes in sparse areas by calculating the square error between the predicted density map and the true density map at each pixel, thereby enhancing the network's prediction ability in sparse scenarios.
[0062] Loss is defined as follows: ; in, represents the mean square error loss, represents the predicted density map, Represents the true density map after adaptive Gaussian kernel smoothing.
[0063] Total loss function, also known as compound loss function The definition is as follows: ; in, and are loss coefficients, which are used to adjust the weights of ODA loss and mean square error loss respectively.
[0064] By designing a composite loss function including counting loss, ODA and mean square error loss, the convergence speed and accuracy of the network in crowd counting tasks are improved, enabling it to have higher prediction capabilities in different density scenarios.
[0065] The model proposed in this paper constructs an efficient and accurate crowd counting model through global information extraction of the AGP module, feature fusion of the multi-scale Mamba aggregation module, inter-channel information capture of the CMD module, and optimization design of the composite loss function, which significantly improves the inference speed and counting accuracy and reduces the demand for computing resources.
[0066] After the model training is completed, the trained crowd counting model is used to estimate the number of people. Specifically, first, an image to be used for crowd estimation is obtained, and then the image is preprocessed according to the preprocessing method in step 1.
[0067] Then, the preprocessed image features are input into the above-trained crowd counting model, and a crowd density map with a channel number of 1 is output. The sum of each pixel point in the crowd density map is performed to obtain the predicted number of people.
[0068] In addition, in order to verify the performance advantages of the model proposed in the present invention in actual deployment, the present invention also introduces a measurement indicator FPS, which is the number of pictures that the optimized model can process per second.
[0069] The FPS data of the proposed model on the NVIDIA GeForce RTX 3060 Laptop are compared with the mainstream CSRNet method and MAN method. The processed image resolution is set to 256×256. The specific comparison data are shown in Table 1.
[0070] Table 1 Comparison of FPS results of different methods
[0071] As can be seen from Table 1, the FPS index of the model proposed in the present invention is significantly better than the CSRNet method and the MAN method used in the comparison, which proves the effectiveness of the method of the present invention. When the edge devices with weaker performance use the model provided by the present invention in actual deployment, the speed of data processing can be greatly accelerated to cope with sudden crowd gatherings and other situations.
[0072] The method of the present invention improves the counting accuracy and inference speed in dense crowd scenes by designing an adaptive global perception module, an AGP module, a CMD module and a composite loss function in the constructed crowd counting model. At the same time, it significantly reduces the number of model parameters and computing resources, ensures the counting accuracy and inference speed in high-density crowd scenes, realizes the lightweight of the model, has good versatility and deployment potential on mobile terminals or embedded devices, and is suitable for application scenarios such as security monitoring, urban management, and crowd flow monitoring in public places that require estimating the number of people in images or video frames.
[0073] Of course, the above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above-mentioned embodiments. It should be noted that all equivalent substitutions and obvious deformation forms made by any technician familiar with this field under the guidance of this specification fall within the substantive scope of this specification and should be protected by the present invention.
Claims
1. Crowd counting method based on adaptive global perception and multi-scale feature fusion, It is characterized in that The steps include: Step 1. Preprocess the image data to construct a data set for training the crowd counting model based on adaptive global perception and multi-scale feature fusion in step 2 below; Step 2. Build a crowd counting model based on adaptive global perception and multi-scale feature fusion, which includes stem module, adaptive global perception module, multi-scale Mamba aggregation module and channel-aware Mamba decoder; The processing of the adaptive global perception module is divided into four stages, namely the first, second, third and fourth stages; First, the input image is processed by the stem module to segment the input image into patches. Then, the adaptive global perception module is applied to process the features in the first stage to generate initial features with global long-range dependencies. In the second, third, and fourth stages, the adaptive global perception module is cascaded with the downsampling operation to extract multi-scale features with linear complexity. Then, the features of different scales output from the second, third and fourth stages are fed into the multi-scale Mamba aggregation module, which effectively integrates the information at different levels and outputs the aggregated features; Finally, the aggregated features are input into the channel-aware Mamba decoder, and the channel-aware Mamba decoder is used to enhance the inter-channel information and generate a crowd density map; Step 3. Based on the data set constructed in step 1, the crowd counting model constructed in step 2 is trained to obtain a trained crowd counting model, and the trained crowd counting model is used to estimate the number of people.
2. According to claim 1, the crowd counting method based on adaptive global perception and multi-scale feature fusion, It is characterized in that The processing flow of the adaptive global perception module is as follows: The feature map input to the adaptive global perception module is first normalized by a layer, and the normalized features are divided into three information streams, which are defined as the first, second, and third information streams. The first information stream first undergoes a linear transformation, and the feature map after the linear transformation is processed by a depth-wise separable convolutional layer, which performs spatial convolution on each input channel separately; The features output by the depthwise separable convolutional layer are passed into the selective scanning 2D module, which scans the input data in multiple directions and selectively processes the information in the feature map to capture spatial dependencies. The output features of the selective scanning 2D module are normalized by a layer normalization and then multiplied element-by-element with the features of the second information stream after linear transformation to obtain the multiplied features; The multiplied features undergo a linear transformation and are added element-by-element with the third information stream to generate the final features.
3. The crowd counting method based on adaptive global perception and multi-scale feature fusion according to claim 1, It is characterized in that The processing flow of the multi-scale Mamba aggregation module is as follows: First, the multi-scale Mamba aggregation module receives the features of different scales output by the second, third and fourth stages, and upsamples the features output by the third and fourth stages respectively; Then, the processed features of three different scales are preliminarily fused through element-by-element addition operation to integrate feature information at different levels and obtain fused features; Secondly, the fused features are subjected to three groups of convolution operations with different convolution kernel sizes, namely 1×1, 3×3, and 5×5, to extract rich local information. After each group of convolution operations, a dilated convolution is introduced to further expand the receptive field. The 1×1 convolution is then subjected to a dilated convolution with a convolution kernel size of 1, the 3×3 convolution is then subjected to a dilated convolution with a convolution kernel size of 3, and the 5×5 convolution is then subjected to a dilated convolution with a convolution kernel size of 5. Finally, the features after element-wise multiplication of the dilated convolutions with three different convolution kernel sizes of 1×1, 3×3, and 5×5 are further added element-wise to the fused features after 1×1 convolution to generate the final fused features.
4. The crowd counting method based on adaptive global perception and multi-scale feature fusion according to claim 1, It is characterized in that The processing flow of the channel-aware Mamba decoder is as follows: First, the fused features of the input channel-aware Mamba decoder are input into the adaptive global perception module to capture the long-range dependencies in space, and then standardized through a layer normalization to improve the balance of feature distribution; The standardized features are further extracted from local spatial features through depthwise separable convolution operations; A channel-aware mechanism consisting of average pooling and maximum pooling is introduced in the channel-aware Mamba decoder to process the features after the depthwise separable convolution operation to generate maximum pooling features and average pooling features; Subsequently, the maximum pooling features and the average pooling features are added element by element, and the channel weights are generated by the Sigmoid function to weight the input features, thereby enhancing important information and suppressing irrelevant information; Finally, the weighted features are multiplied element by element with the features after the depthwise separable convolution operation, and the multiplied features are added element by element with the output features of the adaptive global perception module to obtain the final output features. The final output features are subjected to 1×1 convolution to adjust the number of channels, and a crowd density map with a channel number of 1 is output. The values of each pixel in the crowd density map are added to obtain the final predicted number of people.
5. The crowd counting method based on adaptive global perception and multi-scale feature fusion according to claim 1, It is characterized in that In step 1, the process of preprocessing the image data is as follows: The image data are all from the public dataset ShanghaiTech, which consists of two parts: Part A and Part B. Part A is the image data of extremely crowded crowds, while Part B is the image data of sparse crowds. Each part of the dataset is divided into training data and test data; First, the dataset is preprocessed and the images are resized and split into 256×256.
6. The crowd counting method based on adaptive global perception and multi-scale feature fusion according to claim 1, It is characterized in that In the step 3, during the training of the crowd counting model, a composite loss function is constructed; The loss function consists of the weighted sum of the counting loss, the optimal distribution loss ODA and the mean square error loss; The counting loss measures the gap by calculating the absolute difference between the predicted number of people and the actual number of people. The calculation formula is as follows: ; in is the counting loss, For vector norm, and Represent the real number of people and the predicted number of people respectively; The optimal distribution loss ODA normalizes the predicted density map and the true density map into probability distributions and calculates the minimum transmission cost between the two to measure their difference in global distribution; the ODA loss is defined as follows: ; in, represents ODA losses, represents the normalized probability distribution of the true density map, Represents the normalized probability distribution of the predicted density map; Represents probability distribution and The optimal transmission cost between is calculated as: ; in, is the transmission scheme matrix, represents the transmission scheme from point i to point j, Represents the transmission cost from point i to point j, usually expressed as the square of the Euclidean distance, represents a set of transmission schemes; The mean square error loss can more accurately capture the density changes in sparse areas by calculating the square error between the predicted density map and the true density map at each pixel, thereby enhancing the prediction ability of the network in sparse scenes. It is defined as follows: ; in, represents the mean square error loss, represents the predicted density map, Represents the true density map after adaptive Gaussian kernel smoothing; Total loss function, also known as compound loss function The definition is as follows: ; in, and are loss coefficients, which are used to adjust the weights of ODA loss and mean square error loss respectively.
Citation Information
Patent Citations
Sensory testing data analysis by categories
CN102548470A
Dense crowd counting method based on multi-scale feature pyramid network
CN113011329A
Crowd density estimation method based on multi-scale feature fusion of residual network
CN113807334A
Super real-time crowd counting method based on stem network-encoder-decoder architecture
CN115797860A
Brain tumor image segmentation method based on multi-scale convolution and Mama structure
CN118447244A
Cited By
Relation attribute-based interpretable exercise recommendation method and system
CN119557343A
Crowd analysis method based on density adaptive counting network
CN119625640A
A Population Analysis Method Based on Density Adaptive Counting Network
CN119625640B
Face forgery detection method based on feature enhancement Mama framework
CN120088838A
Multi-scale spatio-temporal modeling video abstract generation method and device
CN120375261A
