CN118097553A - Pedestrian number determining method and device and related equipment - Google Patents

Pedestrian number determining method and device and related equipment Download PDF

Info

Publication number
CN118097553A
CN118097553A CN202410233851.4A CN202410233851A CN118097553A CN 118097553 A CN118097553 A CN 118097553A CN 202410233851 A CN202410233851 A CN 202410233851A CN 118097553 A CN118097553 A CN 118097553A
Authority
CN
China
Prior art keywords
pixel area
pedestrians
image
pixel
pedestrian
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.)
Granted
Application number
CN202410233851.4A
Other languages
Chinese (zh)
Other versions
CN118097553B (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.)
Beijing Digital City Research Center
Original Assignee
Beijing Digital City Research Center
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 Beijing Digital City Research Center filed Critical Beijing Digital City Research Center
Priority to CN202410233851.4A priority Critical patent/CN118097553B/en
Publication of CN118097553A publication Critical patent/CN118097553A/en
Application granted granted Critical
Publication of CN118097553B publication Critical patent/CN118097553B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/766Arrangements for image or video recognition or understanding using pattern recognition or machine learning using regression, e.g. by projecting features on hyperplanes
    • 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/54Surveillance or monitoring of activities, e.g. for recognising suspicious objects of traffic, e.g. cars on the road, trains or boats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/103Static body considered as a whole, e.g. static pedestrian or occupant recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)

Abstract

本发明提供了一种行人数量确定方法、装置及相关设备,涉及人工智能技术领域,所述方法包括:基于采集设备获取的第一图像,确定所述第一图像中第一像素区域的行人数量;基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间;基于所述第一像素区域的行人数量以及所述行人数量区间对应的所述第二像素区域的行人数量,确定所述第一图像中的行人数量;所述第一像素区域映射的第一位置区域与所述采集设备的距离小于所述第二像素区域映射的第二位置区域与所述采集设备的距离。通过定量和定性相结合的行人数量确定方法,可以更准确、高效地检测和识别行人,提升了统计结果的准确性。

The present invention provides a method, device and related equipment for determining the number of pedestrians, which relates to the field of artificial intelligence technology. The method includes: determining the number of pedestrians in a first pixel area in a first image acquired by a collection device; determining the pedestrian number interval in the second pixel area based on a second pixel area of the first image; determining the number of pedestrians in the first image based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval; the distance between the first position area mapped by the first pixel area and the collection device is less than the distance between the second position area mapped by the second pixel area and the collection device. Through the method for determining the number of pedestrians that combines quantitative and qualitative methods, pedestrians can be detected and identified more accurately and efficiently, and the accuracy of statistical results is improved.

Description

一种行人数量确定方法、装置及相关设备A method, device and related equipment for determining the number of pedestrians

技术领域Technical Field

本发明涉及人工智能技术领域,尤其涉及一种行人数量确定方法、装置及相关设备。The present invention relates to the field of artificial intelligence technology, and in particular to a method and device for determining the number of pedestrians and related equipment.

背景技术Background technique

随着城市化水平的发展,城市交通日益繁忙,相应的对于公共安全的需求也不断提升。为了更好地提升公共场所(比如超市、地铁站、公交站和火车站等)的安全性,可以对行人进行统计,以便于制定针对突发事件的应急措施。With the development of urbanization, urban traffic is becoming increasingly busy, and the corresponding demand for public safety is also increasing. In order to better improve the safety of public places (such as supermarkets, subway stations, bus stations and railway stations, etc.), pedestrians can be counted to facilitate the formulation of emergency measures for emergencies.

在行人排队的场景中,摄像头一般设置在队伍的前面或者后面,当排队人数较多、队伍较长时,距离摄像头较远位置的行人在摄像头采集的画面中变得非常的小且密集,遮挡也会非常的严重,导致在统计行人的数量时出现较大的误差。In the scene of pedestrians queuing, the camera is usually set in front of or behind the queue. When there are many people in the queue and the queue is long, the pedestrians far away from the camera become very small and dense in the picture captured by the camera, and the occlusion will be very serious, resulting in large errors in counting the number of pedestrians.

发明内容Summary of the invention

本发明实施例提供了一种行人数量确定方法、装置及相关设备,以解决现有技术中确定行人数量误差较大的问题。The embodiments of the present invention provide a method, an apparatus and related equipment for determining the number of pedestrians, so as to solve the problem of large error in determining the number of pedestrians in the prior art.

为解决上述技术问题,本发明是这样实现的:To solve the above technical problems, the present invention is achieved as follows:

第一方面,本发明实施例提供了一种行人数量确定方法,所述方法包括:In a first aspect, an embodiment of the present invention provides a method for determining the number of pedestrians, the method comprising:

基于采集设备获取的第一图像,确定所述第一图像中第一像素区域的行人数量;Determine, based on a first image acquired by an acquisition device, the number of pedestrians in a first pixel area in the first image;

基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间;Determining a pedestrian quantity interval of a second pixel area based on a second pixel area of the first image;

基于所述第一像素区域的行人数量以及所述行人数量区间对应的所述第二像素区域的行人数量,确定所述第一图像中的行人数量;Determining the number of pedestrians in the first image based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval;

其中,所述第一像素区域映射的第一位置区域与所述采集设备的距离小于所述第二像素区域映射的第二位置区域与所述采集设备的距离。The distance between the first position area mapped by the first pixel area and the acquisition device is smaller than the distance between the second position area mapped by the second pixel area and the acquisition device.

可选地,所述基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间,包括:Optionally, determining the pedestrian quantity interval of the second pixel area based on the second pixel area of the first image includes:

根据第一目标像素的数量、第二目标像素的数量,以及所述第一像素区域的行人数量,确定所述第二像素区域的行人数量区间,所述第一目标像素为所述第一像素区域中具有目标特征的像素,所述第二目标像素为所述第二像素区域中具有所述目标特征的像素,所述目标特征为表征行人的特征。According to the number of first target pixels, the number of second target pixels, and the number of pedestrians in the first pixel area, the pedestrian number interval of the second pixel area is determined, the first target pixel is a pixel having a target feature in the first pixel area, the second target pixel is a pixel having the target feature in the second pixel area, and the target feature is a feature that characterizes pedestrians.

可选地,所述基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间,包括:Optionally, determining the pedestrian quantity interval of the second pixel area based on the second pixel area of the first image includes:

根据图像分类算法对所述第一图像的第二像素区域进行检测,在多个预设的行人数量区间中确定所述第二像素区域对应的行人数量区间。The second pixel area of the first image is detected according to an image classification algorithm, and a pedestrian quantity interval corresponding to the second pixel area is determined from a plurality of preset pedestrian quantity intervals.

可选地,所述基于采集设备获取的第一图像,确定所述第一图像中第一像素区域的行人数量,包括:Optionally, determining the number of pedestrians in a first pixel area in the first image based on the first image acquired by the acquisition device includes:

根据Yolo物体检测算法对所述第一图像进行检测,得到所述第一像素区域的行人数量;Detect the first image according to the Yolo object detection algorithm to obtain the number of pedestrians in the first pixel area;

将所述第一图像中除所述第一像素区域之外的像素区域确定为所述第二像素区域。A pixel region other than the first pixel region in the first image is determined as the second pixel region.

可选地,所述第一像素区域为所述Yolo物体检测算法在所述第一图像标注的像素区域。Optionally, the first pixel area is a pixel area marked by the Yolo object detection algorithm in the first image.

可选地,所述基于所述第一像素区域的行人数量以及所述行人数量区间对应的所述第二像素区域的行人数量,确定所述第一图像中的行人数量,包括:Optionally, the determining the number of pedestrians in the first image based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval includes:

根据所述第一像素区域的行人数量和所述第二像素区域的行人数量,得到所述第一图像中行人的第一预测数量;Obtaining a first predicted number of pedestrians in the first image according to the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area;

在所述第一预测数量与第二预测数量的差值小于或等于预设阈值的情况下,将所述第一预测数量确定为所述第一图像中的行人数量;When the difference between the first predicted number and the second predicted number is less than or equal to a preset threshold, determining the first predicted number as the number of pedestrians in the first image;

其中,所述第二预测数量为根据历史行人数量以及外部因素确定的行人数量,所述外部因素包括所述采集设备采集所述第一图像时的天气因素和时间因素。The second predicted number is the number of pedestrians determined based on the historical number of pedestrians and external factors, and the external factors include weather factors and time factors when the acquisition device acquires the first image.

