Population statistics method and apparatus based on confidence probabilities

By employing a confidence probability-based population statistics method, and utilizing an encoding-decoding neural network and a confidence probability model to filter and predict probability density maps, the problem of misjudgment in high-density scenarios is solved, thus improving the accuracy of population statistics.

CN115482500BActive Publication Date: 2026-06-09CHINA MOBILE (XIONGAN) ICT CO LTD +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE (XIONGAN) ICT CO LTD
Filing Date
2021-05-27
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing population statistics methods are prone to misjudgment in high-density scenarios, leading to incorrect estimates of the number of people. Furthermore, the increased amount of data collection and labeling results in high costs for network models.

Method used

A confidence probability-based population statistics method is adopted, which generates feature maps and generated maps by encoding and decoding neural networks, and uses a confidence probability model and a prediction neural network to determine the true density map, thereby reducing misidentification and improving statistical accuracy.

Benefits of technology

By reducing the amount of data used to train the model through encoding and decoding, and by using confidence probability density maps to filter prediction probability density maps, the false recognition rate can be reduced and the accuracy of population statistics can be improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115482500B_ABST
    Figure CN115482500B_ABST
Patent Text Reader

Abstract

The application provides a crowd statistical method and device based on confidence probability, comprising: obtaining an original picture for crowd quantity statistics; obtaining a feature map and a generated map corresponding to the original picture through encoding and decoding based on the original picture; inputting the original picture, the feature map and the generated map into a preset confidence probability model to obtain a confidence probability density map; inputting the feature map into a preset prediction neural network to obtain a prediction probability density map corresponding to the feature map; determining a real density map based on the confidence probability density map and the prediction probability density map, and performing crowd quantity statistics according to the real density map. In one aspect, the application reduces the data training model through encoding and decoding; on the other hand, the application screens the prediction probability density map by using the confidence probability density map, reduces the occurrence of false recognition, and thus improves the accuracy of crowd quantity statistics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and image processing technology, and in particular to a population statistics method and apparatus based on confidence probability. Background Technology

[0002] Crowd counting is a hot research topic in the field of intelligent video surveillance. Traditional crowd counting techniques perform well in low-density crowd scenes, but their performance is poor in high-density scenes. With the technological breakthroughs of convolutional neural networks in image processing, they have a strong learning ability for nonlinear mappings and are also suitable for crowd counting models that represent the nonlinear relationship between images and crowd numbers.

[0003] Current mainstream crowd counting methods are mainly divided into two categories: 1. Detection-based crowd counting methods; 2. Crowd density-based crowd counting methods. However, the main problem with these two methods is that when using network prediction, there is a high possibility of misjudgment for completely unfamiliar images, leading to incorrect estimation of the number of heads (mainly misjudging situations where there are no heads as if there were). Even by increasing the amount of data collected and labeled, the cost of the network model will increase significantly. Summary of the Invention

[0004] To address the problems existing in the prior art, embodiments of the present invention provide a population statistics method and apparatus based on confidence probability.

[0005] In a first aspect, embodiments of the present invention provide a population statistics method based on confidence probability, comprising:

[0006] Obtain the original image used for crowd counting;

[0007] Based on the original image, a feature map and a generated image corresponding to the original image are obtained through encoding and decoding.

[0008] The original image, the feature map, and the generated image are input into a preset confidence probability model to obtain a confidence probability density map;

[0009] The feature map is input into a preset prediction neural network to obtain a prediction probability density map corresponding to the feature map;

[0010] The true density map is determined based on the confidence probability density map and the predicted probability density map, and the population size is counted based on the true density map.

[0011] Further, obtaining the feature map and generated map corresponding to the original image through encoding and decoding based on the original image includes:

[0012] The original image is input into an encoding neural network to obtain a feature map corresponding to the original image;

[0013] The feature map is input into a decoding neural network to obtain a generated map corresponding to the feature image.

[0014] Furthermore, it also includes:

[0015] The first loss function of the preset confidence probability model is constructed based on the original sample image, the feature map corresponding to the original sample image, and the generated image;

[0016] The confidence level of the feature points in the feature map is calculated based on the first loss function.

[0017] Furthermore, it also includes:

