CN115482500A - Crowd counting method and device based on confidence probability - Google Patents

Crowd counting method and device based on confidence probability Download PDF

Info

Publication number
CN115482500A
CN115482500A CN202110587715.1A CN202110587715A CN115482500A CN 115482500 A CN115482500 A CN 115482500A CN 202110587715 A CN202110587715 A CN 202110587715A CN 115482500 A CN115482500 A CN 115482500A
Authority
CN
China
Prior art keywords
map
density map
confidence
picture
probability density
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110587715.1A
Other languages
Chinese (zh)
Inventor
刘宏炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Xiongan ICT Co Ltd
China Mobile System Integration Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Xiongan ICT Co Ltd
China Mobile System Integration Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Xiongan ICT Co Ltd, China Mobile System Integration Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110587715.1A priority Critical patent/CN115482500A/en
Publication of CN115482500A publication Critical patent/CN115482500A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Biophysics (AREA)
  • Evolutionary Biology (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Operations Research (AREA)
  • Probability & Statistics with Applications (AREA)
  • Health & Medical Sciences (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a crowd counting method and a device based on confidence probability, comprising the following steps: acquiring an original picture for crowd quantity statistics; obtaining a feature map and a generated map corresponding to the original picture through coding and decoding modes 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 characteristic diagram into a preset prediction neural network to obtain a prediction probability density diagram corresponding to the characteristic diagram; and determining a real density map based on the confidence probability density map and the prediction probability density map, and counting the number of people according to the real density map. On one hand, the invention reduces data training models in a coding and decoding mode; on the other hand, the confidence probability density map is used for screening the prediction probability density map, so that the occurrence of false recognition is reduced, and the accuracy of population quantity statistics is improved.

Description

Crowd counting method and device based on confidence probability
Technical Field
The invention relates to the technical field of artificial intelligence and image processing, in particular to a crowd counting method and device based on confidence probability.
Background
People statistics is a research hotspot in the field of intelligent video monitoring. Traditional demographic techniques have good results in low-density crowd scenarios, but perform poorly in high-density scenarios. With the technical breakthrough of the convolutional neural network in image processing, the convolutional neural network has strong learning capability on nonlinear mapping and is also suitable for the nonlinear relation of a crowd counting model from images to the number of crowds.
Currently, mainstream demographic methods are mainly classified into two categories: 1. a detection-based demographic method; 2. a crowd counting method based on crowd density. However, the two methods have the main problem that when network estimation is used, for unknown images which are not seen at all, the probability of misjudgment is high, so that the number of the human heads is estimated by mistake (mainly, the situation without human heads is misjudged as the situation with human heads); even by means of increasing the data collection amount and the label amount, the cost of the network model is greatly increased.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a crowd counting method and device based on confidence probability.
In a first aspect, an embodiment of the present invention provides a crowd counting method based on confidence probability, including:
acquiring original pictures for crowd quantity statistics;
obtaining a feature map and a generated map corresponding to the original picture through coding and decoding modes 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 characteristic diagram into a preset prediction neural network to obtain a prediction probability density diagram corresponding to the characteristic diagram;
and determining a real density map based on the confidence probability density map and the prediction probability density map, and counting the number of people according to the real density map.
Further, the obtaining a feature map and a generated map corresponding to the original picture by encoding and decoding based on the original picture includes:
inputting the original picture into a coding neural network to obtain a feature map corresponding to the original picture;
and inputting the characteristic picture into a decoding neural network to obtain a generated picture corresponding to the characteristic picture.
Further, still include:
constructing a first loss function of the preset confidence probability model based on the original sample picture, the feature map corresponding to the original sample picture and the generated map;
calculating confidence degrees of the feature points in the feature map based on the first loss function.
Further, still include:
constructing a second loss function of the preset prediction neural network based on a sample prediction probability density map and a real density map corresponding to the sample prediction probability density map;
a third loss function is determined based on the first loss function and the second loss function.
Further, determining a real density map based on the confidence probability density map and the prediction probability density map, and performing population quantity statistics according to the real density map, including:
and determining a real density map based on the product of the confidence probability density map and the prediction probability density map, and carrying out population quantity statistics according to the real density map.
In a second aspect, an embodiment of the present invention provides a crowd counting apparatus based on confidence probability, including:
the acquisition module is used for acquiring original pictures for crowd quantity statistics;
the encoding and decoding module is used for obtaining a feature map and a generated map corresponding to the original picture through encoding and decoding modes based on the original picture;
the confidence probability module is used for inputting the original picture, the feature map and the generated map into a preset confidence probability model to obtain a confidence probability density map;
the prediction module is used for inputting the characteristic diagram into a preset prediction neural network to obtain a prediction probability density diagram corresponding to the characteristic diagram;
and the statistic module is used for determining a real density map based on the confidence probability density map and the prediction probability density map and carrying out crowd quantity statistics according to the real density map.
Further, the encoding and decoding module is specifically configured to:
inputting the original picture into a coding neural network to obtain a feature map corresponding to the original picture;
and inputting the characteristic picture into a decoding neural network to obtain a generated picture corresponding to the characteristic picture.
Further, a first loss function of the preset confidence probability model in the confidence probability module is constructed based on the original sample picture, the feature map corresponding to the original sample picture and the generated map;
calculating confidence of the feature points in the feature map based on the first loss function.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to implement the steps of the confidence probability-based demographic method according to the first aspect.
In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the confidence probability-based demographic method according to the first aspect.
According to the technical scheme, the crowd counting method and device based on the confidence probability, provided by the embodiment of the invention, are used for obtaining the original pictures for crowd counting; obtaining a feature map and a generated map corresponding to the original picture through coding and decoding modes 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 characteristic diagram into a preset prediction neural network to obtain a prediction probability density diagram corresponding to the characteristic diagram; and determining a real density map based on the confidence probability density map and the prediction probability density map, and counting the number of people according to the real density map. On one hand, the invention reduces data training models in a coding and decoding mode; on the other hand, the confidence probability density map is used for screening the prediction probability density map, so that the occurrence of false recognition is reduced, and the accuracy of population quantity statistics is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a crowd counting method based on confidence probability according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a prediction process according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a training module according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a demographic apparatus based on confidence probability according to an embodiment of the present invention;
fig. 5 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments, but not all embodiments, of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. The confidence probability-based demographic methodology provided by the present invention will be explained and illustrated in detail by way of specific examples.
FIG. 1 is a schematic flow chart of a crowd counting method based on confidence probability according to an embodiment of the present invention; as shown in fig. 1, the method includes:
step 101: and acquiring an original picture for counting the number of the crowd.
In this step, it can be understood that the original image is an image for people counting, and may be a strange image that is not seen by the computer at all.
Step 102: and obtaining a feature map and a generated map corresponding to the original picture by means of coding and decoding based on the original picture.
In this step, it can be understood that, by means of automatic encoding-decoding, the data demand outside the human head is improved, and the data volume is reduced fundamentally; for example, when the UNet encoding/decoding neural network is used to perform model training, the encoding neural network may be used to obtain a feature map corresponding to an original picture, the decoding neural network may be used to obtain a generated map corresponding to the original picture, or the decoding neural network may be used to obtain a generated map corresponding to the feature map after obtaining a feature map corresponding to the original picture.
Step 103: and inputting the original picture, the feature map and the generated map into a preset confidence probability model to obtain a confidence probability density map.
In this step, it can be understood that the preset confidence probability model is obtained based on machine learning training, and the original image, the feature map, and the sample image from which the image is generated are used as input, and the confidence probability density map corresponding to the sample image is used as output.
In this step, for example, the preset confidence probability model may take the feature map (the required size is the same as the picture, the number of channels is variable), the original picture and the generated map as input, obtain the estimation of the credibility (the confidence of the feature point) of each point, thereby obtaining an image satisfying the confidence probability condition, and output the image as a confidence probability density map.
Step 104: and inputting the characteristic diagram into a preset prediction neural network to obtain a prediction probability density diagram corresponding to the characteristic diagram.
In this step, it can be understood that the preset prediction neural network can be implemented by adopting an HRNet network structure, and the sample image of the feature map is used as an input, and the prediction probability density map corresponding to the sample image is used as an output.
Step 105: and determining a real density map based on the confidence probability density map and the prediction probability density map, and counting the number of people according to the real density map.
In this step, it can be understood that, since the confidence probability density map is formed by estimating the credibility of each feature point, the confidence probability density map is used as the confidence degree discrimination standard of the prediction probability density map to screen the prediction probability density map, thereby reducing the occurrence of false recognition (if the situation without human head is erroneously discriminated as the situation with human head), further optimizing the people counting result, and improving the accuracy of the statistics.
In order to better understand the present invention, the following examples are further provided to illustrate the present invention, but the present invention is not limited to the following examples, for example:
the model for realizing the crowd quantity statistics comprises a coding and decoding neural network and is used for obtaining a characteristic graph and a generated graph corresponding to the original image; the preset confidence probability model is used for obtaining a confidence probability density map; the preset prediction neural network is used for obtaining a prediction probability density map; the model for realizing the crowd quantity statistics takes the original pictures for the crowd quantity statistics as input and takes the crowd quantity statistics result as output; when the model for realizing the crowd quantity statistics is trained, a feature map of an original picture is obtained by using a coding network, the feature map is input into a decoding network, a generated map is obtained through the decoding network, the original picture, the generated map and the feature map are used as input of a confidence module (namely a preset confidence probability model), a loss function E of the confidence module is constructed on the basis of the original picture, the generated map and the feature map, the confidence degree of each feature point in the feature map is calculated, the feature map output by the coding network is also used as input of a prediction network (namely a preset prediction neural network), a loss function F of the prediction network is constructed on the basis of the prediction density map and a real density map, and further, the total loss function of the model (the crowd quantity statistics model) is the sum of the loss function E and the loss function F. Therefore, the encoding network can be trained and optimized through the confidence module loss function E, so that the encoding network can accurately and comprehensively extract the characteristics in the original picture and input the characteristics to the prediction network. And optimizing the prediction network through the loss function F of the prediction network, so that the prediction network can more accurately predict the crowd density map. When the model (crowd quantity statistical model) is applied, the feature map of the original image is obtained by using the coding network and the generated map corresponding to the feature map extracted by the coding network is obtained by using the decoding network, the original image, the generated map and the feature map are used as the input of the confidence module, the confidence module sets the value of the feature point with the confidence degree larger than the preset threshold value as 1, otherwise, the value is 0, thus, the confidence probability density map output by the confidence module is obtained, the feature map extracted by the coding network is input to the prediction network, the prediction probability density map is output, and the true probability density map is the product of the confidence probability density map and the prediction probability density map.
In this embodiment, for the model for realizing the population statistics, it should be noted that the model includes the following parts: 1. and constructing a data set. Preparing a training and testing data set; 2. training, including network structure, loss function and training flow; 3. and testing/predicting, namely testing/predicting the number of the human faces in the picture by using a network. Specifically, the method comprises the following steps:
1) First, describing a testing/predicting process, a network module used in the embodiment of the present invention is shown in fig. 2, where the coding network may use a convolutional neural network such as VGG, the decoding network may use a convolutional neural network such as UNet, the predicting neural network may use a network structure such as HRNet, and the confidence probability model may use a feature map (the required size is the same as that of a picture, the number of channels may be changed), an original picture, and a generated map as inputs to obtain an estimate of the credibility of each point. The specific implementation method can be realized by the following steps:
y={mean_{channel}(feat^2)+mean_{channel}((img-img_gen)^2)}<thr
in the above formula: thr is a threshold value, flat is a feature map, img is an original picture, and img _ gen is a generated map; y in the above formula represents the confidence of each point (i.e., feature point), and when feat ^2+ (img-img _ gen) ^2 is less than the threshold, y results in 1; above the threshold, y results in 0. That is, when the generated picture quality is poor or the distance between the feature point and the corresponding point in the original picture is far, the point is not trusted; wherein mean _ { channel } is the average of channels, (feat, img, img _ gen) are all arrays of CxWxH, C is the channel, and W and H are the width and length of the picture, respectively; then, multiplying the predicted probability density graph by y to obtain a real density graph; and finally, summing the real density maps to obtain the statistical population. In addition, the threshold thr may be determined by using a search threshold selection method (e.g., K-fold cross validation) on the validation set, and the final threshold is determined to be the one with the highest prediction accuracy.
2) A training module, a flow chart is shown in FIG. 3; where the loss function E (first loss function) can be expressed as:
L_E=mean(mean_{channel}(feat^2)+mean_{channel}((img-img_gen)^2))
in this equation, feat, img _ gen are the same as the prediction/inference process above, mean is the average of the W and H dimensions.
Wherein the loss function F (second loss function) can be expressed as:
L_F=mean((density-density_ground)^2)
the density represents the prediction probability of each position on the prediction probability density graph, the density _ group represents a real density graph, and the real density graph is constructed through the marked head center position and the preset Gaussian density distribution in the data set construction process.
The final loss function is obtained by L = L _ E + L _ F (third loss function), and is implemented by a standard deep learning training method.
3) And (3) data set construction:
the data set construction mainly comprises the construction of the corresponding relation between the picture and the real density graph. And constructing a real density map by a Gaussian function on the basis of original picture data for calibrating the center position of the head of the person.
According to the technical scheme, the crowd counting method based on the confidence probability provided by the embodiment of the invention obtains the original pictures for crowd counting; obtaining a feature map and a generated map corresponding to the original picture through coding and decoding modes 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 characteristic diagram into a preset prediction neural network to obtain a prediction probability density diagram corresponding to the characteristic diagram; and determining a real density map based on the confidence probability density map and the prediction probability density map, and counting the number of people according to the real density map. On one hand, the invention reduces the data training model by means of coding and decoding; on the other hand, the confidence probability density map is used for screening the prediction probability density map, so that the occurrence of false recognition is reduced, and the accuracy of population quantity statistics is improved.
In addition to the above embodiments, in this embodiment, the obtaining a feature map and a generated map corresponding to the original picture by encoding and decoding based on the original picture includes:
inputting the original picture into a coding neural network to obtain a feature map corresponding to the original picture;
and inputting the characteristic picture into a decoding neural network to obtain a generated picture corresponding to the characteristic picture.
In this embodiment, it should be noted that the picture is generated by using the coding and decoding network, and only the human head is required to detect this data set, so that the training model using less data is implemented.
As can be seen from the foregoing technical solutions, in the crowd counting method based on confidence probability provided in the embodiments of the present invention, the original picture is first input to a coding neural network to obtain a feature map corresponding to the original picture, then the feature map is input to a decoding neural network to obtain a generated map corresponding to the feature picture, so as to achieve improvement of data demand outside human heads, and then the original picture, the feature map corresponding to the original picture, and the generated map corresponding to the feature picture are used as inputs of a confidence probability model, so as to reduce data volume fundamentally.
On the basis of the above embodiment, in this embodiment, the method further includes:
constructing a first loss function of the preset confidence probability model based on the original sample picture, the feature map corresponding to the original sample picture and the generated map;
calculating confidence degrees of the feature points in the feature map based on the first loss function.
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 the confidence of each feature point in the feature map is calculated.
According to the technical scheme, the crowd counting method based on the confidence probability enhances the capability of facing unknown data, utilizes the confidence probability density graph of the key point to screen the prediction result, reduces the occurrence of false recognition and improves the counting accuracy.
On the basis of the above embodiment, in this embodiment, the method further includes:
constructing a second loss function of the preset prediction neural network based on a sample prediction probability density map and a real density map corresponding to the sample prediction probability density map;
a third loss function is determined based on the first loss function and the second loss function.
In this embodiment, it can be understood that the second loss function of the predictive neural network is constructed based on the predictive probability density map and the true density map, and further, 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), and further, the predictive neural network is optimized by the second loss function F, so that the predictive neural network can predict the crowd density map, that is, the true density map, more accurately.
According to the technical scheme, the crowd counting method based on the confidence probability enhances the capability of facing unknown data, screens the prediction result by using the confidence probability density graph of the key point, reduces the occurrence of false recognition and improves the counting accuracy.
On the basis of the foregoing embodiment, in this embodiment, determining a true density map based on the confidence probability density map and the prediction probability density map, and performing population statistics according to the true density map includes:
and determining a real density map based on the product of the confidence probability density map and the prediction probability density map, and carrying out population quantity statistics according to the real density map.
In this embodiment, for example, when a model (population statistical model) is applied, the feature map of the original image is obtained by using the coding network and the generated map corresponding to the feature map extracted by the coding network is obtained by using the decoding network, the original image, the generated map and the feature map are used as the input of the confidence module, the confidence module sets the value of the feature point with the confidence degree greater than the preset threshold value to 1, otherwise to 0, so as to obtain the confidence probability density map output by the confidence module, the feature map extracted by the coding network is input to the prediction network, and the prediction probability density map is output, and the true probability density map is the product of the confidence probability density map and the prediction probability density map.
Fig. 4 is a schematic structural diagram of a demographic apparatus based on confidence probability according to an embodiment of the present invention, as shown in fig. 4, the apparatus includes: an obtaining module 201, an encoding and decoding module 202, a predicting module 204 and a counting module 205, wherein:
the acquiring module 201 is configured to acquire an original image for crowd quantity statistics;
the encoding and decoding module 202 is configured to obtain a feature map and a generated map corresponding to the original picture through encoding and decoding based on the original picture;
a confidence probability module 203, configured to input the original image, the feature map, and the generated map into a preset confidence probability model to obtain a confidence probability density map;
the prediction module 204 is configured to input the feature map into a preset prediction neural network to obtain a prediction probability density map corresponding to the feature map;
and the statistic module 205 is configured to determine a real density map based on the confidence probability density map and the prediction probability density map, and perform population quantity statistics according to the real density map.
On the basis of the foregoing embodiment, in this embodiment, the encoding and decoding module is specifically configured to:
inputting the original picture into a coding neural network to obtain a feature map corresponding to the original picture;
and inputting the characteristic picture into a decoding neural network to obtain a generated picture corresponding to the characteristic picture.
On the basis of the above embodiment, 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 map;
calculating confidence degrees of the feature points in the feature map based on the first loss function.
The crowd counting device based on the confidence probability provided by the embodiment of the invention can be specifically used for executing the crowd counting method based on the confidence probability of the embodiment, the technical principle and the beneficial effect are similar, and specific reference can be made to the embodiment, and details are not repeated here.
Based on the same inventive concept, an embodiment of the present invention provides an electronic device, and referring to fig. 5, the electronic device specifically includes the following contents: a processor 301, a communication interface 303, a memory 302, and a communication bus 304;
the processor 301, the communication interface 303 and the memory 302 complete mutual communication through the communication bus 304; the communication interface 303 is used for realizing information transmission between related devices such as modeling software, an intelligent manufacturing equipment module library and the like; the processor 301 is used for calling the computer program in the memory 302, and the processor executes the computer program to implement the method provided by the above method embodiments, for example, the processor executes the computer program to implement the following steps: acquiring an original picture for crowd quantity statistics; obtaining a feature map and a generated map corresponding to the original picture through a coding and decoding mode 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 characteristic diagram into a preset prediction neural network to obtain a prediction probability density diagram corresponding to the characteristic diagram; and determining a real density map based on the confidence probability density map and the prediction probability density map, and counting the number of people according to the real density map.
Based on the same inventive concept, a non-transitory computer-readable storage medium is further provided, on which a computer program is stored, which when executed by a processor is implemented to perform the methods provided by the above method embodiments, for example, acquiring original pictures for crowd counting; obtaining a feature map and a generated map corresponding to the original picture through coding and decoding modes 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 characteristic diagram into a preset prediction neural network to obtain a prediction probability density diagram corresponding to the characteristic diagram; and determining a real density map based on the confidence probability density map and the prediction probability density map, and counting the number of people according to the real density map.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
In addition, in the present invention, terms such as "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless explicitly specified otherwise.
Moreover, in the present invention, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
Furthermore, in the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for demographic statistics based on confidence probabilities, comprising:
acquiring an original picture for crowd quantity statistics;
obtaining a feature map and a generated map corresponding to the original picture through coding and decoding modes 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 characteristic diagram into a preset prediction neural network to obtain a prediction probability density diagram corresponding to the characteristic diagram;
and determining a real density map based on the confidence probability density map and the prediction probability density map, and counting the number of people according to the real density map.
2. The method of claim 1, wherein the obtaining of the feature map and the generated map corresponding to the original picture by encoding and decoding based on the original picture comprises:
inputting the original picture into a coding neural network to obtain a feature map corresponding to the original picture;
and inputting the characteristic picture into a decoding neural network to obtain a generated picture corresponding to the characteristic picture.
3. The confidence probability based demographic method of claim 1, further comprising:
constructing a first loss function of the preset confidence probability model based on the original sample picture, the feature map corresponding to the original sample picture and the generated map;
calculating confidence degrees of the feature points in the feature map based on the first loss function.
4. The confidence probability based demographic method of claim 3, further comprising:
constructing a second loss function of the preset prediction neural network based on a sample prediction probability density map and a real density map corresponding to the sample prediction probability density map;
a third loss function is determined based on the first loss function and the second loss function.
5. The method of claim 4, wherein determining a true density map based on the confidence probability density map and the prediction probability density map and performing population statistics according to the true density map comprises:
and determining a real density map based on the product of the confidence probability density map and the prediction probability density map, and counting the number of people according to the real density map.
6. A demographic device based on confidence probabilities, comprising:
the acquisition module is used for acquiring original pictures for crowd quantity statistics;
the encoding and decoding module is used for obtaining a feature map and a generated map corresponding to the original picture through encoding and decoding modes based on the original picture;
the confidence probability module is used for inputting the original image, the feature map and the generated map into a preset confidence probability model to obtain a confidence probability density map;
the prediction module is used for inputting the characteristic diagram into a preset prediction neural network to obtain a prediction probability density diagram corresponding to the characteristic diagram;
and the statistic module is used for determining a real density map based on the confidence probability density map and the prediction probability density map and carrying out crowd quantity statistics according to the real density map.
7. The confidence probability-based demographic device of claim 6, wherein the codec module is specifically configured to:
inputting the original picture into a coding neural network to obtain a feature map corresponding to the original picture;
and inputting the characteristic picture into a decoding neural network to obtain a generated picture corresponding to the characteristic picture.
8. The crowd counting device based on confidence probability as claimed in claim 6, wherein the first loss function of the preset confidence probability model in the confidence probability module is constructed based on the original sample picture, the feature map corresponding to the original sample picture and the generated map;
calculating confidence degrees of the feature points in the feature map based on the first loss function.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the confidence probability based demographic method of any one of claims 1-5.
10. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the confidence probability based demographic method of any one of claims 1-5.
CN202110587715.1A 2021-05-27 2021-05-27 Crowd counting method and device based on confidence probability Pending CN115482500A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110587715.1A CN115482500A (en) 2021-05-27 2021-05-27 Crowd counting method and device based on confidence probability

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110587715.1A CN115482500A (en) 2021-05-27 2021-05-27 Crowd counting method and device based on confidence probability