第二方面,本发明实施例提供了一种行人数量确定装置,所述装置包括:In a second aspect, an embodiment of the present invention provides a device for determining the number of pedestrians, the device comprising:

第一确定模块,用于基于采集设备获取的第一图像,确定所述第一图像中第一像素区域的行人数量;A first determination module, configured to determine the number of pedestrians in a first pixel area in a first image acquired by an acquisition device based on the first image;

第二确定模块,用于基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间;A second determination module, configured to determine a pedestrian quantity interval of a second pixel area based on a second pixel area of the first image;

第三确定模块,用于基于所述第一像素区域的行人数量以及所述行人数量区间对应的所述第二像素区域的行人数量,确定所述第一图像中的行人数量;a third determination module, configured to determine the number of pedestrians in the first image based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval;

其中,所述第一像素区域映射的第一位置区域与所述采集设备的距离小于所述第二像素区域映射的第二位置区域与所述采集设备的距离。The distance between the first position area mapped by the first pixel area and the acquisition device is smaller than the distance between the second position area mapped by the second pixel area and the acquisition device.

第三方面,本发明实施例提供了一种电子设备,包括收发机和处理器,In a third aspect, an embodiment of the present invention provides an electronic device, including a transceiver and a processor.

所述处理器,用于基于采集设备获取的第一图像,确定所述第一图像中第一像素区域的行人数量;The processor is used to determine the number of pedestrians in a first pixel area in the first image based on the first image acquired by the acquisition device;

所述处理器,还用于基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间;The processor is further configured to determine a pedestrian quantity interval of the second pixel area based on the second pixel area of the first image;

所述处理器,还用于基于所述第一像素区域的行人数量以及所述行人数量区间对应的所述第二像素区域的行人数量,确定所述第一图像中的行人数量;The processor is further configured to determine the number of pedestrians in the first image based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval;

其中,所述第一像素区域映射的第一位置区域与所述采集设备的距离小于所述第二像素区域映射的第二位置区域与所述采集设备的距离。The distance between the first position area mapped by the first pixel area and the acquisition device is smaller than the distance between the second position area mapped by the second pixel area and the acquisition device.

第四方面,本发明实施例提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面所述的行人数量确定方法的步骤。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for determining the number of pedestrians as described in the first aspect are implemented.

第五方面,本发明实施例提供了一种计算机程序产品,包括计算机指令,该计算机指令被处理器执行时实现如第一方面所述的行人数量确定方法的步骤。In a fifth aspect, an embodiment of the present invention provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps of the method for determining the number of pedestrians as described in the first aspect.

本发明实施例中,首先对第一图像中的行人进行定量检测,以确定第一图像中第一像素区域的行人数量,并将第一图像中除第一像素区域之外的像素区域确定为第二像素区域;然后对第一图像中第二像素区域的行人进行定性检测,以确定第二像素区域的行人数量区间,减少遗漏物体检测算法识别不到的第二像素区域导致的统计误差。通过定量和定性相结合的行人数量确定方法,可以更准确、高效地检测和识别行人,提升了统计结果的准确性。进而为公共安全、智能交通等领域提供了更好的技术支持。In an embodiment of the present invention, a quantitative detection is first performed on pedestrians in the first image to determine the number of pedestrians in the first pixel area in the first image, and the pixel area in the first image other than the first pixel area is determined as the second pixel area; then a qualitative detection is performed on pedestrians in the second pixel area in the first image to determine the number interval of pedestrians in the second pixel area, thereby reducing the statistical error caused by missing the second pixel area that cannot be recognized by the object detection algorithm. By combining quantitative and qualitative methods to determine the number of pedestrians, pedestrians can be detected and identified more accurately and efficiently, thereby improving the accuracy of statistical results. This provides better technical support for the fields of public safety, intelligent transportation, etc.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

图1是本发明实施例提供的一种行人数量确定方法的流程图之一;FIG1 is a flow chart of a method for determining the number of pedestrians provided by an embodiment of the present invention;

图2是本发明实施例提供的一种行人数量确定方法的流程图之二;FIG2 is a second flowchart of a method for determining the number of pedestrians provided by an embodiment of the present invention;

图3是本发明实施例提供的一种行人数量确定装置的结构示意图;FIG3 is a schematic diagram of the structure of a device for determining the number of pedestrians provided by an embodiment of the present invention;

图4是本发明实施例提供的一种电子设备的结构示意图。FIG. 4 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

参见图1,图1是本发明实施例提供的一种行人数量确定方法的流程图,如图1所示,所述方法包括以下步骤:Referring to FIG. 1 , FIG. 1 is a flow chart of a method for determining the number of pedestrians provided by an embodiment of the present invention. As shown in FIG. 1 , the method includes the following steps:

步骤101、基于采集设备获取的第一图像,确定所述第一图像中第一像素区域的行人数量;Step 101: determining the number of pedestrians in a first pixel area in a first image based on a first image acquired by a collection device;

采集设备可以是视像头等视觉采集设备,采集设备可以设置在公共场所(比如超市、地铁站、公交站和火车站等)的出入口位置,以便于进行行人数量统计。第一图像可以是采集设备拍摄的视频流数据中的任一帧图像。The acquisition device may be a visual acquisition device such as a video camera, and the acquisition device may be set at the entrance and exit of a public place (such as a supermarket, a subway station, a bus station, and a railway station, etc.) to facilitate pedestrian counting. The first image may be any frame image in the video stream data captured by the acquisition device.

在一些可选的实施方式中,所述基于采集设备获取的第一图像,确定所述第一图像中第一像素区域的行人数量,包括:In some optional implementations, determining the number of pedestrians in a first pixel area in the first image based on the first image acquired by the acquisition device includes:

根据Yolo物体检测算法对所述第一图像进行检测,得到所述第一像素区域的行人数量;Detect the first image according to the Yolo object detection algorithm to obtain the number of pedestrians in the first pixel area;

将所述第一图像中除所述第一像素区域之外的像素区域确定为所述第二像素区域。A pixel region other than the first pixel region in the first image is determined as the second pixel region.

本实施方式中,可以使用基于Yolo(You Only Look Once)的物体检测算法对第一图像进行定量检测,以确定第一图像中第一像素区域的行人数量。其中,基于Yolo的物体检测算法模型的训练过程可以参见如下表述:In this implementation, a Yolo (You Only Look Once)-based object detection algorithm may be used to quantitatively detect the first image to determine the number of pedestrians in the first pixel region of the first image. The training process of the Yolo-based object detection algorithm model may be described as follows:

首先,数据采集:使用采集设备(以监控摄像头为例)采集图像数据,摄像头的分辨率可以包括1080p、720p、480p等多种格式。同时,还可以收集一些大小不相同的历史图像数据,以扩充训练数据集。对这些图像数据进行筛选,找到符合行人检测要求的图像数据,然后将其转成统一格式的图片,以作为样本图像。First, data collection: Use collection equipment (taking surveillance cameras as an example) to collect image data. The camera resolution can include 1080p, 720p, 480p and other formats. At the same time, you can also collect some historical image data of different sizes to expand the training data set. These image data are screened to find image data that meets the requirements of pedestrian detection, and then converted into pictures of a unified format as sample images.

然后,数据标注:使用标注工具对样本图像中的行人进行标注,为了避免遮挡,同时还要保证行人容易识别,可以采用标注行人头肩的方式。标注框可以是有两个点构成的矩形标注框。Then, data annotation: use annotation tools to annotate pedestrians in sample images. To avoid occlusion and ensure that pedestrians are easy to identify, the head and shoulders of pedestrians can be annotated. The annotation box can be a rectangular annotation box consisting of two points.

训练:在官方的模型上做训练,官方的模型包括C3模块、Conv模块、SPPF模块和ConCat模块。训练完成后得到基于Yolo的物体检测算法模型。Training: Training is done on the official model, which includes C3 module, Conv module, SPPF module and ConCat module. After training, the object detection algorithm model based on Yolo is obtained.