[0018] The second loss function of the preset prediction neural network is constructed based on the sample prediction probability density map and the true density map corresponding to the sample prediction probability density map;

[0019] The third loss function is determined based on the first loss function and the second loss function.

[0020] Further, a true density map is determined based on the confidence probability density map and the predicted probability density map, and population size is counted based on the true density map, including:

[0021] The true density map is determined by multiplying the confidence probability density map and the predicted probability density map, and the population size is counted based on the true density map.

[0022] Secondly, embodiments of the present invention provide a population statistics device based on confidence probability, comprising:

[0023] The acquisition module is used to acquire the original image for crowd counting.

[0024] The encoding / decoding module is used to obtain a feature map and a generated map corresponding to the original image through encoding and decoding.

[0025] The confidence probability module is used to input the original image, the feature map, and the generated image into a preset confidence probability model to obtain a confidence probability density map;

[0026] The prediction module is used to input the feature map into a preset prediction neural network to obtain a prediction probability density map corresponding to the feature map;

[0027] The statistics module is used to determine the true density map based on the confidence probability density map and the predicted probability density map, and to perform population statistics based on the true density map.

[0028] Furthermore, the encoding / decoding module is specifically used for:

[0029] The original image is input into an encoding neural network to obtain a feature map corresponding to the original image;

[0030] The feature map is input into a decoding neural network to obtain a generated map corresponding to the feature image.

[0031] Furthermore, the first loss function of the preset confidence probability model in the confidence probability module is constructed based on the original sample image, the feature map corresponding to the original sample image, and the generated image;

[0032] The confidence level of the feature points in the feature map is calculated based on the first loss function.

[0033] Thirdly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the confidence probability-based population statistics method described in the first aspect above.

[0034] Fourthly, embodiments of the present invention also provide a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the population statistics method based on confidence probability as described in the first aspect above.

[0035] As can be seen from the above technical solution, the crowd counting method and apparatus based on confidence probability provided in this invention involves: acquiring an original image for crowd counting; obtaining a feature map and a generated image corresponding to the original image through encoding and decoding; inputting the original image, the feature map, and the generated image into a preset confidence probability model to obtain a confidence probability density map; inputting the feature map into a preset prediction neural network to obtain a prediction probability density map corresponding to the feature map; determining a true density map based on the confidence probability density map and the prediction probability density map; and performing crowd counting based on the true density map. This invention, on the one hand, reduces data training for the model through encoding and decoding; on the other hand, it uses the confidence probability density map to filter the prediction probability density map, reducing the occurrence of misidentification, thereby improving the accuracy of crowd counting. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is a flowchart illustrating a population statistics method based on confidence probability provided in an embodiment of the present invention.

[0038] Figure 2 This is a schematic diagram of a prediction process provided in an embodiment of the present invention;

[0039] Figure 3 This is a schematic diagram of the training module flow according to an embodiment of the present invention;

[0040] Figure 4 This is a schematic diagram of the structure of a population statistics device based on confidence probability according to an embodiment of the present invention;

[0041] Figure 5 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, 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. The population statistics method based on confidence probability provided by the present invention will be explained and described in detail below through specific embodiments.

[0043] Figure 1 This is a flowchart illustrating a population statistics method based on confidence probability provided in an embodiment of the present invention; as shown below. Figure 1 As shown, the method includes:

[0044] Step 101: Obtain the original image for crowd counting.

[0045] In this step, it is understood that the original image is the one used for crowd counting, and it can be an unfamiliar image that the computer has never seen before.

[0046] Step 102: Based on the original image, obtain the feature map and the generated image corresponding to the original image through encoding and decoding.

[0047] In this step, it is understood that by using an automatic encoding-decoding method, the data requirements other than the human head are improved, fundamentally reducing the amount of data. For example, when using a UNet encoding-decoding neural network for model training, the encoding neural network can be used to obtain the feature map corresponding to the original image, and the decoding neural network can be used to obtain the generated image corresponding to the original image. Furthermore, after obtaining the feature map corresponding to the original image, the decoding neural network can be used to obtain the generated image corresponding to the feature map.

[0048] Step 103: Input the original image, the feature map, and the generated image into a preset confidence probability model to obtain a confidence probability density map.

[0049] In this step, it can be understood that the preset confidence probability model is obtained based on machine learning training, taking the original image, feature map and sample images of the generated image as input, and the confidence probability density map corresponding to the sample image as output.

[0050] In this step, for example, the preset confidence probability model can take the feature map (which must be the same size as the image, but the number of channels can vary), the original image, and the generated image as inputs to obtain an estimate of the confidence of each point (the confidence level of the feature point), thereby obtaining an image that meets the confidence probability conditions and outputting it as a confidence probability density map.

[0051] Step 104: Input the feature map into a preset prediction neural network to obtain a prediction probability density map corresponding to the feature map.

[0052] In this step, it is understood that the preset prediction neural network can be implemented using the HRNet network structure, taking the sample image of the feature map as input and the prediction probability density map corresponding to the sample image as output.

[0053] Step 105: Determine the true density map based on the confidence probability density map and the predicted probability density map, and perform population statistics based on the true density map.

[0054] In this step, it is understood that since the confidence probability density map is composed of the confidence estimate of each feature point, the confidence probability density map is used as the confidence criterion for the prediction probability density map. The prediction probability density map is then filtered to reduce the occurrence of misidentification (such as misidentifying a situation where there are no people as a situation where there are people), thereby optimizing the population statistics results and improving the accuracy of the statistics.

[0055] To better understand the present invention, the following embodiments further illustrate the content of the present invention. However, the present invention is not limited to the following embodiments. For example:

[0056] Based on the confidence probability-based crowd counting method provided in this invention, a model for crowd counting is provided. This model includes an encoding and decoding neural network for obtaining a feature map and a generated map corresponding to the original image; a preset confidence probability model for obtaining a confidence probability density map; and a preset prediction neural network for obtaining a prediction probability density map. The model takes the original image used for crowd counting as input and the crowd counting result as output. During model training, the model utilizes the encoding network to obtain the original image... The feature map of the image is input into the decoding network, which generates the generated image. The original image, generated image, and feature map are used as inputs to the confidence module (i.e., the pre-defined confidence probability model). The loss function E of the confidence module is constructed based on the original image, generated image, and feature map, calculating the confidence score of each feature point in the feature map. The feature map output from the encoding network is also used as input to the prediction network (i.e., the pre-defined prediction neural network). The loss function F of the prediction network is constructed based on the predicted density map and the true density map. Therefore, the total loss function of the model (crowd density statistics model) is the sum of the loss functions E and F. In this way, the encoding network can be trained and optimized using the loss function E of the confidence module, enabling it to accurately and comprehensively extract features from the original image and input them into the prediction network. The prediction network is then optimized using the loss function F of the prediction network, allowing it to more accurately predict the crowd density map. Furthermore, when applying the model (population quantity statistics model), the feature map of the original image is obtained by using the encoding network and the generated image corresponding to the feature map extracted by the encoding network is obtained by using the decoding network. The original image, generated image and feature map are used as inputs to the confidence module. The confidence module sets the value of feature points with a confidence level greater than a preset threshold to 1, and otherwise to 0. In this way, the confidence probability density map output by the confidence module is obtained. The feature map extracted by the encoding network is input to the prediction network and outputs the prediction probability density map. The true probability density map is the product of the confidence probability density map and the prediction probability density map.

[0057] In this embodiment, the model for implementing the above-mentioned population counting includes the following parts: 1. Dataset construction: Preparing training and testing datasets; 2. Training: Including network structure, loss function, and training process; 3. Testing / prediction: Using the network to test / predict the number of faces in the image. Specifically:

[0058] 1) First, the testing / prediction process is explained. The network module used in this embodiment of the invention is as follows: Figure 2As shown, the encoding network can use a convolutional neural network such as VGG, the decoding network can use a convolutional neural network such as UNet, and the prediction neural network can use network structures such as HRNet. The confidence probability model can take the feature map (which must be the same size as the image, but the number of channels can vary), the original image, and the generated image as input to obtain an estimate of the confidence of each point. The specific implementation method can be as follows:

[0059] y={mean_{channel}(feat^2)+mean_{channel}((img-img_gen)^2)} <thr