Publications (1)

Publication Number Publication Date
CN115482500A true CN115482500A (en) 2022-12-16

Family

ID=84420230

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110587715.1A Pending CN115482500A (en) 2021-05-27 2021-05-27 Crowd counting method and device based on confidence probability

Country Status (1)

Country Link
CN (1) CN115482500A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116246150A (en) * 2023-05-11 2023-06-09 合肥的卢深视科技有限公司 Model training method, key point detection method, electronic device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116246150A (en) * 2023-05-11 2023-06-09 合肥的卢深视科技有限公司 Model training method, key point detection method, electronic device and storage medium
CN116246150B (en) * 2023-05-11 2023-09-05 合肥的卢深视科技有限公司 Model training method, key point detection method, electronic device and storage medium

Similar Documents

Publication Publication Date Title
WO2020221278A1 (en) Video classification method and model training method and apparatus thereof, and electronic device
CN109360028B (en) Method and device for pushing information
CN114332578A (en) Image anomaly detection model training method, image anomaly detection method and device
CN111753590B (en) Behavior recognition method and device and electronic equipment
CN109949264A (en) A kind of image quality evaluating method, equipment and storage equipment
CN112182269B (en) Training of image classification model, image classification method, device, equipment and medium
CN111639230B (en) Similar video screening method, device, equipment and storage medium
CN115565019A (en) Single-channel high-resolution SAR image ground object classification method based on deep self-supervision generation countermeasure
CN116977674A (en) Image matching method, related device, storage medium and program product
CN115062779A (en) Event prediction method and device based on dynamic knowledge graph
CN115482500A (en) Crowd counting method and device based on confidence probability
CN113780584A (en) Label prediction method, apparatus, storage medium and program product
CN112802076A (en) Reflection image generation model and training method of reflection removal model
CN117540336A (en) Time sequence prediction method and device and electronic equipment
Mittal et al. Blind image quality assessment without training on human opinion scores
CN111753775A (en) Fish growth assessment method, device, equipment and storage medium
CN116258877A (en) Land utilization scene similarity change detection method, device, medium and equipment
CN115761888A (en) Tower crane operator abnormal behavior detection method based on NL-C3D model
Chen et al. Quality assessment on remote sensing image based on neural networks
Cao et al. No-reference image quality assessment by using convolutional neural networks via object detection
CN113822291A (en) Image processing method, device, equipment and storage medium
JP2010141668A (en) Moving object tracking apparatus, moving object tracking method, and moving object tracking program
CN113365115B (en) Characteristic code determining method, device, server and storage medium
CN112149470B (en) Pedestrian re-identification method and device
CN111210233B (en) User characteristic determining method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination