CN110738169B - Traffic flow monitoring method, device, equipment and computer readable storage medium - Google Patents
Traffic flow monitoring method, device, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN110738169B CN110738169B CN201910975456.2A CN201910975456A CN110738169B CN 110738169 B CN110738169 B CN 110738169B CN 201910975456 A CN201910975456 A CN 201910975456A CN 110738169 B CN110738169 B CN 110738169B
- Authority
- CN
- China
- Prior art keywords
- vehicle
- remote sensing
- interest
- sensing image
- traffic flow
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 51
- 238000012544 monitoring process Methods 0.000 title claims abstract description 51
- 238000001514 detection method Methods 0.000 claims abstract description 142
- 230000011218 segmentation Effects 0.000 claims abstract description 37
- 238000012549 training Methods 0.000 claims abstract description 16
- 238000012806 monitoring device Methods 0.000 claims description 19
- 230000008859 change Effects 0.000 claims description 12
- 238000004364 calculation method Methods 0.000 claims description 9
- 239000000284 extract Substances 0.000 claims description 9
- 238000000605 extraction Methods 0.000 claims description 5
- 230000008569 process Effects 0.000 description 11
- 238000004891 communication Methods 0.000 description 8
- 238000004458 analytical method Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 3
- 238000010276 construction Methods 0.000 description 2
- 238000009434 installation Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 108010001267 Protein Subunits Proteins 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000011176 pooling Methods 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000017105 transposition Effects 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/10—Terrestrial scenes
- G06V20/13—Satellite images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
- G06V10/267—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/52—Surveillance or monitoring of activities, e.g. for recognising suspicious objects
- G06V20/53—Recognition of crowd images, e.g. recognition of crowd congestion
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- General Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Biophysics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Astronomy & Astrophysics (AREA)
- Remote Sensing (AREA)
- Traffic Control Systems (AREA)
Abstract
Description
技术领域Technical field
本发明涉及智能交通技术领域,尤其涉及一种车流量监测方法、装置、设备及计算机可读存储介质。The invention relates to the field of intelligent transportation technology, and in particular to a traffic flow monitoring method, device, equipment and computer-readable storage medium.
背景技术Background technique
随着社会的发展和科技的进步,人民的生活水平得到很大提升,汽车拥有量大幅提升,交通拥堵现象日趋严重,因此,如何高效地进行交通管理,就显得十分重要,其中,车流量是交通管理中的重要交通参数,传统的车流量监测技术,如环形线圈法,需在路面上安装线圈感应器,对路面有损坏,施工和安装不便,且只能感应出经过安装有线圈感应器的固定位置的车辆,不仅便利性差,而且准确性较低。With the development of society and the advancement of science and technology, people's living standards have been greatly improved, car ownership has increased significantly, and traffic congestion has become increasingly serious. Therefore, how to effectively manage traffic is very important. Among them, traffic flow is Important traffic parameters in traffic management, traditional traffic flow monitoring technology, such as the ring coil method, requires the installation of coil sensors on the road surface, which causes damage to the road surface, is inconvenient in construction and installation, and can only sense the passing of the coil sensor installed Fixed-position vehicles are not only less convenient but also less accurate.
发明内容Contents of the invention
本发明的主要目的在于提供一种车流量监测方法、装置、设备及计算机可读存储介质,旨在解决现有车流量监测技术便利性差且准确性较低的技术问题。The main purpose of the present invention is to provide a traffic flow monitoring method, device, equipment and computer-readable storage medium, aiming to solve the technical problems of poor convenience and low accuracy of existing traffic flow monitoring technology.
为实现上述目的,本发明提供一种车流量监测方法,所述方法包括以下步骤:To achieve the above objectives, the present invention provides a traffic flow monitoring method, which method includes the following steps:
采集检测区域的第一遥感图像,并在预设间隔时间后采集所述检测区域的第二遥感图像;Collect the first remote sensing image of the detection area, and collect the second remote sensing image of the detection area after a preset interval;
通过训练完成的语义分割模型,分别从所述第一遥感图像中提取第一感兴趣区域、从所述第二遥感图像中提取第二感兴趣区域;Using the trained semantic segmentation model, a first region of interest is extracted from the first remote sensing image and a second region of interest is extracted from the second remote sensing image;
通过训练完成的遥感目标检测模型,分别对所述第一感兴趣区域和所述第二感兴趣区域进行目标检测,以获取所述第一感兴趣区域中的第一车辆信息和所述第二感兴趣区域中的第二车辆信息;Through the trained remote sensing target detection model, target detection is performed on the first area of interest and the second area of interest respectively to obtain the first vehicle information and the second area of interest in the first area of interest. Second vehicle information in the area of interest;
根据所述第一车辆信息和所述第二车辆信息,确定所述检测区域在所述预设间隔时间内的车流量信息。According to the first vehicle information and the second vehicle information, the traffic flow information of the detection area within the preset interval is determined.
可选地,所述通过训练完成的语义分割模型,分别从所述第一遥感图像中提取第一感兴趣区域、从所述第二遥感图像中提取第二感兴趣区域的步骤包括:Optionally, for the semantic segmentation model completed through training, the steps of respectively extracting the first region of interest from the first remote sensing image and extracting the second region of interest from the second remote sensing image include:
将所述第一遥感图像输入至训练完成的语义分割模型,以从所述第一遥感图像中识别出道路骨架,作为第一感兴趣区域;Input the first remote sensing image to the trained semantic segmentation model to identify the road skeleton from the first remote sensing image as the first region of interest;
将所述第二遥感图像输入至训练完成的语义分割模型,以从所述第二遥感图像中识别出道路骨架,作为第二感兴趣区域。The second remote sensing image is input to the trained semantic segmentation model to identify the road skeleton from the second remote sensing image as the second region of interest.
可选地,所述通过训练完成的遥感目标检测模型,分别对所述第一感兴趣区域和所述第二感兴趣区域进行目标检测,以获取所述第一感兴趣区域中的第一车辆信息和所述第二感兴趣区域中的第二车辆信息的步骤包括:Optionally, the remote sensing target detection model completed through training performs target detection on the first area of interest and the second area of interest respectively to obtain the first vehicle in the first area of interest. The steps of obtaining information and second vehicle information in the second area of interest include:
将所述第一感兴趣区域输入至训练完成的遥感目标检测模型中进行目标检测,以从所述第一感兴趣区域中识别出第一车辆及其类型,以及,将所述第二感兴趣区域输入至训练完成的遥感目标检测模型中进行目标检测,以从所述第二感兴趣区域中识别出第二车辆及其类型;The first region of interest is input into the trained remote sensing target detection model for target detection to identify the first vehicle and its type from the first region of interest, and the second region of interest is The area is input into the trained remote sensing target detection model for target detection to identify the second vehicle and its type from the second area of interest;
确定第一车辆在所述第一遥感图像中的坐标信息,并统计第一车辆的总数,以及,确定第二车辆在所述第二遥感图像中的坐标信息,并统计第二车辆的总数;Determine the coordinate information of the first vehicle in the first remote sensing image, and count the total number of first vehicles, and determine the coordinate information of the second vehicle in the second remote sensing image, and count the total number of second vehicles;
将第一车辆的所述坐标信息和类型、第一车辆的总数确定为第一车辆信息,以及,将第二车辆的所述坐标信息和类型、第二车辆的总数确定为第二车辆信息。The coordinate information and type of the first vehicle and the total number of first vehicles are determined as first vehicle information, and the coordinate information and type of the second vehicle and the total number of second vehicles are determined as second vehicle information.
可选地,所述根据所述第一车辆信息和所述第二车辆信息,确定所述检测区域在所述预设间隔时间内的车流量信息的步骤包括:Optionally, the step of determining the traffic flow information of the detection area within the preset interval based on the first vehicle information and the second vehicle information includes:
根据第一车辆的所述坐标信息计算第一车辆在所述第一遥感图像中的中心坐标,以及,根据第二车辆的所述坐标信息计算第二车辆在所述第二遥感图像中的中心坐标;Calculate the center coordinates of the first vehicle in the first remote sensing image based on the coordinate information of the first vehicle, and calculate the center coordinates of the second vehicle in the second remote sensing image based on the coordinate information of the second vehicle coordinate;
根据第一车辆的所述中心坐标和第二车辆的所述中心坐标,计算所述检测区域在所述预设间隔时间内的车流速度;Calculate the traffic speed of the detection area within the preset interval according to the center coordinate of the first vehicle and the center coordinate of the second vehicle;
将第一车辆的类型与第二车辆的类型、第一车辆的总数与第二车辆的总数分别进行比对,得到车流变化量;Compare the type of the first vehicle with the type of the second vehicle, and the total number of the first vehicle with the total number of the second vehicle respectively to obtain the traffic flow change amount;
将所述车流变化量和计算的所述车流速度,确定为所述检测区域在所述预设间隔时间内的车流量信息。The traffic flow change amount and the calculated traffic flow speed are determined as the traffic flow information of the detection area within the preset interval.
可选地,所述根据第一车辆的所述中心坐标和第二车辆的所述中心坐标,计算所述检测区域在所述预设间隔时间内的车流速度的步骤包括:Optionally, the step of calculating the traffic speed of the detection area within the preset interval based on the center coordinates of the first vehicle and the center coordinates of the second vehicle includes:
根据第一车辆的所述中心坐标,计算所述第一遥感图像中所有第一车辆的整体中心坐标,以及,根据第二车辆的所述中心坐标,计算所述第二遥感图像中所有第二车辆的整体中心坐标;According to the center coordinates of the first vehicle, the overall center coordinates of all first vehicles in the first remote sensing image are calculated, and based on the center coordinates of the second vehicle, all second remote sensing images in the second remote sensing image are calculated. The overall center coordinates of the vehicle;
获取所述第一遥感图像或所述第二遥感图像的缩放比例;Obtain the zoom ratio of the first remote sensing image or the second remote sensing image;
根据第一车辆的所述整体中心坐标和第二车辆的所述整体中心坐标,以及,所述缩放比例,计算所述检测区域在所述预设间隔时间内的车流速度。According to the overall center coordinate of the first vehicle and the overall center coordinate of the second vehicle, and the scaling ratio, the traffic flow speed of the detection area within the preset interval is calculated.
可选地,所述采集检测区域的第一遥感图像,并在预设间隔时间后采集所述检测区域的第二遥感图像的步骤之前,包括:Optionally, before the step of collecting the first remote sensing image of the detection area and collecting the second remote sensing image of the detection area after a preset interval, the step includes:
训练语义分割模型,得到训练完成的语义分割模型,以及,训练遥感目标检测模型,得到训练完成的遥感目标检测模型。Train the semantic segmentation model to obtain the trained semantic segmentation model, and train the remote sensing target detection model to obtain the trained remote sensing target detection model.
可选地,所述根据第一车辆的所述整体中心坐标和第二车辆的所述整体中心坐标,以及,所述缩放比例,计算所述检测区域在所述预设间隔时间内的车流速度的步骤包括:Optionally, the traffic flow speed of the detection area within the preset interval is calculated based on the overall center coordinate of the first vehicle and the overall center coordinate of the second vehicle, and the scaling ratio. The steps include:
根据第一车辆的所述整体中心坐标和第二车辆的所述整体中心坐标,计算基于遥感图像的车流速度;Calculate the traffic flow speed based on the remote sensing image according to the overall center coordinate of the first vehicle and the overall center coordinate of the second vehicle;
计算所述基于遥感图像的车流速度与所述缩放比例的乘积,得到所述检测区域在所述预设间隔时间内的车流速度。Calculate the product of the traffic flow speed based on the remote sensing image and the scaling ratio to obtain the traffic flow speed of the detection area within the preset interval.
此外,为实现上述目的,本发明还提供一种车流量监测装置,所述车流量监测装置包括:In addition, to achieve the above object, the present invention also provides a vehicle flow monitoring device, which includes:
采集模块,用于采集检测区域的第一遥感图像,并在预设间隔时间后采集所述检测区域的第二遥感图像;An acquisition module, configured to collect the first remote sensing image of the detection area, and collect the second remote sensing image of the detection area after a preset interval;
提取模块,用于通过训练完成的语义分割模型,分别从所述第一遥感图像中提取第一感兴趣区域、从所述第二遥感图像中提取第二感兴趣区域;An extraction module, configured to extract a first region of interest from the first remote sensing image and a second region of interest from the second remote sensing image using the semantic segmentation model completed through training;
检测模块,用于通过训练完成的遥感目标检测模型,分别对所述第一感兴趣区域和所述第二感兴趣区域进行目标检测,以获取所述第一感兴趣区域中的第一车辆信息和所述第二感兴趣区域中的第二车辆信息;A detection module, configured to perform target detection on the first area of interest and the second area of interest through the trained remote sensing target detection model to obtain the first vehicle information in the first area of interest. and second vehicle information in the second area of interest;
确定模块,用于根据所述第一车辆信息和所述第二车辆信息,确定所述检测区域在所述预设间隔时间内的车流量信息。A determining module, configured to determine the traffic flow information of the detection area within the preset interval according to the first vehicle information and the second vehicle information.
此外,为实现上述目的,本发明还提供一种车流量监测设备,所述车流量监测设备包括处理器、存储器、以及存储在所述存储器上并可被所述处理器执行的交通数据的可视化程序,其中所述车流量监测程序被所述处理器执行时,实现如上所述的车流量监测方法的步骤。In addition, to achieve the above object, the present invention also provides a traffic flow monitoring device, which includes a processor, a memory, and visualization of traffic data stored on the memory and executed by the processor. Program, wherein when the traffic flow monitoring program is executed by the processor, the steps of the traffic flow monitoring method as described above are implemented.
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有车流量监测程序,所述车流量监测程序被处理器执行时实现如上所述的车流量监测方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a traffic flow monitoring program. When the traffic flow monitoring program is executed by a processor, the above-mentioned steps are implemented. Steps of the traffic flow monitoring method.
本发明提供一种车流量监测方法、装置、设备及计算机可读存储介质,采集检测区域的第一遥感图像,并在预设间隔时间后采集所述检测区域的第二遥感图像;通过训练完成的语义分割模型,分别从所述第一遥感图像中提取第一感兴趣区域、从所述第二遥感图像中提取第二感兴趣区域;通过训练完成的遥感目标检测模型,分别对所述第一感兴趣区域和所述第二感兴趣区域进行目标检测,以获取所述第一感兴趣区域中的第一车辆信息和所述第二感兴趣区域中的第二车辆信息;根据所述第一车辆信息和所述第二车辆信息,确定所述检测区域在所述预设间隔时间内的车流量信息。本发明通过训练完成的语义分割模型和遥感目标检测模型,对检测区域的遥感图像进行分析,为车流量的监测提供了较为详细的分析依据,提升了车流量监测的便利性和准确性。The invention provides a traffic flow monitoring method, device, equipment and computer-readable storage medium, which collects the first remote sensing image of the detection area, and collects the second remote sensing image of the detection area after a preset interval; it is completed through training The semantic segmentation model extracts the first region of interest from the first remote sensing image and the second region of interest from the second remote sensing image respectively; through the trained remote sensing target detection model, the first region of interest is extracted from the first remote sensing image and the second region of interest is extracted from the second remote sensing image respectively. performing target detection on a region of interest and the second region of interest to obtain first vehicle information in the first region of interest and second vehicle information in the second region of interest; according to the first One vehicle information and the second vehicle information determine the traffic flow information of the detection area within the preset interval. The present invention analyzes the remote sensing images of the detection area through the trained semantic segmentation model and remote sensing target detection model, provides a more detailed analysis basis for the monitoring of traffic flow, and improves the convenience and accuracy of traffic flow monitoring.
附图说明Description of the drawings
图1是本发明实施例方案涉及的车流量监测设备的硬件结构示意图;Figure 1 is a schematic diagram of the hardware structure of the traffic flow monitoring equipment involved in the embodiment of the present invention;
图2为本发明车流量监测方法第一实施例的流程示意图;Figure 2 is a schematic flow chart of the first embodiment of the traffic flow monitoring method of the present invention;
图3为本发明车流量监测方法第一实施例的实现方式示例流程图;Figure 3 is an example flow chart of the implementation of the first embodiment of the traffic flow monitoring method of the present invention;
图4为本发明本发明车流量监测装置第一实施例的功能模块示意图。Figure 4 is a functional module schematic diagram of the first embodiment of the traffic flow monitoring device of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose, functional features and advantages of the present invention will be further described with reference to the embodiments and the accompanying drawings.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention and are not intended to limit the present invention.
本发明实施例的主要解决方案是:采集检测区域的第一遥感图像,并在预设间隔时间后采集所述检测区域的第二遥感图像;通过训练完成的语义分割模型,分别从所述第一遥感图像中提取第一感兴趣区域、从所述第二遥感图像中提取第二感兴趣区域;通过训练完成的遥感目标检测模型,分别对所述第一感兴趣区域和所述第二感兴趣区域进行目标检测,以获取所述第一感兴趣区域中的第一车辆信息和所述第二感兴趣区域中的第二车辆信息;根据所述第一车辆信息和所述第二车辆信息,确定所述检测区域在所述预设间隔时间内的车流量信息。以解决现有车流量监测技术便利性差且准确性较低的技术问题。The main solution of the embodiment of the present invention is to: collect the first remote sensing image of the detection area, and collect the second remote sensing image of the detection area after a preset interval; through the semantic segmentation model completed through training, respectively from the first remote sensing image of the detection area. Extract the first area of interest from a remote sensing image and extract the second area of interest from the second remote sensing image; through the trained remote sensing target detection model, respectively detect the first area of interest and the second sensing area. Perform target detection in the area of interest to obtain first vehicle information in the first area of interest and second vehicle information in the second area of interest; according to the first vehicle information and the second vehicle information , determine the traffic flow information of the detection area within the preset interval. To solve the technical problems of poor convenience and low accuracy of existing traffic flow monitoring technology.
如图1所示,图1是本发明实施例方案涉及的硬件运行环境的终端结构示意图。As shown in Figure 1, Figure 1 is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.
本发明实施例涉及的车流量监测方法可以由车流量监测设备实现,该车流量监测设备可以是PC、服务器等具有数据处理功能的设备。The traffic flow monitoring method involved in the embodiment of the present invention can be implemented by a traffic flow monitoring device. The traffic flow monitoring device can be a PC, a server, or other equipment with data processing functions.
参照图1,图1为本发明实施例方案中涉及的车流量监测设备的硬件结构示意图。本发明实施例中,车流量监测设备可以包括处理器1001(例如中央处理器CentralProcessing Unit、CPU),通信总线1002,用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信;用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard);网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口);存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器,存储器1005可选的还可以是独立于前述处理器1001的存储装置。本领域技术人员可以理解,图1中示出的硬件结构并不构成对本发明的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Referring to Figure 1, Figure 1 is a schematic diagram of the hardware structure of the traffic flow monitoring equipment involved in the embodiment of the present invention. In the embodiment of the present invention, the traffic flow monitoring device may include a processor 1001 (such as a central processing unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize connection and communication between these components; the user interface 1003 can include a display screen (Display) and an input unit such as a keyboard (Keyboard); the network interface 1004 can optionally include a standard wired interface and a wireless interface. (such as WI-FI interface); the memory 1005 can be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 can optionally be a storage device independent of the aforementioned processor 1001 . Those skilled in the art can understand that the hardware structure shown in Figure 1 does not limit the present invention, and may include more or fewer components than shown, or combine certain components, or arrange different components.
继续参照图1,图1中作为一种可读存储介质的存储器1005可以包括操作系统、网络通信模块以及车流量监测程序。在图1中,网络通信模块主要用于连接服务器,与服务器进行数据通信;而处理器1001可以调用存储器1005中存储的车流量监测程序,并执行本发明实施例提供的车流量监测方法。Continuing to refer to FIG. 1 , the memory 1005 as a readable storage medium in FIG. 1 may include an operating system, a network communication module, and a traffic flow monitoring program. In Figure 1, the network communication module is mainly used to connect to the server and perform data communication with the server; and the processor 1001 can call the traffic flow monitoring program stored in the memory 1005 and execute the traffic flow monitoring method provided by the embodiment of the present invention.
本发明实施例提供了一种车流量监测方法。The embodiment of the present invention provides a traffic flow monitoring method.
参照图2,图2为本发明车流量监测方法第一实施例的流程示意图。Referring to Figure 2, Figure 2 is a schematic flow chart of the first embodiment of the traffic flow monitoring method of the present invention.
本实施例中,该车流量监测方法由车流量监测设备实现,该车流量监测设备可以是PC、服务器等终端设备,可选为图1所示的设备,车流量监测设备与遥感设备建立有通信连接,可对遥感设备进行控制,该车流量监测方法包括以下步骤:In this embodiment, the traffic flow monitoring method is implemented by traffic flow monitoring equipment. The traffic flow monitoring equipment can be a terminal device such as a PC or a server, and can optionally be the equipment shown in Figure 1. The traffic flow monitoring equipment and the remote sensing equipment have an established relationship. Communication connection can control remote sensing equipment. The traffic flow monitoring method includes the following steps:
步骤S10,采集检测区域的第一遥感图像,并在预设间隔时间后采集所述检测区域的第二遥感图像;Step S10, collect the first remote sensing image of the detection area, and collect the second remote sensing image of the detection area after a preset interval;
步骤S20,通过训练完成的语义分割模型,分别从所述第一遥感图像中提取第一感兴趣区域、从所述第二遥感图像中提取第二感兴趣区域;Step S20: extract a first region of interest from the first remote sensing image and a second region of interest from the second remote sensing image through the trained semantic segmentation model;
步骤S30,通过训练完成的遥感目标检测模型,分别对所述第一感兴趣区域和所述第二感兴趣区域进行目标检测,以获取所述第一感兴趣区域中的第一车辆信息和所述第二感兴趣区域中的第二车辆信息;Step S30: Using the trained remote sensing target detection model, perform target detection on the first area of interest and the second area of interest respectively to obtain the first vehicle information and the first vehicle information in the first area of interest. second vehicle information in the second area of interest;
步骤S40,根据所述第一车辆信息和所述第二车辆信息,确定所述检测区域在所述预设间隔时间内的车流量信息。Step S40: Determine the traffic volume information of the detection area within the preset interval based on the first vehicle information and the second vehicle information.
在本实施例中,检测区域可以是任意路段。预先在检测区域搭建遥感设备,并建立车流量监测设备与遥感设备的通信连接,那么,车流量监测设备便可随时控制遥感设备采集检测区域的遥感图像,进而,车流量监测设备便可通过训练完成的语义分割模型和遥感目标检测模型,对采集的遥感图像进行分析,为车流量的监测提供较为详细的分析依据,从而提升车流量监测的便利性和准确性。In this embodiment, the detection area can be any road section. Set up remote sensing equipment in the detection area in advance, and establish a communication connection between the traffic flow monitoring equipment and the remote sensing equipment. Then, the traffic flow monitoring equipment can control the remote sensing equipment to collect remote sensing images of the detection area at any time. Then, the traffic flow monitoring equipment can pass the training The completed semantic segmentation model and remote sensing target detection model analyze the collected remote sensing images to provide a more detailed analysis basis for traffic flow monitoring, thus improving the convenience and accuracy of traffic flow monitoring.
步骤S10,采集检测区域的第一遥感图像,并在预设间隔时间后采集所述检测区域的第二遥感图像;Step S10, collect the first remote sensing image of the detection area, and collect the second remote sensing image of the detection area after a preset interval;
由于在实际中,在成像时间较短的两帧影像中,背景是几乎不变的,变化的部分由运动的车辆造成,因此本实施例基于物理运动学,通过分析间隔预设时间的两帧遥感影像,来获得车流量信息。Since in practice, in two frames of images with a short imaging time, the background is almost unchanged, and the changing part is caused by the moving vehicle. Therefore, this embodiment is based on physical kinematics and analyzes two frames separated by a preset time. Remote sensing images are used to obtain traffic flow information.
具体地,车流量监测设备可以实时或定时向遥感设备发送遥感图像采集指令,控制遥感设备采集检测区域的一帧遥感图像(定义为第一遥感图像),并控制遥感设备在预设间隔时间后再采集检测区域的遥感图像另一帧遥感图像(定义为第二遥感图像),其中,预设间隔时间可以根据实际需要进行灵活设置,较短即可。将第一遥感图像的采集时刻定义为T1、第二遥感图像的采集时刻定义为T2,可以理解的是,T1<T2。Specifically, the traffic flow monitoring device can send remote sensing image collection instructions to the remote sensing device in real time or regularly, control the remote sensing device to collect a frame of remote sensing image (defined as the first remote sensing image) of the detection area, and control the remote sensing device to collect a remote sensing image after a preset interval. Then collect another frame of remote sensing image of the detection area (defined as the second remote sensing image). The preset interval time can be flexibly set according to actual needs, and it can be shorter. The collection time of the first remote sensing image is defined as T1, and the collection time of the second remote sensing image is defined as T2. It can be understood that T1<T2.
步骤S20,通过训练完成的语义分割模型,分别从所述第一遥感图像中提取第一感兴趣区域、从所述第二遥感图像中提取第二感兴趣区域;Step S20: extract a first region of interest from the first remote sensing image and a second region of interest from the second remote sensing image through the trained semantic segmentation model;
之后,通过训练完成的语义分割模型,分别从第一遥感图像中提取第一感兴趣区域、从第二遥感图像中提取第二感兴趣区域。作为一种实施方式,步骤S20包括:Afterwards, through the trained semantic segmentation model, the first region of interest is extracted from the first remote sensing image and the second region of interest is extracted from the second remote sensing image. As an implementation manner, step S20 includes:
A、将所述第一遥感图像输入至训练完成的语义分割模型,以从所述第一遥感图像中识别出道路骨架,作为第一感兴趣区域;A. Input the first remote sensing image to the trained semantic segmentation model to identify the road skeleton from the first remote sensing image as the first region of interest;
B、将所述第二遥感图像输入至训练完成的语义分割模型,以从所述第二遥感图像中识别出道路骨架,作为第二感兴趣区域。B. Input the second remote sensing image to the trained semantic segmentation model to identify the road skeleton from the second remote sensing image as the second region of interest.
即,将T1时刻采集的第一遥感图像输入至训练完成语义分割模型中进行分析,以从T1时刻采集的第一遥感图像中提取道路骨架,作为第一感兴趣区域,以及,将T2时刻采集的第二遥感图像输入至语义分割模型中进行分析,以从T2时刻采集的第二遥感图像中提取道路骨架,作为第二感兴趣区域。That is, the first remote sensing image collected at time T1 is input into the trained semantic segmentation model for analysis, so as to extract the road skeleton from the first remote sensing image collected at time T1 as the first area of interest, and, collect the first remote sensing image at time T2 The second remote sensing image is input into the semantic segmentation model for analysis to extract the road skeleton from the second remote sensing image collected at time T2 as the second region of interest.
步骤S30,通过训练完成的遥感目标检测模型,分别对所述第一感兴趣区域和所述第二感兴趣区域进行目标检测,以获取所述第一感兴趣区域中的第一车辆信息和所述第二感兴趣区域中的第二车辆信息;Step S30: Using the trained remote sensing target detection model, perform target detection on the first area of interest and the second area of interest respectively to obtain the first vehicle information and the first vehicle information in the first area of interest. second vehicle information in the second area of interest;
之后,采用训练完成的遥感目标检测模型,分别对第一感兴趣区域和所第二感兴趣区域进行目标检测,以获取第一感兴趣区域中的第一车辆信息和第二感兴趣区域中的第二车辆信息。具体地,步骤S30包括:After that, the trained remote sensing target detection model is used to perform target detection on the first area of interest and the second area of interest respectively to obtain the first vehicle information in the first area of interest and the first vehicle information in the second area of interest. Second vehicle information. Specifically, step S30 includes:
C、将所述第一感兴趣区域输入至训练完成的遥感目标检测模型中进行目标检测,以从所述第一感兴趣区域中识别出第一车辆及其类型,以及,将所述第二感兴趣区域输入至训练完成的遥感目标检测模型中进行目标检测,以从所述第二感兴趣区域中识别出第二车辆及其类型;C. Input the first area of interest into the trained remote sensing target detection model for target detection to identify the first vehicle and its type from the first area of interest, and add the second The area of interest is input into the trained remote sensing target detection model for target detection to identify the second vehicle and its type from the second area of interest;
D、确定第一车辆在所述第一遥感图像中的坐标信息,并统计第一车辆的总数,以及,确定第二车辆在所述第二遥感图像中的坐标信息,并统计第二车辆的总数;D. Determine the coordinate information of the first vehicle in the first remote sensing image, and count the total number of first vehicles, and determine the coordinate information of the second vehicle in the second remote sensing image, and count the number of the second vehicle. total;
E、将第一车辆的所述坐标信息和类型、第一车辆的总数确定为第一车辆信息,以及,将第二车辆的所述坐标信息和类型、第二车辆的总数确定为第二车辆信息。E. Determine the coordinate information and type of the first vehicle and the total number of first vehicles as the first vehicle information, and determine the coordinate information and type of the second vehicle and the total number of second vehicles as the second vehicle information.
即,将T1时刻采集的第一遥感图像中的第一感兴趣区域和T2时刻采集的第二遥感图像中的第二感兴趣区域,分别输入至训练完成的遥感目标检测模型进行目标检测,以分别从第一感兴趣区域中和第二感兴趣区域中识别出车辆及其对应的类型,将从第一感兴趣区域中识别出的车辆定义为第一车辆,将从第二感兴趣区域中识别出的车辆定义为第二车辆。之后,在第一遥感图像中建立坐标系,从而获得每一第一车辆在第一遥感图像中的坐标信息(每一第一车辆对应的矩形框的四个点的坐标),以及,在第二遥感图像中建立坐标系,从而获得每一第二车辆在第二遥感图像中的坐标信息(每一第二车辆对应的矩形框的四个点的坐标)。此外,还统计第一车辆的总数和第二车辆的总数。将第一车辆在第一遥感图像中的坐标信息和类型、第一车辆的总数作为第一车辆信息,以及,将第二车辆在第二遥感图像中的坐标信息和类型、第一车辆的总数作为第二车辆信息。That is, the first area of interest in the first remote sensing image collected at time T1 and the second area of interest in the second remote sensing image collected at time T2 are respectively input to the trained remote sensing target detection model for target detection, so as to Vehicles and their corresponding types are respectively identified from the first area of interest and the second area of interest. The vehicle identified from the first area of interest is defined as the first vehicle, and the vehicle identified from the second area of interest is defined as the first vehicle. The identified vehicle is defined as the second vehicle. After that, a coordinate system is established in the first remote sensing image, thereby obtaining the coordinate information of each first vehicle in the first remote sensing image (the coordinates of the four points of the rectangular frame corresponding to each first vehicle), and, in the A coordinate system is established in the second remote sensing image to obtain the coordinate information of each second vehicle in the second remote sensing image (the coordinates of the four points of the rectangular frame corresponding to each second vehicle). In addition, the total number of first vehicles and the total number of second vehicles are also counted. The coordinate information and type of the first vehicle in the first remote sensing image and the total number of first vehicles are used as the first vehicle information, and the coordinate information and type of the second vehicle in the second remote sensing image and the total number of first vehicles are used as the second vehicle information.
步骤S40,根据所述第一车辆信息和所述第二车辆信息,确定所述检测区域在所述预设间隔时间内的车流量信息。Step S40: Determine the traffic volume information of the detection area within the preset interval based on the first vehicle information and the second vehicle information.
之后,根据第一车辆信息和第二车辆信息,确定检测区域在预设间隔时间内的车流量信息,也即确定检测区域在T1和T2之间的车流量信息。具体地,步骤S40包括:After that, based on the first vehicle information and the second vehicle information, the traffic flow information of the detection area within the preset interval is determined, that is, the traffic flow information of the detection area between T1 and T2 is determined. Specifically, step S40 includes:
F、根据第一车辆的所述坐标信息计算第一车辆在所述第一遥感图像中的中心坐标,以及,根据第二车辆的所述坐标信息计算第二车辆在所述第二遥感图像中的中心坐标;F. Calculate the center coordinate of the first vehicle in the first remote sensing image based on the coordinate information of the first vehicle, and calculate the center coordinate of the second vehicle in the second remote sensing image based on the coordinate information of the second vehicle. center coordinates;
G、根据第一车辆的所述中心坐标和第二车辆的所述中心坐标,计算所述检测区域在所述预设间隔时间内的车流速度;G. Calculate the traffic flow speed of the detection area within the preset interval according to the center coordinates of the first vehicle and the center coordinates of the second vehicle;
H、将第一车辆的类型与各第二车辆的类型、第一车辆的总数与第二车辆的总数分别进行比对,得到车流变化量;H. Compare the type of the first vehicle with the type of each second vehicle, and the total number of first vehicles with the total number of second vehicles, respectively, to obtain the traffic flow change;
I、将所述车流变化量和计算的所述车流速度,确定为所述检测区域在所述预设间隔时间内的车流量信息。1. Determine the traffic flow change amount and the calculated traffic flow speed as the traffic flow information of the detection area within the preset interval.
即,根据每一第一车辆在第一遥感图像中的坐标信息,计算每一第一车辆在第一遥感图像的中心坐标,以及,根据每一第二车辆在第二遥感图像中的坐标信息,计算每一第二车辆在第二遥感图像中的中心坐标。以T1时刻的第一遥感图像为例,对于T1时刻遥感图像中的任一第一辆车,设其第一遥感图像中的坐标信息为(x1,y1)、(x2,y2)、(x3,y3)、(x4、y4),设其在T1时刻的遥感图像中的中心坐标为(Px,Py),那么计算该车辆中心坐标(Px,Py)的公式如下:That is, based on the coordinate information of each first vehicle in the first remote sensing image, calculate the center coordinates of each first vehicle in the first remote sensing image, and based on the coordinate information of each second vehicle in the second remote sensing image , calculate the center coordinates of each second vehicle in the second remote sensing image. Taking the first remote sensing image at time T1 as an example, for any first vehicle in the remote sensing image at time T1, assume that the coordinate information in the first remote sensing image is (x1, y1), (x2, y2), (x3 , y3), (x4, y4), assuming its center coordinate in the remote sensing image at time T1 is (Px, Py), then the formula for calculating the center coordinate (Px, Py) of the vehicle is as follows:
Px=(x1+x2+x3+x4)/4P x =(x1+x2+x3+x4)/4
Py=(y1+y2+y3+y4)/4P y =(y1+y2+y3+y4)/4
以此类推,可以分别得到T1时刻的第一遥感图像中每一第一车辆的中心坐标和T2时刻的第二遥感图像中每一第二车辆的中心坐标。由上述计算公式可知,每一第一车辆的中心坐标指的是,每一第一车辆对应的矩形框的中心点坐标,每一第二车辆的中心坐标指的是,每一第二车辆对应的矩形框的中心点坐标。By analogy, the center coordinates of each first vehicle in the first remote sensing image at time T1 and the center coordinates of each second vehicle in the second remote sensing image at time T2 can be obtained respectively. It can be seen from the above calculation formula that the center coordinates of each first vehicle refer to the center point coordinates of the rectangular frame corresponding to each first vehicle, and the center coordinates of each second vehicle refer to the center coordinates of each second vehicle corresponding to The coordinates of the center point of the rectangular box.
之后,即可根据各第一车辆的中心坐标和各第二车辆的中心坐标,计算检测区域在预设间隔时间内的车流速度。具体地,步骤H包括:After that, the traffic flow speed of the detection area within the preset interval can be calculated based on the center coordinates of each first vehicle and the center coordinates of each second vehicle. Specifically, step H includes:
H1,根据第一车辆的所述中心坐标,计算所述第一遥感图像中所有第一车辆的整体中心坐标,以及,根据第二车辆的所述中心坐标,计算所述第二遥感图像中所有第二车辆的整体中心坐标;H1, based on the center coordinates of the first vehicle, calculate the overall center coordinates of all first vehicles in the first remote sensing image, and based on the center coordinates of the second vehicle, calculate the overall center coordinates of all first vehicles in the second remote sensing image The overall center coordinate of the second vehicle;
H2,获取所述第一遥感图像或所述第二遥感图像的缩放比例;H2, obtain the zoom ratio of the first remote sensing image or the second remote sensing image;
H3,根据各第一车辆的所述整体中心坐标和各第二车辆的所述整体中心坐标,以及,所述缩放比例,计算所述检测区域在所述预设间隔时间内的车流速度。H3: Calculate the traffic flow speed of the detection area within the preset interval according to the overall center coordinates of each first vehicle and the overall center coordinates of each second vehicle, and the scaling ratio.
即,根据每一第一车辆的中心坐标,计算第一遥感图像中所有第一车辆的整体中心坐标,以及,根据每一第二车辆的中心坐标,计算第二遥感图像中所有第二车辆的整体中心坐标,计算公式如下:That is, based on the center coordinates of each first vehicle, the overall center coordinates of all first vehicles in the first remote sensing image are calculated, and based on the center coordinates of each second vehicle, the overall center coordinates of all second vehicles in the second remote sensing image are calculated. The overall center coordinates are calculated as follows:
由此得到T1时刻的第一遥感遥感图像中所有第一车辆的整体中心坐标(Center_Px1,Center_Py1),T2时刻的第二遥感图像中所有第二车辆的整体中心坐标(Center_Px2,CenT2er_Py2)。From this, we obtain the overall center coordinates of all first vehicles in the first remote sensing image at time T1 (Center_P x1 , Center_P y1 ), and the overall center coordinates of all second vehicles in the second remote sensing image at time T2 (Center_Px2, CentT2er_Py2).
由物理运动学可知,速度等于单位时间内的位移,即:According to physical kinematics, velocity is equal to displacement per unit time, that is:
因此,可以根据T1时刻的第一遥感遥感图像中所有第一车辆的整体中心坐标,以及,T2时刻的第二遥感图像中所有第二车辆的整体中心坐标,计算在遥感图像中,T1时刻与T2时刻之间单位时间内的车流整体速度,计算公式如下:Therefore, it can be calculated based on the overall center coordinates of all first vehicles in the first remote sensing image at time T1 and the overall center coordinates of all second vehicles in the second remote sensing image at time T2. In the remote sensing image, the difference between time T1 and The overall speed of the traffic flow per unit time between time T2 is calculated as follows:
由于遥感影像与真实场景存在比例缩放关系,因此还需获取第一遥感图像的缩放比例,或第二遥感图像的缩放比例,也就是第一遥感图像或第二遥感图像相对于检测区域的实际场景的缩小比例,若缩放比例以N表示,那么实际场景中,T1时刻与T2时刻之间单位时间内的车流整体速度即为vN。Since there is a scaling relationship between remote sensing images and real scenes, it is also necessary to obtain the scaling ratio of the first remote sensing image or the scaling ratio of the second remote sensing image, that is, the actual scene of the first remote sensing image or the second remote sensing image relative to the detection area. If the scaling ratio is represented by N, then in the actual scenario, the overall speed of the traffic flow per unit time between T1 time and T2 time is vN.
还将第一车辆的类型与第二车辆的类型、第一车辆的总数与第二车辆的总数分别进行比对,得到车流变化量,将车流变化量和计算的车流速度,作为检测区域在预设间隔时间内的车流量信息。如此,利用训练完成的语义分割模型和遥感目标检测模型,来分析间隔预设时间的两帧遥感影像,实现了车流量信息的监测。The type of the first vehicle and the type of the second vehicle, and the total number of the first vehicle and the total number of the second vehicle are also compared respectively to obtain the traffic flow change amount, and the traffic flow change amount and the calculated traffic flow speed are used as the detection area in the predetermined area. Set the traffic flow information within the interval. In this way, the trained semantic segmentation model and remote sensing target detection model are used to analyze two frames of remote sensing images separated by a preset time, thereby realizing the monitoring of traffic flow information.
在更多的实施中,步骤S之后,包括:In more implementations, following step S, include:
J、将所述车流量信息发送至车辆指挥调度系统,以供所述车辆指挥调度系统将所述车流量信息发布至预定距离内的车辆。J. Send the traffic flow information to the vehicle command and dispatch system, so that the vehicle command and dispatch system can publish the traffic flow information to vehicles within a predetermined distance.
即,车流量监测设备可以将TI时刻和T2时刻之间的车流量信息发送至车辆指挥调度系统,车辆指挥调度系统在接收到该车流量信息后,将该车流量信息发布至预定距离内的车辆,比如发送至车载终端,满足交通控制需求。That is, the traffic flow monitoring equipment can send the traffic flow information between TI time and T2 time to the vehicle command and dispatch system. After receiving the traffic flow information, the vehicle command and dispatch system publishes the traffic flow information to the vehicles within a predetermined distance. vehicles, such as sending it to vehicle-mounted terminals to meet traffic control needs.
为更好理解本实施方式,以下参照图3所示的流程图对本实施例的实现过程进行说明。In order to better understand this embodiment, the implementation process of this embodiment will be described below with reference to the flowchart shown in FIG. 3 .
如图3所示,车流量监测设备首先获取检测区域的一张遥感图像,并在预设时间间隔后获取检测区域的另一张遥感图像;然后分别对获取的两张遥感图像进行语义分割处理,以分别从两张遥感图像中提取道路骨架;再对从两张遥感图像中提取的道路骨架分别进行遥感目标检测,以获得车辆速度、位置、数量、种类等车流量信息;再将获得的车流量信息发送至车辆指挥调度系统,车辆指挥调度系统在接收到该车流量信息后,可以实时获知当前路面车流量状况,进而进行路况实时通知,也就是将该车流量信息发布至预定距离内车辆的车载终端,供车辆驾驶员规避拥堵路段、合理规划行车路线,进而保证道路畅通,满足交通控制需求。As shown in Figure 3, the traffic flow monitoring equipment first acquires a remote sensing image of the detection area, and acquires another remote sensing image of the detection area after a preset time interval; then performs semantic segmentation processing on the two acquired remote sensing images. , to extract the road skeleton from the two remote sensing images respectively; then perform remote sensing target detection on the road skeleton extracted from the two remote sensing images to obtain traffic flow information such as vehicle speed, position, quantity, type, etc.; and then use the obtained The traffic flow information is sent to the vehicle command and dispatch system. After receiving the traffic flow information, the vehicle command and dispatch system can know the current road traffic flow status in real time, and then provide real-time notification of road conditions, that is, release the traffic flow information to a predetermined distance. The vehicle's on-board terminal allows vehicle drivers to avoid congested road sections and plan driving routes rationally, thereby ensuring smooth roads and meeting traffic control needs.
本实施例提供一种车流量监测方法,采集检测区域的第一遥感图像,并在预设间隔时间后采集所述检测区域的第二遥感图像;通过训练完成的语义分割模型,分别从所述第一遥感图像中提取第一感兴趣区域、从所述第二遥感图像中提取第二感兴趣区域;通过训练完成的遥感目标检测模型,分别对所述第一感兴趣区域和所述第二感兴趣区域进行目标检测,以获取所述第一感兴趣区域中的第一车辆信息和所述第二感兴趣区域中的第二车辆信息;根据所述第一车辆信息和所述第二车辆信息,确定所述检测区域在所述预设间隔时间内的车流量信息。本实施例通过训练完成的语义分割模型和遥感目标检测模型,对检测区域的遥感图像进行分析,为车流量的监测提供了较为详细的分析依据,提升了车流量监测的便利性和准确性。This embodiment provides a traffic flow monitoring method, which collects the first remote sensing image of the detection area, and collects the second remote sensing image of the detection area after a preset interval; through the trained semantic segmentation model, the Extract a first region of interest from the first remote sensing image and extract a second region of interest from the second remote sensing image; through the trained remote sensing target detection model, the first region of interest and the second region of interest are respectively Perform target detection in the area of interest to obtain first vehicle information in the first area of interest and second vehicle information in the second area of interest; according to the first vehicle information and the second vehicle information to determine the traffic flow information of the detection area within the preset interval. This embodiment uses the trained semantic segmentation model and remote sensing target detection model to analyze the remote sensing images of the detection area, providing a more detailed analysis basis for the monitoring of traffic flow, and improving the convenience and accuracy of traffic flow monitoring.
进一步地,基于上述第一实施例,提出了本发明车流量监测方法的第二实施例,与第一实施例的区别在于,所述步骤S10之前,包括:Furthermore, based on the above-mentioned first embodiment, a second embodiment of the traffic flow monitoring method of the present invention is proposed. The difference from the first embodiment is that before step S10, it includes:
训练语义分割模型,得到训练完成的语义分割模型,以及,训练遥感目标检测模型,得到训练完成的遥感目标检测模型。Train the semantic segmentation model to obtain the trained semantic segmentation model, and train the remote sensing target detection model to obtain the trained remote sensing target detection model.
首先,训练语义分割模型(DeeplabV3)的过程如下:First, the process of training the semantic segmentation model (DeeplabV3) is as follows:
a、建立训练样本:将用于训练语义分割模型的初始图像调整为符合预设格式和尺寸的训练图像,对训练图像中的道路做标定,并统一分配为相同的初始类别;a. Establish training samples: adjust the initial images used to train the semantic segmentation model to training images that conform to the preset format and size, calibrate the roads in the training images, and uniformly assign them to the same initial category;
b、多尺度图像分辨率获取:采用图像金字塔的方式,对特征图做不同尺度池化操作,以从获取丰富的上下文本信息;b. Multi-scale image resolution acquisition: Using the image pyramid method, the feature map is pooled at different scales to obtain rich contextual information;
c、编码-解码架构搭建:在编码过程中,采用下采样方式,通过逐步减少特征图的分辨率,获取高级语义信息,进而对图像信息进行编码;在解码阶段,通过上采样卷积转置的方式,逐渐恢复图像空间信息,获取预测结果;c. Encoding-decoding architecture construction: In the encoding process, down-sampling is used to gradually reduce the resolution of the feature map to obtain high-level semantic information, and then encode the image information; in the decoding stage, up-sampling convolution transposition is used In this way, the image spatial information is gradually restored and the prediction results are obtained;
d、误差反馈调整过程:通过预测结果是真实标签对比,计算模型损失函数,并通过BP算法,反馈调整每一层神经网络权重,反复迭代,使得语义分割网络模型达到最优。d. Error feedback adjustment process: By comparing the prediction result with the real label, the model loss function is calculated, and through the BP algorithm, the weight of each layer of neural network is adjusted through feedback, and repeated iterations are performed to optimize the semantic segmentation network model.
训练遥感目标检测模型(R2CNN_Faster_RCNN网络)的过程如下:The process of training the remote sensing target detection model (R2CNN_Faster_RCNN network) is as follows:
e、建立训练样本:从用于训练遥感目标检测模型的图像中获取车辆坐标信息,并对图像做裁剪,对裁剪后图像尺寸归一化,取均值,并转为tfrecord格式数据;e. Establish training samples: Obtain vehicle coordinate information from the images used to train the remote sensing target detection model, crop the images, normalize the size of the cropped images, take the average, and convert it to tfrecord format data;
f、骨架网络选择:基于ResNet101基础上,对网络进行微调,第一阶段,通过RPN网络,得到候选框,由于遥感图像中车辆很小,并且方向任意,因此在采用R2CNN_Faster_RCNN做目标检测过程中,需要将锚点尺度改小为(4,8,16,32),方便对小目标的提取;为了获取更丰富图像信息,将池化大小修改为(7x7,11x3,3x11)三个尺寸,将最后的特征图做连接去预测目标框位置。由于目标检测中经常出现一个目标被多个矩形框标定的情况,同时道路中车辆倾斜原因,需要采用倾斜NMS(非极大值抑制算法,常用于做多矩形融合)进行后处理,得到最后目标检测结果。f. Skeleton network selection: Based on ResNet101, the network is fine-tuned. In the first stage, the candidate frame is obtained through the RPN network. Since the vehicle in the remote sensing image is very small and has any direction, in the process of using R2CNN_Faster_RCNN for target detection, The anchor point scale needs to be changed to (4, 8, 16, 32) to facilitate the extraction of small targets; in order to obtain richer image information, the pooling size is modified to three sizes (7x7, 11x3, 3x11). The final feature map is connected to predict the target frame position. Since a target is often calibrated by multiple rectangular frames in target detection, and the vehicle on the road is tilted, it is necessary to use tilted NMS (non-maximum suppression algorithm, often used for multi-rectangle fusion) for post-processing to obtain the final target. Test results.
由此,得到得到训练完成的语义分割模型和遥感目标检测模型。From this, the trained semantic segmentation model and remote sensing target detection model are obtained.
此外,本发明实施例还提供一种车流量监测装置。In addition, embodiments of the present invention also provide a vehicle flow monitoring device.
参照图4,图4为本发明车流量监测装置第一实施例的功能模块示意图。Referring to Figure 4, Figure 4 is a functional module schematic diagram of the first embodiment of the traffic flow monitoring device of the present invention.
本实施例中,所述车流量监测装置包括:In this embodiment, the traffic flow monitoring device includes:
采集模块10,用于采集检测区域的第一遥感图像,并在预设间隔时间后采集所述检测区域的第二遥感图像;The collection module 10 is used to collect the first remote sensing image of the detection area, and collect the second remote sensing image of the detection area after a preset interval;
提取模块20,用于通过训练完成的语义分割模型,分别从所述第一遥感图像中提取第一感兴趣区域、从所述第二遥感图像中提取第二感兴趣区域;The extraction module 20 is used to extract a first region of interest from the first remote sensing image and a second region of interest from the second remote sensing image through the trained semantic segmentation model;
检测模块30,用于通过训练完成的遥感目标检测模型,分别对所述第一感兴趣区域和所述第二感兴趣区域进行目标检测,以获取所述第一感兴趣区域中的第一车辆信息和所述第二感兴趣区域中的第二车辆信息;The detection module 30 is configured to perform target detection on the first area of interest and the second area of interest through the trained remote sensing target detection model to obtain the first vehicle in the first area of interest. information and second vehicle information in the second area of interest;
确定模块40,用于根据所述第一车辆信息和所述第二车辆信息,确定所述检测区域在所述预设间隔时间内的车流量信息。The determination module 40 is configured to determine the traffic flow information of the detection area within the preset interval according to the first vehicle information and the second vehicle information.
其中,上述车流量监测装置的各虚拟功能模块存储于图1所示车流量监测设备的存储器1005中,用于实现车流量监测程序的所有功能;各模块被处理器1001执行时,能够为车流量的监测提供了较为详细的分析依据,提升了车流量监测的便利性和准确性。Among them, each virtual function module of the above-mentioned traffic flow monitoring device is stored in the memory 1005 of the traffic flow monitoring device shown in Figure 1, and is used to realize all functions of the traffic flow monitoring program; when each module is executed by the processor 1001, it can be used for the vehicle. Traffic flow monitoring provides a more detailed analysis basis and improves the convenience and accuracy of traffic flow monitoring.
进一步的,所述提取模块20包括:Further, the extraction module 20 includes:
第一识别单元,用于将所述第一遥感图像输入至训练完成的语义分割模型,以从所述第一遥感图像中识别出道路骨架,作为第一感兴趣区域;A first recognition unit configured to input the first remote sensing image to the trained semantic segmentation model to identify the road skeleton from the first remote sensing image as the first region of interest;
第二识别单元,用于将所述第二遥感图像输入至训练完成的语义分割模型,以从所述第二遥感图像中识别出道路骨架,作为第二感兴趣区域。The second recognition unit is configured to input the second remote sensing image to the trained semantic segmentation model to identify the road skeleton from the second remote sensing image as the second region of interest.
进一步的,所述检测模块30包括:Further, the detection module 30 includes:
第三识别单元,用于将所述第一感兴趣区域输入至训练完成的遥感目标检测模型中进行目标检测,以从所述第一感兴趣区域中识别出各第一车辆及其类型,以及,将所述第二感兴趣区域输入至训练完成的遥感目标检测模型中进行目标检测,以从所述第二感兴趣区域中识别出各第二车辆及其类型;A third identification unit configured to input the first region of interest into the trained remote sensing target detection model for target detection, so as to identify each first vehicle and its type from the first region of interest, and , input the second region of interest into the trained remote sensing target detection model for target detection, so as to identify each second vehicle and its type from the second region of interest;
第四识别单元,用于确定第一车辆在所述第一遥感图像中的坐标信息,并统计第一车辆的总数,以及,确定第二车辆在所述第二遥感图像中的坐标信息,并统计第二车辆的总数;The fourth identification unit is used to determine the coordinate information of the first vehicle in the first remote sensing image, and count the total number of first vehicles, and determine the coordinate information of the second vehicle in the second remote sensing image, and Count the total number of second vehicles;
第一确定单元,用于将第一车辆的所述坐标信息和类型、第一车辆的总数确定为第一车辆信息,以及,将第二车辆的所述坐标信息和类型、第二车辆的总数确定为第二车辆信息。A first determining unit configured to determine the coordinate information and type of the first vehicle and the total number of first vehicles as first vehicle information, and to determine the coordinate information and type of the second vehicle and the total number of second vehicles. It is determined as the second vehicle information.
进一步的,所述确定模块40包括:Further, the determination module 40 includes:
第一计算单元,用于根据各第一车辆的所述坐标信息计算第一车辆在所述第一遥感图像中的中心坐标,以及,根据第二车辆的所述坐标信息计算各第二车辆在所述第二遥感图像中的中心坐标;A first calculation unit configured to calculate the center coordinates of the first vehicle in the first remote sensing image based on the coordinate information of each first vehicle, and calculate the center coordinates of each second vehicle based on the coordinate information of the second vehicle. The center coordinates in the second remote sensing image;
第二计算单元,用于根据第一车辆的所述中心坐标和第二车辆的所述中心坐标,计算所述检测区域在所述预设间隔时间内的车流速度;A second calculation unit configured to calculate the traffic flow speed of the detection area within the preset interval based on the center coordinates of the first vehicle and the center coordinates of the second vehicle;
比对单元,用于将第一车辆的类型与第二车辆的类型、第一车辆的总数与第二车辆的总数分别进行比对,得到车流变化量;A comparison unit configured to compare the type of the first vehicle with the type of the second vehicle, and the total number of the first vehicle with the total number of the second vehicle, respectively, to obtain the traffic flow change amount;
第二确定单元,用于将所述车流变化量和计算的所述车流速度,确定为所述检测区域在所述预设间隔时间内的车流量信息。The second determination unit is configured to determine the traffic flow change amount and the calculated traffic flow speed as the traffic flow information of the detection area within the preset interval.
进一步的,所述第二计算单元包括:Further, the second computing unit includes:
第一计算子单元,用于根据第一车辆的所述中心坐标,计算所述第一遥感图像中所有第一车辆的整体中心坐标,以及,根据第二车辆的所述中心坐标,计算所述第二遥感图像中所有第二车辆的整体中心坐标;A first calculation subunit configured to calculate the overall center coordinates of all first vehicles in the first remote sensing image based on the center coordinates of the first vehicle, and calculate the overall center coordinates of all first vehicles in the first remote sensing image based on the center coordinates of the second vehicle. The overall center coordinates of all second vehicles in the second remote sensing image;
获取子单元,用于获取所述第一遥感图像或所述第二遥感图像的缩放比例;Obtaining subunit, used to obtain the scaling ratio of the first remote sensing image or the second remote sensing image;
第二计算子单元,用于根据第一车辆的所述整体中心坐标和第二车辆的所述整体中心坐标,以及,所述缩放比例,计算所述检测区域在所述预设间隔时间内的车流速度。A second calculation subunit configured to calculate the detection area within the preset interval based on the overall center coordinates of the first vehicle and the overall center coordinates of the second vehicle, and the scaling ratio. Traffic speed.
进一步的,所述第二计算子单元包括:Further, the second calculation subunit includes:
第一计算子子单元,用于根据第一车辆的所述整体中心坐标和第二车辆的所述整体中心坐标,计算基于遥感图像的车流速度;A first calculation sub-unit, configured to calculate the traffic flow speed based on the remote sensing image according to the overall center coordinate of the first vehicle and the overall center coordinate of the second vehicle;
第二计算子子单元,用于计算所述基于遥感图像的车流速度与所述缩放比例的乘积,得到所述检测区域在所述预设间隔时间内的车流速度。The second calculation sub-unit is used to calculate the product of the traffic speed based on the remote sensing image and the scaling ratio to obtain the traffic speed of the detection area within the preset interval.
进一步的,所述车流量监测装置还包括:Further, the traffic flow monitoring device also includes:
发送模块,用于将所述车流量信息发送至车辆指挥调度系统,以供所述车辆指挥调度系统将所述车流量信息发布至预定距离内的车辆。A sending module, configured to send the traffic flow information to a vehicle command and dispatch system, so that the vehicle command and dispatch system can publish the traffic flow information to vehicles within a predetermined distance.
其中,上述车流量监测装置中各个模块的功能实现与上述车流量监测方法实施例中各步骤相对应,其功能和实现过程在此处不再一一赘述。Among them, the functional implementation of each module in the above-mentioned traffic flow monitoring device corresponds to each step in the embodiment of the above-mentioned traffic flow monitoring method, and its functions and implementation processes will not be described in detail here.
此外,本发明实施例还提供一种计算机可读存储介质。In addition, embodiments of the present invention also provide a computer-readable storage medium.
本发明计算机可读存储介质上存储有车流量监测程序,其中所述车流量监测程序被处理器执行时,实现如上述的车流量监测方法的步骤。The computer-readable storage medium of the present invention stores a traffic flow monitoring program. When the traffic flow monitoring program is executed by a processor, the steps of the above-mentioned traffic flow monitoring method are implemented.
其中,车流量监测程序被执行时所实现的方法可参照本发明车流量监测方法的各个实施例,此处不再赘述。For the method implemented when the traffic flow monitoring program is executed, reference can be made to the various embodiments of the traffic flow monitoring method of the present invention, which will not be described again here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that, as used herein, the terms "include", "comprising" or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or system that includes a list of elements not only includes those elements, but It also includes other elements not expressly listed or that are inherent to the process, method, article or system. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product in essence or the part that contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM, disk, CD), including several instructions to cause a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the description and drawings of the present invention may be directly or indirectly used in other related technical fields. , are all similarly included in the scope of patent protection of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910975456.2A CN110738169B (en) | 2019-10-11 | 2019-10-11 | Traffic flow monitoring method, device, equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910975456.2A CN110738169B (en) | 2019-10-11 | 2019-10-11 | Traffic flow monitoring method, device, equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110738169A CN110738169A (en) | 2020-01-31 |
CN110738169B true CN110738169B (en) | 2023-09-08 |
Family
ID=69268925
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910975456.2A Active CN110738169B (en) | 2019-10-11 | 2019-10-11 | Traffic flow monitoring method, device, equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110738169B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112101167B (en) * | 2020-09-08 | 2021-05-14 | 广东新禾道信息科技有限公司 | Remote sensing image data processing method and device |
CN113505638B (en) * | 2021-05-27 | 2024-04-02 | 中国科学院深圳先进技术研究院 | Method and device for monitoring traffic flow and computer readable storage medium |
CN113984767A (en) * | 2021-11-24 | 2022-01-28 | 牧原肉食品有限公司 | System, method, apparatus and computer storage medium for livestock carcass quality detection |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101968924A (en) * | 2010-10-19 | 2011-02-09 | 北方工业大学 | High-resolution image-based real-time traffic flow detection method |
CN106780603A (en) * | 2016-12-09 | 2017-05-31 | 宇龙计算机通信科技(深圳)有限公司 | Vehicle checking method, device and electronic equipment |
CN108986465A (en) * | 2018-07-27 | 2018-12-11 | 深圳大学 | A kind of method of vehicle Flow Detection, system and terminal device |
CN109492588A (en) * | 2018-11-12 | 2019-03-19 | 广西交通科学研究院有限公司 | A kind of rapid vehicle detection and classification method based on artificial intelligence |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6970102B2 (en) * | 2003-05-05 | 2005-11-29 | Transol Pty Ltd | Traffic violation detection, recording and evidence processing system |
-
2019
- 2019-10-11 CN CN201910975456.2A patent/CN110738169B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101968924A (en) * | 2010-10-19 | 2011-02-09 | 北方工业大学 | High-resolution image-based real-time traffic flow detection method |
CN106780603A (en) * | 2016-12-09 | 2017-05-31 | 宇龙计算机通信科技(深圳)有限公司 | Vehicle checking method, device and electronic equipment |
CN108986465A (en) * | 2018-07-27 | 2018-12-11 | 深圳大学 | A kind of method of vehicle Flow Detection, system and terminal device |
CN109492588A (en) * | 2018-11-12 | 2019-03-19 | 广西交通科学研究院有限公司 | A kind of rapid vehicle detection and classification method based on artificial intelligence |
Also Published As
Publication number | Publication date |
---|---|
CN110738169A (en) | 2020-01-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109087510B (en) | Traffic monitoring method and device | |
JP5776545B2 (en) | Road surface inspection program and road surface inspection device | |
US11263726B2 (en) | Method, apparatus, and system for task driven approaches to super resolution | |
CN110738169B (en) | Traffic flow monitoring method, device, equipment and computer readable storage medium | |
JP5716866B2 (en) | Device management apparatus and device search method | |
CN108831161A (en) | A kind of traffic flow monitoring method, intelligence system and data set based on unmanned plane | |
US10515293B2 (en) | Method, apparatus, and system for providing skip areas for machine learning | |
CN104599002B (en) | Method and equipment for predicting order value | |
CN113950611B (en) | Method and data processing system for predicting road properties | |
CN105528912A (en) | Indoor parking stall recommendation method and system | |
CN111612489A (en) | Order quantity prediction method and device and electronic equipment | |
CN104167109A (en) | Detection method and detection apparatus for vehicle position | |
JPWO2019215779A1 (en) | Model delivery system, method and program | |
JP2015076077A (en) | Traffic volume estimation system,terminal device, traffic volume estimation method and traffic volume estimation program | |
US20210033404A1 (en) | Systems and methods for controlling mapping information inaccuracies | |
CN113012215A (en) | Method, system and equipment for space positioning | |
CN107067813A (en) | A kind of parking stall bootstrap technique and system based on image procossing and pattern-recognition | |
JP7001149B2 (en) | Data provision system and data collection system | |
CN115616937A (en) | Automatic driving simulation test method, device, equipment and computer readable medium | |
CN110969864A (en) | Vehicle speed detection method, vehicle driving event detection method and electronic equipment | |
JP2023064093A (en) | Traffic mark detection method and method of training traffic mark detection model | |
CN112784707A (en) | Information fusion method and device, integrated detection equipment and storage medium | |
JP7265961B2 (en) | ANNOTATION SUPPORT METHOD, ANNOTATION SUPPORT DEVICE, AND ANNOTATION SUPPORT PROGRAM | |
WO2020054058A1 (en) | Identification system, parameter value update method, and program | |
CN115830073A (en) | Map element reconstruction method, map element reconstruction device, computer equipment and storage medium |
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 |