CN108021949B - Crowd crowding degree detection method, device and system and electronic equipment - Google Patents

Crowd crowding degree detection method, device and system and electronic equipment Download PDF

Info

Publication number
CN108021949B
CN108021949B CN201711451839.7A CN201711451839A CN108021949B CN 108021949 B CN108021949 B CN 108021949B CN 201711451839 A CN201711451839 A CN 201711451839A CN 108021949 B CN108021949 B CN 108021949B
Authority
CN
China
Prior art keywords
image
crowd
crowding
degree detection
classification result
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.)
Active
Application number
CN201711451839.7A
Other languages
Chinese (zh)
Other versions
CN108021949A (en
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.)
Chongqing Traffic D&i Technology Development Co ltd
Original Assignee
Chongqing Traffic D&i Technology Development 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 Chongqing Traffic D&i Technology Development Co ltd filed Critical Chongqing Traffic D&i Technology Development Co ltd
Priority to CN201711451839.7A priority Critical patent/CN108021949B/en
Publication of CN108021949A publication Critical patent/CN108021949A/en
Application granted granted Critical
Publication of CN108021949B publication Critical patent/CN108021949B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • G06V20/53Recognition of crowd images, e.g. recognition of crowd congestion

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Probability & Statistics with Applications (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a crowd crowding degree detection method, a device, a system and electronic equipment, and relates to the technical field of image recognition, wherein the method comprises the following steps: acquiring a first image to be detected, namely one of images acquired in multiple application scenes; extracting a first crowd crowding feature in the first image, namely a background area feature of the first image; inputting the first crowd crowding characteristic into a pre-trained crowd degree detection classifier to obtain a classification result of the crowd crowding degree of the first image; the congestion degree detection classifier is obtained by training sample data acquired under various application scenes with the number reaching a certain threshold value. The method can detect the crowding degree in different application scenes by combining the background information of the acquired images, reduces the dependence on high-configuration hardware equipment, realizes rapid and accurate crowding degree identification, and meets the rapid judgment requirement on the crowding degree of people in various application scenes.

Description

Crowd crowding degree detection method, device and system and electronic equipment
Technical Field
The invention relates to the technical field of image recognition, in particular to a crowd crowding degree detection method, device and system and electronic equipment.
Background
At present, the mainstream crowd crowding degree algorithm generally adopts a mode recognition method of counting people, firstly, the background of people flow is removed, then the number of people is distinguished in the rest images according to the shape of the head of a human body, and because the images in the video have dynamic continuous change, the more accurate number of people can be obtained through a series of processing. The method has higher precision requirement on video equipment, and because the background calculation amount required by the algorithm is larger because a more complex algorithm is required to process the video stream, a more accurate human head processing result can be obtained at a higher speed by generally needing special hardware.
For most application scenarios, it is not necessary to know how many people are in a public place, but rather to know a fuzzy concept, such as whether the place is crowded and how much the crowd is. For example, in a bus station or a waiting hall, the manager only needs to know whether the congestion of the waiting person reaches a certain degree, and then different coping modes are convenient to start; for a bus, passengers only care whether seats exist or not, and whether the passengers can be pushed up in time without the seats.
In view of the above situation, the conventional crowd congestion degree detection method determines the number of people in a crowd through processing and analyzing video data, and further obtains the congestion degree in a corresponding scene, and the problems of low recognition speed and high configuration of required hardware equipment exist in the process.
Disclosure of Invention
In view of this, the present invention aims to provide a crowd congestion degree detection method, apparatus, system and electronic device, which can detect the congestion degree in different application scenarios in combination with the background information of the acquired image, reduce the dependence on highly configured hardware devices, achieve fast and accurate crowd congestion degree identification, and meet the fast determination requirement on crowd congestion degree in various application scenarios.
In a first aspect, an embodiment of the present invention provides a crowd congestion degree detection method, including:
acquiring a first image to be detected; the first image is one of images acquired under multiple application scenes;
extracting a first crowd crowding feature in the first image; the first crowd characteristics include: a background region feature of the first image;
inputting the first crowd crowding characteristic into a pre-trained crowd degree detection classifier to obtain a classification result of the crowd crowding degree of the first image;
the congestion degree detection classifier is obtained by performing classification training on training sample data of which the number reaches a certain threshold; the training sample data comprises images acquired under a plurality of application scenarios.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where before acquiring the first image to be detected, the method further includes:
acquiring a second image to be trained; the second image comprises images acquired under a plurality of application scenes with the number reaching a certain threshold value;
extracting a second crowd congestion feature in the second image; the second crowd characteristic includes: a background region feature of the second image;
integrating the second crowd crowding characteristic into training sample data and verification sample data;
training the training sample data through a machine learning algorithm to obtain the congestion degree detection classifier.
With reference to the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where after obtaining the congestion degree detection classifier, the method further includes:
obtaining a first classification result and model parameters of a congestion degree detection classifier, wherein the first classification result is an output result obtained after training sample data is input into the congestion degree detection classifier;
inputting the verification sample data into a congestion degree detection classifier to obtain a second classification result;
judging whether the second recognition result is consistent with the first recognition result or not;
if not, adjusting the model parameters.
With reference to the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where before extracting the second crowd characteristic in the second image, the method further includes:
carrying out normalization preprocessing on the second image;
judging whether the second image after the normalization pretreatment has preset defects or not; the default defects include: at least one of image occlusion, data error, image blur;
if so, the image is re-acquired and the re-acquired image is taken as the second image.
With reference to the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where the inputting the first crowd congestion feature into a pre-trained congestion detection classifier to obtain a crowd congestion classification result of the first image specifically includes:
determining a data format corresponding to the congestion degree detection classifier;
and if the data format comprises a binary data format, converting the first crowd crowding characteristics into the binary data format and then inputting the binary data format into a crowding degree detection classifier to generate a classification result corresponding to the first image.
With reference to the first aspect, an embodiment of the present invention provides a fifth possible implementation manner of the first aspect, where after obtaining the crowd density classification result of the first image, the method further includes:
and storing the first image and the classification result corresponding to the first image as new training sample data in a training sample database.
In a second aspect, an embodiment of the present invention provides a crowd congestion degree detection apparatus, including:
the image acquisition module is used for acquiring a first image to be detected; the first image is one of images acquired under multiple application scenes;
the feature extraction module is used for extracting a first crowd crowding feature in the first image; the first crowd characteristics include: a background region feature of the first image;
the image classification module is used for inputting the crowding characteristics of the first person group into a pre-trained crowding degree detection classifier to obtain a classification result of the crowding degree of the first image; the congestion degree detection classifier is obtained by performing classification training on training sample data of which the number reaches a certain threshold; the training sample data comprises images acquired under a plurality of application scenarios.
In a third aspect, an embodiment of the present invention provides a crowd congestion degree detection system, including: a background server, a terminal device and a crowd congestion degree detection device according to the second aspect;
the background server, the terminal equipment and the crowd congestion degree detection device are in communication connection with each other;
and the background server receives the crowd degree classification result of the image sent by the crowd degree detection device and sends the crowd degree classification result to the terminal equipment.
In a fourth aspect, an embodiment of the present invention provides an electronic device, which includes a memory and a processor, where the memory stores a computer program that is executable on the processor, and the processor implements the steps of the method according to the first aspect when executing the computer program.
In a fifth aspect, the present invention also provides a computer-readable medium having non-volatile program code executable by a processor, where the program code causes the processor to execute the method according to the first aspect.
The embodiment of the invention has the following beneficial effects:
in the crowd congestion degree detection method provided by the embodiment of the invention, a first image to be detected is obtained firstly; the first image is one of images acquired under multiple application scenes; among these, various application scenarios include, but are not limited to: bus compartments, rail train compartments, ship cabins, various waiting rooms, bus stops, ticket windows, and rooms or floors with obvious signs (e.g., floor tile lines). Then extracting a first crowd crowding feature in the first image; the first crowd characteristics include: a background region feature of the first image; finally, inputting the crowding characteristics of the first person group into a pre-trained crowding degree detection classifier to obtain a classification result of the crowding degree of the first image; the congestion degree detection classifier is obtained by performing classification training on training sample data of which the number reaches a certain threshold; the training sample data comprises images acquired under a plurality of application scenarios.
The crowd crowding degree detection method provided by the embodiment performs multi-angle feature extraction on training sample data under a large number of various application scenes in advance, further trains to obtain a crowding degree detection classifier, and then performs crowd degree identification on a new image by combining background region features extracted from the new image through the classifier.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
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 described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a crowd congestion detection method according to an embodiment of the present invention;
fig. 2 is a flowchart of another crowd congestion detection method according to an embodiment of the present invention;
fig. 3 is a flowchart of another crowd congestion detection method according to an embodiment of the present invention;
fig. 4 is a flowchart of another crowd congestion detection method according to an embodiment of the present invention;
fig. 5 is a flowchart of another crowd congestion detection method according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a crowd congestion detection apparatus according to a second embodiment of the present invention;
fig. 7 is a schematic diagram of a crowd congestion detection system according to a third embodiment of the present invention;
fig. 8 is a schematic view of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, 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 existing crowd crowding degree detection method determines the number of people in a crowd through processing and analyzing video data, and further obtains the crowding degree in a corresponding scene, and the problems of low recognition speed and high configuration of required hardware equipment exist in the process.
Based on this, the embodiment of the invention provides a crowd congestion degree detection method, device and system and electronic equipment, which can detect the congestion degree in different application scenes by combining the background information of the acquired images, reduce the dependence on highly-configured hardware equipment, realize rapid and accurate crowd congestion degree identification, and meet the rapid judgment requirement on crowd congestion degree in various application scenes.
To facilitate understanding of the present embodiment, a detailed description is first given of a crowd density detection method disclosed in the present embodiment.
The first embodiment is as follows:
the embodiment of the invention provides a crowd crowding degree detection method, which can be applied to various specific crowd scenes. Referring to fig. 1, the method comprises the steps of:
s101: acquiring a first image to be detected; the first image is one of images acquired under various application scenes.
In the embodiment of the present invention, the application scenarios include, but are not limited to: bus compartments, rail train compartments, ship cabins, various waiting rooms, bus stops, ticket windows, and rooms or floors with obvious signs (e.g., floor tile lines). Before the congestion degree identification is performed, an image in a certain application scene to be detected is obtained, specifically, the image to be detected may be obtained by shooting through a camera installed in the application scene, or may also be obtained by shooting through another shooting device such as a camera, and is represented by a first image for distinguishing from an image to be trained hereinafter.
S102: extracting a first crowd crowding feature in the first image; the first crowd characteristics include: a background region characteristic of the first image.
After an image to be detected is acquired, feature extraction is performed on a background region in the image, specifically, feature extraction of the background region may be performed on the image by combining a fractional order theory and a method, and technologies such as image enhancement, reconstruction, segmentation, target tracking, and the like, for example: for a bus application scenario, the features of its background area include, but are not limited to: the seat is provided with a contrast characteristic of no person sitting on, the aisle or the doorway is provided with a contrast characteristic of no person standing on, and the armrest is provided with a contrast characteristic of no person standing on. The background region characteristics extracted from the corresponding images are different according to different application scenes, and the pre-trained classifier is used for recognition by combining the background region characteristics, so that the crowd crowding degree under the corresponding application scenes can be quickly obtained. The specific identification process is as follows:
s103: and inputting the first crowd congestion feature into a pre-trained crowd detection classifier to obtain a classification result of the crowd congestion degree of the first image.
The congestion degree detection classifier is obtained by performing classification training on training sample data of which the number reaches a certain threshold; the training sample data comprises images acquired under a plurality of application scenarios.
In this embodiment, the congestion degree detection classifier is obtained by performing feature extraction and training on a large number of images acquired in various application scenarios. Therefore, the accuracy of image recognition can be improved, that is, the accurate crowdedness of the image to be detected can be obtained.
The extracted crowd characteristic, that is, the background region characteristic, is input into the trained crowd detection classifier, so that a crowd classification result, that is, a crowd value, of the first image can be obtained, and the crowd value can be represented by a percentage or a level. Specifically, determining a data format corresponding to the congestion degree detection classifier; and if the data format comprises a binary data format, converting the first crowd crowding characteristics into the binary data format and then inputting the binary data format into a crowding degree detection classifier to generate a classification result corresponding to the first image.
It should be noted that the classifier for training in the embodiment of the present invention may be implemented in various ways, for example, various neural networks based on deep learning are commonly used, or other models capable of implementing feature extraction and recognition may also be used.
Referring to fig. 2, the training process of the classifier is as follows, that is, before the step S101 acquires the first image to be detected, the method further includes the following steps:
s201: acquiring a second image to be trained; the second image includes images acquired under a number of application scenarios that reaches a threshold.
In the embodiment of the present invention, the application scenarios include, but are not limited to: bus compartments, rail train compartments, ship cabins, various waiting rooms, bus stops, ticket windows, and rooms or floors with obvious signs (e.g., floor tile lines). Before the training of the congestion degree detection classifier, images to be trained in the various application scenes are acquired, specifically, the images to be trained are obtained by shooting through cameras installed in the application scenes, and the images to be trained are represented by a second image for distinguishing from the images to be trained.
S202: extracting a second crowd congestion feature in the second image; the second crowd characteristic includes: a background region characteristic of the second image.
After an image to be trained is acquired, feature extraction is performed on a background region in the image, specifically, feature extraction of the background region may be performed on the image by combining a fractional order theory and a method, and technologies such as image enhancement, reconstruction, segmentation, target tracking, and the like, for example: for a bus application scenario, the features of its background area include, but are not limited to: the seat is provided with a contrast characteristic of no person sitting on, the aisle or the doorway is provided with a contrast characteristic of no person standing on, and the armrest is provided with a contrast characteristic of no person standing on. The background region features extracted from the corresponding images are different for different application scenes, and various crowdedness detection classifiers for different application scenes can be trained by combining different background region features under various application scenes, so that the crowdedness detection classifiers for various application scenes can be used for rapidly identifying the crowdedness under various application scenes.
S203: and integrating the second crowd crowding characteristic into training sample data and verification sample data.
After the crowd crowding characteristics, namely background region characteristics in various application scenes, are extracted, the crowd crowding characteristics are integrated into two types of data, one type is training sample data, the other type is verification sample data, and in general, the proportion of the training sample data to the verification sample data is 7: 3.
according to the requirement of the identification precision, the sample data may need to be manually marked in the image, and the requirement of the identification progress is met in a supervised learning mode.
S204: training the training sample data through a machine learning algorithm to obtain the congestion degree detection classifier.
After the training sample data is obtained, a deep learning algorithm (such as a Convolutional Neural Network (CNN) technology) is used for learning and establishing a model from a large amount of training sample data to obtain the congestion degree detection classifier.
As shown in fig. 3, after obtaining the congestion degree detection classifier, the method further includes the following steps:
s301: and obtaining a first classification result and model parameters of the congestion degree detection classifier, wherein the first classification result is an output result obtained after training sample data is input into the congestion degree detection classifier.
S302: and inputting the verification sample data into a congestion degree detection classifier to obtain a second classification result.
S303: judging whether the second recognition result is consistent with the first recognition result or not; if not, adjusting the model parameters.
After the congestion degree detection classifier is trained, performing real scene test and verification on model parameters of the classifier, specifically, inputting the verification sample data into the congestion degree detection classifier, and judging whether an output result is consistent with the condition of inputting training sample data, wherein the verification sample data comprises: and judging whether the output result of the background region characteristics extracted from the images under different vehicle types, different crowding degrees, different illumination conditions and different camera angle scenes is consistent with the output result of the training sample data or not according to the multiple kinds of verification sample data, and if the output result is different from the output result of the training sample data, further adjusting the model parameters according to the test result, and correcting and perfecting the model of the classifier.
Referring to fig. 4, before extracting the second crowd characteristic in the second image, the method further includes the following steps:
s401: and carrying out normalization preprocessing on the second image.
S402: judging whether the second image after the normalization pretreatment has preset defects or not; the default defects include: at least one of image occlusion, data error, image blur.
S403: if so, the image is re-acquired and the re-acquired image is taken as the second image.
After images to be trained are obtained by shooting through cameras installed in various application scenes, normalization preprocessing is carried out on the images to be trained, image format standards are ensured, and multi-source videos are preliminarily classified. If the image is still shielded, has data errors, blurs and other defects after the image is preprocessed, other image data are obtained again, and if the image is still problematic after being preprocessed for many times, the alarm device is controlled to give an alarm.
As a preferred embodiment, after obtaining the crowd classification result of the first image, the method further comprises the following steps, as shown in fig. 5:
s501: and storing the first image and the classification result corresponding to the first image as new training sample data in a training sample database.
With the application of the congestion degree detection classifier in practical occasions, newly recognized images and recognition results thereof are continuously added into a training sample database, so that the classifier or algorithm is continuously updated and optimized, the classifier or algorithm is adaptive to different new application scenes, and the accuracy rate of congestion degree recognition in different application scenes is improved.
The congestion degree in this embodiment is a quantitative index for an application scenario, and may be defined in various ways. For example, the degree of crowding can be defined according to the riding comfort level of the people. Taking the degree of congestion of a bus as an example, the degree of congestion of the bus is defined as 5 (no passenger can get on the bus any more), the degree of congestion is defined as 4 (more than half of passengers can stand in the aisle, but the degree of congestion is not reached), the degree of congestion is defined as 3 (a small number of passengers stand in the aisle), the degree of comfort is defined as 2 (there are empty seats, but more than half of the number of passengers), and the degree of vacancy is defined as 1 (more than half of the number of empty seats). The degree of crowding can also be defined by the number of people carried in a unit area, for example, the number of people in a unit area (square meter) exceeds X crowding; or defined by the passenger capacity approved by the location and vehicle as a standard.
Taking a bus compartment as an example, firstly obtaining image data under different illumination conditions from a plurality of compartment video cameras, and then marking the congestion degrees of different vehicle types and illumination conditions in a manual mode according to a plurality of defined congestion degree indexes; then selecting a classifier (such as a deep learning neural network), training, after training is finished, ensuring that the recognition degree meets the requirement, and if the recognition degree does not meet the requirement, increasing sample data or replacing the classifier or adjusting parameters of the classifier and the like; the standard-reaching classifier is used for analyzing the crowdedness of real-time video data, and is continuously evolved and trained in the background in modes of expanding samples and the like in practice and is updated and deployed in an application scene, so that a better recognition effect is achieved.
In this embodiment, the application scenarios include, but are not limited to: the congestion degree algorithm can be used for crowd congestion degree identification, and can also be used for congestion degree analysis of articles, such as container congestion degree and warehouse article congestion degree. These applications are characterized by: the shape and size of the recognition target object can be approximately fixed, and the place background is provided with obvious markers (such as seats, armrests, floor tile lines, sign lines and the like).
In the crowd congestion degree detection method provided by the embodiment of the invention, a first image to be detected is obtained firstly; the first image is one of images acquired under multiple application scenes; among these, various application scenarios include, but are not limited to: bus compartments, rail train compartments, ship cabins, various waiting rooms, bus stops, ticket windows, and rooms or floors with obvious signs (e.g., floor tile lines). Then extracting a first crowd crowding feature in the first image; the first crowd characteristics include: a background region feature of the first image; finally, inputting the crowding characteristics of the first person group into a pre-trained crowding degree detection classifier to obtain a classification result of the crowding degree of the first image; the congestion degree detection classifier is obtained by performing classification training on training sample data of which the number reaches a certain threshold; the training sample data comprises images acquired under a plurality of application scenarios.
The crowd crowding degree detection method provided by the embodiment performs multi-angle feature extraction on training sample data under a large number of various application scenes in advance, further trains to obtain a crowding degree detection classifier, and then performs crowd degree identification on a new image by combining background region features extracted from the new image through the classifier.
It should be noted that some preprocessing methods, algorithm names and control parameters are listed in the deep learning algorithm adopted in the embodiment, and in practical application, the method, the algorithm and the parameters are not limited to the above methods, algorithms and parameters, and any method, algorithm and parameter capable of achieving the purpose of quickly judging the crowding degree by combining with the scene characteristic factors are within the protection scope of the patent.
Example two:
an embodiment of the present invention provides a crowd congestion degree detection apparatus, as shown in fig. 6, the apparatus includes: an image acquisition module 61, a feature extraction module 62 and an image classification module 63.
The image acquisition module 61 is configured to acquire a first image to be detected; the first image is one of images acquired under multiple application scenes; a feature extraction module 62, configured to extract a first crowd feature in the first image; the first crowd characteristics include: a background region feature of the first image; the image classification module 63 is configured to input the first crowd congestion feature into a pre-trained congestion degree detection classifier to obtain a classification result of the crowd congestion degree of the first image; the congestion degree detection classifier is obtained by performing classification training on training sample data of which the number reaches a certain threshold; the training sample data comprises images acquired under a plurality of application scenarios.
In the crowd density detection apparatus provided in the embodiment of the present invention, each module has the same technical features as the crowd density detection method described above, and therefore, the above functions can be implemented in the same manner. The specific working process of each module in the device refers to the above method embodiment, and is not described herein again.
Example three:
an embodiment of the present invention provides a crowd congestion degree detection system, as shown in fig. 7, the system includes: a background server 71, a terminal device 72, and a crowd detection device 73 as described in the second embodiment.
The background server 71, the terminal device 72 and the crowd density detection device 73 are in communication connection; the background server 71 receives the crowd degree classification result of the image sent by the crowd degree detection device 73, and sends the crowd degree classification result to the terminal device 72.
The background server 71 may be a monitoring center in different application industries, and the terminal device 72 may be an information distribution platform, a display, a handheld terminal of a relevant worker, and the like in each industry, and specifically, the crowd congestion degree detection device 73 is applied to different relevant application industries, so that various functions can be further realized, for example, a bus station worker performs a bus dispatching operation according to the current bus congestion degree received by the handheld terminal, and for example, the crowd congestion degree of each waiting hall is published to the public through the information distribution platform in a waiting hall of a train station, so that the public can select a waiting place according to the information.
Example four:
an embodiment of the present invention provides an electronic device, which is shown in fig. 8 and includes: the device comprises a processor 80, a memory 81, a bus 82 and a communication interface 83, wherein the processor 80, the communication interface 83 and the memory 81 are connected through the bus 82; the processor 80 is arranged to execute executable modules, such as computer programs, stored in the memory 81. The steps of the method according to the method embodiment are implemented when the processor executes the computer program.
The memory 81 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 83 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
Bus 82 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 8, but that does not indicate only one bus or one type of bus.
The memory 81 is used for storing a program, the processor 80 executes the program after receiving an execution instruction, and the method executed by the apparatus defined by the flow disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 80, or implemented by the processor 80.
The processor 80 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 80. The Processor 80 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory 81, and the processor 80 reads the information in the memory 81 and performs the steps of the above method in combination with its hardware.
The computer program product of the crowd congestion detection method provided by the embodiment of the present invention includes a computer-readable storage medium storing a nonvolatile program code executable by a processor, where instructions included in the program code may be used to execute the method described in the foregoing method embodiment, and specific implementation may refer to the method embodiment, and is not described herein again.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the apparatus and the electronic device described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and 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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A crowd congestion degree detection method is characterized by comprising the following steps:
acquiring a first image to be detected; the first image is one of images collected under multiple application scenes;
extracting a first crowd crowding feature in the first image; the first crowd feature is a background region feature of the first image;
inputting the first crowd crowding characteristic into a pre-trained crowd degree detection classifier to obtain a classification result of the crowd crowding degree of the first image;
the congestion degree detection classifier is obtained by performing classification training on training sample data of which the number reaches a certain threshold; the training sample data comprises images acquired under a plurality of application scenarios.
2. The method according to claim 1, further comprising, before said acquiring the first image to be detected:
acquiring a second image to be trained; the second image comprises images acquired under a plurality of application scenes with the number reaching a certain threshold value;
extracting a second crowd characteristic in the second image; the second crowd characteristic is a background region characteristic of the second image;
integrating the second crowd crowding characteristic into training sample data and verification sample data;
training the training sample data through a machine learning algorithm to obtain the crowding degree detection classifier.
3. The method according to claim 2, further comprising, after obtaining the congestion degree detection classifier:
obtaining a first classification result and model parameters of the congestion degree detection classifier, wherein the first classification result is an output result obtained after the training sample data is input into the congestion degree detection classifier;
inputting the verification sample data into the congestion degree detection classifier to obtain a second classification result;
judging whether the second classification result is consistent with the first classification result or not;
and if not, adjusting the model parameters.
4. The method of claim 2, further comprising, prior to said extracting the second crowd feature in the second image:
carrying out normalization preprocessing on the second image;
judging whether the second image after the normalization pretreatment has preset defects or not; the preset defects include: at least one of image occlusion, data error, image blur;
if so, re-acquiring the image, and taking the re-acquired image as the second image.
5. The method according to claim 1, wherein the step of inputting the first crowd congestion feature into a pre-trained crowd detection classifier to obtain a crowd congestion classification result of the first image comprises:
determining a data format corresponding to the congestion degree detection classifier;
and if the data format comprises a binary data format, converting the first crowd congestion feature into the binary data format and inputting the binary data format into the congestion degree detection classifier to generate a classification result corresponding to the first image.
6. The method according to any one of claims 1-5, further comprising, after the obtaining the crowd-sourcing classification result for the first image:
and storing the first image and the classification result corresponding to the first image as new training sample data in a training sample database.
7. A crowd density detection apparatus, comprising:
the image acquisition module is used for acquiring a first image to be detected; the first image is one of images collected under multiple application scenes;
the feature extraction module is used for extracting a first crowd crowding feature in the first image; the first crowd feature is a background region feature of the first image;
the image classification module is used for inputting the first crowd crowding characteristic into a pre-trained crowd degree detection classifier to obtain a classification result of the crowd crowding degree of the first image; the congestion degree detection classifier is obtained by performing classification training on training sample data of which the number reaches a certain threshold; the training sample data comprises images acquired under a plurality of application scenarios.
8. A crowd congestion level detection system, the system comprising: a background server, a terminal device and the crowd detection device of claim 7;
the background server, the terminal equipment and the crowd congestion degree detection device are in communication connection with each other;
the background server receives the crowd crowding degree classification result of the image sent by the crowd crowding degree detection device and sends the crowd crowding degree classification result to the terminal equipment.
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 implements the steps of the method of any of claims 1 to 6 when executing the computer program.
10. A computer-readable medium having non-volatile program code executable by a processor, wherein the program code causes the processor to perform the method of any of claims 1 to 6.
CN201711451839.7A 2017-12-27 2017-12-27 Crowd crowding degree detection method, device and system and electronic equipment Active CN108021949B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711451839.7A CN108021949B (en) 2017-12-27 2017-12-27 Crowd crowding degree detection method, device and system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711451839.7A CN108021949B (en) 2017-12-27 2017-12-27 Crowd crowding degree detection method, device and system and electronic equipment

Publications (2)

Publication Number Publication Date
CN108021949A CN108021949A (en) 2018-05-11
CN108021949B true CN108021949B (en) 2021-03-05

Family

ID=62071924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711451839.7A Active CN108021949B (en) 2017-12-27 2017-12-27 Crowd crowding degree detection method, device and system and electronic equipment

Country Status (1)

Country Link
CN (1) CN108021949B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110705391B (en) * 2019-09-17 2023-09-19 四川大学锦城学院 Seat distribution system based on human body image recognition method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739569A (en) * 2009-12-17 2010-06-16 北京中星微电子有限公司 Crowd density estimation method, device and monitoring system
CN102044073A (en) * 2009-10-09 2011-05-04 汉王科技股份有限公司 Method and system for judging crowd density in image
US8812344B1 (en) * 2009-06-29 2014-08-19 Videomining Corporation Method and system for determining the impact of crowding on retail performance
CN104268898A (en) * 2014-09-15 2015-01-07 郑州天迈科技股份有限公司 Method for detecting density of passengers in bus on basis of image analysis
CN104951804A (en) * 2015-06-25 2015-09-30 西北工业大学 Crowded scene classification method based on unsupervised feature learning and density estimation
CN106203331A (en) * 2016-07-08 2016-12-07 苏州平江历史街区保护整治有限责任公司 A kind of crowd density evaluation method based on convolutional neural networks
CN107229894A (en) * 2016-03-24 2017-10-03 上海宝信软件股份有限公司 Intelligent video monitoring method and system based on computer vision analysis technology

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8195598B2 (en) * 2007-11-16 2012-06-05 Agilence, Inc. Method of and system for hierarchical human/crowd behavior detection
CN104123569B (en) * 2014-07-21 2017-02-15 中国人民解放军63908部队 Video person number information statistics method based on supervised learning
CN107145821A (en) * 2017-03-23 2017-09-08 华南农业大学 A kind of crowd density detection method and system based on deep learning
CN107341480A (en) * 2017-07-12 2017-11-10 中国电子科技集团公司第二十八研究所 A kind of crowd massing detection method of modified PCCNN neural network models
CN107483887B (en) * 2017-08-11 2020-05-22 中国地质大学(武汉) Early warning detection method for emergency in smart city video monitoring

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8812344B1 (en) * 2009-06-29 2014-08-19 Videomining Corporation Method and system for determining the impact of crowding on retail performance
CN102044073A (en) * 2009-10-09 2011-05-04 汉王科技股份有限公司 Method and system for judging crowd density in image
CN101739569A (en) * 2009-12-17 2010-06-16 北京中星微电子有限公司 Crowd density estimation method, device and monitoring system
CN104268898A (en) * 2014-09-15 2015-01-07 郑州天迈科技股份有限公司 Method for detecting density of passengers in bus on basis of image analysis
CN104951804A (en) * 2015-06-25 2015-09-30 西北工业大学 Crowded scene classification method based on unsupervised feature learning and density estimation
CN107229894A (en) * 2016-03-24 2017-10-03 上海宝信软件股份有限公司 Intelligent video monitoring method and system based on computer vision analysis technology
CN106203331A (en) * 2016-07-08 2016-12-07 苏州平江历史街区保护整治有限责任公司 A kind of crowd density evaluation method based on convolutional neural networks

Also Published As

Publication number Publication date
CN108021949A (en) 2018-05-11

Similar Documents

Publication Publication Date Title
CN108171162B (en) Crowd crowding degree detection method, device and system
CN108090458B (en) Human body falling detection method and device
CN110188807B (en) Tunnel pedestrian target detection method based on cascading super-resolution network and improved Faster R-CNN
CN109801260B (en) Livestock number identification method and device, control device and readable storage medium
EP3806064A1 (en) Method and apparatus for detecting parking space usage condition, electronic device, and storage medium
CN110781836A (en) Human body recognition method and device, computer equipment and storage medium
CN110059635B (en) Skin defect detection method and device
CN111210399B (en) Imaging quality evaluation method, device and equipment
CN111898581A (en) Animal detection method, device, electronic equipment and readable storage medium
EP2662827A1 (en) Video analysis
CN107358141B (en) Data identification method and device
CN112200081A (en) Abnormal behavior identification method and device, electronic equipment and storage medium
KR20150107599A (en) Event detection apparatus and event detection method
CN107133629B (en) Picture classification method and device and mobile terminal
CN110781853A (en) Crowd abnormality detection method and related device
CN111611944A (en) Identity recognition method and device, electronic equipment and storage medium
US11455500B2 (en) Automatic classifier profiles from training set metadata
CN113255444A (en) Training method of image recognition model, image recognition method and device
CN113554008A (en) Method and device for detecting static object in area, electronic equipment and storage medium
CN108021949B (en) Crowd crowding degree detection method, device and system and electronic equipment
CN111046747A (en) Crowd counting model training method, crowd counting method, device and server
CN111178445A (en) Image processing method and device
CN112700473B (en) Carriage congestion degree judging system based on image recognition
CN111126112A (en) Candidate region determination method and device
JP7119774B2 (en) Learning program, image classification program, learning method, image classification method, learning device and image classification device

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
GR01 Patent grant
GR01 Patent grant