People flow statistical method and device and cloud server

文档序号:191561 发布日期:2021-11-02 浏览:16次 中文

阅读说明:本技术 一种人流量统计方法、装置及云服务器 (People flow statistical method and device and cloud server ) 是由 顾炜 于 2021-08-11 设计创作,主要内容包括:本公开实施例提供一种人流量统计方法、装置及云服务器,其方法包括:使用行人检测样本和非行人检测样本组成的样本集合构建支持向量机样本模型;读取不属于样本集合的的输入视频流;将输入视频流进行解构,得到与行人相关的帧图像;通过支持向量机样本模型对与行人相关的帧图像进行检测,并对输入视频流进行人流量统计。本发明通过预先设定的行人检测样本和非行人检测样本组成的样本集合构建支持向量机样本模型,通过构建的支持向量机样本模型对不属于样本集合的的输入视频流进行人流量统计,使用上述方法,可以提升人流量统计的统计效率。(The embodiment of the disclosure provides a people flow statistical method, a device and a cloud server, wherein the method comprises the following steps: constructing a support vector machine sample model by using a sample set consisting of a pedestrian detection sample and a non-pedestrian detection sample; reading an input video stream that does not belong to a sample set; deconstructing the input video stream to obtain a frame image related to the pedestrian; and detecting frame images related to pedestrians through a support vector machine sample model, and carrying out pedestrian flow statistics on the input video stream. The invention constructs the sample model of the support vector machine through the sample set formed by the preset pedestrian detection sample and the non-pedestrian detection sample, and carries out the people flow statistics on the input video stream which does not belong to the sample set through the constructed sample model of the support vector machine.)

1. A people flow statistical method is characterized by comprising the following steps:

constructing a support vector machine sample model by using a sample set consisting of a pedestrian detection sample and a non-pedestrian detection sample;

reading an input video stream that does not belong to a sample set;

deconstructing the input video stream to obtain a frame image related to the pedestrian;

and detecting frame images related to pedestrians through the support vector machine sample model, and carrying out pedestrian flow statistics on input video streams.

2. The method of claim 1, wherein the step of constructing a support vector machine sample model using a sample set of pedestrian detection samples and non-pedestrian detection samples comprises:

deconstructing the pedestrian detection sample and the non-pedestrian detection sample in the sample set respectively to obtain frame images;

performing category marking on the frame image;

and inputting a frame image for carrying out category marking through a support vector machine to construct a support vector machine sample model.

3. The method of claim 2, wherein the step of class labeling the frame images of the pedestrian detection samples and the non-pedestrian detection samples in the sample set further comprises:

when the pedestrian detection sample contains pedestrians, reading corresponding forward markers;

when a non-pedestrian is included in the non-pedestrian detection sample, reading a corresponding reverse mark.

4. The method according to any one of claims 1-3, wherein the step of detecting frame images related to pedestrians through a sample model of a support vector machine and performing pedestrian traffic statistics on the input video stream comprises:

obtaining a calculation result of the input video stream after the frame image related to the pedestrian is obtained through a support vector machine sample model;

and outputting the number of pedestrians in the input video stream according to the calculation result so as to obtain the pedestrian volume.

5. The method according to claim 4, wherein the deconstructing the input video stream to obtain a frame image related to a pedestrian comprises:

deconstructing the input video stream according to a first preset time to obtain a split frame image;

detecting human body parts of the targets in the split frame images to obtain detection results of different human body parts;

and if the detection result comprises a result with human body part relevance, the target is considered to be a pedestrian.

6. The method according to claim 5, wherein the obtaining of the calculation result of the input video stream after obtaining the frame image related to the pedestrian through a support vector machine sample model comprises:

judging whether the target person in the frame image repeatedly appears within a second preset time;

and if the target person repeatedly appears within the second preset time, performing deduplication processing on the result.

7. A people flow statistic apparatus, comprising:

