CN109242183B - Crowd simulation evacuation method and device based on artificial fish-swarm algorithm and target detection - Google Patents

Crowd simulation evacuation method and device based on artificial fish-swarm algorithm and target detection Download PDF

Info

Publication number
CN109242183B
CN109242183B CN201811030222.2A CN201811030222A CN109242183B CN 109242183 B CN109242183 B CN 109242183B CN 201811030222 A CN201811030222 A CN 201811030222A CN 109242183 B CN109242183 B CN 109242183B
Authority
CN
China
Prior art keywords
evacuation
individual
exit
crowd
artificial fish
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.)
Expired - Fee Related
Application number
CN201811030222.2A
Other languages
Chinese (zh)
Other versions
CN109242183A (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.)
Shandong Normal University
Original Assignee
Shandong Normal University
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 Shandong Normal University filed Critical Shandong Normal University
Priority to CN201811030222.2A priority Critical patent/CN109242183B/en
Publication of CN109242183A publication Critical patent/CN109242183A/en
Application granted granted Critical
Publication of CN109242183B publication Critical patent/CN109242183B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services
    • G06Q50/265Personal security, identity or safety
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/277Analysis of motion involving stochastic approaches, e.g. using Kalman filters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Tourism & Hospitality (AREA)
  • Economics (AREA)
  • Multimedia (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • General Health & Medical Sciences (AREA)
  • Educational Administration (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种基于人工鱼群算法与目标检测的人群仿真疏散方法与装置,所述方法包括以下步骤:根据疏散场景平面图建立拓扑地图,其中,结点表示疏散出口,连线表示两个出口连通,并且标记最终出口;根据视频数据对疏散人群的个体进行检测和跟踪,获得疏散人群的个体实时速度;采用所述个体速度表示鱼群进食行为中的进食速度,初始化鱼群,以场景的最终出口位置表示食物,基于人工鱼群算法对疏散人群个体进行路径规划;当最终出口的疏散人数等于总人数时疏散过程结束,得到疏散路径。本发明识别疏散中速度较慢的个体,指导人群进行疏散,从而照顾到疏散中的弱势群体,同时提高疏散效率,避免过分拥堵。

The invention discloses a crowd simulation evacuation method and device based on artificial fish swarm algorithm and target detection. The method includes the following steps: establishing a topology map according to the plan of the evacuation scene, wherein the nodes represent evacuation exits, and the connecting lines represent two The exit is connected, and the final exit is marked; according to the video data, the individuals of the evacuated crowd are detected and tracked to obtain the real-time speed of the evacuated crowd; the individual speed is used to represent the feeding speed in the feeding behavior of the fish, initialize the fish, and use the scene The final exit position of , represents food, and the individual evacuated crowd is planned based on the artificial fish swarm algorithm; when the number of evacuees at the final exit is equal to the total number of people, the evacuation process ends, and the evacuation path is obtained. The invention identifies individuals with slow evacuation speeds, and guides crowds to evacuate, thereby taking care of vulnerable groups in evacuation, improving evacuation efficiency and avoiding excessive congestion.

Description

基于人工鱼群算法与目标检测的人群仿真疏散方法与装置Crowd simulation evacuation method and device based on artificial fish swarm algorithm and target detection

技术领域technical field

本发明属于人群疏散仿真领域,尤其涉及一种基于人工鱼群算法与目标检测的人群仿真疏散方法与装置。The invention belongs to the field of crowd evacuation simulation, and in particular relates to a crowd simulation evacuation method and device based on artificial fish swarm algorithm and target detection.

背景技术Background technique

在实际的疏散情况中,问题日益复杂,非确定性因素、不可知因素众多,因果关系复杂,而演习代价大,周期长,难以对规律进行研究。因而国内外学者针对疏散问题开发出许多计算机模型和软件。人工鱼群算法是新型的群智能优化算法,在一片水域中,鱼通常能够自由游动或者跟随其他个体找到食物多的地方,因此水域中鱼生存数目最多的地方一般就是本水域中富含营养物质最多的地方,根据这一特点,李晓磊提出人工鱼群算法,通过模拟鱼群的觅食、追尾、聚群等行为,达到搜索寻优的目的。鱼群算法自提出以来,已经在机器人路径规划,车辆调度等问题上得到了广泛应用,展示了其良好的搜索能力。In the actual evacuation situation, the problems are becoming more and more complex, there are many non-deterministic and unknowable factors, and the causal relationship is complicated. Therefore, scholars at home and abroad have developed many computer models and software for evacuation problems. The artificial fish swarm algorithm is a new type of swarm intelligence optimization algorithm. In a water area, fish can usually swim freely or follow other individuals to find a place with more food. Therefore, the place with the largest number of fish in the water is generally the water rich in nutrients. Based on this feature, Li Xiaolei proposed an artificial fish swarm algorithm to achieve the purpose of searching and optimizing by simulating the behavior of fish foraging, tail-chasing, and swarming. Since the fish swarm algorithm was proposed, it has been widely used in robot path planning, vehicle scheduling and other issues, showing its good search ability.

紧急情况发生时,人群疏散效率与人群密度有很大关系。当一个出口聚集的人很多时,势必影响整体的疏散。我们从疏散视频中应该了解到,个体的疏散速度具有差异性,比如老人、孩子、和残疾人群的疏散速度慢,若一个疏散出口的人群密度低,但疏散人群大部分是上述行动速度较慢的三类人群时,疏散效率也会大打折扣。同时,若仅以人群密度作为衡量,会导致大量人群往这个出口聚集,从而使疏散更加缓慢,甚至造成拥挤踩踏等事故。目前还未发现将个体速度差异性考虑入人群疏散的相关方法。When an emergency occurs, crowd evacuation efficiency has a lot to do with crowd density. When a lot of people gather at an exit, it will inevitably affect the overall evacuation. We should know from the evacuation video that the evacuation speed of individuals is different. For example, the evacuation speed of the elderly, children, and disabled groups is slow. If the crowd density at an evacuation exit is low, but most of the evacuation crowds are the above-mentioned slower action speeds. When there are three types of people, the evacuation efficiency will be greatly reduced. At the same time, if only the crowd density is used as a measure, a large number of people will gather at this exit, which will make the evacuation slower, and even cause accidents such as crowding and stampede. No relevant method has been found to take individual speed differences into account for crowd evacuation.

发明内容SUMMARY OF THE INVENTION

为克服上述现有技术的不足,本发明提供了一种基于人工鱼群算法与目标检测的人群仿真疏散方法与装置,首先基于目标检测方法获取行人运动速度,然后在人工鱼原有属性的基础上添加进食速度一项,把进食速度快的个体类比于疏散中行动缓慢的个体,识别疏散中速度较慢的个体,指导人群进行疏散,从而照顾到疏散中的弱势群体,同时提高疏散效率,避免过分拥堵。In order to overcome the above-mentioned deficiencies of the prior art, the present invention provides a crowd simulation evacuation method and device based on artificial fish swarm algorithm and target detection. The item of eating speed is added to the above, and the individuals who eat fast are compared to those who are slow in the evacuation, identify the individuals who are slow in the evacuation, and guide the crowd to evacuate, so as to take care of the vulnerable groups in the evacuation, and improve the evacuation efficiency at the same time. Avoid excessive congestion.

为实现上述目的,本发明采用如下技术方案:To achieve the above object, the present invention adopts the following technical solutions:

一种基于人工鱼群算法与目标检测的人群仿真疏散方法,包括以下步骤:A crowd simulation evacuation method based on artificial fish swarm algorithm and target detection, comprising the following steps:

根据疏散场景平面图建立拓扑地图,其中,结点表示疏散出口,连线表示两个出口连通,并且标记最终出口;Establish a topology map according to the plan of the evacuation scene, wherein the node represents the evacuation exit, the connection line represents the connection between the two exits, and the final exit is marked;

根据视频数据对疏散人群的个体进行检测和跟踪,获得疏散人群的个体实时速度;Detect and track the individuals of the evacuated crowd according to the video data, and obtain the real-time speed of the individual evacuated crowd;

采用所述个体实时速度表示鱼群进食行为中的进食速度,初始化鱼群,以场景的最终出口位置表示食物,基于人工鱼群算法对疏散人群个体进行路径规划;The individual real-time speed is used to represent the feeding speed in the feeding behavior of the fish school, the fish school is initialized, the food is represented by the final exit position of the scene, and the path planning for the evacuated crowd individuals is carried out based on the artificial fish swarm algorithm;

当最终出口的疏散人数等于总人数时疏散过程结束,得到疏散路径。When the number of evacuees at the final exit is equal to the total number of people, the evacuation process ends, and the evacuation path is obtained.

进一步地,获得疏散人群的个体实时速度包括:Further, obtaining the individual real-time speed of the evacuated crowd includes:

获取通道出口处视频数据;Get the video data at the exit of the channel;

基于RCNN检测所述视频数据中的行人目标;Detect pedestrian targets in the video data based on RCNN;

采用粒子滤波器进行行人运动的跟踪;Pedestrian motion tracking using particle filter;

对于每个行人,根据当前帧和前一帧该行人的位置差异换算实际位移;For each pedestrian, convert the actual displacement according to the position difference between the current frame and the previous frame of the pedestrian;

根据所述实际位移和视频的拍摄帧频,计算该行人的速度。According to the actual displacement and the shooting frame rate of the video, the speed of the pedestrian is calculated.

进一步地,所述基于RCNN检测所述视频数据中的行人目标包括:Further, the detection of pedestrian targets in the video data based on RCNN includes:

使用二值归一化梯度算法选取目标候选区域;Use the binary normalized gradient algorithm to select target candidate regions;

采用卷积神经网络对候选区域内进行特征提取;其中,所述卷积神经网络选用包含5个卷积层和3个全连接层的网络结构;A convolutional neural network is used to extract features in the candidate area; wherein, the convolutional neural network selects a network structure comprising 5 convolutional layers and 3 fully connected layers;

提取后的特征采用支持向量机进行分类,识别所述候选区域为行人目标还是背景。The extracted features are classified by a support vector machine to identify whether the candidate region is a pedestrian target or a background.

进一步地,所述基于人工鱼群算法对疏散人群个体进行路径规划包括:Further, the path planning for the evacuated crowd individuals based on the artificial fish swarm algorithm includes:

初始化鱼群,包括人工鱼的编号、所在位置、视野范围、移动步长以及个体的进食速度;Initialize the fish school, including the number, location, field of view, moving step and individual feeding speed of the artificial fish;

对于每个个体,根据欲选择的出口到疏散最终出口的距离、拥挤度和进食速度较快的个体数目,确定个体的下一个位置;其中,采用速度低于一定阈值的行人表示所述进食速度较快的个体。For each individual, the next position of the individual is determined according to the distance from the exit to be selected to the final evacuation exit, the degree of crowding and the number of individuals with a faster eating speed; wherein, pedestrians whose speed is lower than a certain threshold are used to represent the eating speed faster individuals.

进一步地,所述确定个体的下一个位置包括:Further, the determination of the next position of the individual includes:

对于每个个体,预先判断所述个体在当前位置发生不同行为时选定的下一出口,根据选定的所述下一出口到最终疏散出口的距离、拥挤度和进食速度较快的个体数目分别计算评价函数;所述评价函数为:For each individual, pre-judging the next exit selected when the individual has different behaviors at the current location, according to the distance from the selected next exit to the final evacuation exit, the degree of crowding and the number of individuals with faster eating speed Calculate the evaluation function separately; the evaluation function is:

B(vi)=μDis(vi)+λδ+ωNums B(vi )= μDis (vi )+ λδ +ωNum s

其中,下一出口到最终出口的距离Yi表示所述下一出口结点vi所在位置的食物浓度;δ表示拥挤度因子;Nums表示所述下一出口进食速度较快的个体的数目;μ、λ和ω表示权重系数,μ+λ+ω=1;μ、λ和ω表示权重系数,μ+λ+ω=1;Among them, the distance from the next exit to the final exit Y i represents the food concentration at the location of the next outlet node vi; δ represents the crowding factor; Num s represents the number of individuals who eat faster at the next outlet; μ, λ and ω represent the weight coefficients, μ+λ+ω=1; μ, λ and ω represent weight coefficients, μ+λ+ω=1;

选择评价函数最小的行为执行个体的移动。Select the behavior with the smallest evaluation function to perform the movement of the individual.

进一步地,所述行为包括觅食、聚群、追尾和随机行为。Further, the behaviors include foraging, flocking, tail-chasing and random behaviors.

进一步地,执行觅食、聚群、追尾行为的移动公式为:Further, the movement formulas to perform foraging, flocking, and tail-chasing behaviors are:

执行随机行为的移动公式为:The move formula to perform random behavior is:

其中,rand()为随机函数,取值为0~1;表示个体当前所处位置,Xj表示目标个体所在出口位置,表示个体移动后的位置;step表示移动步长;Visual为个体的可见范围。Among them, rand() is a random function with a value of 0 to 1; represents the current position of the individual, X j represents the exit position of the target individual, Represents the position of the individual after moving; step represents the moving step; Visual is the visible range of the individual.

一个或多个实施例提供了一种计算装置,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如权利要求1-6任一项所述的基于人工鱼群算法与目标检测的人群仿真疏散方法。One or more embodiments provide a computing device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the program as claimed in claims 1-6 when executed Any one of the crowd simulation evacuation methods based on artificial fish swarm algorithm and target detection.

一个或多个实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现所述的基于人工鱼群算法与目标检测的人群仿真疏散方法。One or more embodiments provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the described crowd simulation evacuation method based on artificial fish swarm algorithm and target detection.

本发明的有益效果The beneficial effects of the present invention

(1)本发明将复杂环境用拓扑地图表示出来,简洁地表示了区域之间的连通性问题,能直观地反映疏散的过程及路径。(1) The present invention expresses the complex environment with a topology map, succinctly expresses the connectivity problem between regions, and can intuitively reflect the evacuation process and path.

(2)本发明考虑到实际疏散中老人小孩和残疾人群与正常人群的速度差异,将行人速度作为选择疏散结点的重要指标,利用RCNN和粒子滤波器对行人运动检测跟踪,能获得行人实时速度,反映出口疏散的真实情况,为疏散结点的选择提供依据,照顾到了疏散中的弱势群体,同时避免了出口拥堵加剧,提高了疏散效率。(2) The present invention takes into account the speed difference between the elderly, children, disabled groups and normal people in actual evacuation, takes pedestrian speed as an important index for selecting evacuation nodes, uses RCNN and particle filter to detect and track pedestrian motion, and can obtain real-time pedestrians. The speed reflects the real situation of exit evacuation, provides a basis for the selection of evacuation nodes, takes care of vulnerable groups during evacuation, avoids the aggravation of exit congestion, and improves evacuation efficiency.

(3)本发明利用鱼群算法模拟疏散过程,有较快的寻优速度和良好的全局寻优能力。通过引入对进食速度的判断,人工鱼在选择下一个结点时,除了要考虑该位置的伙伴拥挤度,还要考虑伙伴进食速度的问题。相对应于人群疏散中,行人在选择下一个位置时,考虑行人速度差异对疏散效率的影响,选择使目标函数得到最优值的行为,展现了一种高效的寻优方法。(3) The present invention uses the fish swarm algorithm to simulate the evacuation process, and has a faster optimization speed and a good global optimization ability. By introducing the judgment of the feeding speed, when the artificial fish selects the next node, in addition to considering the crowding degree of the partner at the location, it should also consider the feeding speed of the partner. Corresponding to the crowd evacuation, when pedestrians choose the next position, considering the influence of pedestrian speed difference on the evacuation efficiency, the behavior of choosing the optimal value of the objective function shows an efficient optimization method.

附图说明Description of drawings

构成本申请的一部分的说明书附图用来提供对本申请的进一步理解,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。The accompanying drawings that form a part of the present application are used to provide further understanding of the present application, and the schematic embodiments and descriptions of the present application are used to explain the present application and do not constitute improper limitations on the present application.

图1是本发明人群疏散方法的流程图;Fig. 1 is the flow chart of the crowd evacuation method of the present invention;

图2是疏散场景的二维平面图;Figure 2 is a two-dimensional plan view of an evacuation scene;

图3是由出口的连通性生成的拓扑地图;Figure 3 is a topology map generated by the connectivity of outlets;

图4是人群在场景中初始化随机分布示意图;Figure 4 is a schematic diagram of the initial random distribution of the crowd in the scene;

图5是人群按照规则疏散示意图;Figure 5 is a schematic diagram of crowd evacuation according to rules;

图6是人群疏散结束时刻示意图。FIG. 6 is a schematic diagram of the end time of crowd evacuation.

具体实施方式Detailed ways

应该指出,以下详细说明都是示例性的,旨在对本申请提供进一步的说明。除非另有指明,本文使用的所有技术和科学术语具有与本申请所属技术领域的普通技术人员通常理解的相同含义。It should be noted that the following detailed description is exemplary and intended to provide further explanation of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

需要注意的是,这里所使用的术语仅是为了描述具体实施方式,而非意图限制根据本申请的示例性实施方式。如在这里所使用的,除非上下文另外明确指出,否则单数形式也意图包括复数形式,此外,还应当理解的是,当在本说明书中使用术语“包含”和/或“包括”时,其指明存在特征、步骤、操作、器件、组件和/或它们的组合。It should be noted that the terminology used herein is for the purpose of describing specific embodiments only, and is not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly dictates otherwise, the singular is intended to include the plural as well, furthermore, it is to be understood that when the terms "comprising" and/or "including" are used in this specification, it indicates that There are features, steps, operations, devices, components and/or combinations thereof.

在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The embodiments in this application and the features in the embodiments may be combined with each other without conflict.

本发明提出的总体思路:本发明将复杂的疏散环境用拓扑地图表示,以点和线的关系表示出相关出口的连通性。考虑到疏散过程中老人、儿童、残疾人群等行动相对缓慢的个体的真实情况,本发明在人工鱼原有属性的基础上添加进食速度一项:由于鱼群个体差异,进食速度不同,若某区域人工鱼密度小,但个体进食速度快,该区域食物浓度就会很快降低,因此,人工鱼在执行聚群行为前应预先判断鱼群中是否存在进食速度过快的个体,以免劳而无功。把进食速度快的个体类比于疏散中行动缓慢的个体,将个体的疏散速度作为疏散中需要衡量的重要指标,避免了单以密度作为衡量而忽略个体疏散速度差异造成的出口拥堵,提高疏散效率。利用RCNN识别运动中的行人,并进一步计算得出他们的速度,统计某区域行动缓慢的个体数量,为行人疏散出口的选择提供依据,反映疏散的真实情况,避免次生事故发生。The general idea proposed by the present invention: the present invention expresses the complex evacuation environment with a topological map, and expresses the connectivity of the relevant exits with the relationship between points and lines. Considering the real situation of the elderly, children, disabled groups and other individuals who move relatively slowly during the evacuation process, the present invention adds a feeding speed item on the basis of the original attributes of the artificial fish: due to individual differences in fish groups, the feeding speed is different. The density of artificial fish in the area is small, but the individual feeding speed is fast, and the food concentration in the area will decrease quickly. Therefore, before the artificial fish performs the swarming behavior, it should be pre-judged whether there are individuals who eat too fast in the fish group, so as to avoid overwork. No use. The individual who eats fast is likened to the individual who moves slowly during evacuation, and the evacuation speed of the individual is used as an important indicator to be measured in the evacuation, which avoids the exit congestion caused by ignoring the difference of individual evacuation speed only by using density as the measure, and improves the evacuation efficiency. . Use RCNN to identify pedestrians in motion, and further calculate their speed, count the number of individuals moving slowly in a certain area, provide a basis for the selection of pedestrian evacuation exits, reflect the real situation of evacuation, and avoid secondary accidents.

拓扑地图是机器人学中环境的重要表示方法,它把室内环境表示为带结点和相关连接线的拓扑结构图,其中结点表示环境中的重要位置点(拐角、门、电梯、楼梯等),边表示结点间的连接关系,如走廊等。拓扑地图是实际环境的简单化和规则化表示,用结点和连线建立位置关系,具有较低的复杂度,同时能简单有效地表示人群疏散中出口路径的选择问题。Topological map is an important representation method of the environment in robotics. It represents the indoor environment as a topological structure map with nodes and related connecting lines, where the nodes represent important locations in the environment (corners, doors, elevators, stairs, etc.) , and the edge represents the connection relationship between nodes, such as corridors. Topological map is a simplified and regularized representation of the actual environment. It uses nodes and lines to establish positional relationships, which has low complexity and can simply and effectively represent the problem of exit path selection in crowd evacuation.

RCNN(Regions with CNN features)是一种目标检测方法,是将卷积神经网络方法应用到目标检测问题上的一个里程碑,它利用卷积神经网络的特征提取功能和支持向量机的分类功能,通过Region Proposal方法实现目标检测问题的转化。它具有准确性和高效性,能满足实时性问题的需求。RCNN (Regions with CNN features) is a target detection method, which is a milestone in the application of convolutional neural network methods to target detection problems. The Region Proposal method realizes the transformation of the target detection problem. It is accurate and efficient, and can meet the needs of real-time problems.

实施例一Example 1

本实施例公开了一种基于人工鱼群算法与目标检测的人群仿真疏散方法,如图1所示,包括以下步骤:This embodiment discloses a crowd simulation evacuation method based on artificial fish swarm algorithm and target detection, as shown in FIG. 1 , including the following steps:

步骤1:根据疏散场景平面图获取区域之间的连通关系,建立拓扑地图,其中结点代表疏散出口,连线代表两出口的连通关系,并且标记最终出口。Step 1: Obtain the connectivity between areas according to the plan of the evacuation scene, and establish a topology map, in which the nodes represent the evacuation exits, the connecting lines represent the connectivity between the two exits, and the final exits are marked.

获取疏散环境的二维平面图,根据区域的连通性建立拓扑地图,疏散出口编号为vi(i=1,2,…n),结点代表疏散出口,连线代表两出口的连通关系。如图2所示,其中标号为⑤和⑥的结点表示最终出口。Obtain a two-dimensional plan of the evacuation environment, and build a topology map according to the connectivity of the area. The evacuation exits are numbered vi ( i =1,2,...n), the nodes represent the evacuation exits, and the connection lines represent the connectivity between the two exits. As shown in Figure 2, the nodes marked with ⑤ and ⑥ represent the final exit.

步骤2:根据视频数据对行人进行检测和跟踪,获得行人实时速度。Step 2: Detect and track pedestrians according to the video data to obtain the real-time speed of pedestrians.

利用RCNN和粒子滤波器对某出口疏散的行人进行检测跟踪,获得行人实时速度,计算某出口处聚集的行动缓慢的s个体的数目,为行人选择出口提供依据。将某出口处s个体筛选出来,统计其数量。Use RCNN and particle filter to detect and track pedestrians evacuated from an exit, obtain the real-time speed of pedestrians, calculate the number of slow-moving individuals gathered at an exit, and provide a basis for pedestrians to choose exits. Screen out s individuals at a certain exit, and count the number of them.

具体地,在疏散场景每个出口处均安装CCD摄像机,对行人进行全方位的检测跟踪,行人无论从哪个出口走,都能测得其实时速度。获取视频数据后,首先利用卷积神经网络提取行人特征,进行跟踪,测得行人速度。具体步骤包括:Specifically, a CCD camera is installed at each exit of the evacuation scene to detect and track pedestrians in an all-round way. No matter which exit a pedestrian walks from, their real-time speed can be measured. After acquiring the video data, first use the convolutional neural network to extract pedestrian features, track them, and measure the pedestrian speed. Specific steps include:

采用RCNN来检测监控视频中行人目标,描述如下:RCNN is used to detect pedestrian targets in surveillance video, which is described as follows:

使用二值归一化梯度算法BING选取可能的目标,获得候选区域;Use the binary normalized gradient algorithm BING to select possible targets and obtain candidate regions;

用卷积神经网络算法(CNN)对候选区域内进行特征提取。可选用包含5个卷积层和3个全连接层的Alex net网络结构。首先输入向量x与滤波器权值进行卷积运算,计算公式为Feature extraction is performed within the candidate region using a convolutional neural network algorithm (CNN). The Alex net network structure containing 5 convolutional layers and 3 fully connected layers can be selected. First, the input vector x and the filter weights are convolved, and the calculation formula is:

f=g(∑i∈Mxi×w+b) (1)f=g(∑ i∈M x i ×w+b) (1)

增加偏量b,然后使用ReLU激活函数g=max(0,x),最后进行最大池化,输入到下一层。最后一个全连接层输出一个4096维的特征向量。经CNN提取后的特征最后由SVM进行分类,识别候选区域为行人目标或背景。Increase the bias b, then use the ReLU activation function g=max(0,x), and finally perform maximum pooling and input to the next layer. The last fully connected layer outputs a 4096-dimensional feature vector. The features extracted by CNN are finally classified by SVM to identify candidate regions as pedestrian targets or backgrounds.

然后使用粒子滤波器进行行人运动的预测跟踪,描述如下:Particle filters are then used for predictive tracking of pedestrian movements, described as follows:

假设Y={y1,y2,…yt}表示观测变量序列,X={x1,x2…,xt}表示被跟踪向量序列,yt与xt分别代表在t时刻观测变量和被跟踪目标的状态变量,权值是wt。那么后验概率p为Suppose Y={y 1 , y 2 ,...y t } represents the observed variable sequence, X={x 1 , x 2 ..., x t } represents the tracked vector sequence, y t and x t represent the observed variables at time t respectively and the state variable of the tracked target, the weight is w t . Then the posterior probability p is

比较当前粒子和之前目标的相似程度可以得出下一帧目标的位置。粒子从重要性分布q(xt|x1:1-t,y1:t)中采样得到。具有最高的相似度的粒子位置通过权重确定,权重的更新依据为Comparing the similarity between the current particle and the previous target can get the position of the target in the next frame. Particles are sampled from the importance distribution q(x t |x 1:1-t , y 1:t ). The particle position with the highest similarity is determined by the weight, and the weight is updated according to

权值更新后如果小于一个阈值,就需要对粒子重新采样,淘汰权值过低的粒子。After the weight is updated, if it is less than a threshold, the particles need to be resampled to eliminate particles with too low weights.

获得行人在下一帧的坐标位置后,与前一帧的坐标相比较,得出图像中行人位移l。根据图像中行人位移l与实际位移的对应关系,得到实际位移l′。由于摄像机拍摄帧频是一定的,由此可计算出行人速度v。After obtaining the coordinate position of the pedestrian in the next frame, compare it with the coordinates of the previous frame to obtain the pedestrian displacement l in the image. According to the corresponding relationship between the pedestrian displacement l and the actual displacement in the image, the actual displacement l′ is obtained. Since the shooting frame rate of the camera is constant, the pedestrian speed v can be calculated.

通过如上过程可测得欲从某个出口疏散的行人速度,当行人速度v低于1m/s时,可认为该行人的疏散速度比较慢的,将其定义为s,并记录该区域s的数量Nums。设置不影响某出口疏散的情况下s的最大数目T。Through the above process, the speed of the pedestrian to be evacuated from a certain exit can be measured. When the pedestrian's speed v is lower than 1m/s, it can be considered that the pedestrian's evacuation speed is relatively slow, which is defined as s, and the area s is recorded. Number Num s . Set the maximum number T of s without affecting the evacuation of an exit.

步骤3:按照一定阈值划分速度较快和速度较慢的行人,分别对应鱼群进食行为中的进食较慢和进食较快的个体;Step 3: Divide the pedestrians with faster and slower speeds according to a certain threshold, respectively corresponding to the slower and faster individuals in the feeding behavior of the fish;

在鱼群原有属性的基础上定义鱼群的进食行为,按进食速度分为进食快速的个体和一般个体,相应对于疏散过程疏散速度慢的个体和普通个体,将疏散速度慢的个体在某出口的数目统计出来,指导行人疏散,避免拥堵加剧。将人工鱼的进食速度分为正常速度和快速两种,分别对应疏散中一般个体和行动缓慢的个体。将进食速度过快的个体(行动缓慢的个体)记为s,其数目记为NumsThe feeding behavior of the fish is defined on the basis of the original attributes of the fish, and divided into fast-feeding individuals and general individuals according to the feeding speed. Correspondingly, for the individuals with slow evacuation speed and ordinary individuals during the evacuation process, the individuals with slow evacuation speed are placed in a certain The number of exits is counted to guide pedestrians to evacuate and avoid increased congestion. The feeding speed of artificial fish is divided into two types: normal speed and fast speed, which correspond to the average individual and the slow-moving individual during evacuation, respectively. The individuals who eat too fast (individuals who move slowly) are denoted as s, and their number is denoted as Num s .

统计数据得出,紧急情况中,普通人的行走速度为1.25m/s,老人或小孩的行走速度为0.65m/s,需要帮助的残疾人的速度为0.57m/s,在不妨碍正常疏散的情况下,取1m/s为阈值,行走速度在阈值以下的个体记作s。为了疏散效率和安全考虑,需要对s个体进行筛选,统计其个数,以反映出口的真实疏散情况及疏散能力,为行人的正确选择提供依据,避免出口拥堵加剧。将某出口处s个体筛选出来,统计其数量。Statistics show that in an emergency, the walking speed of ordinary people is 1.25m/s, the walking speed of the elderly or children is 0.65m/s, and the speed of disabled people who need help is 0.57m/s. In the case of , take 1m/s as the threshold, and the individual whose walking speed is below the threshold is denoted as s. For evacuation efficiency and safety considerations, it is necessary to screen s individuals and count their number to reflect the real evacuation situation and evacuation capability of the exit, provide a basis for the correct choice of pedestrians, and avoid aggravation of exit congestion. Screen out s individuals at a certain exit, and count the number of them.

步骤4:初始化鱼群,以场景的最终出口位置表示食物,基于人工鱼群算法对疏散人群个体进行路径规划。Step 4: Initialize the fish swarm, represent the food with the final exit position of the scene, and plan the path of the evacuated crowd based on the artificial fish swarm algorithm.

利用人工鱼群搜索食物的行为对人群疏散进行模拟。人工鱼判断某结点优劣的依据包括食物浓度,拥挤度因子和进食快速的个体的数目。人工鱼的行为有觅食,聚群,追尾三种,从中选择使得目标函数值最小的行为。Simulation of crowd evacuation using artificial fish swarms searching for food. The basis of artificial fish judging the quality of a node includes food concentration, crowding factor and the number of fast-eating individuals. There are three behaviors of artificial fish: foraging, flocking, and tail-chasing, from which the behavior that minimizes the value of the objective function is selected.

初始化鱼群,包括人工鱼的编号、所在位置、视野范围、移动步长以及个体的进食速度,其中个体的进食速度分为较快和一般。按照鱼群算法指导行人疏散。向量X=(x1,x2,…,xn)代表人工鱼个体的状态,其中xi(i=1,2,…n)是欲搜索寻优的变量;Y是食物浓度;di,j=||Xi-Xj||为个体之间的距离;Visual为个体的可见范围;step表示移动步长;δ(0<δ<1)为拥挤度因子;Trynum为最大尝试次数。Initialize the fish school, including the number, location, field of view, moving step, and feeding speed of the artificial fish. The feeding speed of the individual is divided into fast and normal. Guide pedestrians to evacuate according to the fish swarm algorithm. The vector X=(x 1 , x 2 ,...,x n ) represents the state of the artificial fish individual, where x i (i=1, 2,...n) is the variable to be searched for optimization; Y is the food concentration; d i ,j =||X i -X j || is the distance between individuals; Visual is the visible range of individuals; step is the moving step size; δ(0<δ<1) is the crowding factor; Trynum is the maximum number of attempts .

利用鱼群搜索食物的行为对人群疏散进行仿真,鱼群算法中人工鱼与食物距离越小食物浓度越大,食物位置可代表人群疏散中最终出口位置,某出口结点vi与最终疏散出口的距离Dis(vi)可表示为出口结点的选择由出口结点vi距离最终疏散出口的距离Dis(vi),结点的拥挤度因子δ和结点处s个体的数目Nums共同决定,评价函数可表示为The crowd evacuation is simulated by the fish swarm searching for food. In the fish swarm algorithm, the smaller the distance between the artificial fish and the food, the greater the food concentration. The food position can represent the final exit position in the crowd evacuation. An exit node v i and the final evacuation exit The distance Dis(v i ) can be expressed as The selection of the exit node is determined by the distance Dis(vi ) from the exit node v i to the final evacuation exit, the congestion factor δ of the node and the number of s individuals at the node Nums. The evaluation function can be expressed as

B(vi)=μDis(vi)+λδ+ωNums,其中μ+λ+ω=1B(v i )=μDis(vi ) +λδ+ωNum s , where μ+λ+ω=1

分别模拟个体在当前位置发生觅食、群聚、追尾和随机行为时的选择的下一结点,针对下一结点采用评价函数判断其优劣,人工鱼选择使评价函数最小的行为执行。Simulate the next node selected by individuals when foraging, swarming, tail-chasing and random behaviors occur at the current position, respectively. The evaluation function is used to judge the pros and cons of the next node, and the artificial fish chooses the behavior with the smallest evaluation function to execute.

人工鱼的行为表述如下:The behavior of the artificial fish is expressed as follows:

觅食:人在慌乱过程中随机选择疏散路径类似于鱼群的觅食行为,评价函数仅由下一结点与最终出口的距离Dis(vi)决定。假设行人xi此时处于vt结点,在其视野范围内随机选择结点vp,若vp结点食物浓度YP>Yt,则可以选择vp作为下一个结点,评价函数记为B(vi)forage;否则选择其他结点。如上重复Trynum次后,人工鱼执行随机行为。移动公式为:Foraging: people randomly choose an evacuation path in the process of panic, which is similar to the foraging behavior of fish, and the evaluation function is only determined by the distance between the next node and the final exit Dis( vi ). Assuming that pedestrian x i is at the v t node at this time, and randomly selects the node v p within its field of view, if the food concentration of the v p node Y P > Y t , then v p can be selected as the next node, the evaluation function Denote it as B(v i ) forage ; otherwise select other nodes. After repeating Trynum times as above, the artificial fish performs random behavior. The moving formula is:

rand()为随机函数,取值为0~1。rand() is a random function with a value of 0 to 1.

聚群:疏散过程中人往往有着从众心理,类似于鱼群的聚群行为,聚群行为中人工鱼想选择的目标是视野中中心鱼所在的出口位置。假设行人xi此时处于vt结点,获取其视野范围内伙伴的聚集中心结点vc及结点处伙伴的数量nf,若证明中心位置食物充足且伙伴密度不是很高,此时判断伙伴中s个体数目与阈值T的关系,若Nums<T,则可以选择vc作为下一个结点,评价函数记为B(vi)bunching。移动公式表示如下:Swarming: During the evacuation process, people tend to have a herd mentality, similar to the swarming behavior of fish. In the swarming behavior, the target that the artificial fish wants to choose is the exit position of the central fish in the field of vision. Assuming that the pedestrian xi is at the v t node at this time, obtain the gathering center node v c of the partners within its field of vision and the number of partners n f at the node, if Prove that the central location has sufficient food and the density of partners is not very high. At this time, the relationship between the number of s individuals in the partner and the threshold T is judged. If Num s < T, v c can be selected as the next node, and the evaluation function is recorded as B(v i ) bunching . The movement formula is expressed as follows:

否则执行其他行为。Otherwise perform other actions.

追尾:疏散过程中的行人由于盲目性,容易跟随他人做疏散运动,类似于鱼群算法中的追尾,追尾行为中想选择的目标是视野中状态最优的鱼所在的出口位置。假设行人xi此时处于vt结点,获取其视野范围内具有最优状态的伙伴所处结点vp及其周围的伙伴数量nf,若证明该状态有较多的食物且伙伴密度不是很大,进一步判断伙伴中s个体数目与阈值T的关系,若Nums<T,则可以选择vp作为下一个结点,评价函数记为B(vi)pursueRear chasing: Pedestrians in the evacuation process tend to follow others to evacuate due to their blindness. Similar to rear chasing in the fish swarm algorithm, the target to be selected in the rear chasing behavior is the exit position of the fish with the best state in the field of vision. Assuming that pedestrian x i is at node v t at this time, obtain the node v p of the partner with the optimal state in its field of vision and the number of its surrounding partners n f , if Prove that there is more food in this state and the density of partners is not very large. Further judge the relationship between the number of s individuals in the partner and the threshold T. If Num s < T, then v p can be selected as the next node, and the evaluation function is recorded as B ( vi ) pursue .

移动公式为:The moving formula is:

否则选择其他行为。Otherwise choose other behavior.

随机:随机行为是觅食行为的一个缺省行为,人工鱼随机地选择状态或伙伴,评价函数记作B(vi)random。移动公式为:Random: Random behavior is a default behavior of foraging behavior. The artificial fish randomly selects a state or a partner, and the evaluation function is denoted as B( vi ) random . The moving formula is:

人工鱼进行下一步行为的预判断后,选择使得评价函数取最小值的行为,即After pre-judging the next behavior, the artificial fish selects the behavior that makes the evaluation function take the minimum value, that is,

min(B(vi)forage,B(vi)bunching,B(vi)pursue,B(vi)random)。min(B(v i ) forage , B(vi i ) bunching , B(vi i ) pursue , B(vi i ) random ).

步骤5:当最终出口的疏散人数等于总人数时疏散过程结束,导出疏散路径。Step 5: When the number of evacuees at the final exit is equal to the total number of people, the evacuation process ends, and the evacuation path is derived.

即,当从最终出口出来的人数等于总人数时结束,如图6所示。That is, it ends when the number of people coming out of the final exit is equal to the total number of people, as shown in FIG. 6 .

实施例二Embodiment 2

本实施例的目的是提供一种计算装置。The purpose of this embodiment is to provide a computing device.

一种计算装置,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现以下步骤,包括:A computing device, comprising a memory, a processor and a computer program stored in the memory and running on the processor, the processor implements the following steps when executing the program, including:

根据疏散场景平面图建立拓扑地图,其中,结点表示疏散出口,连线表示两个出口连通,并且标记最终出口;Establish a topology map according to the plan of the evacuation scene, wherein the node represents the evacuation exit, the connection line represents the connection between the two exits, and the final exit is marked;

根据视频数据对疏散人群的个体进行检测和跟踪,获得疏散人群的个体实时速度;Detect and track the individuals of the evacuated crowd according to the video data, and obtain the real-time speed of the individual evacuated crowd;

采用所述个体实时速度表示鱼群进食行为中的进食速度,初始化鱼群,以场景的最终出口位置表示食物,基于人工鱼群算法对疏散人群个体进行路径规划;The individual real-time speed is used to represent the feeding speed in the feeding behavior of the fish school, the fish school is initialized, the food is represented by the final exit position of the scene, and the path planning for the evacuated crowd individuals is carried out based on the artificial fish swarm algorithm;

当最终出口的疏散人数等于总人数时疏散过程结束,得到疏散路径。When the number of evacuees at the final exit is equal to the total number of people, the evacuation process ends, and the evacuation path is obtained.

实施例三Embodiment 3

本实施例的目的是提供一种计算机可读存储介质。The purpose of this embodiment is to provide a computer-readable storage medium.

一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时执行以下步骤:A computer-readable storage medium on which a computer program is stored, the program executes the following steps when executed by a processor:

根据疏散场景平面图建立拓扑地图,其中,结点表示疏散出口,连线表示两个出口连通,并且标记最终出口;Establish a topology map according to the plan of the evacuation scene, wherein the node represents the evacuation exit, the connection line represents the connection between the two exits, and the final exit is marked;

根据视频数据对疏散人群的个体进行检测和跟踪,获得疏散人群的个体实时速度;Detect and track the individuals of the evacuated crowd according to the video data, and obtain the real-time speed of the individual evacuated crowd;

采用所述个体实时速度表示鱼群进食行为中的进食速度,初始化鱼群,以场景的最终出口位置表示食物,基于人工鱼群算法对疏散人群个体进行路径规划;The individual real-time speed is used to represent the feeding speed in the feeding behavior of the fish school, the fish school is initialized, the food is represented by the final exit position of the scene, and the path planning for the evacuated crowd individuals is carried out based on the artificial fish swarm algorithm;

当最终出口的疏散人数等于总人数时疏散过程结束,得到疏散路径。When the number of evacuees at the final exit is equal to the total number of people, the evacuation process ends, and the evacuation path is obtained.

以上实施例二和三中涉及的各步骤与方法实施例一相对应,具体实施方式可参见实施例一的相关说明部分。术语“计算机可读存储介质”应该理解为包括一个或多个指令集的单个介质或多个介质;还应当被理解为包括任何介质,所述任何介质能够存储、编码或承载用于由处理器执行的指令集并使处理器执行本发明中的任一方法。The steps involved in Embodiments 2 and 3 above correspond to Embodiment 1 of the method, and the specific implementation can refer to the relevant description part of Embodiment 1. The term "computer-readable storage medium" should be understood to include a single medium or multiple media including one or more sets of instructions; it should also be understood to include any medium capable of storing, encoding or carrying for use by a processor The executed instruction set causes the processor to perform any of the methods of the present invention.

本发明的有益效果The beneficial effects of the present invention

(1)本发明将复杂环境用拓扑地图表示出来,简洁地表示了区域之间的连通性问题,能直观地反映疏散的过程及路径。(1) The present invention expresses the complex environment with a topology map, succinctly expresses the connectivity problem between regions, and can intuitively reflect the evacuation process and path.

(2)本发明考虑到实际疏散中老人小孩和残疾人群与正常人群的速度差异,将行人速度作为选择疏散结点的重要指标,利用RCNN和粒子滤波器对行人运动检测跟踪,能获得行人实时速度,反映出口疏散的真实情况,为疏散结点的选择提供依据,照顾到了疏散中的弱势群体,同时避免了出口拥堵加剧,提高了疏散效率。(2) The present invention takes into account the speed difference between the elderly, children, disabled groups and normal people in actual evacuation, takes pedestrian speed as an important index for selecting evacuation nodes, uses RCNN and particle filter to detect and track pedestrian motion, and can obtain real-time pedestrians. The speed reflects the real situation of exit evacuation, provides a basis for the selection of evacuation nodes, takes care of vulnerable groups during evacuation, avoids the aggravation of exit congestion, and improves evacuation efficiency.

(3)本发明利用鱼群算法模拟疏散过程,有较快的寻优速度和良好的全局寻优能力。通过引入对进食速度的判断,人工鱼在选择下一个结点时,除了要考虑该位置的伙伴拥挤度,还要考虑伙伴进食速度的问题。相对应于人群疏散中,行人在选择下一个位置时,考虑行人速度差异对疏散效率的影响,选择使目标函数得到最优值的行为,展现了一种高效的寻优方法。(3) The present invention uses the fish swarm algorithm to simulate the evacuation process, and has a faster optimization speed and a good global optimization ability. By introducing the judgment of the feeding speed, when the artificial fish selects the next node, in addition to considering the crowding degree of the partner at the location, it should also consider the feeding speed of the partner. Corresponding to the crowd evacuation, when pedestrians choose the next position, considering the influence of pedestrian speed difference on the evacuation efficiency, the behavior of choosing the optimal value of the objective function shows an efficient optimization method.

本领域技术人员应该明白,上述本发明的各模块或各步骤可以用通用的计算机装置来实现,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。本发明不限制于任何特定的硬件和软件的结合。Those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by the computing device, so that they can be stored in a storage device. The device is executed by a computing device, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps in them are fabricated into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.

以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the protection scope of this application.

上述虽然结合附图对本发明的具体实施方式进行了描述,但并非对本发明保护范围的限制,所属领域技术人员应该明白,在本发明的技术方案的基础上,本领域技术人员不需要付出创造性劳动即可做出的各种修改或变形仍在本发明的保护范围以内。Although the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, they do not limit the scope of protection of the present invention. Those skilled in the art should understand that on the basis of the technical solutions of the present invention, those skilled in the art do not need to pay creative work. Various modifications or variations that can be made are still within the protection scope of the present invention.

Claims (7)

1.一种基于人工鱼群算法与目标检测的人群仿真疏散方法,其特征在于,包括以下步骤:1. a crowd simulation evacuation method based on artificial fish swarm algorithm and target detection, is characterized in that, comprises the following steps: 根据疏散场景平面图建立拓扑地图,其中,结点表示疏散出口,连线表示两个出口连通,并且标记最终出口;Establish a topology map according to the plan of the evacuation scene, wherein the node represents the evacuation exit, the connection line represents the connection between the two exits, and the final exit is marked; 根据视频数据对疏散人群的个体进行检测和跟踪,获得疏散人群的个体实时速度;Detect and track the individuals of the evacuated crowd according to the video data, and obtain the real-time speed of the individual evacuated crowd; 采用所述个体实时速度表示鱼群进食行为中的进食速度,初始化鱼群,以场景的最终出口位置表示食物,基于人工鱼群算法对疏散人群个体进行路径规划;The individual real-time speed is used to represent the feeding speed in the feeding behavior of the fish school, the fish school is initialized, the food is represented by the final exit position of the scene, and the path planning for the evacuated crowd individuals is carried out based on the artificial fish swarm algorithm; 当最终出口的疏散人数等于总人数时疏散过程结束,得到疏散路径;When the number of evacuees at the final exit is equal to the total number of people, the evacuation process ends, and the evacuation path is obtained; 所述基于人工鱼群算法对疏散人群个体进行路径规划包括:The path planning for individual evacuated crowds based on the artificial fish swarm algorithm includes: 初始化鱼群,包括人工鱼的编号、所在位置、视野范围、移动步长以及个体的进食速度;Initialize the fish school, including the number, location, field of view, moving step and individual feeding speed of the artificial fish; 对于每个个体,根据可选择的出口到最终出口的距离、可选择的出口位置的拥挤度和进食速度较快的个体数目,确定个体的下一个位置;其中,采用速度低于一定阈值的行人表示所述进食速度较快的个体;For each individual, the next position of the individual is determined according to the distance from the selectable exit to the final exit, the crowding degree of the selectable exit location, and the number of individuals with faster eating speed; among them, pedestrians whose speed is lower than a certain threshold are used Indicates that the individual who eats faster; 所述确定个体的下一个位置包括:The determination of the next location of the individual includes: 对于每个个体,预先判断所述个体在当前位置发生不同行为时选定的下一出口,根据选定的所述下一出口到最终疏散出口的距离、拥挤度和进食速度较快的个体数目分别计算评价函数;所述评价函数为:For each individual, pre-judging the next exit selected when the individual has different behaviors at the current location, according to the distance from the selected next exit to the final evacuation exit, the degree of crowding and the number of individuals with faster eating speed Calculate the evaluation function separately; the evaluation function is: B(vi)=μDis(vi)+λδ+ωNums B(vi )= μDis (vi )+ λδ +ωNum s 其中,下一出口到最终出口的距离Yi表示所述下一出口vi所在位置的食物浓度;δ表示拥挤度因子;Nums表示所述下一出口进食速度较快的个体的数目;μ、λ和ω表示权重系数,μ+λ+ω=1;Among them, the distance from the next exit to the final exit Y i represents the food concentration at the location of the next outlet vi; δ represents the crowding factor; Num s represents the number of individuals who eat faster at the next outlet; μ, λ and ω represent the weight coefficient, μ+ λ+ω=1; 选择评价函数最小的行为执行个体的移动。Select the behavior with the smallest evaluation function to perform the movement of the individual. 2.如权利要求1所述的一种基于人工鱼群算法与目标检测的人群仿真疏散方法,其特征在于,获得疏散人群的个体实时速度包括:2. a kind of crowd simulation evacuation method based on artificial fish swarm algorithm and target detection as claimed in claim 1 is characterized in that, obtaining the individual real-time speed of evacuation crowd comprises: 获取通道出口处视频数据;Get the video data at the exit of the channel; 基于RCNN检测所述视频数据中的行人目标;Detect pedestrian targets in the video data based on RCNN; 采用粒子滤波器进行行人运动的跟踪;Pedestrian motion tracking using particle filter; 对于每个行人,根据当前帧和前一帧该行人的位置差异换算实际位移;For each pedestrian, convert the actual displacement according to the position difference between the current frame and the previous frame of the pedestrian; 根据所述实际位移和视频的拍摄帧频,计算该行人的速度。According to the actual displacement and the shooting frame rate of the video, the speed of the pedestrian is calculated. 3.如权利要求2所述的一种基于人工鱼群算法与目标检测的人群仿真疏散方法,其特征在于,所述基于RCNN检测所述视频数据中的行人目标包括:3. a kind of crowd simulation evacuation method based on artificial fish swarm algorithm and target detection as claimed in claim 2, is characterized in that, described based on RCNN detects the pedestrian target in described video data comprises: 使用二值归一化梯度算法选取目标候选区域;Use the binary normalized gradient algorithm to select target candidate regions; 采用卷积神经网络对候选区域内进行特征提取;其中,所述卷积神经网络选用包含5个卷积层和3个全连接层的网络结构;A convolutional neural network is used to extract features in the candidate area; wherein, the convolutional neural network selects a network structure comprising 5 convolutional layers and 3 fully connected layers; 提取后的特征采用支持向量机进行分类,识别所述候选区域为行人目标还是背景。The extracted features are classified by a support vector machine to identify whether the candidate region is a pedestrian target or a background. 4.如权利要求1所述的一种基于人工鱼群算法与目标检测的人群仿真疏散方法,其特征在于,所述行为包括觅食、聚群、追尾和随机行为。4 . A crowd simulation evacuation method based on artificial fish swarm algorithm and target detection according to claim 1 , wherein the behaviors include foraging, swarming, tail-chasing and random behaviors. 5 . 5.如权利要求4所述的一种基于人工鱼群算法与目标检测的人群仿真疏散方法,其特征在于,发生觅食、聚群、追尾行为的移动公式为:5. a kind of crowd simulation evacuation method based on artificial fish swarm algorithm and target detection as claimed in claim 4, is characterized in that, the movement formula that occurs foraging, swarming, rear-chasing behavior is: 执行随机行为的移动公式为:The move formula to perform random behavior is: 其中,rand()为随机函数,取值为0~1;表示个体当前所处位置,Xj表示目标个体所在出口位置,表示个体移动后的位置;step表示移动步长;Visual为个体的可见范围。Among them, rand() is a random function with a value of 0 to 1; represents the current position of the individual, X j represents the exit position of the target individual, Represents the position of the individual after moving; step represents the moving step; Visual is the visible range of the individual. 6.一种计算装置,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现如权利要求1-5任一项所述的基于人工鱼群算法与目标检测的人群仿真疏散方法。6. A computing device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements any one of claims 1-5 when the processor executes the program The crowd simulation evacuation method based on artificial fish swarm algorithm and target detection described in item. 7.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-5任一项所述的基于人工鱼群算法与目标检测的人群仿真疏散方法。7. A computer-readable storage medium on which a computer program is stored, characterized in that, when the program is executed by the processor, the artificial fish swarm algorithm and target detection based on any one of claims 1-5 are realized. Crowd simulation evacuation method.
CN201811030222.2A 2018-09-05 2018-09-05 Crowd simulation evacuation method and device based on artificial fish-swarm algorithm and target detection Expired - Fee Related CN109242183B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811030222.2A CN109242183B (en) 2018-09-05 2018-09-05 Crowd simulation evacuation method and device based on artificial fish-swarm algorithm and target detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811030222.2A CN109242183B (en) 2018-09-05 2018-09-05 Crowd simulation evacuation method and device based on artificial fish-swarm algorithm and target detection

Publications (2)

Publication Number Publication Date
CN109242183A CN109242183A (en) 2019-01-18
CN109242183B true CN109242183B (en) 2019-06-28

Family

ID=65060509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811030222.2A Expired - Fee Related CN109242183B (en) 2018-09-05 2018-09-05 Crowd simulation evacuation method and device based on artificial fish-swarm algorithm and target detection

Country Status (1)

Country Link
CN (1) CN109242183B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111066698B (en) * 2020-01-14 2024-07-26 清华大学 Square combined multi-layer experimental device for simulating crowd flow of zebra fish
CN111709281A (en) * 2020-05-06 2020-09-25 北京图创时代科技有限公司武汉分公司 Intelligent security auxiliary system
CN113221379A (en) * 2021-05-28 2021-08-06 视伴科技(北京)有限公司 Method and device for planning number of viewing seats of event activity
CN114332170B (en) * 2021-12-24 2022-11-18 哈尔滨商业大学 Novel capital construction site safety monitoring system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103679264B (en) * 2013-12-23 2016-08-17 山东师范大学 Crowd evacuation paths planning method based on artificial fish-swarm algorithm
CN105468801A (en) * 2014-09-09 2016-04-06 中国科学院深圳先进技术研究院 Simulation method and system for crowd evacuation in public place
CN107194030B (en) * 2017-04-20 2020-05-29 山东师范大学 Crowd evacuation simulation method and system based on video data driving
CN107665269B (en) * 2017-08-11 2021-01-08 山东师范大学 Simulation method and device for rapid crowd evacuation based on geographic information
CN107679306B (en) * 2017-09-26 2018-09-25 山东师范大学 The crowd evacuation behavior simulation method and system of video drive

Also Published As

Publication number Publication date
CN109242183A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
CN109242183B (en) Crowd simulation evacuation method and device based on artificial fish-swarm algorithm and target detection
CN109559320B (en) Method and system for implementing visual SLAM semantic mapping function based on dilated convolutional deep neural network
CN111814683B (en) Robust visual SLAM method based on semantic prior and deep learning features
CN111626128B (en) A Pedestrian Detection Method Based on Improved YOLOv3 in Orchard Environment
CN113485375B (en) Indoor environment robot exploration method based on heuristic bias sampling
CN113110482B (en) Indoor environment robot exploration method and system based on priori information heuristic method
CN112949508B (en) Model training method, pedestrian detection method, electronic device, and readable storage medium
WO2023082882A1 (en) Pose estimation-based pedestrian fall action recognition method and device
CN106991408A (en) The generation method and method for detecting human face of a kind of candidate frame generation network
CN109685037A (en) A kind of real-time action recognition methods, device and electronic equipment
KR20170140228A (en) Merging top-down information in deep neural networks through bias terms
CN110221290B (en) UAV target search construction method based on ant colony algorithm optimization
WO2020042126A1 (en) Focusing apparatus, method and related device
CN117979487A (en) LED light intelligent control method, system and computer equipment
CN114373225A (en) Behavior recognition method and system based on human skeleton
CN111291646A (en) A method, device, equipment and storage medium for people flow statistics
CN109740455B (en) A crowd evacuation simulation method and device
Batool et al. Telemonitoring of daily activities based on multi-sensors data fusion
CN117935031B (en) A salient object detection method integrating hybrid attention
CN116795098A (en) Spherical amphibious robot path planning method based on improved sparrow search algorithm
JP2024159396A (en) A smart cruise detection method for unmanned aerial vehicles based on binary cooperative feedback
Sheeba et al. Hybrid features-enabled dragon deep belief neural network for activity recognition
CN114723782A (en) A moving target perception method in traffic scene based on heterogeneous graph learning
Cruz et al. Hand detection using deformable part models on an egocentric perspective
Wang et al. Research on improved pedestrian detection algorithm based on Convolutional Neural Network

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190628