这样,将采集设备获取的第一图像输入至基于Yolo的物体检测算法模型,可以得到第一像素区域的行人数量。本发明实施例中考虑到基于Yolo的物体检测算法模型在行人检测过程中识别能力有限,例如,在行人排队的场景中,摄像头一般设置在队伍的前面或者后面,当排队人数较多、队伍较长时,距离摄像头较远位置的行人在摄像头采集的第一图像中变得非常的小且密集,遮挡也会非常的严重,导致基于Yolo的物体检测算法模型难以对位于这部分区域的行人进行检测、统计。因此,可以使用基于Yolo的物体检测算法模型在测试集上进行预测;而后对得到的测试结果进行分析,以确定基于Yolo的物体检测算法模型不能识别的区域,换言之,第一像素区域为Yolo物体检测算法在第一图像标注的像素区域,即第一像素区域为在第一图像中可识别到行人的区域;将第一图像中除第一像素区域之外的像素区域确定为第二像素区域。In this way, the first image acquired by the acquisition device is input into the object detection algorithm model based on Yolo, and the number of pedestrians in the first pixel area can be obtained. In the embodiment of the present invention, it is considered that the object detection algorithm model based on Yolo has limited recognition ability in the process of pedestrian detection. For example, in the scene of pedestrians queuing, the camera is generally set in front of or behind the queue. When the number of people in the queue is large and the queue is long, the pedestrians far away from the camera become very small and dense in the first image collected by the camera, and the occlusion will also be very serious, which makes it difficult for the object detection algorithm model based on Yolo to detect and count the pedestrians in this area. Therefore, the object detection algorithm model based on Yolo can be used to make predictions on the test set; then the obtained test results are analyzed to determine the area that the object detection algorithm model based on Yolo cannot recognize. In other words, the first pixel area is the pixel area marked by the Yolo object detection algorithm in the first image, that is, the first pixel area is the area where pedestrians can be recognized in the first image; the pixel area in the first image other than the first pixel area is determined as the second pixel area.

由于第二像素区域同样可能包含行人,因此可以进一步通过步骤102对第二像素区域进行定性检测,在统计行人数量时减小误差。Since the second pixel region may also contain pedestrians, the second pixel region may be further qualitatively detected in step 102 to reduce errors when counting the number of pedestrians.

步骤102、基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间;Step 102: determining a pedestrian quantity interval of a second pixel area based on a second pixel area of the first image;

在一示例中,首先对第一图像中的行人进行定量检测,以确定第一图像中第一像素区域的行人数量,并将第一图像中除第一像素区域之外的像素区域确定为第二像素区域;然后对第一图像中第二像素区域的行人进行定性检测,以确定第二像素区域的行人数量区间,减少遗漏物体检测算法识别不到的第二像素区域导致的统计误差。In one example, pedestrians in a first image are first quantitatively detected to determine the number of pedestrians in a first pixel area in the first image, and a pixel area other than the first pixel area in the first image is determined as a second pixel area; then, pedestrians in a second pixel area in the first image are qualitatively detected to determine an interval of the number of pedestrians in the second pixel area, thereby reducing statistical errors caused by missing the second pixel area that cannot be recognized by the object detection algorithm.

在一些可选的实施方式中,所述基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间,包括:In some optional implementations, determining the pedestrian quantity interval of the second pixel area based on the second pixel area of the first image includes:

根据图像分类算法对所述第一图像的第二像素区域进行检测,在多个预设的行人数量区间中确定所述第二像素区域对应的行人数量区间。The second pixel area of the first image is detected according to an image classification algorithm, and a pedestrian quantity interval corresponding to the second pixel area is determined from a plurality of preset pedestrian quantity intervals.

本实施方式中,可以使用基于图像分类算法对不能识别的区域做定性分析,即对第一图像的第二像素区域进行定性检测,以确定第一图像中第二像素区域对应的行人数量区间。其中,根据图像分类算法对第一图像的第二像素区域进行检测,可以采用基于深度残差网络(ResNet)模型对第二像素区域进行定性检测。ResNet模型的训练过程可以参见如下表述:In this embodiment, a qualitative analysis of the unrecognizable area can be performed based on an image classification algorithm, that is, a qualitative detection is performed on the second pixel area of the first image to determine the pedestrian number interval corresponding to the second pixel area in the first image. Among them, the second pixel area of the first image is detected according to the image classification algorithm, and the second pixel area can be qualitatively detected based on a deep residual network (ResNet) model. The training process of the ResNet model can be described as follows:

首先,数据采集:基于Yolo的物体检测算法模型对样本图像进行行人检测,将样本图像中物体检测算法模型检测不到的第二像素区域进行提取,以制作ResNet模型的训练数据集。根据行人数量从少到多分为:无人、很少的人(1人到5人)、有一些人(5-10人左右)、拥挤(人数比较多)、爆满等多个预设的行人数量区间。将得到的训练数据集划分为训练集和测试集。First, data collection: Pedestrian detection is performed on sample images based on the Yolo object detection algorithm model. The second pixel area in the sample image that cannot be detected by the object detection algorithm model is extracted to create a training data set for the ResNet model. According to the number of pedestrians, it is divided into multiple preset pedestrian number intervals from small to large: no people, few people (1 to 5 people), some people (about 5-10 people), crowded (more people), full, etc. The obtained training data set is divided into a training set and a test set.

其中,训练数据集在输入模型之前需要进行预处理,以确保输入格式符合模型要求。预处理步骤可能包括调整图像大小、归一化像素值、数据增强(如随机裁剪、旋转)等,目的是提高模型的泛化能力和处理效率。Among them, the training data set needs to be preprocessed before inputting into the model to ensure that the input format meets the model requirements. The preprocessing steps may include adjusting the image size, normalizing pixel values, data enhancement (such as random cropping, rotation), etc., in order to improve the generalization ability and processing efficiency of the model.

然后,进行训练:采用基于深度残差网络(ResNet)模型对第二像素区域进行定性检测。ResNet是一种深度卷积神经网络,因引入残差学习单元以解决深层网络训练困难的问题而闻名。首先,根据任务的复杂性和可用的计算资源,可以选择不同深度的ResNet架构,如ResNet18、ResNet34、ResNet50等。使用所选的ResNet架构构建模型,并根据实际分类任务的类别数量调整网络最后一层的输出。如果使用预训练模型,除了最后一层外,其他层可以保持原来的参数不变,以利用已有的特征提取能力;最后一层(通常是全连接层)则需要针对新的分类任务重新训练。然后,定义损失函数和优化器,通过多次迭代训练ResNet模型。在每次迭代中,ResNet模型会预测训练数据的输出,通过比较预测结果和真实标签计算损失,并通过反向传播算法更新权重参数以减小损失。训练过程中需要监控训练集和测试集上的表现,以调整训练参数或进行早停以防止过拟合。Then, training is performed: a deep residual network (ResNet) model is used to perform qualitative detection on the second pixel area. ResNet is a deep convolutional neural network, which is famous for introducing residual learning units to solve the problem of difficult training of deep networks. First, according to the complexity of the task and the available computing resources, ResNet architectures of different depths can be selected, such as ResNet18, ResNet34, ResNet50, etc. The model is built using the selected ResNet architecture, and the output of the last layer of the network is adjusted according to the number of categories of the actual classification task. If a pre-trained model is used, the parameters of other layers except the last layer can be kept unchanged to utilize the existing feature extraction capabilities; the last layer (usually a fully connected layer) needs to be retrained for the new classification task. Then, the loss function and optimizer are defined, and the ResNet model is trained through multiple iterations. In each iteration, the ResNet model predicts the output of the training data, calculates the loss by comparing the predicted results with the true labels, and updates the weight parameters through the back-propagation algorithm to reduce the loss. During the training process, it is necessary to monitor the performance on the training set and the test set to adjust the training parameters or perform early stopping to prevent overfitting.

训练完成后,使用独立的测试数据集评估ResNet模型性能,常用的评估指标包括准确度、精确度、召回率等。这一步是检验ResNet模型泛化能力的重要手段。最后,将训练好的ResNet模型部署到实际应用中,进行图像分类任务。当遇到新的图像时,ResNet模型能够根据学到的特征识别出图像的类别。整个过程是迭代且循环的,根据评估结果和实际应用的反馈,可能需要返回到数据准备、ResNet模型调整或重新训练的步骤,以不断提升ResNet模型性能满足实际需求。After training is completed, an independent test data set is used to evaluate the performance of the ResNet model. Common evaluation indicators include accuracy, precision, recall, etc. This step is an important means to test the generalization ability of the ResNet model. Finally, the trained ResNet model is deployed to actual applications for image classification tasks. When encountering new images, the ResNet model can identify the category of the image based on the learned features. The whole process is iterative and cyclical. Based on the evaluation results and feedback from actual applications, it may be necessary to return to the steps of data preparation, ResNet model adjustment, or retraining to continuously improve the performance of the ResNet model to meet actual needs.

