[go: up one dir, main page]

CN116665112A - Tunnel inspection method and device, electronic equipment and storage medium - Google Patents

Tunnel inspection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116665112A
CN116665112A CN202310485698.XA CN202310485698A CN116665112A CN 116665112 A CN116665112 A CN 116665112A CN 202310485698 A CN202310485698 A CN 202310485698A CN 116665112 A CN116665112 A CN 116665112A
Authority
CN
China
Prior art keywords
component
tunnel
target
captured image
disease
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310485698.XA
Other languages
Chinese (zh)
Other versions
CN116665112B (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.)
Shenzhen Intellifusion Technologies Co Ltd
Original Assignee
Shenzhen Intellifusion Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Intellifusion Technologies Co Ltd filed Critical Shenzhen Intellifusion Technologies Co Ltd
Priority to CN202310485698.XA priority Critical patent/CN116665112B/en
Publication of CN116665112A publication Critical patent/CN116665112A/en
Application granted granted Critical
Publication of CN116665112B publication Critical patent/CN116665112B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/09Supervised learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Multimedia (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

本发明实施例提供一种隧道巡检方法,获取目标隧道内拍摄图像对应的光流分量以及亮度分量;将所述光流分量及所述亮度分量与所述拍摄图像的颜色分量进行结合,得到目标图像;通过训练好的病害识别模型对所述目标图像进行处理,得到所述目标隧道的病害识别结果;基于所述目标隧道的病害识别结果确定所述目标隧道的巡检结果。通过将拍摄图像的光流分量及亮度分量与拍摄图像的颜色分量进行结合,使得目标图像具备光流分量的动态信息和亮度分量的静态信息,利用光流分量的动态信息和亮度分量的静态信息来辅助病害识别模型进行道路病害识别,从而提高病害识别结果的准确度,进而提高隧道巡检结果的准确率。

An embodiment of the present invention provides a tunnel inspection method, which obtains the optical flow component and brightness component corresponding to the captured image in the target tunnel; combines the optical flow component and the brightness component with the color component of the captured image to obtain A target image; processing the target image through a trained disease recognition model to obtain a disease recognition result of the target tunnel; determining a patrol inspection result of the target tunnel based on the disease recognition result of the target tunnel. By combining the optical flow component and brightness component of the captured image with the color component of the captured image, the target image has the dynamic information of the optical flow component and the static information of the brightness component, and uses the dynamic information of the optical flow component and the static information of the brightness component To assist the disease identification model to identify road diseases, so as to improve the accuracy of disease identification results, and then improve the accuracy of tunnel inspection results.

Description

一种隧道巡检方法、装置、电子设备及存储介质A tunnel inspection method, device, electronic equipment and storage medium

技术领域technical field

本发明涉及智慧交通技术领域,尤其涉及一种隧道巡检方法、装置、电子设备及存储介质。The invention relates to the technical field of intelligent transportation, in particular to a tunnel inspection method, device, electronic equipment and storage medium.

背景技术Background technique

随着人工智能在交通领域的落地,已经可以通过视觉技术来代替人工进行道路病害巡检。道路病害巡检车是一种搭载图像传感器和图像处理器的交通工具,利用图像传感器采集道路的图像或点云数据来进行图像识别处理,从而识别出道路中所存在的道路病害。然而,在隧道中进行巡检时,由于隧道内光线较弱,若采用图像数据进行病害识别,则会因为隧道光照问题使得获取到的图像光照偏弱,若直接用采集到的图像进行病害识别,则会导致病害识别结果的准确率较低,进而降低隧道巡检结果的准确率。With the implementation of artificial intelligence in the transportation field, visual technology can already be used to replace manual road disease inspections. The road disease inspection vehicle is a vehicle equipped with an image sensor and an image processor. The image sensor is used to collect road images or point cloud data for image recognition processing, thereby identifying road diseases existing in the road. However, when conducting inspections in tunnels, due to the weak light in the tunnel, if image data is used for disease identification, the acquired images will be weak due to tunnel lighting problems. If the collected images are directly used for disease identification , it will lead to a lower accuracy of the disease identification results, thereby reducing the accuracy of the tunnel inspection results.

发明内容Contents of the invention

本发明实施例提供一种隧道巡检方法,旨在解决现有在隧道中进行病害巡检时,由于隧道内光线较弱,若直接用采集到的图像进行病害识别,则会导致病害识别结果准确率较低的问题。通过将拍摄图像的光流分量及亮度分量与拍摄图像的颜色分量进行结合,使得目标图像具备光流分量的动态信息和亮度分量的静态信息,利用光流分量的动态信息和亮度分量的静态信息来辅助病害识别模型进行道路病害识别,从而提高病害识别结果的准确度,进而提高隧道巡检结果的准确率。The embodiment of the present invention provides a tunnel inspection method, which aims to solve the problem that when the existing disease inspection is carried out in the tunnel, due to the weak light in the tunnel, if the collected images are directly used for disease identification, the result of disease identification will be caused. low accuracy problem. By combining the optical flow component and brightness component of the captured image with the color component of the captured image, the target image has the dynamic information of the optical flow component and the static information of the brightness component, and uses the dynamic information of the optical flow component and the static information of the brightness component To assist the disease identification model to identify road diseases, so as to improve the accuracy of disease identification results, and then improve the accuracy of tunnel inspection results.

第一方面,本发明实施例提供一种隧道巡检方法,所述方法包括:In a first aspect, an embodiment of the present invention provides a tunnel inspection method, the method comprising:

获取目标隧道内拍摄图像对应的光流分量以及亮度分量;Obtain the optical flow component and brightness component corresponding to the captured image in the target tunnel;

将所述光流分量及所述亮度分量与所述拍摄图像的颜色分量进行结合,得到目标图像;combining the optical flow component and the brightness component with the color component of the captured image to obtain a target image;

通过训练好的病害识别模型对所述目标图像进行处理,得到所述目标隧道的病害识别结果;Processing the target image through the trained disease recognition model to obtain a disease recognition result of the target tunnel;

基于所述目标隧道的病害识别结果确定所述目标隧道的巡检结果。An inspection result of the target tunnel is determined based on a disease identification result of the target tunnel.

可选的,在所述获取目标隧道内拍摄图像的光流分量以及亮度分量之前,所述方法还包括:Optionally, before the acquisition of the optical flow component and brightness component of the captured image in the target tunnel, the method further includes:

采集目标隧道前的道路标识信息;Collect road sign information in front of the target tunnel;

根据所述道路标识信息,确定所述目标隧道的拍摄参数;determining shooting parameters of the target tunnel according to the road sign information;

在进入到所述目标隧道后,以所述拍摄参数对所述目标隧道进行拍摄。After entering the target tunnel, the target tunnel is photographed with the photographing parameters.

可选的,所述获取目标隧道内拍摄图像的光流分量以及亮度分量,包括:Optionally, the acquiring the optical flow component and the brightness component of the captured image in the target tunnel includes:

获取目标隧道内拍摄图像与在前拍摄图像;Obtain the images taken in the target tunnel and the images taken before;

对所述在前拍摄图像与所述拍摄图像之间的光流分量进行提取,得到所述拍摄图像对应的光流分量;extracting an optical flow component between the previously captured image and the captured image, to obtain an optical flow component corresponding to the captured image;

将所述拍摄图像转换为HSV颜色模式,并基于所述HSV颜色模式确定所述拍摄图像对应的亮度分量。converting the captured image into an HSV color mode, and determining a brightness component corresponding to the captured image based on the HSV color mode.

可选的,所述基于所述HSV颜色模式确定所述拍摄图像对应的亮度分量,包括:Optionally, the determining the brightness component corresponding to the captured image based on the HSV color mode includes:

基于所述HSV颜色模式确定所述拍摄图像的第一亮度分量;determining a first luminance component of the captured image based on the HSV color mode;

根据所述第一亮度分量预测出所述拍摄图像的第二亮度分量,将所述第二亮度分量确定为所述拍摄图像对应的亮度分量。A second brightness component of the captured image is predicted according to the first brightness component, and the second brightness component is determined as a corresponding brightness component of the captured image.

可选的,所述拍摄图像为RGB颜色模式,所述将所述光流分量及所述亮度分量与所述拍摄图像的颜色分量进行结合,得到目标图像,包括:Optionally, the captured image is in RGB color mode, and combining the optical flow component and the brightness component with the color component of the captured image to obtain a target image includes:

将所述光流分量及所述亮度分量拼接到所述拍摄图像的颜色分量之后,得到拼接图像;After splicing the optical flow component and the brightness component to the color component of the captured image, a spliced image is obtained;

通过预设的卷积核对所述拼接图像进行卷积融合处理,得到目标图像。A target image is obtained by performing convolution fusion processing on the spliced image through a preset convolution kernel.

可选的,在所述通过训练好的病害识别模型对所述目标图像进行处理,得到所述目标隧道的病害识别结果之前,所述方法还包括:Optionally, before the trained disease recognition model is used to process the target image to obtain the result of the target tunnel's disease recognition, the method further includes:

获取第一数据集以及待训练的病害识别模型,所述第一数据集包括样本图像以及与所述样本图像对应的病害标签,所述样本图像与所述目标图像的获取方式相同;Obtain a first data set and a disease recognition model to be trained, the first data set includes a sample image and a disease label corresponding to the sample image, the sample image is obtained in the same manner as the target image;

通过所述第一数据集对所述待训练的病害识别模型进行有监督训练;performing supervised training on the disease identification model to be trained through the first data set;

训练完成得到所述训练好的病害识别模型。After the training is completed, the trained disease recognition model is obtained.

可选的,所述基于所述目标隧道的病害识别结果确定所述目标隧道的巡检结果,包括:Optionally, the determining the inspection result of the target tunnel based on the disease identification result of the target tunnel includes:

基于所述目标隧道的病害识别结果确定所述目标隧道的综合病害评分;determining the comprehensive disease score of the target tunnel based on the disease identification result of the target tunnel;

根据所述综合病害评分确定所述目标隧道的巡检结果。The inspection result of the target tunnel is determined according to the comprehensive disease score.

第二方面,本发明实施例还提供了一种隧道巡检装置,所述隧道巡检装置包括:In the second aspect, the embodiment of the present invention also provides a tunnel inspection device, and the tunnel inspection device includes:

第一获取模块,用于获取目标隧道内拍摄图像对应的光流分量以及亮度分量;A first acquisition module, configured to acquire an optical flow component and a brightness component corresponding to the captured image in the target tunnel;

结合模块,用于将所述光流分量及所述亮度分量与所述拍摄图像的颜色分量进行结合,得到目标图像;A combination module, configured to combine the optical flow component and the brightness component with the color component of the captured image to obtain a target image;

第一处理模块,用于通过训练好的病害识别模型对所述目标图像进行处理,得到所述目标隧道的病害识别结果;The first processing module is used to process the target image through the trained disease recognition model to obtain a disease recognition result of the target tunnel;

第一确定模块,用于基于所述目标隧道的病害识别结果确定所述目标隧道的巡检结果。The first determination module is configured to determine the inspection result of the target tunnel based on the disease identification result of the target tunnel.

第三方面,本发明实施例提供一种电子设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本发明实施例提供的隧道巡检方法中的步骤。In a third aspect, an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the computer program, The steps in the tunnel inspection method provided by the embodiment of the present invention are implemented.

第四方面,本发明实施例提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现发明实施例提供的隧道巡检方法中的步骤。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the tunnel inspection method provided by the embodiment of the present invention is implemented. A step of.

本发明实施例中,获取目标隧道内拍摄图像对应的光流分量以及亮度分量;将所述光流分量及所述亮度分量与所述拍摄图像的颜色分量进行结合,得到目标图像;通过训练好的病害识别模型对所述目标图像进行处理,得到所述目标隧道的病害识别结果;基于所述目标隧道的病害识别结果确定所述目标隧道的巡检结果。通过将拍摄图像的光流分量及亮度分量与拍摄图像的颜色分量进行结合,使得目标图像具备光流分量的动态信息和亮度分量的静态信息,利用光流分量的动态信息和亮度分量的静态信息来辅助病害识别模型进行道路病害识别,从而提高病害识别结果的准确度,进而提高隧道巡检结果的准确率。In the embodiment of the present invention, the optical flow component and brightness component corresponding to the captured image in the target tunnel are obtained; the optical flow component and the brightness component are combined with the color component of the captured image to obtain the target image; The disease identification model of the target image is processed to obtain a disease identification result of the target tunnel; and an inspection result of the target tunnel is determined based on the disease identification result of the target tunnel. By combining the optical flow component and brightness component of the captured image with the color component of the captured image, the target image has the dynamic information of the optical flow component and the static information of the brightness component, and uses the dynamic information of the optical flow component and the static information of the brightness component To assist the disease identification model to identify road diseases, so as to improve the accuracy of disease identification results, and then improve the accuracy of tunnel inspection results.

附图说明Description of drawings

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

图1是本发明实施例提供的一种隧道巡检方法的流程图;Fig. 1 is a flowchart of a tunnel inspection method provided by an embodiment of the present invention;

图2是本发明实施例中提供的一种隧道巡检装置的结构示意图;Fig. 2 is a schematic structural diagram of a tunnel inspection device provided in an embodiment of the present invention;

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

具体实施方式Detailed ways

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

如图1所示,图1是本发明实施例提供的一种隧道巡检方法的方法流程图。该隧道巡检方法包括步骤:As shown in FIG. 1 , FIG. 1 is a method flowchart of a tunnel inspection method provided by an embodiment of the present invention. The tunnel inspection method includes steps:

101、获取目标隧道内拍摄图像对应的光流分量以及亮度分量。101. Acquire an optical flow component and a brightness component corresponding to a captured image in a target tunnel.

在本发明实施例中,上述隧道可以是供交通工具通行的隧道,上述隧道巡检方法可以搭载在服务器或边缘端上,上述边缘端可以是巡检车上用于图像处理和分析的电子设备,巡检车上设置有图像拍摄设备,可以通过图像拍摄设备对隧道的路面和拱面进行拍摄,得到对应的拍摄图像。需要说明的是,巡检车在进行行驶时,图像拍摄设备会以一定帧率进行拍摄,得到连续的拍摄图像。In the embodiment of the present invention, the above-mentioned tunnel may be a tunnel for vehicles to pass through, the above-mentioned tunnel inspection method may be carried on a server or an edge end, and the above-mentioned edge end may be an electronic device for image processing and analysis on an inspection vehicle , The inspection vehicle is equipped with an image capture device, which can be used to capture the road surface and arch surface of the tunnel to obtain corresponding captured images. It should be noted that when the inspection vehicle is driving, the image capture device will capture images at a certain frame rate to obtain continuous captured images.

上述目标隧道可以是巡检车当前所处的隧道,此时,目标隧道内拍摄图像可以是巡检车实时拍摄到的图像;或者上述目标隧道可以是用户通过交互界面选定的隧道,此时,目标隧道内拍摄图像可以是用户选定隧道的历史拍摄图像,该历史拍摄图像为巡检车在选定隧道中拍摄到的历史拍摄图像。The above-mentioned target tunnel can be the tunnel where the inspection vehicle is currently located. At this time, the image captured in the target tunnel can be the image captured by the inspection vehicle in real time; or the above-mentioned target tunnel can be a tunnel selected by the user through the interactive interface. , the captured image in the target tunnel may be a historical captured image of the tunnel selected by the user, and the historical captured image is a historical captured image captured by the inspection vehicle in the selected tunnel.

图像拍摄设备在采集到拍摄图像后,可以将拍摄图像通过数据传输协议传输到服务器或边缘端中进行图像处理和分析。After the image capturing device collects the captured image, it can transmit the captured image to the server or the edge terminal through the data transmission protocol for image processing and analysis.

服务器或边缘端在获取到目标隧道内拍摄图像后,可以通过图像处理技术提取拍摄图像对应的光流分量以及亮度分量,并利用拍摄图像对应的光流分量以及亮度分量辅助隧道巡检中的病害识别。After the server or the edge end obtains the captured image in the target tunnel, it can extract the optical flow component and brightness component corresponding to the captured image through image processing technology, and use the optical flow component and brightness component corresponding to the captured image to assist in the tunnel inspection. identify.

在一种可能的实施例中,上述边缘端在接收到图像拍摄设备的拍摄图像后,通过图像处理技术提取拍摄图像对应的光流分量以及亮度分量,并将拍摄图像以及对应的光流分量和亮度分量上传到服务器,服务器通过拍摄图像对应的光流分量以及亮度分量辅助隧道巡检中的病害识别。In a possible embodiment, after receiving the image captured by the image capture device, the above-mentioned edge terminal extracts the optical flow component and brightness component corresponding to the captured image through image processing technology, and converts the captured image and the corresponding optical flow component and The brightness component is uploaded to the server, and the server assists the identification of diseases in the tunnel inspection through the corresponding optical flow component and brightness component of the captured image.

上述拍摄图像对应的光流分量可以表示从上一拍摄图像到该拍摄图像之间各个像素点的变化情况,可以通过Lucas-Kanade算法、Farneback算法、PyrLK算法来提取上一拍摄图像到该拍摄图像之间的光流信息作为拍摄图像对应的光流分量。The optical flow component corresponding to the above captured image can represent the change of each pixel point from the previous captured image to the captured image, and the previous captured image can be extracted to the captured image through the Lucas-Kanade algorithm, Farneback algorithm, and PyrLK algorithm The optical flow information between them is used as the optical flow component corresponding to the captured image.

上述拍摄图像对应的亮度分量可以是根据拍摄图像的灰度图进行确定,也可以通过将拍摄图像转换为HSV颜色模式来获取。The brightness component corresponding to the above captured image may be determined according to the grayscale image of the captured image, or may be obtained by converting the captured image into an HSV color mode.

需要说明的是,在灰度图中,灰度值可以用0-255之间的整数来表示,不同的灰度值表示不同的亮度,灰度值越大,则亮度越高,0表示黑色,亮度最低,255表示白色,亮度最高。具体的,可以将拍摄图像转换为灰度图,将灰度图作为拍摄图像对应的亮度分量。It should be noted that in the grayscale image, the grayscale value can be represented by an integer between 0-255. Different grayscale values represent different brightness. The larger the grayscale value, the higher the brightness, and 0 means black. , the lowest brightness, 255 means white, the highest brightness. Specifically, the captured image may be converted into a grayscale image, and the grayscale image may be used as a brightness component corresponding to the captured image.

在HSV颜色模式中,每个像素点的颜色可以表示为一个三元组(H,S,V),其中H表示色调,S表示饱和度,V表示亮度,在HSV颜色模式下,图像的亮度分量可以通过V分量进行表示,上述V分量也可以称为V通道。具体的,将拍摄图像转换为HSV颜色模式,在HSV颜色模式下提取V分量来作为拍摄图像对应的亮度分量。In the HSV color mode, the color of each pixel can be expressed as a triplet (H, S, V), where H represents the hue, S represents the saturation, and V represents the brightness. In the HSV color mode, the brightness of the image The component can be represented by a V component, and the above V component can also be called a V channel. Specifically, the captured image is converted into the HSV color mode, and the V component is extracted in the HSV color mode as the brightness component corresponding to the captured image.

102、将光流分量及亮度分量与拍摄图像的颜色分量进行结合,得到目标图像。102. Combine the optical flow component and brightness component with the color component of the captured image to obtain a target image.

在本发明实施例中,上述拍摄图像包括多个颜色分量,不同的颜色模式对应不同的颜色分量,一个颜色分量也可以称为一个通道。图像的颜色模式包括RGB颜色模式、HSV颜色模式、CMYK颜色模式、LAB颜色模式等。其中,RGB颜色模式对应的颜色分量为R分量、G分量以及B分量,R分量表示红色分量,G分量表示绿色分量,B分量表示蓝色分量。HSV颜色模式对应的颜色分量为H分量、S分量以及V分量,其中,H分量表示色调分量,S分量表示饱和度分量,V分量表示亮度分量。CMYK颜色模式对应的颜色分量为C分量、M分量、Y分量和K分量,其中,C分量表示青色分量,M分量表示品红色分量,Y分量表示黄色分量,K分量表示黑色分量。LAB颜色模式对应的颜色分量为L分量、A分量以及B分量,其中,L分量表示明度分量,A分量表示绿/红分量,B表示蓝/黄分量。在本发明实施例中,拍摄图像的颜色模式优选为RGB颜色模式,这是由于RGB颜色模式可以提供丰富的颜色表现能力,使得拍摄图像具备有更多的图像细节。In the embodiment of the present invention, the above-mentioned captured image includes multiple color components, and different color modes correspond to different color components, and one color component may also be called a channel. The color mode of the image includes RGB color mode, HSV color mode, CMYK color mode, LAB color mode, etc. Wherein, the color components corresponding to the RGB color mode are R component, G component and B component, the R component represents the red component, the G component represents the green component, and the B component represents the blue component. The color components corresponding to the HSV color mode are H component, S component and V component, wherein the H component represents the hue component, the S component represents the saturation component, and the V component represents the brightness component. The color components corresponding to the CMYK color mode are C component, M component, Y component and K component, where the C component represents the cyan component, the M component represents the magenta component, the Y component represents the yellow component, and the K component represents the black component. The color components corresponding to the LAB color mode are the L component, the A component, and the B component, where the L component represents the lightness component, the A component represents the green/red component, and the B represents the blue/yellow component. In the embodiment of the present invention, the color mode of the captured image is preferably the RGB color mode, because the RGB color mode can provide rich color expression capabilities, so that the captured image has more image details.

以拍摄图像的颜色模式为RGB颜色模式进行说明,服务器或边缘端在得到拍摄图像对应的光流分量和亮度分量后,可以将光流分量和亮度分量与拍摄图像的颜色分量进行拼接,得到目标图像,此时目标图像中包括RGB颜色分量、光流分量和亮度分量。在一种可能的实施例中,可以将光流分量和亮度分量与拍摄图像的颜色分量进行叠加,得到目标图像,此时目标图像中包括叠加后的RGB颜色分量。The color mode of the captured image is RGB color mode for illustration. After the server or the edge end obtains the optical flow component and brightness component corresponding to the captured image, it can splice the optical flow component and brightness component with the color component of the captured image to obtain the target Image, at this time, the target image includes RGB color components, optical flow components, and brightness components. In a possible embodiment, the optical flow component and the brightness component may be superimposed on the color component of the captured image to obtain the target image, and at this time the target image includes the superimposed RGB color components.

103、通过训练好的病害识别模型对目标图像进行处理,得到目标隧道的病害识别结果。103. Process the target image through the trained defect recognition model to obtain a defect recognition result of the target tunnel.

在本发明实施例中,上述病害识别模型用于识别目标图像中的病害类型、病害位置和病害程度,上述病害识别模型可以是深度卷积神经网络,具体的,上述病害识别模型可以是基于ResNet、YOLOV、Faster R-CNN、SSD、RetinaNet等深度卷积神经网络构建得到的模型。In the embodiment of the present invention, the above-mentioned disease identification model is used to identify the disease type, disease location and disease degree in the target image. The above-mentioned disease identification model can be a deep convolutional neural network. Specifically, the above-mentioned disease identification model can be based on ResNet , YOLOV, Faster R-CNN, SSD, RetinaNet and other deep convolutional neural networks to build models.

上述病害识别模型可以通过预先准备好的数据集进行训练,训练完成后得到训练好的病害识别模型。上述训练好的病害识别模型部署于服务器或边缘端,在服务器或边缘端得到目标图像后,将目标图像输入到病害识别模型中进行处理,病害识别模型输出目标图像中存在的病害类型、病害位置和病害程度等病害信息作为病害识别结果。The above-mentioned disease identification model can be trained through a pre-prepared data set, and a trained disease identification model can be obtained after the training is completed. The above-mentioned trained disease recognition model is deployed on the server or the edge. After the target image is obtained on the server or the edge, the target image is input into the disease recognition model for processing, and the disease recognition model outputs the type and location of the disease in the target image. The disease information such as disease degree and disease degree is used as the disease identification result.

上述训练好的病害识别模型输出病害检测框(x,y,w,h,r,u,v),其中,(x,y)表示病害检测框的中心位置,w表示病害检测框的宽度,h表示病害检测框的高度,r表示病害检测框的置信度,u表示病害检测框中的病害类型,v表示病害检测框中的病害程度。The above-mentioned trained disease recognition model outputs a disease detection frame (x, y, w, h, r, u, v), where (x, y) represents the center position of the disease detection frame, and w represents the width of the disease detection frame, h represents the height of the disease detection frame, r represents the confidence of the disease detection frame, u represents the type of disease in the disease detection frame, and v represents the degree of disease in the disease detection frame.

上述病害类型可以通过病害检测框的u进行确定,病害类型可以包括路面病害和拱面病害,其中,上述路面病害可以理解为出现在道路表面的病害,上述拱面病害可以理解为出现在拱洞内表面的病害。具体的,上述道路表面的病害可以是路面龟裂、坑洼、波浪形路面、沉降等影响路面寿命和交通安全的病害,上述拱面病害可以是表面剥落、裂缝、坍塌等影响隧道寿命和隧道安全的病害。The above-mentioned disease types can be determined by u in the disease detection frame. The disease types can include road surface diseases and arch surface diseases. The above-mentioned road surface diseases can be understood as diseases that appear on the road surface, and the above-mentioned arch surface diseases can be understood as appearing in arch holes Diseases of the inner surface. Specifically, the above-mentioned road surface diseases can be road surface cracks, potholes, wavy road surfaces, settlements and other diseases that affect the life of the road surface and traffic safety, and the above-mentioned arch surface diseases can be surface spalling, cracks, collapses, etc. safe disease.

上述病害位置可以是病害在目标图像中的位置,病害位置可以通过病害检测框的中心位置进行表示。在一种可能的实施例中,每一帧拍摄图像都有对应的拍摄时间和拍摄地点,在确定拍摄图像的拍摄地点后,可以通过图像拍摄设备的相机坐标系与真实世界坐标系之间的转换关系,将目标图像中的病害位置转换为真实世界中的病害位置。The above-mentioned disease position may be the position of the disease in the target image, and the disease position may be represented by the center position of the disease detection frame. In a possible embodiment, each frame of captured image has a corresponding shooting time and shooting location. After determining the shooting location of the captured image, the coordinate system between the camera coordinate system of the image capturing device and the real world coordinate system can be used to The transformation relation converts the lesion location in the target image to the lesion location in the real world.

上述病害程度可以通过病害检测框的v进行确定,病害程度可以通过分值形式进行表示,也可以等级形式进行表示。病害程度的分值越高,病害越严重,或者,病害等级越高,病害越严重。The above-mentioned disease degree can be determined through the v of the disease detection frame, and the disease degree can be expressed in the form of a score, or in the form of a grade. The higher the score of the disease degree, the more serious the disease, or the higher the disease grade, the more serious the disease.

通过训练好的病害识别模型对目标隧道中所有目标图像进行病害识别结果,可以得到目标隧道的病害识别结果。目标隧道的病害识别结果可以包括病害数量、病害类型、病害位置、病害程度等病害信息。Through the trained disease identification model, the disease identification results of all target images in the target tunnel can be obtained, and the disease identification results of the target tunnel can be obtained. The disease identification result of the target tunnel may include disease information such as disease quantity, disease type, disease location, and disease degree.

104、基于目标隧道的病害识别结果确定目标隧道的巡检结果。104. Determine the inspection result of the target tunnel based on the fault identification result of the target tunnel.

在本发明实施例中,在得到目标隧道的病害识别结果后,可以在目标隧道的病害识别结果基础上进行数据分析,得到目标隧道的巡检结果。In the embodiment of the present invention, after the defect identification result of the target tunnel is obtained, data analysis may be performed on the basis of the defect identification result of the target tunnel to obtain the inspection result of the target tunnel.

上述巡检结果包括是否合格和修复等级中的至少一项。服务器或边缘端在得到目标隧道的病害识别结果后,可以根据目标隧道的病害识别结果确定目标隧道的巡检结果是否合格。或者可以根据目标隧道的病害识别结果确定目标隧道的修复等级。或者可以在确定目标隧道的巡检结果不合格的情况下,进一步确定目标隧道的修复等级。The above inspection results include at least one of qualification and repair level. After obtaining the fault identification result of the target tunnel, the server or the edge end may determine whether the inspection result of the target tunnel is qualified according to the fault identification result of the target tunnel. Alternatively, the repair level of the target tunnel can be determined according to the identification result of the target tunnel. Alternatively, in a case where it is determined that the inspection result of the target tunnel is unqualified, the repair level of the target tunnel may be further determined.

可以根据目标隧道的病害数量、病害类型、病害位置、病害程度等来确定目标隧道的巡检结果是否合格,比如,当病害数量大于或等于预设病害数量时,则可以确定目标隧道的巡检结果为不合格,当病害数量小于预设病害数量时,则可以确定目标隧道的巡检结果为合格;当病害类型存在预设类型时,则可以确定目标隧道的巡检结果为不合格,当病害数量不存在预设病害数量时,则可以确定目标隧道的巡检结果为合格;当病害位置出现在路面中心或拱面中心时,则可以确定目标隧道的巡检结果为不合格,当病害位置出现在路面边缘或拱面边缘时,则可以确定目标隧道的巡检结果为合格;当病害程度大于或等于预设病害程度时,则可以确定目标隧道的巡检结果为不合格,当病害程度小于预设病害程度时,则可以确定目标隧道的巡检结果为合格。也可以将目标隧道的病害数量、病害类型、病害位置、病害程度进行结合来判断目标隧道的巡检结果是否合格。It can be determined whether the inspection result of the target tunnel is qualified according to the number of diseases, disease type, disease location, disease degree, etc. of the target tunnel. For example, when the number of diseases is greater than or equal to the preset number of diseases, the inspection of the target tunnel can be determined. The result is unqualified. When the number of diseases is less than the preset number of diseases, it can be determined that the inspection result of the target tunnel is qualified; when the disease type has a preset type, it can be determined that the inspection result of the target tunnel is unqualified. When the number of diseases does not exist in the preset number of diseases, it can be determined that the inspection result of the target tunnel is qualified; When the position appears on the edge of the road surface or the edge of the arch surface, it can be determined that the inspection result of the target tunnel is qualified; when the disease degree is greater than or equal to the preset disease degree, it can be determined that the inspection result of the target tunnel is unqualified. When the degree of damage is less than the preset disease degree, it can be determined that the inspection result of the target tunnel is qualified. It is also possible to combine the number of diseases, disease types, disease locations, and disease degrees of the target tunnel to determine whether the inspection result of the target tunnel is qualified.

上述修复等级可以通过目标隧道的病害程度进行确定,可以将目标隧道中的最大病害程度确定为目标隧道的修复等级,也可以将目标隧道中平均病害程度确定为目标隧道的修复等级。在一种可能的实施例中,也可以根据上述病害综合评分来确定目标隧道的修复等级,目标隧道的病害综合评分越高,则目标隧道的修复等级越高,目标隧道的病害综合评分越低,则目标隧道的修复等级越低。The repair level above can be determined by the damage degree of the target tunnel, the maximum damage degree in the target tunnel can be determined as the repair grade of the target tunnel, and the average damage degree in the target tunnel can also be determined as the repair grade of the target tunnel. In a possible embodiment, the repair grade of the target tunnel can also be determined according to the above-mentioned comprehensive damage score. The higher the comprehensive damage score of the target tunnel is, the higher the repair grade of the target tunnel is, and the lower the comprehensive damage score of the target tunnel is. , the lower the repair level of the target tunnel is.

服务器或边缘端在得到上述巡检结果后,可以将巡检结果发送到相关道路部门的管理系统或用户终端,以使相关道路部门或用户能够查看目标隧道的巡检结果。After the server or the edge terminal obtains the inspection result, it can send the inspection result to the management system of the relevant road department or the user terminal, so that the relevant road department or user can view the inspection result of the target tunnel.

本发明实施例中,获取目标隧道内拍摄图像对应的光流分量以及亮度分量;将光流分量及亮度分量与拍摄图像的颜色分量进行结合,得到目标图像;通过训练好的病害识别模型对目标图像进行处理,得到目标隧道的病害识别结果;基于目标隧道的病害识别结果确定目标隧道的巡检结果。通过将拍摄图像的光流分量及亮度分量与拍摄图像的颜色分量进行结合,使得目标图像具备光流分量的动态信息和亮度分量的静态信息,利用光流分量的动态信息和亮度分量的静态信息来辅助病害识别模型进行道路病害识别,从而提高病害识别结果的准确度,进而提高隧道巡检结果的准确率。In the embodiment of the present invention, the optical flow component and brightness component corresponding to the captured image in the target tunnel are obtained; the optical flow component and the brightness component are combined with the color component of the captured image to obtain the target image; The image is processed to obtain the result of the target tunnel's disease identification; based on the result of the target tunnel's disease identification, the inspection result of the target tunnel is determined. By combining the optical flow component and brightness component of the captured image with the color component of the captured image, the target image has the dynamic information of the optical flow component and the static information of the brightness component, and uses the dynamic information of the optical flow component and the static information of the brightness component To assist the disease identification model to identify road diseases, so as to improve the accuracy of disease identification results, and then improve the accuracy of tunnel inspection results.

可以理解的是,在本申请的具体实施方式中,涉及到隧道内外的拍摄图像等相关的数据,当本申请中实施例运用到具体产品或技术中时,需要获得相关部门的许可或者同意,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。It can be understood that in the specific implementation of this application, related data such as photographed images inside and outside the tunnel are involved. When the embodiment in this application is applied to a specific product or technology, it is necessary to obtain the permission or consent of the relevant department. And the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

可选的,在获取目标隧道内拍摄图像的光流分量以及亮度分量的步骤之前,还可以采集目标隧道前的道路标识信息;根据道路标识信息,确定目标隧道的拍摄参数;在进入到目标隧道后,以拍摄参数对目标隧道进行拍摄。Optionally, before the step of obtaining the optical flow component and brightness component of the captured image in the target tunnel, road sign information before the target tunnel can also be collected; according to the road sign information, the shooting parameters of the target tunnel are determined; After that, shoot the target tunnel with shooting parameters.

在本发明实施例中,可以获取巡检车进入目标隧道前采集到的拍摄图像,对进入目标隧道前采集到的拍摄图像进行标识识别,得到目标隧道前的道路标识信息。上述道路标识信息可以包括隧道名称、隧道限速、隧道长度、隧道高度等。上述拍摄参数包括拍摄光补偿、拍摄帧率、拍摄分辨率、对焦位置等。In the embodiment of the present invention, the photographed images collected before the inspection vehicle enters the target tunnel can be acquired, the photographed images collected before entering the target tunnel can be identified and identified, and the road identification information before the target tunnel can be obtained. The above road identification information may include tunnel name, tunnel speed limit, tunnel length, tunnel height and so on. The above shooting parameters include shooting light compensation, shooting frame rate, shooting resolution, focus position and so on.

不同的道路标识信息对应不同的拍摄参数,道路标识信息与拍摄参数之间的关联关系可以通过一个映射表进行记录,在得到目标隧道的道路标识信息后,可以通过映射表查找出对应的拍摄参数,从而得到目标隧道的拍摄参数。Different road sign information corresponds to different shooting parameters. The relationship between road sign information and shooting parameters can be recorded through a mapping table. After obtaining the road sign information of the target tunnel, the corresponding shooting parameters can be found through the mapping table , so as to obtain the shooting parameters of the target tunnel.

在一种可能的实施例中,可以通过一个训练好的卷积神经网络来对拍摄参数进行输出。可以将道路标识信息输入到训练好的卷积神经网络中进行编码、特征提取和结果输出,得到对应的拍摄参数。具体的,上述道路标识信息包括隧道限速、隧道长度、隧道高度等,训练好的卷积神经网络包括编码层、卷积层和输出层,通过编码层对道路标识信息进行编码,将道路标识信息由字符串类型编码为数值类型,得到道路标识信息对应的编码特征,通过卷积层对编码特征进行卷积计算,得到道路标识信息的特征向量,通过输出层对特征向量进行线性回归分类,得到对应的拍摄参数进行输出。进一步的,卷积神经网络在训练时采集第二数据集进行有监督训练,第二数据集中包括样本标识信息和拍摄参数标签,其中,样本标识信息包括隧道限速、隧道长度、隧道高度等,拍摄参数标签包括与样本标识信息实际对应的拍摄光补偿、拍摄帧率、拍摄分辨率、对焦位置等,上述拍摄参数标签可以由相关专业人员进行人工标注得到。在训练过程中,将样本标识信息输入到待训练的卷积神经网络中,通过编码层、卷积层和输出层处理后,得到样本标识信息对应的拍摄参数结果,计算样本标识信息对应的拍摄参数结果与样本标识信息对应的拍摄参数标签之间的误差损失,以最小化误差损失为优化目标,通过误差反向传播算法对待训练的卷积神经网络中的参数进行调整,迭代上述误差计算与参数调整的过程,直到待训练的卷积神经网络在误差损失最小处收敛或迭代次数达到预设次数后,完成训练,得到训练好的卷积神经网络。在得到训练好的卷积神经网络后,将目标隧道的道路标识信息输入到训练好的卷积神经网络进行处理,通过训练好的卷积神经网络输出目标隧道的拍摄参数。In a possible embodiment, the shooting parameters may be output through a trained convolutional neural network. The road sign information can be input into the trained convolutional neural network for encoding, feature extraction and result output to obtain the corresponding shooting parameters. Specifically, the above-mentioned road sign information includes tunnel speed limit, tunnel length, tunnel height, etc., and the trained convolutional neural network includes an encoding layer, a convolution layer and an output layer, and the road sign information is encoded through the encoding layer, and the road sign The information is encoded from a string type to a numerical type, and the encoding features corresponding to the road sign information are obtained. The encoding features are convoluted through the convolution layer to obtain the feature vector of the road sign information, and the feature vector is linearly classified through the output layer. The corresponding shooting parameters are obtained for output. Further, the convolutional neural network collects a second data set for supervised training during training, and the second data set includes sample identification information and shooting parameter labels, wherein the sample identification information includes tunnel speed limit, tunnel length, tunnel height, etc. The shooting parameter label includes the shooting light compensation, shooting frame rate, shooting resolution, focus position, etc. actually corresponding to the sample identification information. The above shooting parameter label can be manually marked by relevant professionals. During the training process, the sample identification information is input into the convolutional neural network to be trained. After processing through the encoding layer, convolution layer and output layer, the shooting parameter results corresponding to the sample identification information are obtained, and the shooting parameters corresponding to the sample identification information are calculated. The error loss between the parameter result and the shooting parameter label corresponding to the sample identification information, with the optimization goal of minimizing the error loss, adjusts the parameters in the convolutional neural network to be trained through the error back propagation algorithm, and iterates the above error calculation and In the process of parameter adjustment, the training is completed until the convolutional neural network to be trained converges at the point where the error loss is minimum or the number of iterations reaches the preset number, and the trained convolutional neural network is obtained. After the trained convolutional neural network is obtained, the road identification information of the target tunnel is input to the trained convolutional neural network for processing, and the shooting parameters of the target tunnel are output through the trained convolutional neural network.

在得到目标隧道的拍摄参数后,将拍摄参数转换为对应的控制指令,在巡检车进入到目标隧道后,通过控制指令控制对应图像拍摄设备进行拍摄,从而可以使得图像拍摄设备以拍摄参数对目标隧道进行拍摄,得到目标隧道内的拍摄图像。After obtaining the shooting parameters of the target tunnel, the shooting parameters are converted into corresponding control instructions. After the inspection vehicle enters the target tunnel, the corresponding image shooting equipment is controlled by the control instructions to shoot, so that the image shooting equipment can use the shooting parameters to control The target tunnel is photographed to obtain photographed images in the target tunnel.

可选的,在获取目标隧道内拍摄图像的光流分量以及亮度分量的步骤中,可以获取目标隧道内拍摄图像与在前拍摄图像;对在前拍摄图像与拍摄图像之间的光流分量进行提取,得到拍摄图像对应的光流分量;将拍摄图像转换为HSV颜色模式,并基于HSV颜色模式确定拍摄图像对应的亮度分量。Optionally, in the step of obtaining the optical flow component and the brightness component of the captured image in the target tunnel, the captured image in the target tunnel and the previously captured image can be acquired; the optical flow component between the previously captured image and the captured image is Extract to obtain the optical flow component corresponding to the captured image; convert the captured image to HSV color mode, and determine the brightness component corresponding to the captured image based on the HSV color mode.

在本发明实施例中,服务器或边缘端在获取到目标隧道内拍摄图像的同时,还会获取该拍摄图像的在前拍摄图像,上述目标隧道内拍摄图像的在前拍摄图像可以理解为在前一个时刻拍摄到的图像,拍摄图像与在前拍摄图像为相邻的两帧拍摄图像。可以通过服务器或边缘端中部署的Lucas-Kanade算法、Farneback算法、PyrLK算法等光流提取算法来提取在前拍摄图像到拍摄图像之间的光流信息作为拍摄图像对应的光流分量。In the embodiment of the present invention, when the server or the edge terminal obtains the captured image in the target tunnel, it will also acquire the previous captured image of the captured image. The above-mentioned previously captured image of the target tunnel image can be understood as For an image captured at a moment, the captured image and the previously captured image are two adjacent frame captured images. The optical flow information between the previously captured image and the captured image can be extracted as the optical flow component corresponding to the captured image through the optical flow extraction algorithm such as Lucas-Kanade algorithm, Farneback algorithm, and PyrLK algorithm deployed in the server or edge.

在服务器或边缘端获取到目标隧道内拍摄图像后,可以通过颜色模式转换算法将拍摄图像的颜色模式转换为HSV颜色模式,在HSV颜色模式下提取对应的亮度分量作为拍摄图像对应的亮度分量。需要说明的是,在HSV颜色模式下,图像的亮度分量可以通过V分量进行表示,上述V分量也可以称为V通道。具体的,将拍摄图像转换为HSV颜色模式,在HSV颜色模式下提取V分量来作为拍摄图像对应的亮度分量。由于在颜色模式转换过程中,图像的分辨率尺寸不变,因此,提取到的亮度分量与拍摄图像也具有相同的分辨率尺寸。After the server or the edge end obtains the captured image in the target tunnel, the color mode of the captured image can be converted to the HSV color mode through the color mode conversion algorithm, and the corresponding brightness component is extracted in the HSV color mode as the corresponding brightness component of the captured image. It should be noted that, in the HSV color mode, the luminance component of an image may be represented by a V component, and the V component may also be called a V channel. Specifically, the captured image is converted into the HSV color mode, and the V component is extracted in the HSV color mode as the brightness component corresponding to the captured image. Since the resolution size of the image does not change during the color mode conversion process, the extracted brightness component also has the same resolution size as the captured image.

可选的,在基于HSV颜色模式确定拍摄图像对应的亮度分量的步骤中,还可以基于HSV颜色模式确定拍摄图像的第一亮度分量;根据第一亮度分量预测出拍摄图像的第二亮度分量,将第二亮度分量确定为拍摄图像对应的亮度分量。Optionally, in the step of determining the brightness component corresponding to the captured image based on the HSV color mode, the first brightness component of the captured image may also be determined based on the HSV color mode; the second brightness component of the captured image is predicted according to the first brightness component, The second brightness component is determined as the brightness component corresponding to the captured image.

在本发明实施例中,服务器或边缘端将拍摄图像转换为HSV颜色模式后,提取出HSV颜色模式中的V分量作为拍摄图像的第一亮度分量,第一亮度分量的分辨率尺寸与拍摄图像的分辨率尺寸相同,第一亮度分量中的每一个像素点都与拍摄图像中相同坐标的像素点对应,其中,第一亮度分量中各个像素点的值表示拍摄图像中对应像素点的亮度值。In the embodiment of the present invention, after the server or the edge side converts the captured image into the HSV color mode, the V component in the HSV color mode is extracted as the first luminance component of the captured image, and the resolution size of the first luminance component is the same as that of the captured image. The resolution size is the same, each pixel in the first brightness component corresponds to the pixel with the same coordinates in the captured image, where the value of each pixel in the first brightness component represents the brightness value of the corresponding pixel in the captured image .

在得到第一亮度分量后,可以对第一亮度分量进行预测处理,得到拍摄图像的第二亮度分量,第二亮度分量中各个像素点的亮度值大于第一亮度分量中各个像素点的亮度值。After the first luminance component is obtained, prediction processing can be performed on the first luminance component to obtain the second luminance component of the captured image, and the luminance value of each pixel in the second luminance component is greater than the luminance value of each pixel in the first luminance component .

在一种实施例中,根据第一亮度分量预测出拍摄图像的第二亮度分量的步骤中,可以将第一亮度分量进行奇异值分解(SVD)或主成分分析(PCA),得到第一亮度分量的奇异值或主成分,然后通过奇异值或主成分对第一亮度分量进行调整,得到第二亮度分量。In one embodiment, in the step of predicting the second brightness component of the captured image according to the first brightness component, the first brightness component can be subjected to singular value decomposition (SVD) or principal component analysis (PCA) to obtain the first brightness The singular value or principal component of the component, and then the first brightness component is adjusted by the singular value or principal component to obtain the second brightness component.

在一种实施例中,可以训练一个生成器,该生成器用于根据第一亮度分量生成第二亮度分量。具体的,可以构建一个生成式对抗网络(Generative Adversarial Network,GAN),生成式对抗网络包括生成器和判别器。需要说明的是,生成器尝试生成类似于真实数据的样本,而判别器则尝试区分真实数据和生成器生成的数据。在训练过程中,生成器和判别器相互对抗,最终生成器可以生成逼真的样本。构建第三数据集,第三数据集中包括样本亮度分量和目标亮度分量,目标亮度分量可以理解为样本亮度分量进行亮度增强后的亮度分量,目标亮度分量也可以理解为较亮HSV图像中的V分量,样本亮度分量也可以理解为较暗HSV图像中的V分量,较暗HSV图像可以是较亮HSV图像经过亮度下调得到,较亮HSV图像也可以是较暗HSV图像经过亮度上调得到。样本亮度分量与目标亮度分量具有相同的分辨率尺寸,样本亮度分量中各像素点的亮度值小于目标亮度分量中各个像素点的亮度值。在训练过程中,将样本亮度分量输入到生成器进行生成处理,得到生成结果,将生成结果输入到判别器中与目标亮度分量进行判别处理,若判别结果为假,则表明判别器判断生成器的生成结果与目标亮度分量不相似,此时,计算生成结果与目标亮度分量之间的误差损失,通过以误差损失最小为优化目标对生成器进行参数调整,以使生成器能够生成与目标亮度分量更相似的结果;若判别结果为真,则表明判别器判断生成器的生成结果与目标亮度分量很相似,则可以计算生成结果与目标亮度分量之间的误差损失,通过以误差损失最小为优化目标对判别器进行参数调整,以使生成器能够提高判别性能,从而提高判别器对于生成结果的判别准确率,迭代上述生成器和判别器的参数调整过程,直到迭代次数达到预设次数,停止迭代,得到训练好的生成器。将拍摄图像的第一亮度分量输入到该训练好的生成器中,通过生成器输出对应的生成结果,将该生成结果作为拍摄图像的第二亮度分量。In one embodiment, a generator can be trained to generate the second luminance component from the first luminance component. Specifically, a Generative Adversarial Network (GAN) can be constructed, and the Generative Adversarial Network includes a generator and a discriminator. It should be noted that the generator tries to generate samples similar to real data, while the discriminator tries to distinguish real data from the data generated by the generator. During training, the generator and the discriminator compete against each other, and finally the generator can generate realistic samples. Construct the third data set. The third data set includes the sample brightness component and the target brightness component. The target brightness component can be understood as the brightness component after the brightness enhancement of the sample brightness component, and the target brightness component can also be understood as the V in the brighter HSV image. The sample brightness component can also be understood as the V component in the darker HSV image. The darker HSV image can be obtained by reducing the brightness of the brighter HSV image, and the brighter HSV image can also be obtained by increasing the brightness of the darker HSV image. The sample luminance component and the target luminance component have the same resolution size, and the luminance value of each pixel in the sample luminance component is smaller than the luminance value of each pixel in the target luminance component. In the training process, the sample brightness component is input to the generator for generation processing, and the generation result is obtained, and the generation result is input into the discriminator for discrimination processing with the target brightness component. If the discrimination result is false, it indicates that the discriminator judges the generator The generated result of is not similar to the target brightness component. At this time, calculate the error loss between the generated result and the target brightness component, and adjust the parameters of the generator by taking the minimum error loss as the optimization goal, so that the generator can generate The results of the more similar components; if the discriminant result is true, it means that the discriminator judges that the generated result of the generator is very similar to the target luminance component, and the error loss between the generated result and the target luminance component can be calculated, and the minimum error loss is The optimization goal is to adjust the parameters of the discriminator so that the generator can improve the discrimination performance, thereby improving the discrimination accuracy of the discriminator for the generated results, iterating the parameter adjustment process of the generator and the discriminator above until the number of iterations reaches the preset number, Stop iterating and get the trained generator. The first luminance component of the captured image is input into the trained generator, and the generator outputs a corresponding generation result, which is used as the second luminance component of the captured image.

在得到第二亮度分量后,可以将第二亮度分量确定为拍摄图像的亮度分量,由于第二亮度分量相比于第一亮度分量来说亮度值更高,因此,将第二亮度分量确定为拍摄图像的亮度分量,可以在将亮度分量与拍摄图像的颜色分量进行结合后,进一步提高目标图像的亮度。After obtaining the second luminance component, the second luminance component can be determined as the luminance component of the captured image. Since the luminance value of the second luminance component is higher than that of the first luminance component, the second luminance component is determined as The brightness component of the captured image can further increase the brightness of the target image after combining the brightness component with the color component of the captured image.

可选的,拍摄图像为RGB颜色模式,在将光流分量及亮度分量与拍摄图像的颜色分量进行结合,得到目标图像的步骤中,可以将光流分量及亮度分量拼接到拍摄图像的颜色分量之后,得到拼接图像;通过预设的卷积核对拼接图像进行卷积融合处理,得到目标图像。Optionally, the captured image is in RGB color mode, and in the step of combining the optical flow component and the brightness component with the color component of the captured image to obtain the target image, the optical flow component and the brightness component can be spliced into the color component of the captured image Afterwards, the stitched image is obtained; the stitched image is subjected to convolution and fusion processing through a preset convolution kernel to obtain the target image.

在本发明实施例中,拍摄图像优选为RGB颜色模式,RGB颜色模式可以提供丰富的颜色表现能力,使得拍摄图像具备有更多的图像细节,结合光流分量和亮度分量后,目标图像具备光流分量的动态信息和亮度分量的静态信息,同时保留了丰富的图像细节。In the embodiment of the present invention, the captured image is preferably in the RGB color mode. The RGB color mode can provide rich color expression capabilities, so that the captured image has more image details. After combining the optical flow component and the brightness component, the target image has light The dynamic information of the flow component and the static information of the luminance component, while retaining rich image details.

拍摄图像的颜色分量包括R颜色分量、G颜色分量和B颜色分量,可以将光流分量及亮度分量拼接到R颜色分量、G颜色分量和B颜色分量之前或之后,从而使得拼接图像具有5个分量(可以理解为5个通道),拼接图像中的R颜色分量、G颜色分量和B颜色分量记载了图像细节信息,光流分量记载了亮度的动态信息,亮度分量记载了亮度的静态信息。The color components of the captured image include R color component, G color component and B color component, and the optical flow component and brightness component can be spliced before or after the R color component, G color component and B color component, so that the spliced image has 5 Component (can be understood as 5 channels), the R color component, G color component and B color component in the stitched image record the image detail information, the optical flow component records the dynamic information of the brightness, and the brightness component records the static information of the brightness.

上述预设的卷积核可以是1*1卷积核,1*1卷积核的作用是将多个通道进行线性组合,从而得到一个新的通道。通过1*1卷积核可以将拼接图像中颜色分量、光流分量以及亮度分量进行卷积操作,将多个分量融合为一个单通道图像,并将该单通道图像确定为目标图像,该目标图像中融合了图像细节信息、亮度的动态信息以及亮度的静态信息。The aforementioned preset convolution kernel can be a 1*1 convolution kernel, and the function of the 1*1 convolution kernel is to linearly combine multiple channels to obtain a new channel. Through the 1*1 convolution kernel, the color component, optical flow component and brightness component in the spliced image can be convolved, and multiple components can be fused into a single-channel image, and the single-channel image can be determined as the target image. Image details, dynamic information of brightness and static information of brightness are integrated in the image.

可选的,在通过训练好的病害识别模型对目标图像进行处理,得到目标隧道的病害识别结果的步骤之前,还可以获取第一数据集以及待训练的病害识别模型,第一数据集包括样本图像以及与样本图像对应的病害标签,样本图像与目标图像的获取方式相同;通过第一数据集对待训练的病害识别模型进行有监督训练;训练完成得到训练好的病害识别模型。Optionally, before the step of processing the target image through the trained disease recognition model to obtain the disease recognition result of the target tunnel, the first data set and the disease recognition model to be trained can also be obtained. The first data set includes sample image and the disease label corresponding to the sample image, the sample image is acquired in the same way as the target image; supervised training is performed on the disease recognition model to be trained through the first data set; the trained disease recognition model is obtained after the training is completed.

在本发明实施例中,上述第一数据集中包括一定数量的样本图像以及与样本图像对应的病害标签,也即是样本图像为原始图像的颜色分量、光流分量以及亮度分量进行结合得到,具体结合方式请参考上述实施例中目标图像的结合方式,在此不再另行赘述。样本图像对应的病害标签可以是相关专业人员进行标注得到,一个样本图像可以对应一组病害标签,一组病害标签中包括病害类型、病害位置、病害程度等标注信息。In the embodiment of the present invention, the above-mentioned first data set includes a certain number of sample images and disease labels corresponding to the sample images, that is, the sample images are obtained by combining the color components, optical flow components, and brightness components of the original image, specifically For the combination method, please refer to the combination method of the target image in the above-mentioned embodiment, which will not be repeated here. The disease label corresponding to the sample image can be marked by relevant professionals. A sample image can correspond to a set of disease labels, and a set of disease labels includes label information such as disease type, disease location, and disease degree.

在训练过程中,将样本图像输入到待训练的病害识别模型中进行处理,输出得到样本图像对应的病害识别结果,计算样本图像对应的病害识别结果与样本图像对应的病害标签之间的误差损失,以最小化误差损失为优化目标,通过误差反向传播算法对待训练的病害识别模型进行参数调整,迭代上述误差计算与参数调整的过程,直到待训练的病害识别模型在误差损失最小处收敛或迭代次数达到预设次数后,完成训练,得到训练好的病害识别模型。在得到训练好的病害识别模型后,可以将目标图像输入到训练好的病害识别模型中进行处理,输出得到目标图像对应的病害识别结果,该目标图像对应的病害识别结果即为拍摄图像的病害识别结果。进一步的,可以将隧道内所有拍摄图像的病害识别结果进行记录,得到目标隧道的病害识别结果。In the training process, the sample image is input into the disease recognition model to be trained for processing, and the disease recognition result corresponding to the sample image is output, and the error loss between the disease recognition result corresponding to the sample image and the disease label corresponding to the sample image is calculated , with the optimization goal of minimizing the error loss, adjust the parameters of the disease recognition model to be trained through the error back propagation algorithm, and iterate the above process of error calculation and parameter adjustment until the disease recognition model to be trained converges at the minimum error loss or After the number of iterations reaches the preset number, the training is completed and a trained disease recognition model is obtained. After the trained disease recognition model is obtained, the target image can be input into the trained disease recognition model for processing, and the disease recognition result corresponding to the target image can be output, and the disease recognition result corresponding to the target image is the disease of the captured image recognition result. Further, the disease identification results of all the captured images in the tunnel can be recorded to obtain the disease identification results of the target tunnel.

可选的,在基于目标隧道的病害识别结果确定目标隧道的巡检结果的步骤中,可以基于目标隧道的病害识别结果确定目标隧道的综合病害评分;根据综合病害评分确目标隧道的巡检结果。Optionally, in the step of determining the inspection result of the target tunnel based on the disease identification result of the target tunnel, the comprehensive disease score of the target tunnel can be determined based on the disease identification result of the target tunnel; the inspection result of the target tunnel can be determined according to the comprehensive disease score .

在本发明实施例中,目标隧道的病害识别结果可以包括病害数量、病害类型、病害位置、病害程度等病害信息,服务器或边缘端在得到目标隧道的病害识别结果后,可以根据目标隧道的病害数量、病害类型、病害位置以及病害程度对目标隧道进行病害综合评分计算,得到目标隧道的病害综合计分,根据病害综合评分确定目标隧道是否合格,若目标隧道的病害综合评分大于或等于预设的评分阈值,则可以说明目标隧道的巡检结果为不合格,若目标隧道的病害综合评分小于预设的评分阈值,则可以说明目标隧道的巡检结果为合格。具体的,上述病害综合评分S的计算可以通过下述式子进行:In the embodiment of the present invention, the disease identification result of the target tunnel may include disease information such as the number of diseases, the type of disease, the location of the disease, and the degree of the disease. Quantity, disease type, disease location and disease degree are used to calculate the comprehensive disease score of the target tunnel to obtain the comprehensive disease score of the target tunnel, and determine whether the target tunnel is qualified according to the comprehensive disease score. If the comprehensive disease score of the target tunnel is greater than or equal to the preset If the score threshold of the target tunnel is less than the preset scoring threshold, it can be explained that the inspection result of the target tunnel is unqualified. Specifically, the calculation of the above-mentioned comprehensive disease score S can be performed by the following formula:

其中,上述au,i表示第i个病害的病害类型为u时所对应的经验系数,病害类型对交通安全影响越大,则病害类型所对应的经验系数越大,vi表示第i个病害的病害程度,上述n为病害数量,(xi,yi)表示第i个病害的病害位置,(x0,y0)表示路面中心或拱面中心位置,上述路面中心或拱面中心可以通过对目标图像进行图像识别处理得到,具体可以通过训练好的病害识别模型输出得到,此时输出的病害检测框可以为(x,y,x0,y0,w,h,r,u,v),若病害检测框中的病害类型为路面病害,则(x0,y0)表示路面中心位置,若病害检测框中的病害类型为拱面病害,则(x0,y0)表示拱面中心位置。通过上述式子可以看出,病害综合评分计算与病害类型的经验系数、病害程度成正相关,与病害位置到路面中心或拱面中心位置的距离成反相关。Among them, the above-mentioned a u,i represents the empirical coefficient corresponding to the i-th disease when the disease type is u, the greater the impact of the disease type on traffic safety, the greater the corresponding experience coefficient of the disease type, v i represents the i-th The disease degree of the disease, the above n is the number of diseases, ( xi , y i ) indicates the disease position of the i-th disease, (x 0 , y 0 ) indicates the center of the road surface or the center of the arch surface, and the center of the above road surface or the center of the arch surface It can be obtained by performing image recognition processing on the target image. Specifically, it can be obtained through the output of the trained disease recognition model. At this time, the output disease detection frame can be (x, y, x 0 , y 0 , w, h, r, u , v), if the disease type in the disease detection frame is road surface disease, then (x 0 , y 0 ) represents the center position of the road surface, if the disease type in the disease detection frame is arch surface disease, then (x 0 , y 0 ) Indicates the position of the center of the arch. It can be seen from the above formula that the calculation of the comprehensive disease score is positively correlated with the empirical coefficient of the disease type and the degree of disease, and is inversely correlated with the distance from the disease position to the center of the road surface or the center of the arch surface.

需要说明的是,本发明实施例提供的隧道巡检方法可以应用于可以进行隧道巡检的拍摄设备、智能手机、电脑、服务器等设备。It should be noted that the tunnel inspection method provided by the embodiment of the present invention can be applied to devices such as photographing equipment, smart phones, computers, servers, etc. that can perform tunnel inspection.

如图2所示,本发明实施例提供一种隧道巡检装置,该隧道巡检装置包括:As shown in Figure 2, an embodiment of the present invention provides a tunnel inspection device, which includes:

第一获取模块201,用于获取目标隧道内拍摄图像对应的光流分量以及亮度分量;The first acquisition module 201 is configured to acquire the optical flow component and brightness component corresponding to the captured image in the target tunnel;

结合模块202,用于将所述光流分量及所述亮度分量与所述拍摄图像的颜色分量进行结合,得到目标图像;A combining module 202, configured to combine the optical flow component and the brightness component with the color component of the captured image to obtain a target image;

第一处理模块203,用于通过训练好的病害识别模型对所述目标图像进行处理,得到所述目标隧道的病害识别结果;The first processing module 203 is configured to process the target image through the trained disease recognition model to obtain a disease recognition result of the target tunnel;

第一确定模块204,用于基于所述目标隧道的病害识别结果确定所述目标隧道的巡检结果。The first determining module 204 is configured to determine an inspection result of the target tunnel based on a disease identification result of the target tunnel.

可选的,所述装置还包括:Optionally, the device also includes:

采集模块,用于采集目标隧道前的道路标识信息;A collection module, configured to collect road sign information in front of the target tunnel;

第二确定模块,用于根据所述道路标识信息,确定所述目标隧道的拍摄参数;A second determining module, configured to determine shooting parameters of the target tunnel according to the road sign information;

拍摄模块,用于在进入到所述目标隧道后,以所述拍摄参数对所述目标隧道进行拍摄。The photographing module is configured to photograph the target tunnel with the photographing parameters after entering the target tunnel.

可选的,所述第一获取模块201,包括:Optionally, the first acquiring module 201 includes:

获取子模块,用于获取目标隧道内拍摄图像与在前拍摄图像;The acquisition sub-module is used to acquire the image taken in the target tunnel and the image taken before;

提取子模块,用于对所述在前拍摄图像与所述拍摄图像之间的光流分量进行提取,得到所述拍摄图像对应的光流分量;An extracting submodule, configured to extract an optical flow component between the previously captured image and the captured image, to obtain an optical flow component corresponding to the captured image;

第一确定子模块,用于将所述拍摄图像转换为HSV颜色模式,并基于所述HSV颜色模式确定所述拍摄图像对应的亮度分量。The first determination sub-module is configured to convert the captured image into an HSV color mode, and determine a brightness component corresponding to the captured image based on the HSV color mode.

可选的,所述第一确定子模块,包括:Optionally, the first determining submodule includes:

第一确定单元,用于基于所述HSV颜色模式确定所述拍摄图像的第一亮度分量;a first determining unit, configured to determine a first brightness component of the captured image based on the HSV color mode;

第二确定单元,用于根据所述第一亮度分量预测出所述拍摄图像的第二亮度分量,将所述第二亮度分量确定为所述拍摄图像对应的亮度分量。The second determining unit is configured to predict a second brightness component of the captured image according to the first brightness component, and determine the second brightness component as a corresponding brightness component of the captured image.

可选的,所述结合模块202,包括:Optionally, the combining module 202 includes:

拼接子模块,用于将所述光流分量及所述亮度分量拼接到所述拍摄图像的颜色分量之后,得到拼接图像;A splicing submodule, configured to splice the optical flow component and the brightness component to the color component of the captured image to obtain a spliced image;

处理子模块,用于通过预设的卷积核对所述拼接图像进行卷积融合处理,得到目标图像。The processing sub-module is used to perform convolution fusion processing on the mosaic image through a preset convolution kernel to obtain a target image.

可选的,所述装置还包括:Optionally, the device also includes:

第二获取模块,用于获取第一数据集以及待训练的病害识别模型,所述第一数据集包括样本图像以及与所述样本图像对应的病害标签,所述样本图像与所述目标图像的获取方式相同;The second acquisition module is used to acquire a first data set and a lesion recognition model to be trained, the first data set includes a sample image and a lesion label corresponding to the sample image, the sample image is the same as the target image The acquisition method is the same;

训练模块,用于通过所述第一数据集对所述待训练的病害识别模型进行有监督训练;A training module, configured to perform supervised training on the disease identification model to be trained through the first data set;

第二处理模块,用于训练完成得到所述训练好的病害识别模型。The second processing module is used for training to obtain the trained disease identification model.

可选的,所述第一确定模块204,包括:Optionally, the first determining module 204 includes:

第二确定子模块,用于基于所述目标隧道的病害识别结果确定所述目标隧道的综合病害评分;The second determining submodule is used to determine the comprehensive disease score of the target tunnel based on the disease identification result of the target tunnel;

第三确定子模块,用于根据所述综合病害评分确定所述目标隧道的巡检结果。The third determining submodule is configured to determine the inspection result of the target tunnel according to the comprehensive damage score.

需要说明的是,本发明实施例提供的隧道巡检装置可以应用于可以进行隧道巡检的拍摄设备、智能手机、电脑、服务器等设备。It should be noted that the tunnel inspection device provided by the embodiment of the present invention can be applied to equipment such as photographing equipment, smart phones, computers, servers, etc. that can perform tunnel inspection.

本发明实施例提供的隧道巡检装置能够实现上述方法实施例中隧道巡检方法实现的各个过程,且可以达到相同的有益效果。为避免重复,这里不再赘述。The tunnel inspection device provided by the embodiment of the present invention can realize each process realized by the tunnel inspection method in the above method embodiment, and can achieve the same beneficial effect. To avoid repetition, details are not repeated here.

参见图3,图3是本发明实施例提供的一种电子设备的结构示意图,如图3所示,包括:存储器302、处理器301及存储在存储器302上并可在处理器301上运行的隧道巡检方法的计算机程序,其中:Referring to FIG. 3, FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. As shown in FIG. 3, it includes: a memory 302, a processor 301, and an A computer program for the tunnel inspection method, wherein:

处理器301用于调用存储器302存储的计算机程序,执行如下步骤:The processor 301 is used to call the computer program stored in the memory 302, and perform the following steps:

获取目标隧道内拍摄图像对应的光流分量以及亮度分量;Obtain the optical flow component and brightness component corresponding to the captured image in the target tunnel;

将所述光流分量及所述亮度分量与所述拍摄图像的颜色分量进行结合,得到目标图像;combining the optical flow component and the brightness component with the color component of the captured image to obtain a target image;

通过训练好的病害识别模型对所述目标图像进行处理,得到所述目标隧道的病害识别结果;Processing the target image through the trained disease recognition model to obtain a disease recognition result of the target tunnel;

基于所述目标隧道的病害识别结果确定所述目标隧道的巡检结果。An inspection result of the target tunnel is determined based on a disease identification result of the target tunnel.

可选的,在所述获取目标隧道内拍摄图像的光流分量以及亮度分量之前,处理器301执行的所述方法还包括:Optionally, before the acquisition of the optical flow component and brightness component of the captured image in the target tunnel, the method executed by the processor 301 further includes:

采集目标隧道前的道路标识信息;Collect road sign information in front of the target tunnel;

根据所述道路标识信息,确定所述目标隧道的拍摄参数;determining shooting parameters of the target tunnel according to the road sign information;

在进入到所述目标隧道后,以所述拍摄参数对所述目标隧道进行拍摄。After entering the target tunnel, the target tunnel is photographed with the photographing parameters.

可选的,处理器301执行的所述获取目标隧道内拍摄图像的光流分量以及亮度分量,包括:Optionally, the acquiring the optical flow component and the brightness component of the captured image in the target tunnel executed by the processor 301 includes:

获取目标隧道内拍摄图像与在前拍摄图像;Obtain the images taken in the target tunnel and the images taken before;

对所述在前拍摄图像与所述拍摄图像之间的光流分量进行提取,得到所述拍摄图像对应的光流分量;extracting an optical flow component between the previously captured image and the captured image, to obtain an optical flow component corresponding to the captured image;

将所述拍摄图像转换为HSV颜色模式,并基于所述HSV颜色模式确定所述拍摄图像对应的亮度分量。converting the captured image into an HSV color mode, and determining a brightness component corresponding to the captured image based on the HSV color mode.

可选的,处理器301执行的所述基于所述HSV颜色模式确定所述拍摄图像对应的亮度分量,包括:Optionally, the determining the luminance component corresponding to the captured image based on the HSV color mode performed by the processor 301 includes:

基于所述HSV颜色模式确定所述拍摄图像的第一亮度分量;determining a first luminance component of the captured image based on the HSV color mode;

根据所述第一亮度分量预测出所述拍摄图像的第二亮度分量,将所述第二亮度分量确定为所述拍摄图像对应的亮度分量。A second brightness component of the captured image is predicted according to the first brightness component, and the second brightness component is determined as a corresponding brightness component of the captured image.

可选的,所述拍摄图像为RGB颜色模式,处理器301执行的所述将所述光流分量及所述亮度分量与所述拍摄图像的颜色分量进行结合,得到目标图像,包括:Optionally, the captured image is in RGB color mode, and the combining the optical flow component and the brightness component with the color component of the captured image performed by the processor 301 to obtain the target image includes:

将所述光流分量及所述亮度分量拼接到所述拍摄图像的颜色分量之后,得到拼接图像;After splicing the optical flow component and the brightness component to the color component of the captured image, a spliced image is obtained;

通过预设的卷积核对所述拼接图像进行卷积融合处理,得到目标图像。A target image is obtained by performing convolution fusion processing on the spliced image through a preset convolution kernel.

可选的,在所述通过训练好的病害识别模型对所述目标图像进行处理,得到所述目标隧道的病害识别结果之前,处理器301执行的所述方法还包括:Optionally, before the target image is processed by the trained disease recognition model to obtain the result of the target tunnel's disease recognition, the method executed by the processor 301 further includes:

获取第一数据集以及待训练的病害识别模型,所述第一数据集包括样本图像以及与所述样本图像对应的病害标签,所述样本图像与所述目标图像的获取方式相同;Obtain a first data set and a disease recognition model to be trained, the first data set includes a sample image and a disease label corresponding to the sample image, and the sample image is obtained in the same manner as the target image;

通过所述第一数据集对所述待训练的病害识别模型进行有监督训练;performing supervised training on the disease identification model to be trained through the first data set;

训练完成得到所述训练好的病害识别模型。After the training is completed, the trained disease recognition model is obtained.

可选的,处理器301执行的所述基于所述目标隧道的病害识别结果确定所述目标隧道的巡检结果,包括:Optionally, the determining the patrol inspection result of the target tunnel based on the disease identification result of the target tunnel performed by the processor 301 includes:

基于所述目标隧道的病害识别结果确定所述目标隧道的综合病害评分;determining the comprehensive disease score of the target tunnel based on the disease identification result of the target tunnel;

根据所述综合病害评分确定所述目标隧道的巡检结果。The inspection result of the target tunnel is determined according to the comprehensive disease score.

需要说明的是,本发明实施例提供的电子设备可以应用于可以进行隧道巡检方法的智能手机、电脑、服务器等设备。It should be noted that the electronic device provided by the embodiment of the present invention can be applied to smart phones, computers, servers and other devices that can implement the tunnel inspection method.

本发明实施例提供的电子设备能够实现上述方法实施例中隧道巡检方法实现的各个过程,且可以达到相同的有益效果。为避免重复,这里不再赘述。The electronic device provided by the embodiment of the present invention can realize each process realized by the tunnel inspection method in the above method embodiment, and can achieve the same beneficial effect. To avoid repetition, details are not repeated here.

本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现本发明实施例提供的隧道巡检方法或应用端隧道巡检方法的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the tunnel inspection method or the tunnel inspection at the application end provided by the embodiment of the present invention is implemented. Each process of the method, and can achieve the same technical effect, in order to avoid repetition, will not repeat them here.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存取存储器(Random Access Memory,简称RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the programs can be stored in a computer-readable storage medium. , may include the flow of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM for short).

以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above disclosures are only preferred embodiments of the present invention, and certainly cannot limit the scope of rights of the present invention. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope of the present invention.

Claims (10)

1.一种隧道巡检方法,其特征在于,所述方法包括以下步骤:1. A tunnel inspection method, characterized in that said method comprises the following steps: 获取目标隧道内拍摄图像对应的光流分量以及亮度分量;Obtain the optical flow component and brightness component corresponding to the captured image in the target tunnel; 将所述光流分量及所述亮度分量与所述拍摄图像的颜色分量进行结合,得到目标图像;combining the optical flow component and the brightness component with the color component of the captured image to obtain a target image; 通过训练好的病害识别模型对所述目标图像进行处理,得到所述目标隧道的病害识别结果;Processing the target image through the trained disease recognition model to obtain a disease recognition result of the target tunnel; 基于所述目标隧道的病害识别结果确定所述目标隧道的巡检结果。An inspection result of the target tunnel is determined based on a disease identification result of the target tunnel. 2.如权利要求1所述的隧道巡检方法,其特征在于,在所述获取目标隧道内拍摄图像的光流分量以及亮度分量之前,所述方法还包括:2. The tunnel inspection method according to claim 1, wherein, before the optical flow component and the brightness component of the captured image in the acquisition target tunnel, the method further comprises: 采集目标隧道前的道路标识信息;Collect road sign information in front of the target tunnel; 根据所述道路标识信息,确定所述目标隧道的拍摄参数;determining shooting parameters of the target tunnel according to the road sign information; 在进入到所述目标隧道后,以所述拍摄参数对所述目标隧道进行拍摄。After entering the target tunnel, the target tunnel is photographed with the photographing parameters. 3.如权利要求2所述的隧道巡检方法,其特征在于,所述获取目标隧道内拍摄图像的光流分量以及亮度分量,包括:3. The tunnel inspection method according to claim 2, wherein said obtaining the optical flow component and the brightness component of the captured image in the target tunnel comprises: 获取目标隧道内拍摄图像与在前拍摄图像;Obtain the images taken in the target tunnel and the images taken before; 对所述在前拍摄图像与所述拍摄图像之间的光流分量进行提取,得到所述拍摄图像对应的光流分量;extracting an optical flow component between the previously captured image and the captured image, to obtain an optical flow component corresponding to the captured image; 将所述拍摄图像转换为HSV颜色模式,并基于所述HSV颜色模式确定所述拍摄图像对应的亮度分量。converting the captured image into an HSV color mode, and determining a brightness component corresponding to the captured image based on the HSV color mode. 4.如权利要求2所述的隧道巡检方法,其特征在于,所述基于所述HSV颜色模式确定所述拍摄图像对应的亮度分量,包括:4. The tunnel inspection method according to claim 2, wherein the determination of the brightness component corresponding to the captured image based on the HSV color mode comprises: 基于所述HSV颜色模式确定所述拍摄图像的第一亮度分量;determining a first luminance component of the captured image based on the HSV color mode; 根据所述第一亮度分量预测出所述拍摄图像的第二亮度分量,将所述第二亮度分量确定为所述拍摄图像对应的亮度分量。A second brightness component of the captured image is predicted according to the first brightness component, and the second brightness component is determined as a corresponding brightness component of the captured image. 5.如权利要求4所述的隧道巡检方法,其特征在于,所述拍摄图像为RGB颜色模式,所述将所述光流分量及所述亮度分量与所述拍摄图像的颜色分量进行结合,得到目标图像,包括:5. The tunnel inspection method according to claim 4, wherein the captured image is in RGB color mode, and the optical flow component and the brightness component are combined with the color component of the captured image , to get the target image, including: 将所述光流分量及所述亮度分量拼接到所述拍摄图像的颜色分量之后,得到拼接图像;After splicing the optical flow component and the brightness component to the color component of the captured image, a spliced image is obtained; 通过预设的卷积核对所述拼接图像进行卷积融合处理,得到目标图像。A target image is obtained by performing convolution fusion processing on the spliced image through a preset convolution kernel. 6.如权利要求1至5中任一所述的隧道巡检方法,其特征在于,在所述通过训练好的病害识别模型对所述目标图像进行处理,得到所述目标隧道的病害识别结果之前,所述方法还包括:6. The tunnel inspection method according to any one of claims 1 to 5, wherein the target image is processed by the trained defect recognition model to obtain a defect recognition result of the target tunnel Previously, the method further included: 获取第一数据集以及待训练的病害识别模型,所述第一数据集包括样本图像以及与所述样本图像对应的病害标签,所述样本图像与所述目标图像的获取方式相同;Obtain a first data set and a disease recognition model to be trained, the first data set includes a sample image and a disease label corresponding to the sample image, the sample image is obtained in the same manner as the target image; 通过所述第一数据集对所述待训练的病害识别模型进行有监督训练;performing supervised training on the disease identification model to be trained through the first data set; 训练完成得到所述训练好的病害识别模型。After the training is completed, the trained disease identification model is obtained. 7.如权利要求6所述的隧道巡检方法,其特征在于,所述基于所述目标隧道的病害识别结果确定所述目标隧道的巡检结果,包括:7. The tunnel inspection method according to claim 6, wherein the determining the inspection result of the target tunnel based on the disease identification result of the target tunnel comprises: 基于所述目标隧道的病害识别结果确定所述目标隧道的综合病害评分;determining the comprehensive disease score of the target tunnel based on the disease identification result of the target tunnel; 根据所述综合病害评分确定所述目标隧道的巡检结果。The inspection result of the target tunnel is determined according to the comprehensive disease score. 8.一种隧道巡检装置,其特征在于,所述隧道巡检装置包括:8. A tunnel inspection device, characterized in that the tunnel inspection device comprises: 第一获取模块,用于获取目标隧道内拍摄图像对应的光流分量以及亮度分量;A first acquisition module, configured to acquire an optical flow component and a brightness component corresponding to the captured image in the target tunnel; 结合模块,用于将所述光流分量及所述亮度分量与所述拍摄图像的颜色分量进行结合,得到目标图像;A combination module, configured to combine the optical flow component and the brightness component with the color component of the captured image to obtain a target image; 第一处理模块,用于通过训练好的病害识别模型对所述目标图像进行处理,得到所述目标隧道的病害识别结果;The first processing module is used to process the target image through the trained disease recognition model to obtain a disease recognition result of the target tunnel; 第一确定模块,用于基于所述目标隧道的病害识别结果确定所述目标隧道的巡检结果。The first determination module is configured to determine the inspection result of the target tunnel based on the disease identification result of the target tunnel. 9.一种电子设备,其特征在于,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至7中任一项所述的隧道巡检方法中的步骤。9. An electronic device, characterized in that it comprises: a memory, a processor, and a computer program stored on the memory and operable on the processor, when the processor executes the computer program, it realizes the The steps in the tunnel inspection method described in any one of requirements 1 to 7. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7中任一项所述的隧道巡检方法中的步骤。10. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is realized. Steps in the tunnel inspection method.
CN202310485698.XA 2023-04-28 2023-04-28 Tunnel inspection method and device, electronic equipment and storage medium Active CN116665112B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310485698.XA CN116665112B (en) 2023-04-28 2023-04-28 Tunnel inspection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310485698.XA CN116665112B (en) 2023-04-28 2023-04-28 Tunnel inspection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116665112A true CN116665112A (en) 2023-08-29
CN116665112B CN116665112B (en) 2025-03-07

Family

ID=87716206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310485698.XA Active CN116665112B (en) 2023-04-28 2023-04-28 Tunnel inspection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116665112B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080181507A1 (en) * 2007-01-29 2008-07-31 Intellivision Technologies Corp. Image manipulation for videos and still images
CN108229461A (en) * 2018-01-16 2018-06-29 上海同岩土木工程科技股份有限公司 A kind of tunnel slot method for quickly identifying based on deep learning
CN109684996A (en) * 2018-12-22 2019-04-26 北京工业大学 Real-time vehicle based on video passes in and out recognition methods
CN109685746A (en) * 2019-01-04 2019-04-26 Oppo广东移动通信有限公司 Brightness of image method of adjustment, device, storage medium and terminal
CN109741281A (en) * 2019-01-04 2019-05-10 Oppo广东移动通信有限公司 Image processing method, device, storage medium and terminal
CN111401104A (en) * 2019-01-02 2020-07-10 顺丰科技有限公司 Training method, classification method, device, equipment and storage medium of classification model
CN112907557A (en) * 2021-03-15 2021-06-04 腾讯科技(深圳)有限公司 Road detection method, road detection device, computing equipment and storage medium
CN114418950A (en) * 2021-12-22 2022-04-29 杭州智科通智能科技有限公司 Road disease detection method, device, equipment and storage medium
CN114495067A (en) * 2022-02-14 2022-05-13 招商局重庆公路工程检测中心有限公司 A detection method of road risk sources based on deep learning
WO2022227405A1 (en) * 2021-04-26 2022-11-03 深圳市商汤科技有限公司 Road distress detection method and apparatus, electronic device, and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080181507A1 (en) * 2007-01-29 2008-07-31 Intellivision Technologies Corp. Image manipulation for videos and still images
CN108229461A (en) * 2018-01-16 2018-06-29 上海同岩土木工程科技股份有限公司 A kind of tunnel slot method for quickly identifying based on deep learning
CN109684996A (en) * 2018-12-22 2019-04-26 北京工业大学 Real-time vehicle based on video passes in and out recognition methods
CN111401104A (en) * 2019-01-02 2020-07-10 顺丰科技有限公司 Training method, classification method, device, equipment and storage medium of classification model
CN109685746A (en) * 2019-01-04 2019-04-26 Oppo广东移动通信有限公司 Brightness of image method of adjustment, device, storage medium and terminal
CN109741281A (en) * 2019-01-04 2019-05-10 Oppo广东移动通信有限公司 Image processing method, device, storage medium and terminal
CN112907557A (en) * 2021-03-15 2021-06-04 腾讯科技(深圳)有限公司 Road detection method, road detection device, computing equipment and storage medium
WO2022227405A1 (en) * 2021-04-26 2022-11-03 深圳市商汤科技有限公司 Road distress detection method and apparatus, electronic device, and storage medium
CN114418950A (en) * 2021-12-22 2022-04-29 杭州智科通智能科技有限公司 Road disease detection method, device, equipment and storage medium
CN114495067A (en) * 2022-02-14 2022-05-13 招商局重庆公路工程检测中心有限公司 A detection method of road risk sources based on deep learning

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
潘云鹤等: "计算机图形学-原理、方法及应用(第4版)", 31 July 2022, 高等教育出版社, pages: 201 *
黄宏伟等: "枫林学苑21", 30 April 2018, 上海:同济大学出版社, pages: 17 - 25 *

Also Published As

Publication number Publication date
CN116665112B (en) 2025-03-07

Similar Documents

Publication Publication Date Title
CN116681636B (en) Light infrared and visible light image fusion method based on convolutional neural network
US8724885B2 (en) Integrated image processor
KR20220023335A (en) Defect detection methods and related devices, devices, storage media, computer program products
CN117011688B (en) Method, system and storage medium for identifying diseases of underwater structure
CN111507210A (en) Traffic signal identification method, system, computing device and smart vehicle
CN107507172A (en) Merge the extra high voltage line insulator chain deep learning recognition methods of infrared visible ray
CN113361466A (en) Multi-modal cross-directed learning-based multi-spectral target detection method
CN112614136A (en) Infrared small target real-time instance segmentation method and device
CN109961013A (en) Lane line identification method, device, device, and computer-readable storage medium
CN104598905A (en) License plate positioning method and device
WO2012162981A1 (en) Video character separation method and device
CN118397427A (en) A strawberry fruit recognition method based on improved YOLOv5s
CN115661720A (en) Target tracking and identifying method and system for shielded vehicle
CN115661757A (en) Automatic detection method for pantograph arcing
CN119251459A (en) Real-time identification and positioning method, system and medium for alkane gas leakage based on deep learning
CN113888509A (en) Method, device and equipment for evaluating image definition and storage medium
CN111797694A (en) License plate detection method and device
CN118780997B (en) Target-level fusion method and system for visible light-infrared images of unmanned aerial vehicles
CN111723614A (en) Traffic signal identification method and device
CN118038338B (en) Method for monitoring fire disaster in tunnel based on image recognition
CN116665112A (en) Tunnel inspection method and device, electronic equipment and storage medium
KR102865772B1 (en) Image-based fine dust measurement method and system
CN114821726B (en) Image data processing method, device, equipment and storage medium
CN118781505A (en) A wetland hardening area recognition algorithm based on UAV images
CN118658062A (en) A pose estimation method for occluded environment based on foreground probability

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