the training unit is used for constructing a support vector machine sample model by using a sample set consisting of the pedestrian detection samples and the non-pedestrian detection samples;

an input unit for reading an input video stream not belonging to a set of samples;

the deconstruction unit is used for deconstructing the input video stream to obtain a frame image related to the pedestrian;

and the statistical unit is used for detecting the frame image related to the pedestrian through the support vector machine sample model and carrying out pedestrian flow statistics on the input video stream.

8. A computer readable storage medium storing instructions/executable code which, when executed by a processor of an electronic device, causes the electronic device to implement the method of any of claims 1-6.

9. A cloud server, characterized in that the cloud server comprises a processor, a machine-readable storage medium, and a network interface, the machine-readable storage medium, the network interface, and the processor are connected through a bus system, the network interface is used for being connected with at least one monitoring terminal in a communication manner, the machine-readable storage medium is used for storing programs, instructions, or codes, and the processor is used for executing the programs, instructions, or codes in the machine-readable storage medium to execute the people flow statistical method according to any one of claims 1 to 6.

Technical Field

The disclosure relates to the technical field of pedestrian detection, in particular to a pedestrian flow statistical method and device and a cloud server.

Background

Pedestrian Detection (Pedestrian Detection) is the use of computer vision techniques to determine whether a Pedestrian is present in an image or video sequence and to provide accurate positioning. The technology can be combined with technologies such as pedestrian tracking and pedestrian re-identification, and is applied to the fields of artificial intelligence systems, vehicle driving assistance systems, intelligent robots, intelligent video monitoring, human body behavior analysis, intelligent transportation and the like.

In the prior art, a global feature-based approach is common, such as Histogram of Oriented Gradients (HOG). However, the above method has a problem of insufficient recognition capability, and may recognize an object having a similar contour to a pedestrian as a pedestrian, thereby causing erroneous detection.

Disclosure of Invention

In order to overcome at least the above disadvantages in the prior art, an object of the present disclosure is to provide a people flow rate statistical method, a device and a cloud server.

In a first aspect, the present disclosure provides a people flow rate statistical method, including the following steps:

constructing a support vector machine sample model by using a sample set consisting of a pedestrian detection sample and a non-pedestrian detection sample;

reading an input video stream that does not belong to a sample set;

deconstructing the input video stream to obtain a frame image related to the pedestrian;

and detecting frame images related to pedestrians through the support vector machine sample model, and carrying out pedestrian flow statistics on input video streams.

In a second aspect, the present disclosure provides a people flow statistics apparatus, comprising:

the training unit is used for constructing a support vector machine sample model by using a sample set consisting of the pedestrian detection samples and the non-pedestrian detection samples;

an input unit for reading an input video stream not belonging to a set of samples;

the deconstruction unit is used for deconstructing the input video stream to obtain a frame image related to the pedestrian;

and the statistical unit is used for detecting the frame image related to the pedestrian through the support vector machine sample model and carrying out pedestrian flow statistics on the input video stream.

In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which instructions are stored, and when executed, cause a computer to perform a people flow statistical method in the first aspect or any one of the possible designs of the first aspect.

In a fourth aspect, an embodiment of the present disclosure further provides a cloud server, where the cloud server includes a processor, a machine-readable storage medium, and a network interface, where the machine-readable storage medium, the network interface, and the processor are connected through a bus system, the network interface is used for being communicatively connected with at least one monitoring terminal, the machine-readable storage medium is used for storing a program, an instruction, or a code, and the processor is used for executing the program, the instruction, or the code in the machine-readable storage medium to perform the people flow statistics method in the first aspect or any one of possible designs in the first aspect.

Based on any one of the above aspects, the invention provides a people flow rate statistical method, a device and a storage medium, wherein a support vector machine sample model is constructed through a sample set composed of a preset pedestrian detection sample and a non-pedestrian detection sample, and people flow rate statistics is performed on input video streams which do not belong to the sample set through the constructed support vector machine sample model.