这样,首先将采集设备获取的第一图像输入至基于Yolo的物体检测算法模型,可以得到第一像素区域的行人数量。同时,确定第一图像中物体检测算法模型识别不到的第二像素区域,进一步通过基于ResNet的图像分类算法模型对第一图像的第二像素区域进行定性检测,以确定第二像素区域的行人数量区间。将行人计数问题转为分类问题,降低了确定第一图像中行人数量的难度。最后,根据步骤103基于第一像素区域的行人数量以及行人数量区间对应的第二像素区域的行人数量,确定第一图像中的行人数量。将图像分类算法和物体检测算法相结合,这两种算法均采用卷积神经网络(CNN)、注意力机制等来提取行人的特征,减少遗漏物体检测算法识别不到的第二像素区域导致的统计误差,提升了检测结果的准确性。In this way, the first image acquired by the acquisition device is first input into the object detection algorithm model based on Yolo, and the number of pedestrians in the first pixel area can be obtained. At the same time, the second pixel area in the first image that cannot be recognized by the object detection algorithm model is determined, and the second pixel area of the first image is further qualitatively detected by the image classification algorithm model based on ResNet to determine the number of pedestrians in the second pixel area. The pedestrian counting problem is converted into a classification problem, which reduces the difficulty of determining the number of pedestrians in the first image. Finally, according to step 103, the number of pedestrians in the first image is determined based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval. The image classification algorithm and the object detection algorithm are combined. Both algorithms use convolutional neural networks (CNNs), attention mechanisms, etc. to extract the features of pedestrians, reduce the statistical errors caused by omitting the second pixel area that cannot be recognized by the object detection algorithm, and improve the accuracy of the detection results.

步骤103、基于所述第一像素区域的行人数量以及所述行人数量区间对应的所述第二像素区域的行人数量,确定所述第一图像中的行人数量;Step 103: determining the number of pedestrians in the first image based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval;

其中,所述第一像素区域映射的第一位置区域与所述采集设备的距离小于所述第二像素区域映射的第二位置区域与所述采集设备的距离。The distance between the first position area mapped by the first pixel area and the acquisition device is smaller than the distance between the second position area mapped by the second pixel area and the acquisition device.

以在行人排队的场景中,摄像头设置在队伍的前面为例,第一像素区域映射的第一位置区域为行人队伍靠近摄像头的前部分区域,第二像素区域映射的第二位置区域为行人队伍远离摄像头的后部分区域,即第一像素区域映射的第一位置区域与摄像头的距离小于第二像素区域映射的第二位置区域与摄像头的距离。Taking the scenario of pedestrians queuing, where the camera is set in front of the queue as an example, the first position area mapped by the first pixel area is the front area of the pedestrian queue close to the camera, and the second position area mapped by the second pixel area is the rear area of the pedestrian queue away from the camera, that is, the distance between the first position area mapped by the first pixel area and the camera is smaller than the distance between the second position area mapped by the second pixel area and the camera.

本发明实施例中,首先对第一图像中的行人进行定量检测,以确定第一图像中第一像素区域的行人数量,并将第一图像中除第一像素区域之外的像素区域确定为第二像素区域;然后对第一图像中第二像素区域的行人进行定性检测,以确定第二像素区域的行人数量区间,减少遗漏物体检测算法识别不到的第二像素区域导致的统计误差。通过定量和定性相结合的行人数量确定方法,可以更准确、高效地检测和识别行人,提升了统计结果的准确性。进而为公共安全、智能交通等领域提供了更好的技术支持。In an embodiment of the present invention, a quantitative detection is first performed on pedestrians in the first image to determine the number of pedestrians in the first pixel area in the first image, and the pixel area in the first image other than the first pixel area is determined as the second pixel area; then a qualitative detection is performed on pedestrians in the second pixel area in the first image to determine the number interval of pedestrians in the second pixel area, thereby reducing the statistical error caused by missing the second pixel area that cannot be recognized by the object detection algorithm. By combining quantitative and qualitative methods to determine the number of pedestrians, pedestrians can be detected and identified more accurately and efficiently, thereby improving the accuracy of statistical results. This provides better technical support for the fields of public safety, intelligent transportation, etc.

在一些可选的实施例中,所述基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间,包括:In some optional embodiments, determining the pedestrian quantity interval of the second pixel area based on the second pixel area of the first image includes:

根据第一目标像素的数量、第二目标像素的数量,以及所述第一像素区域的行人数量,确定所述第二像素区域的行人数量区间,所述第一目标像素为所述第一像素区域中具有目标特征的像素,所述第二目标像素为所述第二像素区域中具有所述目标特征的像素,所述目标特征为表征行人的特征。According to the number of first target pixels, the number of second target pixels, and the number of pedestrians in the first pixel area, the pedestrian number interval of the second pixel area is determined, the first target pixel is a pixel having a target feature in the first pixel area, the second target pixel is a pixel having the target feature in the second pixel area, and the target feature is a feature that characterizes pedestrians.

表征行人的特征,即目标特征,可以是整个行人的特征,也可以是行人特定部位的特征,比如行人头部、眼睛、肩部或脚部的特征。本示例中,第一像素区域的行人数量可以是根据物体检测算法定量输出的数值;然后根据第一图像中位于第一像素区域中具有目标特征的像素(即第一目标像素)与位于第二像素区域中具有目标特征的像素(即第二目标像素)的数量之间的比值,确定第二像素区域的行人数量区间,减少遗漏物体检测算法识别不到的第二像素区域导致的统计误差,提升统计结果的准确性。The features that characterize pedestrians, namely the target features, can be the features of the entire pedestrian or the features of a specific part of the pedestrian, such as the features of the pedestrian's head, eyes, shoulders or feet. In this example, the number of pedestrians in the first pixel area can be a numerical value quantitatively output by the object detection algorithm; then, based on the ratio between the number of pixels with target features located in the first pixel area (i.e., the first target pixels) and the number of pixels with target features located in the second pixel area (i.e., the second target pixels) in the first image, the pedestrian number interval in the second pixel area is determined, thereby reducing the statistical error caused by missing the second pixel area that cannot be recognized by the object detection algorithm and improving the accuracy of the statistical results.

在一实施方式中,在行人排队的场景下,所述第一目标像素和所述第二目标像素的数量之间的比值,可以转换为第一目标像素在第一图像中对应的长度与第二目标像素在第一图像中对应的长度之间的比值。In one embodiment, in a scenario where pedestrians are queuing, the ratio between the number of the first target pixels and the number of the second target pixels can be converted into a ratio between the length corresponding to the first target pixel in the first image and the length corresponding to the second target pixel in the first image.

例如,第一图像中行人从A位置排队至B位置,A位置为靠近摄像头的位置,B位置为远离摄像头的位置。将该第一图像输入至基于Yolo的物体检测算法模型,确定第一图像中第一像素区域的行人数量为R1。其中,第一像素区域为Yolo物体检测算法在第一图像标注的像素区域,即第一像素区域为在第一图像中可识别到行人的区域。这样,第一像素区域可以是A位置至C位置在第一图像中对应的区域,C位置为A位置与B位置之间的位置。然后,将第一图像中除第一像素区域之外的像素区域确定为第二像素区域,换言之,将C位置至B位置在第一图像中对应的区域确定为第二像素区域。For example, in the first image, pedestrians line up from position A to position B, position A is a position close to the camera, and position B is a position far from the camera. The first image is input into the Yolo-based object detection algorithm model, and the number of pedestrians in the first pixel area in the first image is determined to be R1. Among them, the first pixel area is the pixel area marked by the Yolo object detection algorithm in the first image, that is, the first pixel area is the area where pedestrians can be identified in the first image. In this way, the first pixel area can be the area corresponding to position A to position C in the first image, and position C is the position between position A and position B. Then, the pixel area in the first image except the first pixel area is determined as the second pixel area. In other words, the area corresponding to position C to position B in the first image is determined as the second pixel area.

进一步地,确定A位置至C位置的长度AC,以及C位置至B位置的长度CB,这样,根据AC、CB和R1,可以确定第二像素区域的行人数量区间为R2,R2=(CB×R1)/AC。从而,可以确定第一图像中的行人数量,通过定量和定性相结合的行人数量确定方法,可以更准确、高效地检测和识别行人,提升了统计结果的准确性。Furthermore, the length AC from position A to position C and the length CB from position C to position B are determined. Thus, according to AC, CB and R1, the pedestrian number interval of the second pixel area can be determined as R2, R2 = (CB × R1) / AC. Thus, the number of pedestrians in the first image can be determined. By combining quantitative and qualitative methods for determining the number of pedestrians, pedestrians can be detected and identified more accurately and efficiently, thereby improving the accuracy of the statistical results.

在另一实施方式中,在行人分散的场景下,所述第一目标像素和所述第二目标像素的数量之间的比值,可以转换为第一目标像素在第一图像中对应的面积与第二目标像素在第一图像中对应的面积之间的比值。In another embodiment, in a scene where pedestrians are scattered, the ratio between the number of the first target pixels and the number of the second target pixels can be converted into a ratio between an area corresponding to the first target pixel in the first image and an area corresponding to the second target pixel in the first image.

例如,第一图像中行人分散在各个位置。将该第一图像输入至基于Yolo的物体检测算法模型,确定第一图像中第一像素区域的行人数量为R1。其中,第一像素区域为Yolo物体检测算法在第一图像标注的像素区域,即第一像素区域为在第一图像中可识别到行人的区域。这样,第一像素区域可以是第一图像中的区域A。然后,将第一图像中除第一像素区域之外的像素区域确定为第二像素区域,换言之,将是第一图像中的区域A以外的区域B确定为第二像素区域。For example, pedestrians are scattered in various locations in the first image. The first image is input into the Yolo-based object detection algorithm model, and the number of pedestrians in the first pixel area in the first image is determined to be R1. The first pixel area is the pixel area marked by the Yolo object detection algorithm in the first image, that is, the first pixel area is the area where pedestrians can be identified in the first image. In this way, the first pixel area can be area A in the first image. Then, the pixel area other than the first pixel area in the first image is determined as the second pixel area. In other words, area B other than area A in the first image is determined as the second pixel area.

进一步地,确定区域A中具有行人特征的像素的面积为M1,以及区域B中具有行人特征的像素的面积为M2,这样,根据M1、M2和R1,可以确定第二像素区域的行人数量区间为R2,R2=(M2×R1)/M1。从而,可以确定第一图像中的行人数量,通过定量和定性相结合的行人数量确定方法,可以更准确、高效地检测和识别行人,提升了统计结果的准确性。Further, the area of pixels with pedestrian features in region A is determined to be M1, and the area of pixels with pedestrian features in region B is determined to be M2. Thus, based on M1, M2 and R1, the pedestrian number interval of the second pixel region can be determined to be R2, R2 = (M2 × R1) / M1. Thus, the number of pedestrians in the first image can be determined, and the pedestrian number determination method combining quantitative and qualitative methods can be used to detect and identify pedestrians more accurately and efficiently, thereby improving the accuracy of the statistical results.

其中,考虑到摄像头在采集第一图像时,摄像头由于存在倾仰角,一个行人在靠近摄像头位置对应的像素数量大于远离摄像头位置对应的像素数量,即第一像素区域和第二像素区域行人数量相同的情况,第一目标像素的数量大于第二目标像素的数量。因此,在一些实施方式中,在根据第一目标像素的数量、第二目标像素的数量,以及所述第一像素区域的行人数量,确定所述第二像素区域的行人数量区间时,可以对第一目标像素的数量与第二目标像素的数量之间的比值进行修正。例如,根据拍摄第一图像的摄像头的倾仰角参数对比值进行补偿,以提升行人数量预测结果的准确性。Among them, considering that when the camera collects the first image, due to the tilt angle of the camera, the number of pixels corresponding to a pedestrian close to the camera position is greater than the number of pixels corresponding to the position far from the camera position, that is, when the number of pedestrians in the first pixel area and the second pixel area is the same, the number of first target pixels is greater than the number of second target pixels. Therefore, in some embodiments, when determining the pedestrian number interval of the second pixel area based on the number of first target pixels, the number of second target pixels, and the number of pedestrians in the first pixel area, the ratio between the number of first target pixels and the number of second target pixels can be corrected. For example, compensation is performed based on the tilt angle parameter comparison value of the camera that captures the first image to improve the accuracy of the pedestrian number prediction result.

在一些可选的实施例中,所述基于所述第一像素区域的行人数量以及所述行人数量区间对应的所述第二像素区域的行人数量,确定所述第一图像中的行人数量,包括:In some optional embodiments, determining the number of pedestrians in the first image based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval includes:

根据所述第一像素区域的行人数量和所述第二像素区域的行人数量,得到所述第一图像中行人的第一预测数量;Obtaining a first predicted number of pedestrians in the first image according to the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area;

在所述第一预测数量与第二预测数量的差值小于或等于预设阈值的情况下,将所述第一预测数量确定为所述第一图像中的行人数量;When the difference between the first predicted number and the second predicted number is less than or equal to a preset threshold, determining the first predicted number as the number of pedestrians in the first image;

其中,所述第二预测数量为根据历史行人数量以及外部因素确定的行人数量,所述外部因素包括所述采集设备采集所述第一图像时的天气因素和时间因素。The second predicted number is the number of pedestrians determined based on the historical number of pedestrians and external factors, and the external factors include weather factors and time factors when the acquisition device acquires the first image.

本实施例中,如图2所示,首先将采集设备获取的第一图像输入至基于Yolo的物体检测算法模型,以对第一图像中的行人进行定量检测,得到第一像素区域的行人数量。同时,确定第一图像中物体检测算法模型识别不到的第二像素区域,进一步通过基于ResNet的图像分类算法模型对第一图像的第二像素区域进行定性检测,以确定第二像素区域的行人数量区间。将行人计数问题转为分类问题,降低了确定第一图像中行人数量的难度。再根据第一像素区域的行人数量以及行人数量区间对应的第二像素区域的行人数量,确定第一图像中的行人数量。这样采用将图像分类算法和物体检测算法相结合的方式,减少遗漏物体检测算法识别不到的第二像素区域导致的统计误差,提升了检测结果的准确性。In this embodiment, as shown in FIG2 , the first image acquired by the acquisition device is first input into the object detection algorithm model based on Yolo to perform quantitative detection of pedestrians in the first image and obtain the number of pedestrians in the first pixel area. At the same time, the second pixel area in the first image that cannot be recognized by the object detection algorithm model is determined, and the second pixel area of the first image is further qualitatively detected by the image classification algorithm model based on ResNet to determine the number interval of pedestrians in the second pixel area. The pedestrian counting problem is converted into a classification problem, which reduces the difficulty of determining the number of pedestrians in the first image. The number of pedestrians in the first image is then determined based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval. In this way, the image classification algorithm and the object detection algorithm are combined to reduce the statistical error caused by omitting the second pixel area that cannot be recognized by the object detection algorithm, thereby improving the accuracy of the detection results.

进一步的,根据第一像素区域的行人数量和第二像素区域的行人数量,得到第一图像中行人的第一预测数量。考虑到在行人数量与天气、时间等外部因素之间存在一定的关联性,例如,地铁早高峰和晚高峰人数会多一些,超市午饭和晚饭前人数会比较多,周末人数比平时人数多等这样的关联性。因此,可以基于训练得到的回归模型对第一图像中行人的第一预测数量进行校验,以提升检测结果的准确性。其中,回归模型为根据历史行人数量以及外部因素对应的样本数据训练得到的验证模型。Furthermore, the first predicted number of pedestrians in the first image is obtained based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area. Considering that there is a certain correlation between the number of pedestrians and external factors such as weather and time, for example, there will be more people during the morning and evening rush hours of the subway, there will be more people before lunch and dinner in the supermarket, and there will be more people on weekends than on weekdays. Therefore, the first predicted number of pedestrians in the first image can be verified based on the trained regression model to improve the accuracy of the detection result. Among them, the regression model is a verification model trained based on the historical number of pedestrians and sample data corresponding to external factors.

在一示例中,可以将采集设备采集第一图像时的天气因素和时间因素,以及历史行人数量,输入回归模型,得到第二预测数量;在第一预测数量与第二预测数量的差值小于或等于预设阈值的情况下,将第一预测数量确定为第一图像中的行人数量。通过定量和定性相结合的行人数量确定方法,并综合考虑了历史行人数据以及天气因素和时间因素的影响,可以更准确、高效地检测和识别行人,提升了统计结果的准确性。进而为公共安全、智能交通等领域提供了更好的技术支持。In one example, the weather factors and time factors when the acquisition device acquires the first image, as well as the historical number of pedestrians, can be input into the regression model to obtain the second predicted number; when the difference between the first predicted number and the second predicted number is less than or equal to the preset threshold, the first predicted number is determined as the number of pedestrians in the first image. By combining quantitative and qualitative methods to determine the number of pedestrians, and taking into account the influence of historical pedestrian data as well as weather factors and time factors, pedestrians can be detected and identified more accurately and efficiently, improving the accuracy of statistical results. This provides better technical support for public safety, intelligent transportation and other fields.

在另一示例中,还可以将采集设备采集第一图像时的天气因素和时间因素,以及第一预测数量,输入训练后得到的回归模型,得到第三预测数量。将第三预测数量确定为第一图像中的行人数量。通过定量和定性相结合的行人数量确定方法,并综合考虑了历史行人数据以及天气因素和时间因素的影响,可以更准确、高效地检测和识别行人,提升了统计结果的准确性。进而为公共安全、智能交通等领域提供了更好的技术支持。In another example, the weather factors and time factors when the acquisition device acquires the first image, as well as the first predicted number, can also be input into the regression model obtained after training to obtain a third predicted number. The third predicted number is determined as the number of pedestrians in the first image. By combining quantitative and qualitative methods to determine the number of pedestrians, and taking into account the influence of historical pedestrian data as well as weather factors and time factors, pedestrians can be detected and identified more accurately and efficiently, thereby improving the accuracy of statistical results. This provides better technical support for public safety, intelligent transportation and other fields.

其中,若第一图像中不存在物体检测算法模型识别不到的第二像素区域,则直接预测的第一图像中的行人数量输入回归算法模型,同样可以达到相同的技术效果,在此不再赘述。Among them, if there is no second pixel area in the first image that cannot be recognized by the object detection algorithm model, then directly predicting the number of pedestrians in the first image and inputting it into the regression algorithm model can also achieve the same technical effect, which will not be repeated here.

参见图3,图3是本发明实施例提供的一种行人数量确定装置的结构示意图,如图3所示,行人数量确定装置300包括:Referring to FIG. 3 , FIG. 3 is a schematic diagram of the structure of a device for determining the number of pedestrians provided by an embodiment of the present invention. As shown in FIG. 3 , the device for determining the number of pedestrians 300 includes:

第一确定模块301,用于基于采集设备获取的第一图像,确定所述第一图像中第一像素区域的行人数量;A first determination module 301 is used to determine the number of pedestrians in a first pixel area in a first image acquired by a collection device based on the first image;

第二确定模块302,用于基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间;A second determination module 302, configured to determine a pedestrian quantity interval of a second pixel area of the first image based on the second pixel area of the second pixel area;

第三确定模块303,用于基于所述第一像素区域的行人数量以及所述行人数量区间对应的所述第二像素区域的行人数量,确定所述第一图像中的行人数量;A third determination module 303, configured to determine the number of pedestrians in the first image based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval;

其中,所述第一像素区域映射的第一位置区域与所述采集设备的距离小于所述第二像素区域映射的第二位置区域与所述采集设备的距离。The distance between the first position area mapped by the first pixel area and the acquisition device is smaller than the distance between the second position area mapped by the second pixel area and the acquisition device.

可选地,第二确定模块302包括:Optionally, the second determining module 302 includes:

第一确定子模块,用于根据第一目标像素的数量、第二目标像素的数量,以及所述第一像素区域的行人数量,确定所述第二像素区域的行人数量区间,所述第一目标像素为所述第一像素区域中具有目标特征的像素,所述第二目标像素为所述第二像素区域中具有所述目标特征的像素,所述目标特征为表征行人的特征。The first determination submodule is used to determine the pedestrian number interval in the second pixel area according to the number of first target pixels, the number of second target pixels, and the number of pedestrians in the first pixel area, wherein the first target pixel is a pixel having a target feature in the first pixel area, the second target pixel is a pixel having the target feature in the second pixel area, and the target feature is a feature that characterizes pedestrians.

可选地,第二确定模块302包括:Optionally, the second determining module 302 includes:

第二确定子模块,用于根据图像分类算法对所述第一图像的第二像素区域进行检测,在多个预设的行人数量区间中确定所述第二像素区域对应的行人数量区间。The second determination submodule is used to detect the second pixel area of the first image according to the image classification algorithm, and determine the pedestrian quantity interval corresponding to the second pixel area in multiple preset pedestrian quantity intervals.

可选地,第一确定模块301包括:Optionally, the first determining module 301 includes:

检测子模块,用于根据Yolo物体检测算法对所述第一图像进行检测,得到所述第一像素区域的行人数量;A detection submodule, configured to detect the first image according to a Yolo object detection algorithm to obtain the number of pedestrians in the first pixel area;

第三确定子模块,用于将所述第一图像中除所述第一像素区域之外的像素区域确定为所述第二像素区域。The third determining submodule is used to determine a pixel region other than the first pixel region in the first image as the second pixel region.

可选地,所述第一像素区域为所述Yolo物体检测算法在所述第一图像标注的像素区域。Optionally, the first pixel area is a pixel area marked by the Yolo object detection algorithm in the first image.

可选地,第三确定模块303包括:Optionally, the third determining module 303 includes:

第四确定子模块,用于根据所述第一像素区域的行人数量和所述第二像素区域的行人数量,得到所述第一图像中行人的第一预测数量;a fourth determination submodule, configured to obtain a first predicted number of pedestrians in the first image according to the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area;

第五确定子模块,用于在所述第一预测数量与第二预测数量的差值小于或等于预设阈值的情况下,将所述第一预测数量确定为所述第一图像中的行人数量;a fifth determination submodule, configured to determine the first predicted number as the number of pedestrians in the first image when a difference between the first predicted number and the second predicted number is less than or equal to a preset threshold;

其中,所述第二预测数量为根据历史行人数量以及外部因素确定的行人数量,所述外部因素包括所述采集设备采集所述第一图像时的天气因素和时间因素。The second predicted number is the number of pedestrians determined based on the historical number of pedestrians and external factors, and the external factors include weather factors and time factors when the acquisition device acquires the first image.

行人数量确定装置300能实现上述行人数量确定方法的各实施例的各个过程,技术特征一一对应,且能达到相同的技术效果,为避免重复,这里不再赘述。The pedestrian number determination device 300 can implement each process of each embodiment of the above-mentioned pedestrian number determination method, the technical features correspond one to one, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

本发明实施例还提供了一种电子设备,包括:处理器、存储器及存储在存储器上并可在处理器上运行的程序,程序被处理器执行时实现上述故障预测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present invention also provides an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, the various processes of the above-mentioned fault prediction method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

具体的,参见图4,本发明实施例还提供了一种电子设备,包括总线401、收发机402、天线403、总线接口404、处理器405和存储器406。Specifically, referring to FIG. 4 , an embodiment of the present invention further provides an electronic device, including a bus 401 , a transceiver 402 , an antenna 403 , a bus interface 404 , a processor 405 , and a memory 406 .

其中,所述收发机402,用于获取采集设备采集的第一图像;Wherein, the transceiver 402 is used to obtain the first image captured by the acquisition device;

处理器405,用于基于采集设备获取的第一图像,确定所述第一图像中第一像素区域的行人数量;Processor 405, configured to determine the number of pedestrians in a first pixel area in the first image based on the first image acquired by the acquisition device;

所述处理器405,还用于基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间;The processor 405 is further configured to determine a pedestrian quantity interval of the second pixel area based on the second pixel area of the first image;

所述处理器405,还用于基于所述第一像素区域的行人数量以及所述行人数量区间对应的所述第二像素区域的行人数量,确定所述第一图像中的行人数量;The processor 405 is further configured to determine the number of pedestrians in the first image based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval;

其中,所述第一像素区域映射的第一位置区域与所述采集设备的距离小于所述第二像素区域映射的第二位置区域与所述采集设备的距离。The distance between the first position area mapped by the first pixel area and the acquisition device is smaller than the distance between the second position area mapped by the second pixel area and the acquisition device.

可选地,所述基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间,包括:Optionally, the determining, based on the second pixel area of the first image, a pedestrian quantity interval of the second pixel area includes:

根据第一目标像素的数量、第二目标像素的数量,以及所述第一像素区域的行人数量,确定所述第二像素区域的行人数量区间,所述第一目标像素为所述第一像素区域中具有目标特征的像素,所述第二目标像素为所述第二像素区域中具有所述目标特征的像素,所述目标特征为表征行人的特征。According to the number of first target pixels, the number of second target pixels, and the number of pedestrians in the first pixel area, the pedestrian number interval of the second pixel area is determined, the first target pixel is a pixel having a target feature in the first pixel area, the second target pixel is a pixel having the target feature in the second pixel area, and the target feature is a feature that characterizes pedestrians.

可选地,所述基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间,包括:Optionally, the determining, based on the second pixel area of the first image, a pedestrian quantity interval of the second pixel area includes:

根据图像分类算法对所述第一图像的第二像素区域进行检测,在多个预设的行人数量区间中确定所述第二像素区域对应的行人数量区间。The second pixel area of the first image is detected according to an image classification algorithm, and a pedestrian quantity interval corresponding to the second pixel area is determined from a plurality of preset pedestrian quantity intervals.

可选地,所述基于采集设备获取的第一图像,确定所述第一图像中第一像素区域的行人数量,包括:Optionally, determining the number of pedestrians in a first pixel area in the first image based on the first image acquired by the acquisition device includes:

根据Yolo物体检测算法对所述第一图像进行检测,得到所述第一像素区域的行人数量;Detect the first image according to the Yolo object detection algorithm to obtain the number of pedestrians in the first pixel area;

将所述第一图像中除所述第一像素区域之外的像素区域确定为所述第二像素区域。A pixel region other than the first pixel region in the first image is determined as the second pixel region.

可选地,所述第一像素区域为所述Yolo物体检测算法在所述第一图像标注的像素区域。Optionally, the first pixel area is a pixel area marked by the Yolo object detection algorithm in the first image.

可选地,所述基于所述第一像素区域的行人数量以及所述行人数量区间对应的所述第二像素区域的行人数量,确定所述第一图像中的行人数量,包括:Optionally, the determining the number of pedestrians in the first image based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval includes:

根据所述第一像素区域的行人数量和所述第二像素区域的行人数量,得到所述第一图像中行人的第一预测数量;Obtaining a first predicted number of pedestrians in the first image according to the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area;

在所述第一预测数量与第二预测数量的差值小于或等于预设阈值的情况下,将所述第一预测数量确定为所述第一图像中的行人数量;When the difference between the first predicted number and the second predicted number is less than or equal to a preset threshold, determining the first predicted number as the number of pedestrians in the first image;

其中,所述第二预测数量为根据历史行人数量以及外部因素确定的行人数量,所述外部因素包括所述采集设备采集所述第一图像时的天气因素和时间因素。The second predicted number is the number of pedestrians determined based on the historical number of pedestrians and external factors, and the external factors include weather factors and time factors when the acquisition device acquires the first image.

在图4中,总线架构(用总线401来代表),总线401可以包括任意数量的互联的总线和桥,总线401将包括由处理器405代表的一个或多个处理器和存储器406代表的存储器的各种电路链接在一起。总线401还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口404在总线401和收发机402之间提供接口。收发机402可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器405处理的数据通过天线403在无线介质上进行传输,进一步,天线403还接收数据并将数据传送给处理器405。In FIG. 4 , a bus architecture (represented by bus 401) is shown, and bus 401 may include any number of interconnected buses and bridges, and bus 401 links various circuits including one or more processors represented by processor 405 and memory represented by memory 406. Bus 401 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 404 provides an interface between bus 401 and transceiver 402. Transceiver 402 may be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. Data processed by processor 405 is transmitted on a wireless medium via antenna 403, and further, antenna 403 also receives data and transmits the data to processor 405.

处理器405负责管理总线401和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器406可以被用于存储处理器405在执行操作时所使用的数据。Processor 405 is responsible for managing bus 401 and general processing, and may also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory 406 may be used to store data used by processor 405 when performing operations.

可选的,处理器405可以是中央处理器(Central Processing Unit,CPU)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程逻辑门阵列(Field Programmable Gate Array,FPGA)或复杂可编程逻辑器件(Complex ProgrammableLogic Device,CPLD)。Optionally, the processor 405 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD).

本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述行人数量确定方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned pedestrian number determination method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

本申请实施例还提供一种计算机程序产品,包括计算机指令,计算机指令被处理器执行时实现上述行人数量确定方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the various processes of the above-mentioned pedestrian number determination method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本发明实施方式中的方法和装置的范围不限于按所讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present invention is not limited to performing functions in the order discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

Claims (10)

1.一种行人数量确定方法,其特征在于,所述方法包括:1. A method for determining the number of pedestrians, characterized in that the method comprises: 基于采集设备获取的第一图像,确定所述第一图像中第一像素区域的行人数量;Determine, based on a first image acquired by an acquisition device, the number of pedestrians in a first pixel area in the first image; 基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间;Determining a pedestrian quantity interval of a second pixel area based on a second pixel area of the first image; 基于所述第一像素区域的行人数量以及所述行人数量区间对应的所述第二像素区域的行人数量,确定所述第一图像中的行人数量;Determining the number of pedestrians in the first image based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval; 其中,所述第一像素区域映射的第一位置区域与所述采集设备的距离小于所述第二像素区域映射的第二位置区域与所述采集设备的距离。The distance between the first position area mapped by the first pixel area and the acquisition device is smaller than the distance between the second position area mapped by the second pixel area and the acquisition device. 2.根据权利要求1所述的方法,其特征在于,所述基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间,包括:2. The method according to claim 1, characterized in that the determining the pedestrian quantity interval of the second pixel area based on the second pixel area of the first image comprises: 根据第一目标像素的数量、第二目标像素的数量,以及所述第一像素区域的行人数量,确定所述第二像素区域的行人数量区间,所述第一目标像素为所述第一像素区域中具有目标特征的像素,所述第二目标像素为所述第二像素区域中具有所述目标特征的像素,所述目标特征为表征行人的特征。According to the number of first target pixels, the number of second target pixels, and the number of pedestrians in the first pixel area, the pedestrian number interval of the second pixel area is determined, the first target pixel is a pixel having a target feature in the first pixel area, the second target pixel is a pixel having the target feature in the second pixel area, and the target feature is a feature that characterizes pedestrians. 3.根据权利要求1所述的方法,其特征在于,所述基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间,包括:3. The method according to claim 1, wherein determining the pedestrian quantity interval of the second pixel area based on the second pixel area of the first image comprises: 根据图像分类算法对所述第一图像的第二像素区域进行检测,在多个预设的行人数量区间中确定所述第二像素区域对应的行人数量区间。The second pixel area of the first image is detected according to an image classification algorithm, and a pedestrian quantity interval corresponding to the second pixel area is determined from a plurality of preset pedestrian quantity intervals. 4.根据权利要求1所述的方法,其特征在于,所述基于采集设备获取的第一图像,确定所述第一图像中第一像素区域的行人数量,包括:4. The method according to claim 1, characterized in that the determining the number of pedestrians in the first pixel area in the first image based on the first image acquired by the acquisition device comprises: 根据Yolo物体检测算法对所述第一图像进行检测,得到所述第一像素区域的行人数量;Detect the first image according to the Yolo object detection algorithm to obtain the number of pedestrians in the first pixel area; 将所述第一图像中除所述第一像素区域之外的像素区域确定为所述第二像素区域。A pixel region other than the first pixel region in the first image is determined as the second pixel region. 5.根据权利要求4所述的方法,其特征在于,所述第一像素区域为所述Yolo物体检测算法在所述第一图像标注的像素区域。5. The method according to claim 4 is characterized in that the first pixel area is a pixel area marked by the Yolo object detection algorithm in the first image. 6.根据权利要求1所述的方法,其特征在于,所述基于所述第一像素区域的行人数量以及所述行人数量区间对应的所述第二像素区域的行人数量,确定所述第一图像中的行人数量,包括:6. The method according to claim 1, characterized in that the determining the number of pedestrians in the first image based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval comprises: 根据所述第一像素区域的行人数量和所述第二像素区域的行人数量,得到所述第一图像中行人的第一预测数量;Obtaining a first predicted number of pedestrians in the first image according to the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area; 在所述第一预测数量与第二预测数量的差值小于或等于预设阈值的情况下,将所述第一预测数量确定为所述第一图像中的行人数量;When the difference between the first predicted number and the second predicted number is less than or equal to a preset threshold, determining the first predicted number as the number of pedestrians in the first image; 其中,所述第二预测数量为根据历史行人数量以及外部因素确定的行人数量,所述外部因素包括所述采集设备采集所述第一图像时的天气因素和时间因素。The second predicted number is the number of pedestrians determined based on the historical number of pedestrians and external factors, and the external factors include weather factors and time factors when the acquisition device acquires the first image. 7.一种行人数量确定装置,其特征在于,所述装置包括:7. A device for determining the number of pedestrians, characterized in that the device comprises: 第一确定模块,用于基于采集设备获取的第一图像,确定所述第一图像中第一像素区域的行人数量;A first determination module, configured to determine the number of pedestrians in a first pixel area in a first image acquired by an acquisition device based on the first image; 第二确定模块,用于基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间;A second determination module, configured to determine a pedestrian quantity interval of a second pixel area based on a second pixel area of the first image; 第三确定模块,用于基于所述第一像素区域的行人数量以及所述行人数量区间对应的所述第二像素区域的行人数量,确定所述第一图像中的行人数量;a third determination module, configured to determine the number of pedestrians in the first image based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval; 其中,所述第一像素区域映射的第一位置区域与所述采集设备的距离小于所述第二像素区域映射的第二位置区域与所述采集设备的距离。The distance between the first position area mapped by the first pixel area and the acquisition device is smaller than the distance between the second position area mapped by the second pixel area and the acquisition device. 8.一种电子设备,其特征在于,包括收发机和处理器,8. An electronic device, comprising a transceiver and a processor, 所述处理器,用于基于采集设备获取的第一图像,确定所述第一图像中第一像素区域的行人数量;The processor is used to determine the number of pedestrians in a first pixel area in the first image based on the first image acquired by the acquisition device; 所述处理器,还用于基于所述第一图像的第二像素区域,确定所述第二像素区域的行人数量区间;The processor is further configured to determine a pedestrian quantity interval of the second pixel area based on the second pixel area of the first image; 所述处理器,还用于基于所述第一像素区域的行人数量以及所述行人数量区间对应的所述第二像素区域的行人数量,确定所述第一图像中的行人数量;The processor is further configured to determine the number of pedestrians in the first image based on the number of pedestrians in the first pixel area and the number of pedestrians in the second pixel area corresponding to the pedestrian number interval; 其中,所述第一像素区域映射的第一位置区域与所述采集设备的距离小于所述第二像素区域映射的第二位置区域与所述采集设备的距离。The distance between the first position area mapped by the first pixel area and the acquisition device is smaller than the distance between the second position area mapped by the second pixel area and the acquisition device. 9.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至6中任一项所述的行人数量确定方法的步骤。9. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for determining the number of pedestrians as described in any one of claims 1 to 6 are implemented. 10.一种计算机程序产品,其特征在于,包括计算机指令,该计算机指令被处理器执行时实现如权利要求1至6中任一项所述的行人数量确定方法的步骤。10. A computer program product, characterized in that it comprises computer instructions, which, when executed by a processor, implement the steps of the method for determining the number of pedestrians according to any one of claims 1 to 6.
CN202410233851.4A 2024-03-01 2024-03-01 Pedestrian number determining method and device and related equipment Active CN118097553B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410233851.4A CN118097553B (en) 2024-03-01 2024-03-01 Pedestrian number determining method and device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410233851.4A CN118097553B (en) 2024-03-01 2024-03-01 Pedestrian number determining method and device and related equipment

Publications (2)

Publication Number Publication Date
CN118097553A true CN118097553A (en) 2024-05-28
CN118097553B CN118097553B (en) 2024-12-10

Family

ID=91149220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410233851.4A Active CN118097553B (en) 2024-03-01 2024-03-01 Pedestrian number determining method and device and related equipment

Country Status (1)

Country Link
CN (1) CN118097553B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025790A (en) * 2007-01-15 2007-08-29 中北大学 Image-based bus passenger number automatic statistics meter
CN103218816A (en) * 2013-04-18 2013-07-24 中山大学 Crowd density estimation method and pedestrian volume statistical method based on video analysis
CN103473114A (en) * 2013-09-04 2013-12-25 李乐之 Method for calculating architectural space activeness through people-stream simulation
CN106203331A (en) * 2016-07-08 2016-12-07 苏州平江历史街区保护整治有限责任公司 A kind of crowd density evaluation method based on convolutional neural networks
CN106845621A (en) * 2017-01-18 2017-06-13 山东大学 Dense population number method of counting and system based on depth convolutional neural networks
CN109697435A (en) * 2018-12-14 2019-04-30 重庆中科云从科技有限公司 Stream of people's quantity monitoring method, device, storage medium and equipment
CN114693674A (en) * 2022-04-24 2022-07-01 深圳奇迹智慧网络有限公司 People flow statistical method, device and computer storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101025790A (en) * 2007-01-15 2007-08-29 中北大学 Image-based bus passenger number automatic statistics meter
CN103218816A (en) * 2013-04-18 2013-07-24 中山大学 Crowd density estimation method and pedestrian volume statistical method based on video analysis
CN103473114A (en) * 2013-09-04 2013-12-25 李乐之 Method for calculating architectural space activeness through people-stream simulation
CN106203331A (en) * 2016-07-08 2016-12-07 苏州平江历史街区保护整治有限责任公司 A kind of crowd density evaluation method based on convolutional neural networks
CN106845621A (en) * 2017-01-18 2017-06-13 山东大学 Dense population number method of counting and system based on depth convolutional neural networks
CN109697435A (en) * 2018-12-14 2019-04-30 重庆中科云从科技有限公司 Stream of people's quantity monitoring method, device, storage medium and equipment
CN114693674A (en) * 2022-04-24 2022-07-01 深圳奇迹智慧网络有限公司 People flow statistical method, device and computer storage medium

Also Published As

Publication number Publication date
CN118097553B (en) 2024-12-10

Similar Documents

Publication Publication Date Title
US11455805B2 (en) Method and apparatus for detecting parking space usage condition, electronic device, and storage medium
CN112990211B (en) Training method, image processing method and device for neural network
WO2021135879A1 (en) Vehicle data monitoring method and apparatus, computer device, and storage medium
WO2020248386A1 (en) Video analysis method and apparatus, computer device and storage medium
US20220301317A1 (en) Method and device for constructing object motion trajectory, and computer storage medium
WO2022134120A1 (en) Target motion prediction-based parking lot management and control method, apparatus, and electronic device
CN116959099B (en) Abnormal behavior identification method based on space-time diagram convolutional neural network
WO2019109793A1 (en) Human head region recognition method, device and apparatus
CN112183166A (en) Method and device for determining training sample and electronic equipment
CN111178235A (en) Target quantity determination method, device, equipment and storage medium
WO2023273041A1 (en) Target detection method and apparatus in vehicle-road coordination, and roadside device
CN112232236A (en) Pedestrian flow monitoring method and system, computer equipment and storage medium
CN111079621A (en) Method and device for detecting object, electronic equipment and storage medium
WO2024242282A1 (en) Apparatus for farrow determination based on behavior recognition of sow, and operational method therefor
CN113538513A (en) Method, device and equipment for controlling access of monitored object and storage medium
CN113052039A (en) Method, system and server for detecting pedestrian density of traffic network
CN115147922A (en) Monocular pedestrian detection method, system, device and medium based on embedded platform
CN114998782A (en) Scene classification method and device of face-check video, electronic equipment and storage medium
CN114863476A (en) Pedestrian re-identification method and device, electronic device and storage medium
CN102867214A (en) Counting management method for people within area range
CN118097553A (en) Pedestrian number determining method and device and related equipment
CN116994313A (en) Mask detection system and method in elevator scenario based on edge computing
CN114445766B (en) A method, device and robot for detecting and managing human traffic
CN110717544B (en) A method and system for analyzing pedestrian attributes under a vertical fisheye lens
CN115063716A (en) The method of quantity supervision and model building of goods in and out of warehouse

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