[0060] In the above formula: thr is the threshold, feat is the feature map, img is the original image, and img_gen is the generated image; y in the above formula represents the confidence of each point (i.e., feature point). When feat^2 + (img - img_gen)^2 is less than the threshold, the result of y is 1; when it is greater than the threshold, the result of y is 0. This means that when the quality of the generated image is poor or the feature point is far away from the corresponding point in the original image, this point is less reliable; mean_{channel} is the average of the channels, and (feat, img, img_gen) are all arrays of CxWxH, where C is the channel, and W and H are the width and length of the image, respectively; then, the predicted probability density map is multiplied by y to obtain the true density map; finally, by summing the true density maps, the number of people can be obtained. In addition, the threshold thr can be determined on the validation set using a search threshold selection method (such as K-fold cross-validation), and the one with the highest prediction accuracy is taken as the final threshold.

[0061] 2) Training module, flowchart as follows Figure 3 As shown; where the loss function E (the first loss function) can be expressed as:

[0062] L_E=mean(mean_{channel}(feat^2)+mean_{channel}((img-img_gen)^2))

[0063] In this formula, feat, img, and img_gen are the same as the prediction / inference process above, and mean is the average of the W and H dimensions.

[0064] The loss function F (the second loss function) can be expressed as:

[0065] L_F=mean((density-density_ground)^2)

[0066] Here, density represents the predicted probability at each location on the predicted probability density map, and density_ground represents the true density map, which is constructed during the dataset construction process using the labeled head center locations and a preset Gaussian density distribution.

[0067] The final loss function is obtained by L = L_E + L_F (the third loss function), which is implemented through standard deep learning training methods.

[0068] 3) Dataset Construction:

[0069] The main task of dataset construction is to establish the correspondence between images and the true density map. Based on the existing image data with the center position of the human head marked, the true density map is then constructed using a Gaussian function.

[0070] As can be seen from the above technical solution, the crowd counting method based on confidence probability provided in this embodiment of the invention involves: acquiring an original image for crowd counting; obtaining a feature map and a generated image corresponding to the original image through encoding and decoding; inputting the original image, the feature map, and the generated image into a preset confidence probability model to obtain a confidence probability density map; inputting the feature map into a preset prediction neural network to obtain a prediction probability density map corresponding to the feature map; determining a true density map based on the confidence probability density map and the prediction probability density map; and performing crowd counting based on the true density map. This invention, on the one hand, reduces data training for the model through encoding and decoding; on the other hand, it uses the confidence probability density map to filter the prediction probability density map, reducing the occurrence of misidentification, thereby improving the accuracy of crowd counting.

[0071] Based on the above embodiments, in this embodiment, obtaining the feature map and generated map corresponding to the original image through encoding and decoding includes:

[0072] The original image is input into an encoding neural network to obtain a feature map corresponding to the original image;

[0073] The feature map is input into a decoding neural network to obtain a generated map corresponding to the feature image.

[0074] In this embodiment, it should be noted that an encoding and decoding network is used to generate images, and only one dataset, human head and body detection, is required, thus enabling the model to be trained with less data.

[0075] As can be seen from the above technical solution, the population statistics method based on confidence probability provided by the embodiments of the present invention first inputs the original image into an encoding neural network to obtain a feature map corresponding to the original image, then inputs the feature map into a decoding neural network to obtain a generated map corresponding to the feature image, thereby improving the data requirement other than the number of heads, and then uses the original image, the feature map corresponding to the original image, and the generated map corresponding to the feature image as inputs to the confidence probability model, thereby fundamentally reducing the amount of data.

[0076] Based on the above embodiments, this embodiment further includes:

[0077] The first loss function of the preset confidence probability model is constructed based on the original sample image, the feature map corresponding to the original sample image, and the generated image;

[0078] The confidence level of the feature points in the feature map is calculated based on the first loss function.

[0079] In this embodiment, it can be understood that the loss function of the confidence probability model is constructed based on the original image, the generated image, and the feature map, and calculates the confidence level of each feature point in the feature map.

[0080] As can be seen from the above technical solutions, the population statistics method based on confidence probability provided by the embodiments of the present invention enhances the ability to deal with unknown data. By using the confidence probability density map of key points, the prediction results are filtered, the occurrence of false identification is reduced, and the accuracy of statistics is improved.