Drawings

To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present disclosure and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings may be obtained from the drawings without inventive effort.

Fig. 1 is a schematic view of an application scenario of a people flow rate statistical system according to an embodiment of the present disclosure;

fig. 2 is a schematic flow chart of a people flow rate statistical method according to an embodiment of the present disclosure;

fig. 3 is a schematic diagram of functional modules of a people flow rate statistic device according to an embodiment of the disclosure;

fig. 4 is a block diagram schematically illustrating a structure of a cloud server for implementing the people flow statistical method according to the embodiment of the present disclosure.

Detailed Description

The present disclosure is described in detail below with reference to the drawings, and the specific operation methods in the method embodiments can also be applied to the device embodiments or the system embodiments.

Fig. 1 is an interaction diagram of a people flow rate statistics system 10 according to an embodiment of the present disclosure. The people flow statistical system 10 may include a cloud server 100 and a monitoring terminal 200 communicatively connected to the cloud server 100. The people flow statistics system 10 shown in fig. 1 is only one possible example, and in other possible embodiments, the people flow statistics system 10 may include only a portion of the components shown in fig. 1 or may also include other components.

In this embodiment, the monitoring terminal 200 may comprise a mobile device, a tablet computer, a laptop computer, etc., or any combination thereof. In some embodiments, the mobile device may include a smart home device, a wearable device, a smart mobile device, a virtual reality device, an augmented reality device, or the like, or any combination thereof. In some embodiments, the smart home devices may include control devices of smart electrical devices, smart monitoring devices, smart televisions, smart cameras, and the like, or any combination thereof. In some embodiments, the wearable device may include a smart bracelet, a smart lace, smart glass, a smart helmet, a smart watch, a smart garment, a smart backpack, a smart accessory, or the like, or any combination thereof. In some embodiments, the smart mobile device may include a smartphone, a personal digital assistant, a gaming device, and the like, or any combination thereof. In some embodiments, the virtual reality device and/or the augmented reality device may include a virtual reality helmet, virtual reality glass, a virtual reality patch, an augmented reality helmet, augmented reality glass, an augmented reality patch, or the like, or any combination thereof. For example, the virtual reality device and/or augmented reality device may include various virtual reality products and the like.

In this embodiment, the cloud server 100 and the monitoring terminal 200 in the people flow rate statistics system 10 may cooperatively perform the people flow rate statistics method described in the following method embodiment, and for a specific step of the cloud server 100 and the monitoring terminal 200, reference may be made to the detailed description of the following method embodiment.

To solve the technical problem in the foregoing background, fig. 2 is a schematic flow chart of a people flow rate statistical method provided in the embodiment of the present disclosure, and the people flow rate statistical method provided in this embodiment may be executed by the cloud server 100 shown in fig. 1, and the people flow rate statistical method is described in detail below.

Step S110, constructing a support vector machine sample model by using a sample set consisting of a pedestrian detection sample and a non-pedestrian detection sample;

step S120, reading an input video stream which does not belong to the sample set;

step S130, deconstructing the input video stream to obtain a frame image related to the pedestrian;

and step S140, detecting frame images related to pedestrians through the support vector machine sample model, and carrying out people flow statistics on input video streams.

In one possible embodiment, step S110 further includes:

step S111, deconstructing the pedestrian detection samples and the non-pedestrian detection samples in the sample set respectively to obtain frame images;

step S112, carrying out category marking on the frame image;

and step S113, inputting a frame image for carrying out category marking through the support vector machine, and constructing a support vector machine sample model.

In one possible embodiment, step S112 further includes:

step S1121, when the pedestrian detection sample contains a pedestrian, reading a corresponding forward marker;

in step S1122, when the non-pedestrian detection sample includes a non-pedestrian, a corresponding reverse flag is read.

In one possible embodiment, step S140 further includes:

step S141, obtaining a calculation result of the input video stream after obtaining the frame image related to the pedestrian through a support vector machine sample model;

and step S142, outputting the number of the pedestrians in the input video stream according to the calculation result, so as to obtain the pedestrian volume.

In one possible embodiment, step S130 further includes:

step S131, deconstructing the input video stream according to a first preset time to obtain a split frame image;

step S132, detecting human body parts of the targets in the split frame images to obtain detection results of different human body parts;

and step S133, if the detection result comprises the result with human body part relevance, the target is considered to be a pedestrian.

In one possible embodiment, step S141 further includes:

step 1411, judging whether the target person in the frame image repeatedly appears within a second preset time;

in step S1412, if the target person appears repeatedly within the second preset time, performing deduplication processing on the result.

Fig. 3 is a schematic diagram of functional modules of a people flow rate statistics apparatus 300 according to an embodiment of the present disclosure, in this embodiment, functional modules of the people flow rate statistics apparatus 300 may be divided according to a method embodiment executed by the cloud server 100, that is, the following functional modules corresponding to the people flow rate statistics apparatus 300 may be used to execute each method embodiment executed by the cloud server 100. The people flow rate statistics apparatus 300 may include a training unit 310, an input unit 320, a deconstruction unit 330, and a statistics unit 340, and the functions of the functional modules of the people flow rate statistics apparatus 300 are described in detail below.

The training unit 310 may be configured to perform the above step S110, that is, to construct a support vector machine sample model using a sample set composed of pedestrian detection samples and non-pedestrian detection samples.

The input unit 320 may be configured to perform the above-mentioned step S120, i.e. to read an input video stream not belonging to a sample set.

The deconstruction unit 330 may be configured to perform the step S130 described above, that is, to deconstruct the input video stream to obtain a frame image related to a pedestrian.

The statistic unit 340 may be configured to perform step S140 described above, that is, to detect a frame image related to a pedestrian through the support vector machine sample model, and perform people flow statistics on the input video stream.

It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the training unit 310 may be a processing element separately set up, or may be implemented by being integrated into a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and the processing element of the apparatus calls and executes the functions of the training unit 310. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.

For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when some of the above modules are implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor that can call the program code. As another example, these modules may be integrated together, implemented in the form of a system-on-a-chip (SOC).

Fig. 4 shows a hardware structure diagram of the cloud server 100 for implementing the control device provided by the embodiment of the present disclosure, and as shown in fig. 4, the cloud server 100 may include a processor 110, a machine-readable storage medium 120, a bus 130, and a transceiver 140.

In a specific implementation process, at least one processor 110 executes computer-executable instructions stored in the machine-readable storage medium 120 (for example, the instructions included in the human traffic statistic apparatus 300 shown in fig. 3), so that the processor 110 may perform the human traffic statistic method according to the above method embodiment, where the processor 110, the machine-readable storage medium 120, and the transceiver 140 are connected through the bus 130, and the processor 110 may be configured to control the transceiving action of the transceiver 140, so as to perform data transceiving with the monitoring terminal 200.

For a specific implementation process of the processor 110, reference may be made to the above-mentioned method embodiments executed by the cloud server 100, and implementation principles and technical effects are similar, which are not described herein again.

In the embodiment shown in fig. 4, it should be understood that the processor may be a Central Processing Unit (CPU), other general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.

The machine-readable storage medium 120 may comprise high-speed RAM memory and may also include non-volatile storage NVM, such as at least one disk memory.

The bus 130 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus 130 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.

In addition, the embodiment of the disclosure also provides a readable storage medium, in which a computer executing instruction is stored, and when a processor executes the computer executing instruction, the people flow rate statistical method is implemented.

The readable storage medium described above may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.

Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present disclosure, and not for limiting the same; while the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the 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 disclosure.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于集成多传感器手写式的投射数据采集系统及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!