[0081] Based on the above embodiments, this embodiment further includes:

[0082] The second loss function of the preset prediction neural network is constructed based on the sample prediction probability density map and the true density map corresponding to the sample prediction probability density map;

[0083] The third loss function is determined based on the first loss function and the second loss function.

[0084] In this embodiment, it can be understood that the second loss function of the predictive neural network is constructed based on the predicted probability density map and the true density map. Therefore, the total loss function of the model is the sum of the first loss function and the second loss function (i.e., the third loss function is determined based on the first loss function and the second loss function). Furthermore, the predictive neural network is optimized through the second loss function F, so that the predictive neural network can more accurately predict the crowd density map, i.e., the true density map.

[0085] As can be seen from the above technical solutions, the population statistics method based on confidence probability provided by the embodiments of the present invention enhances the ability to deal with unknown data. By using the confidence probability density map of key points, the prediction results are filtered, the occurrence of false identification is reduced, and the accuracy of statistics is improved.

[0086] Based on the above embodiments, in this embodiment, a true density map is determined based on the confidence probability density map and the predicted probability density map, and population size is counted based on the true density map, including:

[0087] The true density map is determined by multiplying the confidence probability density map and the predicted probability density map, and the population size is counted based on the true density map.

[0088] In this implementation, for example, when applying the model (population number statistics model), the feature map of the original image is obtained by using the encoding network and the generated image corresponding to the feature map extracted by the encoding network is obtained by using the decoding network. The original image, the generated image, and the feature map are used as inputs to the confidence module. The confidence module sets the value of feature points with a confidence level greater than a preset threshold to 1, and otherwise to 0. In this way, the confidence probability density map output by the confidence module is obtained. The feature map extracted by the encoding network is input to the prediction network and outputs the prediction probability density map. The true probability density map is the product of the confidence probability density map and the prediction probability density map.

[0089] Figure 4 This is a schematic diagram of a population statistics device based on confidence probability provided in an embodiment of the present invention, as shown below. Figure 4 As shown, the device includes: an acquisition module 201, an encoding / decoding module 202, a prediction module 204, and a statistics module 205, wherein:

[0090] Among them, the acquisition module 201 is used to acquire the original image for crowd size statistics;

[0091] The encoding / decoding module 202 is used to obtain a feature map and a generated map corresponding to the original image through encoding and decoding based on the original image;

[0092] The confidence probability module 203 is used to input the original image, the feature map and the generated image into a preset confidence probability model to obtain a confidence probability density map;

[0093] The prediction module 204 is used to input the feature map into a preset prediction neural network to obtain a prediction probability density map corresponding to the feature map;

[0094] The statistics module 205 is used to determine the true density map based on the confidence probability density map and the predicted probability density map, and to perform population statistics based on the true density map.

[0095] Based on the above embodiments, in this embodiment, the encoding / decoding module is specifically used for:

[0096] The original image is input into an encoding neural network to obtain a feature map corresponding to the original image;

[0097] The feature map is input into a decoding neural network to obtain a generated map corresponding to the feature image.

[0098] Based on the above embodiments, in this embodiment, the first loss function of the preset confidence probability model in the confidence probability module is constructed based on the original sample image, the feature map corresponding to the original sample image, and the generated image;

[0099] The confidence level of the feature points in the feature map is calculated based on the first loss function.

[0100] The confidence probability-based population statistics device provided in this embodiment of the invention can be used to execute the confidence probability-based population statistics method of the above embodiments. Its technical principle and beneficial effects are similar, and can be found in the above embodiments. It will not be repeated here.

[0101] Based on the same inventive concept, embodiments of the present invention provide an electronic device, see [link to relevant documentation]. Figure 5 The electronic device specifically includes the following components: processor 301, communication interface 303, memory 302, and communication bus 304;

[0102] The processor 301, communication interface 303, and memory 302 communicate with each other via communication bus 304. Communication interface 303 is used to realize information transmission between various modeling software and intelligent manufacturing equipment module libraries and other related devices. The processor 301 is used to call the computer program in memory 302. When the processor executes the computer program, it implements the methods provided in the above-mentioned method embodiments. For example, when the processor executes the computer program, it implements the following steps: acquiring the original image for crowd counting; obtaining a feature map and a generated image corresponding to the original image through encoding and decoding based on the original image; inputting the original image, the feature map, and the generated image into a preset confidence probability model to obtain a confidence probability density map; inputting the feature map into a preset prediction neural network to obtain a prediction probability density map corresponding to the feature map; determining the true density map based on the confidence probability density map and the prediction probability density map, and performing crowd counting based on the true density map.

[0103] Based on the same inventive concept, another embodiment of the present invention provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program performs the methods provided in the above-described method embodiments, such as: acquiring an original image for crowd counting; obtaining a feature map and a generated image corresponding to the original image through encoding and decoding; inputting the original image, the feature map, and the generated image into a preset confidence probability model to obtain a confidence probability density map; inputting the feature map into a preset prediction neural network to obtain a prediction probability density map corresponding to the feature map; determining a true density map based on the confidence probability density map and the prediction probability density map; and performing crowd counting based on the true density map.

[0104] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0105] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.

[0106] Furthermore, in this invention, terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0107] Furthermore, in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0108] Furthermore, in the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A population statistics method based on confidence probability, characterized in that, include: Obtain the original image used for crowd counting; Based on the original image, a feature map and a generated image corresponding to the original image are obtained through encoding and decoding. The original image, the feature map, and the generated image are input into a preset confidence probability model to obtain a confidence probability density map; the confidence probability density map is an image composed of the confidence estimate of each feature point; The feature map is input into a preset prediction neural network to obtain a prediction probability density map corresponding to the feature map; The true density map is determined based on the confidence probability density map and the predicted probability density map, and the population size is counted based on the true density map.

2. The population statistics method based on confidence probability according to claim 1, characterized in that, The process of obtaining the feature map and generated map corresponding to the original image through encoding and decoding includes: The original image is input into an encoding neural network to obtain a feature map corresponding to the original image; The feature map is input into a decoding neural network to obtain a generated map corresponding to the feature image.

3. The population statistics method based on confidence probability according to claim 1, characterized in that, Also includes: The first loss function of the preset confidence probability model is constructed based on the original sample image, the feature map corresponding to the original sample image, and the generated image; The confidence level of the feature points in the feature map is calculated based on the first loss function.

4. The population statistics method based on confidence probability according to claim 3, characterized in that, Also includes: The second loss function of the preset prediction neural network is constructed based on the sample prediction probability density map and the true density map corresponding to the sample prediction probability density map; The third loss function is determined based on the first loss function and the second loss function.

5. The population statistics method based on confidence probability according to claim 4, characterized in that, The true density map is determined based on the confidence probability density map and the predicted probability density map, and population size is counted based on the true density map, including: The true density map is determined by multiplying the confidence probability density map and the predicted probability density map, and the population size is counted based on the true density map.

6. A population statistics device based on confidence probability, characterized in that, include: The acquisition module is used to acquire the original image for crowd counting. The encoding / decoding module is used to obtain a feature map and a generated map corresponding to the original image through encoding and decoding. The confidence probability module is used to input the original image, the feature map, and the generated image into a preset confidence probability model to obtain a confidence probability density map; the confidence probability density map is an image composed of the confidence estimate of each feature point; The prediction module is used to input the feature map into a preset prediction neural network to obtain a prediction probability density map corresponding to the feature map; The statistics module is used to determine the true density map based on the confidence probability density map and the predicted probability density map, and to perform population statistics based on the true density map.

7. The population statistics device based on confidence probability according to claim 6, characterized in that, The encoding / decoding module is specifically used for: The original image is input into an encoding neural network to obtain a feature map corresponding to the original image; The feature map is input into a decoding neural network to obtain a generated map corresponding to the feature image.

8. The population statistics device based on confidence probability according to claim 6, characterized in that, The first loss function of the preset confidence probability model in the confidence probability module is constructed based on the original sample image, the feature map corresponding to the original sample image, and the generated image; The confidence level of the feature points in the feature map is calculated based on the first loss function.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the population statistics method based on confidence probability as described in any one of claims 1 to 5.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the population statistics method based on confidence probability as described in any one of claims 1 to 5.