Movatterモバイル変換


[0]ホーム

URL:


CN112801072B - A computer vision-based elevator non-leveling door opening fault identification device and method - Google Patents

A computer vision-based elevator non-leveling door opening fault identification device and method
Download PDF

Info

Publication number
CN112801072B
CN112801072BCN202110400660.9ACN202110400660ACN112801072BCN 112801072 BCN112801072 BCN 112801072BCN 202110400660 ACN202110400660 ACN 202110400660ACN 112801072 BCN112801072 BCN 112801072B
Authority
CN
China
Prior art keywords
elevator
acceleration
sill
image
door opening
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
Application number
CN202110400660.9A
Other languages
Chinese (zh)
Other versions
CN112801072A (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJUfiledCriticalZhejiang University ZJU
Priority to CN202110400660.9ApriorityCriticalpatent/CN112801072B/en
Publication of CN112801072ApublicationCriticalpatent/CN112801072A/en
Application grantedgrantedCritical
Publication of CN112801072BpublicationCriticalpatent/CN112801072B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明为一种基于计算机视觉的电梯非平层开门故障识别装置及方法,装置包括视频采集模块,采集电梯地坎图像;加速度监测模块,对电梯运行加速度进行监控,以预判电梯是否进入减速停梯状态;模型训练模块,包括地坎槽目标检测模型训练单元、非平层开门分类模型训练单元,用于训练模型;检测识别模块,包括图像光照自适应矫正单元、地坎槽检测单元、图像角度自适应矫正单元、非平层开门识别单元。在此方案中,装置发现电梯准备停梯时,加载检测和识别模型,对轿门和所在厅门地坎槽的目标图像进行分析,检测电梯开门状态和幅度,通过对目标图像进行平层开门、非平层开门的二分类,能够实时、高效、准确地检测和识别电梯非平层开门故障。

Figure 202110400660

The invention is a computer vision-based elevator non-leveling door opening fault identification device and method. The device includes a video acquisition module, which collects images of elevator sills; an acceleration monitoring module, which monitors the running acceleration of the elevator to predict whether the elevator enters deceleration. Elevator stop state; model training module, including sill target detection model training unit, non-level door classification model training unit, used to train the model; detection and recognition module, including image illumination adaptive correction unit, sill slot detection unit, Image angle adaptive correction unit, non-leveling door recognition unit. In this scheme, when the device finds that the elevator is about to stop, it loads the detection and recognition model, analyzes the target images of the car door and the hall door sill where it is located, detects the state and amplitude of the elevator's door opening, and opens the door by leveling the target image. , The second classification of non-leveling door opening can detect and identify elevator non-leveling door open faults in real time, efficiently and accurately.

Figure 202110400660

Description

Translated fromChinese
一种基于计算机视觉的电梯非平层开门故障识别装置及方法A computer vision-based elevator non-leveling door opening fault identification device and method

技术领域technical field

本发明涉及电梯故障识别领域,特别是涉及一种基于计算机视觉的电梯非平层开门故障识别装置及方法。The invention relates to the field of elevator fault identification, in particular to a computer vision-based elevator non-leveling door opening fault identification device and method.

背景技术Background technique

近年来,我国电梯数量快速增加,与之相对应的电梯事故也越来越多,其中,电梯门系统故障是引发电梯事故的主要原因。电梯门系统故障有多种,主要包括:非平层开门(非平层指的是轿门地坎相对于厅门地坎的高差绝对值大于10mm,非平层开门指的是电梯在非平层的位置打开轿门和厅门)、非同步开门、开关门失效、防止门夹人装置失效等类型。非平层开门故障是造成人员伤亡的最主要原因之一,也是现代电梯安全保障技术最难彻底解决的问题之一。因此对非平层开门进行检测和识别具有重要的现实意义。In recent years, the number of elevators in my country has increased rapidly, and the corresponding elevator accidents have also increased. Among them, the failure of elevator door system is the main cause of elevator accidents. There are many kinds of elevator door system faults, mainly including: non-leveling door opening (non-leveling refers to the absolute value of the height difference between the car door sill and the hall door sill is greater than 10mm, non-leveling door opening refers to the elevator in non-leveling Leveling position to open the car door and hall door), non-synchronized door opening, door opening and closing failure, failure of door jamming device failure, etc. Non-leveling door opening failure is one of the main causes of casualties, and it is also one of the most difficult problems for modern elevator safety technology to solve completely. Therefore, it is of great practical significance to detect and identify non-leveling door openings.

传统的非平层开门故障检测方法主要依赖于人工维护排查,这种方式不仅效率很低,而且发现故障隐患周期过久,影响电梯安全运行。The traditional non-leveling door opening fault detection method mainly relies on manual maintenance and investigation, which is not only inefficient, but also has a long period of finding hidden faults, which affects the safe operation of the elevator.

近几年,随着计算机技术的发展,一些研究尝试通过计算机视觉技术来实现识别电梯开关门。In recent years, with the development of computer technology, some researches try to realize the recognition of elevator door opening and closing through computer vision technology.

如:发明专利:电梯平层故障的检测方法和系统(CN201710666494),提出一种电梯平层故障的检测方法和系统,在电梯轿门开启时,获取电梯轿内地坎与电梯所在楼层的厅门地坎所在区域的目标图像,计算目标图像中电梯轿内地坎和厅门地坎之间的视角差值,在视角差值大于或小于预设值时,判定电梯平层故障。For example: Invention patent: Detection method and system for elevator leveling fault (CN201710666494), which proposes a detection method and system for elevator leveling fault. When the elevator car door is opened, the elevator car interior sill and the hall door of the floor where the elevator is located are obtained. The target image of the area where the sill is located, calculate the difference between the viewing angle between the elevator car sill and the hall door sill in the target image, and determine the elevator leveling failure when the viewing angle difference is greater than or less than the preset value.

该专利使用的图像识别电梯是否平层的方法存在以下问题:The method used in the patent to identify whether the elevator is leveling has the following problems:

第一,目标图像难以获取,将摄像头安装在轿厢内上部,地坎或门扇很容易被轿厢出入口乘客遮挡;First, the target image is difficult to obtain. The camera is installed in the upper part of the car, and the sill or door leaf is easily blocked by passengers at the entrance and exit of the car;

第二,图像检测方法难以实现,采用层面地坎与厅门地坎视交差值的方法,开门时如果厅门地坎位于较低位置时,即被轿厢地坎遮挡,算法失效;Second, the image detection method is difficult to implement. The method of the apparent intersection value between the floor sill and the hall door sill is used. If the hall door sill is at a lower position when opening the door, it will be blocked by the car sill, and the algorithm will fail;

第三,图像识别效率和准确率低,电梯门和地坎种类规格繁多,目前采用的图像识别技术较为简单,无法快速、准确地识别目标图像;Third, the image recognition efficiency and accuracy are low, and there are many types and specifications of elevator doors and sills. The currently used image recognition technology is relatively simple, and cannot quickly and accurately identify the target image;

第四,故障识别过程发生在整个电梯的运行过程中,带来了不必要的算力消耗。Fourth, the fault identification process occurs during the entire elevator operation, which brings unnecessary consumption of computing power.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于克服现有技术的不足,提供一种基于计算机视觉的电梯非平层开门故障识别装置和方法,能够实时在线监测电梯非平层开门故障,减少非平层目标样本的人工标定工作量,实现地坎槽模型和非平层模型的快速训练,提高对电梯非平层图像和开关门图像的目标检测准确率,具有在低照度和高照度环境下的图像降噪能力,提高整体电梯故障智能检测和识别能力。The purpose of the present invention is to overcome the deficiencies of the prior art, and to provide a computer vision-based elevator non-leveling door-opening fault identification device and method, which can monitor the elevator non-leveling door-opening faults online in real time and reduce the manual calibration of non-leveling target samples workload, realize the rapid training of the sill model and the non-leveling model, improve the target detection accuracy of the elevator non-leveling image and door opening and closing image, and have the ability to reduce image noise in low-light and high-light environments. The overall elevator fault intelligent detection and identification ability.

本发明实施例提供了一种基于计算机视觉的电梯非平层开门故障识别装置,其包括视频采集模块、加速度监测模块、模型训练模块以及检测识别模块;其中,The embodiment of the present invention provides a computer vision-based elevator non-leveling door opening fault identification device, which includes a video acquisition module, an acceleration monitoring module, a model training module, and a detection and identification module; wherein,

所述视频采集模块,包括摄像装置,用于采集电梯地坎图像;所述视频采集模块与检测识别模块电性连接;所述摄像装置的镜头设置于电梯轿门和厅门夹缝,垂直并正对于地坎槽,以同时拍摄厅门地坎槽和轿门地坎槽;The video capture module includes a camera device for capturing images of the elevator sill; the video capture module is electrically connected to the detection and identification module; the camera lens of the video capture device is arranged in the gap between the elevator car door and the hall door, and is vertical and positive. For the sill groove, the hall door sill groove and the sedan door sill groove can be photographed at the same time;

所述加速度监测模块,包括加速度传感器以及微处理器;所述加速度监测模块用于对电梯运行加速度进行监控,以预判电梯是否进入减速停梯状态,加速度监测模块与检测识别模块电性连接;The acceleration monitoring module includes an acceleration sensor and a microprocessor; the acceleration monitoring module is used to monitor the running acceleration of the elevator to predict whether the elevator enters a deceleration stop state, and the acceleration monitoring module is electrically connected to the detection and identification module;

所述模型训练模块,包括地坎槽目标检测模型训练单元和非平层开门分类模型训练单元;所述地坎槽目标检测模型训练单元用于预先训练地坎槽检测模型,供检测识别模块加载使用;所述非平层开门分类模型训练单元用于预先训练非平层开门分类模型,以供检测识别模块加载使用;The model training module includes a sill target detection model training unit and a non-level door classification model training unit; the sill target detection model training unit is used to pre-train the sill detection model for loading by the detection and identification module use; the non-leveling door classification model training unit is used for pre-training the non-leveling door classification model for the detection and identification module loading;

所述检测识别模块,用于在根据所述加速度监测模块确定所述电梯进入减速停梯状态时,对电梯地坎图像做自适应处理并加载由所述模型训练模块训练好的模型进行预测以及识别,以判断电梯是否发生非平层开门故障。The detection and recognition module is used to perform adaptive processing on the elevator sill image and load the model trained by the model training module to predict and predict when the elevator enters the deceleration stop state according to the acceleration monitoring module. Identification to determine whether the elevator has a non-leveling door open fault.

优选地,所述微处理器具体用于,利用方差、极差以及极差对应的索引距离占加速度序列长度的占比对完成滤波平滑处理后的加速度曲线进行加速度检测以判断电梯是否停梯;Preferably, the microprocessor is specifically used to perform acceleration detection on the acceleration curve after the filtering and smoothing process is completed by using the ratio of the variance, the range, and the index distance corresponding to the range to the length of the acceleration sequence to determine whether the elevator stops;

其中,所述方差是用来度量加速度序列的波动程度,表达的是加速度的平稳性,用

Figure 460125DEST_PATH_IMAGE001
表示,如公式(1)所示:Among them, the variance is used to measure the degree of fluctuation of the acceleration sequence, which expresses the stationarity of the acceleration.
Figure 460125DEST_PATH_IMAGE001
Represented as formula (1):

Figure 190315DEST_PATH_IMAGE002
(1)
Figure 190315DEST_PATH_IMAGE002
(1)

其中,

Figure 642156DEST_PATH_IMAGE003
表示加速度序列的第
Figure 99682DEST_PATH_IMAGE004
个加速度取值,
Figure 727104DEST_PATH_IMAGE005
表示该加速度序列的加速度均值,n代表该加速度序列长度,即该加速度序列是由n个加速度取值组成的序列;in,
Figure 642156DEST_PATH_IMAGE003
represents the first
Figure 99682DEST_PATH_IMAGE004
an acceleration value,
Figure 727104DEST_PATH_IMAGE005
Indicates the acceleration mean value of the acceleration sequence, and n represents the length of the acceleration sequence, that is, the acceleration sequence is a sequence composed of n acceleration values;

所述极差是用来衡量数值变动的最大范围,是测定数值变动较为方便的指标,是最大值与最小值之间的差距,用

Figure 346304DEST_PATH_IMAGE006
表示,如公式(2)所示:The range is used to measure the maximum range of numerical changes, is a more convenient index to measure numerical changes, and is the gap between the maximum value and the minimum value.
Figure 346304DEST_PATH_IMAGE006
Represented as formula (2):

Figure 699322DEST_PATH_IMAGE008
(2)
Figure 699322DEST_PATH_IMAGE008
(2)

其中,

Figure 181250DEST_PATH_IMAGE009
表示该加速度序列中的最大值,
Figure 236931DEST_PATH_IMAGE010
表示该加速度序列的最小值;in,
Figure 181250DEST_PATH_IMAGE009
represents the maximum value in the acceleration sequence,
Figure 236931DEST_PATH_IMAGE010
represents the minimum value of the acceleration sequence;

所述极差对应的索引距离占加速度序列长度的占比的是刻画加速度骤变程度,描述的是最大值和最小值所在序列位置的间距占整个运行加速度序列的比例,用r表示,如公式(3)所示:The ratio of the index distance corresponding to the range to the length of the acceleration sequence is to describe the degree of sudden acceleration of acceleration, which describes the ratio of the distance between the sequence positions of the maximum value and the minimum value to the entire running acceleration sequence, which is represented by r, as shown in the formula (3) shows:

Figure 804310DEST_PATH_IMAGE011
(3)
Figure 804310DEST_PATH_IMAGE011
(3)

其中,

Figure 603638DEST_PATH_IMAGE012
表示该序列中最大加速度所在序列的位置,
Figure 674494DEST_PATH_IMAGE013
则表示最小加速度所在的位置,序列位置表示为第几个点;n则为整个加速度序列的长度;in,
Figure 603638DEST_PATH_IMAGE012
represents the position of the sequence in which the maximum acceleration is located in the sequence,
Figure 674494DEST_PATH_IMAGE013
Then it indicates the position of the minimum acceleration, and the sequence position is expressed as the first point; n is the length of the entire acceleration sequence;

其中,当方差满足大于1000、极差满足大于500和/或极差对应的索引距离占加速度序列长度的占比小于10%,则认为电梯即将停梯;否则微处理器判断为加速度正常,电梯处于正常运行。Among them, when the variance is greater than 1000, the range is greater than 500, and/or the index distance corresponding to the range accounts for less than 10% of the length of the acceleration sequence, it is considered that the elevator is about to stop; otherwise, the microprocessor determines that the acceleration is normal, and the elevator in normal operation.

优选地,所述加速度传感器具有多个采集时间间隔;通过遍历所述加速度传感器的采集时间间隔,计算每个采集时间间隔下微处理器判断的准确度,并计算准确度与加速度传感器在单位时间内采集的信息量的比值,当所述比值达到最大值时,将当前对应的采集时间间隔设置为默认的采集时间间隔。Preferably, the acceleration sensor has a plurality of acquisition time intervals; by traversing the acquisition time intervals of the acceleration sensor, the accuracy of the judgment of the microprocessor at each acquisition time interval is calculated, and the accuracy is calculated with the acceleration sensor in unit time. When the ratio reaches the maximum value, the current corresponding collection time interval is set as the default collection time interval.

优选地,所述模型训练模块中的地坎槽检测模型训练单元,其训练方法包括如下步骤:Preferably, the sill groove detection model training unit in the model training module, its training method comprises the following steps:

步骤41:制作地坎槽检测训练集,使用LabelImg对含有地坎槽的轿厢图片进行标注,具体为框出地坎槽图像并标注类别;Step 41: make a sill detection training set, use LabelImg to label the car picture containing the sill, specifically frame the sill image and label the category;

步骤42:搭建目标检测模型结构,采用迁移学习方法使用在 ILSVRC数据集上训练过的模型作为网络backbone的初始权重并随机化除所述初始权重外的其他参数,在步骤41建立的地坎槽检测训练集上进行训练,损失函数包括类别分类损失函数loss_cls和地坎槽边界框位置回归损失函数loss_bbox;Step 42: Build the structure of the target detection model, use the transfer learning method to use the model trained on the ILSVRC data set as the initial weight of the network backbone and randomize other parameters except the initial weight. The sill slot established in step 41 Training is performed on the detection training set. The loss function includes the category classification loss function loss_cls and the sill trough bounding box position regression loss function loss_bbox;

步骤43:设置停止策略,当达到指定的迭代次数,或者模型在验证集的预测精度达到设定值时停止训练。Step 43: Set a stopping strategy, when the specified number of iterations is reached, or the model stops training when the prediction accuracy of the validation set reaches the set value.

优选地,所述模型训练模块中的非平层开门图像分类模型训练单元,用于训练非平层开门识别模型,对地坎槽图像做二分类,以识别平层状态;Preferably, the non-leveling door opening image classification model training unit in the model training module is used to train the non-leveling door opening recognition model, and the sill and groove images are classified into two to identify the leveling state;

训练非平层开门分类模型的方法包括如下步骤:The method for training a non-level door classification model includes the following steps:

步骤51:制作地坎槽图像分类训练集,具体方法为开门状态下,采集厅门地坎槽和轿门地坎槽高度差绝对值小于等于10mm的地坎槽图像作为平层开门数据集,其他为非平层开门数据集;Step 51: Create a training set of sill image classification. The specific method is to collect the sill image with the absolute value of the height difference between the hall door sill and the car door sill less than or equal to 10mm in the open state as the leveling door opening data set. Others are non-leveling open door datasets;

步骤52:下载并加载Inception V3模型作为预训练模型;Step 52: Download and load the Inception V3 model as a pre-training model;

步骤53:执行迁移学习策略,去掉输出全连接层和softmax层,增加新的二分类的全连接层和softmax分类层,并增删预定中间网络层,作为改进的基于inception结构的深度卷积神经网络;深度卷积神经网络含有Inception结构通过多卷积核融合提取图像不同尺度信息得到更好的表征,Inception结构含有1×1卷积以降维构建参数更少的稀疏网络结构;所述预定中间网络层包括inception块、1×1卷积;Step 53: Execute the transfer learning strategy, remove the output fully connected layer and the softmax layer, add a new two-category fully connected layer and a softmax classification layer, and add or delete a predetermined intermediate network layer as an improved deep convolutional neural network based on the inception structure ; The deep convolutional neural network contains the Inception structure to obtain better characterization by extracting information at different scales of the image through the fusion of multiple convolution kernels. The Inception structure contains 1 × 1 convolution to reduce the dimension to build a sparse network structure with fewer parameters; the predetermined intermediate network Layers include inception blocks, 1×1 convolutions;

步骤54:加载步骤53得到的深度卷积神经网络,创建训练脚本文件;Step 54: load the deep convolutional neural network obtained in step 53, and create a training script file;

步骤55:对地坎槽图像分类训练集样本做预处理,输入训练的参数batch_size,epoch,iteration,batch_size表示一次参数更新过程中使用的所需样本数量,1个iteration等于使用batch_size个样本训练1次,epoch为所有样本总共迭代的次数;Step 55: Preprocess the samples of the sill and trough image classification training set, input the training parameters batch_size, epoch, iteration, batch_size represents the required number of samples used in a parameter update process, 1 iteration is equal to using batch_size samples to train 1 times, epoch is the total number of iterations for all samples;

步骤56:设置停止策略,当迭代达到指定的epoch数和iteration数,或者模型在验证集的预测精度达到设定值时停止训练;Step 56: Set a stopping strategy, when the iteration reaches the specified epoch number and iteration number, or the model stops training when the prediction accuracy of the validation set reaches the set value;

步骤57:增设checkpoint机制,在每个epoch模型训练过程中达到最优时,输出模型文件;Step 57: Add a checkpoint mechanism, and output the model file when the optimum is reached in the training process of each epoch model;

步骤58:根据batch_size加载样本做数据预处理后执行训练过程。Step 58: Load the samples according to batch_size for data preprocessing and then execute the training process.

优选地,地坎槽图像分类训练集中的训练样本通过对原始样本做进行随机裁剪、翻转以及特征变换的方法获得;特征变换如公示(4)(5)(6)所示:Preferably, the training samples in the sill image classification training set are obtained by randomly cropping, flipping, and transforming the original samples; the transforming features are shown in public announcements (4) (5) (6):

Figure 432234DEST_PATH_IMAGE014
(4)
Figure 432234DEST_PATH_IMAGE014
(4)

Figure 221330DEST_PATH_IMAGE015
(5)
Figure 221330DEST_PATH_IMAGE015
(5)

Figure 558770DEST_PATH_IMAGE016
(6)
Figure 558770DEST_PATH_IMAGE016
(6)

其中,

Figure 15290DEST_PATH_IMAGE017
表示中心像素,对于给定中心点
Figure 147195DEST_PATH_IMAGE018
,其圆形邻域像素位置为
Figure 282641DEST_PATH_IMAGE019
,
Figure 174505DEST_PATH_IMAGE020
是采样半径,
Figure 469220DEST_PATH_IMAGE021
表示第
Figure 647391DEST_PATH_IMAGE021
个采样点,
Figure 145500DEST_PATH_IMAGE022
是采样数目,
Figure 168951DEST_PATH_IMAGE023
是符号函数,若相邻位置像素与中间位置中心像素的差值为正数或0时返回1;否则为0,
Figure 604928DEST_PATH_IMAGE025
是旋转函数,
Figure 855912DEST_PATH_IMAGE026
表示将
Figure 948633DEST_PATH_IMAGE027
右循环
Figure 483519DEST_PATH_IMAGE028
位。in,
Figure 15290DEST_PATH_IMAGE017
represents the center pixel, for a given center point
Figure 147195DEST_PATH_IMAGE018
, and its circular neighborhood pixel position is
Figure 282641DEST_PATH_IMAGE019
,
Figure 174505DEST_PATH_IMAGE020
is the sampling radius,
Figure 469220DEST_PATH_IMAGE021
means the first
Figure 647391DEST_PATH_IMAGE021
sampling points,
Figure 145500DEST_PATH_IMAGE022
is the number of samples,
Figure 168951DEST_PATH_IMAGE023
is a sign function, if the difference between the pixel at the adjacent position and the central pixel at the middle position is a positive number or 0, it returns 1; otherwise, it is 0,
Figure 604928DEST_PATH_IMAGE025
is the rotation function,
Figure 855912DEST_PATH_IMAGE026
means to
Figure 948633DEST_PATH_IMAGE027
loop right
Figure 483519DEST_PATH_IMAGE028
bit.

优选地,所述检测识别模块中的图像光照自适应矫正单元,具体用于对视频采集模块采集到的输入图像做光照自适应矫正,处理环境光照度过暗、过亮时的地坎槽图像,以提高光照均匀度并增强图像质量,自适应处理方法如公式(7)(8)所示:Preferably, the image illumination adaptive correction unit in the detection and recognition module is specifically configured to perform illumination adaptive correction on the input image collected by the video acquisition module, and process the sill image when the ambient light is too dark or too bright, In order to improve illumination uniformity and enhance image quality, the adaptive processing method is shown in formula (7) (8):

Figure 144439DEST_PATH_IMAGE029
(7)
Figure 144439DEST_PATH_IMAGE029
(7)

Figure 131987DEST_PATH_IMAGE030
(8)
Figure 131987DEST_PATH_IMAGE030
(8)

其中,

Figure 903765DEST_PATH_IMAGE031
是矫正后的输出图像的光照特性,
Figure 27579DEST_PATH_IMAGE032
为输入图像
Figure 847681DEST_PATH_IMAGE033
提取出的光照分量,m为光照分量的亮度均值;
Figure 932311DEST_PATH_IMAGE034
系数为自适应系数,参数k和r为用机器学习方法根据电梯轿厢实际光照条件迭代学习的可变参数;所述检测识别模块中的地坎槽检测单元用于:in,
Figure 903765DEST_PATH_IMAGE031
is the illumination characteristic of the corrected output image,
Figure 27579DEST_PATH_IMAGE032
for the input image
Figure 847681DEST_PATH_IMAGE033
The extracted illumination component, m is the average brightness of the illumination component;
Figure 932311DEST_PATH_IMAGE034
The coefficient is an adaptive coefficient, and the parameters k and r are variable parameters that are iteratively learned according to the actual lighting conditions of the elevator car with a machine learning method; the sill detection unit in the detection and identification module is used for:

加载目标检测模型对地坎槽进行检测,当检测到地坎槽时判断为开门;根据检测到地坎槽长度和其总长度比值判断电梯开门程度α,检测到的地坎槽的实际长度和其实际总长度比值,等于其对应的像素比;当α为0时电梯未开门;当开门程度α大于等于设定的阈值时,识别判断是否开门;所述检测识别模块中的图像角度自适应矫正单元,其具体用于对检测到的地坎槽图像进行角度变换以适应不同镜头、不同型号的门系统、不同类型的开门方式带来的角度畸变,如公示(9)(10)(11)(12)所示:Load the target detection model to detect the sill slot, when the sill slot is detected, it is judged to open the door; according to the ratio of the detected sill slot length and its total length, the elevator door opening degree α is judged, and the actual length of the detected sill slot and the total length are determined. Its actual total length ratio is equal to its corresponding pixel ratio; when α is 0, the elevator does not open the door; when the degree of door opening α is greater than or equal to the set threshold, it is recognized and judged whether to open the door; the image angle in the detection and recognition module is adaptive Correction unit, which is specifically used to perform angle transformation on the detected sill image to adapt to the angle distortion caused by different lenses, different types of door systems, and different types of door opening methods, such as public announcements (9) (10) (11) ) (12) as shown:

Figure 22627DEST_PATH_IMAGE035
(9)
Figure 22627DEST_PATH_IMAGE035
(9)

Figure 17259DEST_PATH_IMAGE036
(10)
Figure 17259DEST_PATH_IMAGE036
(10)

Figure 269249DEST_PATH_IMAGE037
(11)
Figure 269249DEST_PATH_IMAGE037
(11)

Figure 716542DEST_PATH_IMAGE038
(12)
Figure 716542DEST_PATH_IMAGE038
(12)

其中

Figure 79390DEST_PATH_IMAGE039
是变换后像素点坐标,
Figure 928528DEST_PATH_IMAGE040
是变换前像素点坐标,
Figure 961207DEST_PATH_IMAGE041
分别是图像的宽度和高度,
Figure 410642DEST_PATH_IMAGE042
是相机镜头中心与地坎槽水平中心线的夹角,
Figure 593493DEST_PATH_IMAGE043
是相机镜头中心与地坎槽中心线的夹角,
Figure 280827DEST_PATH_IMAGE044
Figure 890931DEST_PATH_IMAGE045
是由
Figure 296504DEST_PATH_IMAGE042
Figure 17467DEST_PATH_IMAGE043
决定的衡量二维平面旋转角度和三维空间绕z轴旋转程度的向量,并作为超参数进行自适应训练。in
Figure 79390DEST_PATH_IMAGE039
is the transformed pixel coordinates,
Figure 928528DEST_PATH_IMAGE040
is the pixel coordinates before transformation,
Figure 961207DEST_PATH_IMAGE041
are the width and height of the image, respectively,
Figure 410642DEST_PATH_IMAGE042
is the angle between the center of the camera lens and the horizontal centerline of the sill groove,
Figure 593493DEST_PATH_IMAGE043
is the angle between the center of the camera lens and the center line of the sill groove,
Figure 280827DEST_PATH_IMAGE044
and
Figure 890931DEST_PATH_IMAGE045
By
Figure 296504DEST_PATH_IMAGE042
and
Figure 17467DEST_PATH_IMAGE043
The determined vector that measures the rotation angle of the two-dimensional plane and the degree of rotation of the three-dimensional space around the z-axis, and is used as a hyperparameter for adaptive training.

优选地,所述检测识别模块中的非平层开门识别单元,具体用于加载非平层开门分类模型,判断厅门、轿门是否非平层并给出置信度β,当β大于设定的阈值时判断为非平层开门。Preferably, the non-leveling door opening identification unit in the detection and identification module is specifically used to load the non-leveling door opening classification model, determine whether the hall door and the car door are non-leveling, and give a confidence level β, when β is greater than the set When the threshold value is reached, it is judged as non-leveling open door.

本发明实施例还提供了一种基于深度学习的非平层开门故障识别方法,其包括如下步骤:The embodiment of the present invention also provides a deep learning-based non-leveling door opening fault identification method, which includes the following steps:

步骤101:视频采集模块启动;加速度监测模块采集电梯轿厢的加速度信号,并将加速度信号传输到微处理器;微处理器接收加速度信号,进行滤波平滑处理,并对完成滤波平滑处理后的加速度曲线进行分析,若判断为进入减速停梯阶段时进入步骤102,若判断为正常行驶则继续进行加速度监测;Step 101: the video acquisition module is started; the acceleration monitoring module collects the acceleration signal of the elevator car, and transmits the acceleration signal to the microprocessor; the microprocessor receives the acceleration signal, performs filtering and smoothing processing, and performs filtering and smoothing processing on the acceleration signal The curve is analyzed, if it is judged that it is entering the stage of deceleration and stopping, go to step 102, and if it is judged that it is normal driving, continue to carry out acceleration monitoring;

步骤102:检测识别模块接收加速度监测模块信息,并根据监测到准备停梯的时间开始截取电梯轿厢运行视频;检测识别模块对截取的视频进行帧处理,对每帧图像进行光照自适应矫正,进入步骤103;Step 102: The detection and identification module receives the information of the acceleration monitoring module, and starts to intercept the running video of the elevator car according to the monitoring time when the elevator is ready to stop; the detection and identification module performs frame processing on the intercepted video, and performs adaptive illumination correction on each frame of image, Enter step 103;

步骤103:检测识别模块加载地坎槽检测模型,对步骤102得到的图像进行目标检测,当检测到地坎槽时即可判断为开门,进入步骤104;Step 103: The detection and recognition module loads the sill detection model, and performs target detection on the image obtained in step 102. When the sill is detected, it can be judged that the door is opened, and the process goes to step 104;

步骤104:检测识别模块对步骤103检测到的地坎槽图像做角度自适应矫正,智能处理不同镜头、不同型号的门系统、不同类型的开门方式等因素带来的图像角度畸变,进入步骤105;Step 104: The detection and recognition module performs angle adaptive correction on the sill image detected in step 103, intelligently handles the image angle distortion caused by factors such as different lenses, different types of door systems, different types of door opening methods, etc., and proceeds to step 105 ;

步骤105:检测识别模块加载非平层开门分类模型,判断步骤104处理后的图像是否为非平层开门,并给出置信度β,当β大于设定的阈值时判断为非平层开门故障;否则回到步骤101。Step 105: The detection and recognition module loads the non-leveling door opening classification model, determines whether the image processed in step 104 is non-leveling door opening, and gives a confidence level β, when β is greater than the set threshold, it is judged as a non-leveling door opening failure ; otherwise, go back to step 101.

本发明提供的一种基于计算机视觉的电梯非平层开门故障识别装置及方法,能够全覆盖到各种类型的电梯门系统,满足电梯行业快速发展的需要,实现对于电梯非平层开门的智能识别预测,克服了传统检测方式的不足,减少非平层目标样本的人工标定工作量,提高对电梯非平层图像和开关门图像的目标检测准确率和识别速度,模型识别精度达95.3%。本装置采用领先的电梯故障识别技术,实现极强的兼容性。The invention provides a computer vision-based elevator non-leveling door opening fault identification device and method, which can fully cover various types of elevator door systems, meet the needs of the rapid development of the elevator industry, and realize intelligent elevator non-leveling door opening. Recognition prediction overcomes the shortcomings of traditional detection methods, reduces the workload of manual calibration of non-leveling target samples, and improves the target detection accuracy and recognition speed of elevator non-leveling images and door opening and closing images, and the model recognition accuracy reaches 95.3%. The device adopts the leading elevator fault identification technology to achieve strong compatibility.

本发明具有如下有益效果:The present invention has the following beneficial effects:

1、充分考虑到各类电梯的传感器差异性,采用视频识别的检测方式,避免改造原有电梯传感器装置的复杂问题,识别装置安装更加简易方便。1. Fully considering the sensor differences of various elevators, the detection method of video recognition is adopted to avoid the complicated problem of modifying the original elevator sensor device, and the installation of the recognition device is simpler and more convenient.

2、充分考虑到门系统的型号、规格的差异性,利用深度学习的方式预先训练好地坎槽模型和非平层开门模型,可以大量减少人工标定非平层图像的工作量。2. Fully considering the differences in the model and specification of the door system, using the deep learning method to pre-train the sill model and the non-leveling door model can greatly reduce the workload of manually calibrating non-leveling images.

3、充分考虑到不同镜头、不同型号的门系统、不同类型的电梯开门方式等带来的镜头拍摄角度畸变,在装置中设置了图像角度自适应矫正单元,可对检测到的地坎槽图像进行角度自动变换。3. Fully considering the lens shooting angle distortion caused by different lenses, different types of door systems, and different types of elevator door opening methods, etc., an image angle adaptive correction unit is set up in the device, which can correct the detected sill image. Perform automatic angle transformation.

4、针对电梯复杂的环境照度对图像造成的影响,本装置设置了图像光照自适应矫正单元,具体用于对视频采集模块采集到的输入图像做光照自适应矫正,以提高光照均匀度并增强图像质量。4. In view of the influence of the complex environmental illumination of the elevator on the image, the device is equipped with an image illumination adaptive correction unit, which is specifically used to perform illumination adaptive correction on the input image collected by the video acquisition module, so as to improve the illumination uniformity and enhance the Image Quality.

5、充分考虑到电梯门和地坎容易被乘客或设备遮挡的情况,合理应对,将镜头设置于电梯轿门和厅门夹缝,可以同时拍摄厅门地坎槽和轿门地坎槽,避免被遮挡,根据检测到地坎槽长度和其总长度比值判断电梯开门程度。5. Fully consider the situation that the elevator doors and sills are easily blocked by passengers or equipment, and deal with it reasonably. Set the camera in the gap between the elevator car door and the hall door. You can shoot the hall door sill and the car door sill at the same time. If it is blocked, the door opening degree of the elevator is judged according to the ratio of the detected sill groove length to its total length.

6、为了提高对电梯非平层图像和开关门图像的目标检测准确率和识别速度,分别制作地坎槽检测训练集、地坎槽图像分类训练集;并进行地坎槽检测模型训练,通过对原始样本做进行随机裁剪、翻转以及特征变换的方法获得训练非平层开门识别模型,对地坎槽图像做二分类,快速识别平层或非平层。6. In order to improve the target detection accuracy and recognition speed of elevator non-leveling images and door opening and closing images, respectively make a sill detection training set and a sill image classification training set; and train the sill detection model. The method of random cropping, flipping and feature transformation of the original sample is used to obtain a training non-leveling door recognition model, and the sill and trough images are classified into two categories to quickly identify the leveling or non-leveling.

7、针对检测识别模块的算力消耗问题,配置加速度监测模块,当发现电梯进入减速停梯状态时,检测识别模块开始工作,否则待机,以节约算力。7. In view of the computing power consumption of the detection and recognition module, configure the acceleration monitoring module. When the elevator is found to enter the deceleration stop state, the detection and recognition module starts to work, otherwise it will stand by to save computing power.

8、采用深度学习模型,检测识别的准确性有保证,相比传统的利用传感器测距等方式,具有更好的鲁棒性和适用性。8. Using a deep learning model, the accuracy of detection and recognition is guaranteed, and it has better robustness and applicability than traditional methods such as using sensors to measure distance.

9、充分考虑到产业化和市场化方面问题,本方法在普通单目相机作为图像采集装置的基础上,通过优化图像识别模型和算法来实现测距功能,相比采用深度相机等其他图像测距方式,具有成本更低、体积更小、算力需求更少、图像处理速度更快等优势,具有良好的产业化,也更易于现场安装。9. Fully considering the industrialization and marketization issues, this method realizes the ranging function by optimizing the image recognition model and algorithm on the basis of the ordinary monocular camera as the image acquisition device. The distance method has the advantages of lower cost, smaller size, less computing power requirements, and faster image processing speed. It has good industrialization and is easier to install on site.

附图说明Description of drawings

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

图1为本发明实施例提供的电梯非平层开门故障识别装置的结构示意图。FIG. 1 is a schematic structural diagram of an elevator non-leveling door opening fault identification device provided by an embodiment of the present invention.

图2为本发明实施例提供的电梯非平层开门故障识别方法的流程图。FIG. 2 is a flowchart of a method for identifying an elevator non-leveling door opening fault provided by an embodiment of the present invention.

图3为本发明实施例的样本特征预处理运算方式举例。FIG. 3 is an example of a sample feature preprocessing operation manner according to an embodiment of the present invention.

图4为本发明实施例检测识别模块的工作过程示意图。FIG. 4 is a schematic diagram of a working process of a detection and identification module according to an embodiment of the present invention.

图5为本发明实施例视频采集模块和加速度监测模块安装位置示意图。FIG. 5 is a schematic diagram of installation positions of a video acquisition module and an acceleration monitoring module according to an embodiment of the present invention.

具体实施方式Detailed ways

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

请参阅图1,本发明实施例提供了一种基于计算机视觉的电梯非平层开门故障识别装置,包括视频采集模块10、加速度监测模块20、模型训练模块30以及检测识别模块40;其中,Referring to FIG. 1, an embodiment of the present invention provides a computer vision-based elevator non-leveling door opening fault identification device, including avideo acquisition module 10, anacceleration monitoring module 20, amodel training module 30, and a detection and identification module 40; wherein,

如图5所示,在本实施例中,所述视频采集模块10设置于电梯轿厢1内的顶部,所述视频采集模块10可为摄像装置,如微型相机或者摄像头等,其镜头3设置于电梯轿门6和厅门7的夹缝,垂直于地坎槽,正对地坎槽进行拍摄,从而可以同时拍摄厅门地坎槽5和轿门地坎槽4。As shown in FIG. 5 , in this embodiment, thevideo capture module 10 is arranged on the top of theelevator car 1 , and thevideo capture module 10 may be a camera device, such as a miniature camera or a camera, and thelens 3 of thevideo capture module 10 is provided The gap between theelevator car door 6 and thehall door 7 is perpendicular to the sill groove, and the photo is directly facing the sill groove, so that the halldoor sill groove 5 and the cardoor sill groove 4 can be photographed at the same time.

在本实施例中,镜头具体安装位置根据电梯开门类型而定,且与电梯门锁打开的位置一致,如当电梯为中分开门时,镜头安装在门的正中间位置;电梯为旁开门时,镜头安装在轿门的开门一端。在本实施例中,所述摄像装置优选的采用红外广角摄像头,能够适应光线微弱的环境,其中摄像头的镜头正对地坎槽。In this embodiment, the specific installation position of the lens is determined according to the type of elevator door opening, and is consistent with the position where the elevator door lock is opened. , the lens is installed on the open end of the car door. In this embodiment, the camera device preferably adopts an infrared wide-angle camera, which can adapt to a weak light environment, wherein the lens of the camera is facing the sill groove.

进一步地,摄像装置可以采用补光灯和光照度传感器,当光照度低于设定限度时,补光灯自动打开,对地坎槽补充光照。Further, the camera device can use a fill light and an illuminance sensor. When the illuminance is lower than a set limit, the fill light is automatically turned on to supplement the illumination for the sill groove.

本实施例中,视频采集模块10与检测识别模块40电性连接,视频采集模块40能够将实时采集的视频信号通过连接线路传输到检测识别模块40并进行存储。In this embodiment, thevideo capture module 10 is electrically connected to the detection and identification module 40, and the video capture module 40 can transmit the real-time captured video signal to the detection and identification module 40 through the connection line and store it.

所述加速度监测模块20,包括加速度传感器以及微处理器,微处理器可为单片机;所述加速度监测模块20用于对电梯运行加速度进行监控,以预判电梯是否进入减速状态,加速度监测模块20与检测识别模块40电性连接。Theacceleration monitoring module 20 includes an acceleration sensor and a microprocessor, and the microprocessor can be a single-chip microcomputer; theacceleration monitoring module 20 is used to monitor the running acceleration of the elevator to predict whether the elevator enters a deceleration state. Theacceleration monitoring module 20 It is electrically connected with the detection and identification module 40 .

所述加速度传感器采集加速度的时间间隔可为60ms、40ms、 25ms。其中随着加速度采样频率的增大,微处理器对于检测加速度进行电梯即将停梯的判断就愈为准确,并且对硬件存储要求和信息传输要求指数级上升;特别在40ms处出现拐点,此时微处理器判断的准确度与加速度传感器在单位时间内采集的信息量的比值达到最大值,因此在本实施例中加速度传感器采用40ms的采集时间间隔,也就是25HZ的采集频率,加速度的单位为cm/s2The time interval at which the acceleration sensor collects the acceleration may be 60ms, 40ms, or 25ms. Among them, with the increase of the acceleration sampling frequency, the microprocessor will be more accurate for detecting the acceleration to judge that the elevator is about to stop, and the requirements for hardware storage and information transmission increase exponentially; The ratio between the accuracy of the microprocessor's judgment and the amount of information collected by the acceleration sensor per unit time reaches the maximum value. Therefore, in this embodiment, the acceleration sensor adopts a collection time interval of 40ms, that is, the collection frequency of 25HZ. The unit of acceleration is cm/s2 .

所述微处理器利用方差、极差以及极差对应的索引距离占加速度序列长度的占比对完成滤波平滑处理后的加速度曲线进行加速度检测以判断电梯是否停梯。所述方差是用来度量加速度序列的波动程度,表达的是加速度的平稳性,用

Figure 700252DEST_PATH_IMAGE046
表示,如公式(1)所示:The microprocessor uses the variance, the range, and the ratio of the index distance corresponding to the range to the length of the acceleration sequence to perform acceleration detection on the acceleration curve after filtering and smoothing to determine whether the elevator stops. The variance is used to measure the degree of fluctuation of the acceleration sequence, which expresses the stationarity of the acceleration.
Figure 700252DEST_PATH_IMAGE046
Represented as formula (1):

Figure 374127DEST_PATH_IMAGE048
(1)
Figure 374127DEST_PATH_IMAGE048
(1)

其中,

Figure 616889DEST_PATH_IMAGE049
表示加速度序列的第
Figure 295126DEST_PATH_IMAGE050
个加速度取值,
Figure 106088DEST_PATH_IMAGE051
表示该加速度序列的加速度均值,n代表该加速度序列长度,即该加速度序列是由n个加速度取值组成的序列。in,
Figure 616889DEST_PATH_IMAGE049
represents the first
Figure 295126DEST_PATH_IMAGE050
an acceleration value,
Figure 106088DEST_PATH_IMAGE051
Indicates the acceleration mean value of the acceleration sequence, and n represents the length of the acceleration sequence, that is, the acceleration sequence is a sequence composed of n acceleration values.

所述极差是用来衡量数值变动的最大范围,是测定数值变动较为方便的指标,是最大值与最小值之间的差距,用

Figure 751833DEST_PATH_IMAGE052
表示,如公式(2)所示:The range is used to measure the maximum range of numerical changes, is a more convenient index to measure numerical changes, and is the gap between the maximum value and the minimum value.
Figure 751833DEST_PATH_IMAGE052
Represented as formula (2):

Figure 596609DEST_PATH_IMAGE054
(2)
Figure 596609DEST_PATH_IMAGE054
(2)

其中,

Figure 719417DEST_PATH_IMAGE055
表示该加速度序列中的最大值,
Figure 321299DEST_PATH_IMAGE056
表示该加速度序列的最小值。in,
Figure 719417DEST_PATH_IMAGE055
represents the maximum value in the acceleration sequence,
Figure 321299DEST_PATH_IMAGE056
Represents the minimum value of the acceleration sequence.

所述极差对应的索引距离占加速度序列长度的占比是刻画的加速度骤变程度,描述的是最大值和最小值所在序列位置的间距占整个运行加速度序列的比例,用

Figure 453335DEST_PATH_IMAGE057
表示,如公式(3)所示:The ratio of the index distance corresponding to the range to the length of the acceleration sequence is the degree of sudden acceleration described, which describes the ratio of the distance between the sequence positions of the maximum value and the minimum value to the entire running acceleration sequence, using
Figure 453335DEST_PATH_IMAGE057
is expressed, as shown in formula (3):

Figure 395280DEST_PATH_IMAGE059
(3)
Figure 395280DEST_PATH_IMAGE059
(3)

其中,

Figure 750038DEST_PATH_IMAGE060
表示该序列中最大加速度所在的序列位置,
Figure 279240DEST_PATH_IMAGE061
则表示最小加速度所在的序列位置,在本例中序列位置表示为第几个点;
Figure 520996DEST_PATH_IMAGE062
则为整个加速度序列的长度。in,
Figure 750038DEST_PATH_IMAGE060
represents the sequence position where the maximum acceleration is located in the sequence,
Figure 279240DEST_PATH_IMAGE061
Then it represents the sequence position where the minimum acceleration is located. In this example, the sequence position is expressed as the first point;
Figure 520996DEST_PATH_IMAGE062
is the length of the entire acceleration sequence.

在本实施例中方差满足大于1000、极差满足大于500和/或极差对应的索引距离占加速度序列长度的占比小于10%,则认为电梯即将停梯;否则微处理器判断为加速度正常。其中方差、极差以及极差对应的索引距离占加速度序列长度的占比之间的关系为“和”时,说明条件苛刻,判断为电梯即将停梯的情况会更为精确,但是会出现漏查的情况;关系为“或”时,说明条件松弛,能够全面排查可能为电梯即将停梯的情况,但是对于判断为电梯即将停梯情况的精度会降低。所述加速度序列长度表示电梯轿厢的速度从零开始到恢复为零的时间间隔内的加速度数据长度;极差对应的索引距离表示加速度序列中加速度的最大值和最小值之间的加速度数据长度;所述数据长度为数据的数量,电梯轿厢的速度由速度传感器采集,速度传感器设置于电梯轿厢。In this embodiment, if the variance is greater than 1000, the range is greater than 500, and/or the index distance corresponding to the range accounts for less than 10% of the length of the acceleration sequence, it is considered that the elevator is about to stop; otherwise, the microprocessor determines that the acceleration is normal . When the relationship between the variance, the range and the ratio of the index distance corresponding to the range to the length of the acceleration sequence is "sum", it means that the conditions are harsh, and it will be more accurate to judge that the elevator is about to stop, but there will be leakage. When the relationship is "or", it means that the conditions are relaxed, and it is possible to comprehensively check the situation that the elevator is about to stop, but the accuracy of judging the situation that the elevator is about to stop will be reduced. The length of the acceleration sequence represents the length of the acceleration data in the time interval when the speed of the elevator car starts from zero and returns to zero; the index distance corresponding to the extreme difference represents the length of the acceleration data between the maximum value and the minimum value of the acceleration in the acceleration sequence The data length is the number of data, the speed of the elevator car is collected by a speed sensor, and the speed sensor is arranged in the elevator car.

所述模型训练模块30,包括地坎槽目标检测模型训练单元和非平层开门图像分类模型训练单元;用于预先训练地坎槽检测模型和非平层开门识别模型,以供检测模块加载使用。Themodel training module 30 includes a sill target detection model training unit and a non-leveling door image classification model training unit; used for pre-training the sill detection model and the non-leveling door recognition model, for the detection module to load and use .

所述检测识别模块40,包括图像光照自适应矫正单元,地坎槽检测单元,图像角度自适应矫正单元,非平层开门识别单元;用于对图像做自适应处理并加载训练好的模型进行预测、识别。The detection and recognition module 40 includes an image illumination adaptive correction unit, a sill groove detection unit, an image angle adaptive correction unit, and a non-leveling door recognition unit; it is used to perform adaptive processing on the image and load the trained model for Predict, identify.

如图2所示,所述视频采集模块10与检测识别模块40电性连接;模型训练模块30和检测识别模块40都设置于后端服务器。As shown in FIG. 2 , thevideo acquisition module 10 is electrically connected with the detection and identification module 40 ; themodel training module 30 and the detection and identification module 40 are both arranged on the back-end server.

所述模型训练模块30中的地坎槽检测模型训练单元,其训练方法包括如下步骤:The sill groove detection model training unit in themodel training module 30, its training method comprises the steps:

步骤1:制作地坎槽检测训练集,使用LabelImg对含有地坎槽的轿厢图片进行批量标注,具体为框出地坎槽图像并标注类别;Step 1: Create a training set for sill detection, and use LabelImg to label the pictures of the car containing the sill in batches, specifically frame the sill image and label the category;

步骤2:搭建目标检测模型结构,采用迁移学习方法使用在 ILSVRC数据集上训练过的模型作为网络backbone的初始权重并随机化除初始权重外的其他参数,在步骤1建立的数据集上进行训练,损失函数包括类别分类损失函数loss_cls和地坎槽边界框位置回归损失函数loss_bbox。本实施例中类别损失函数采用二值交叉熵,边框位置回归损失函数采用L2损失函数;Step 2: Build the target detection model structure, use the transfer learning method to use the model trained on the ILSVRC data set as the initial weight of the network backbone and randomize other parameters except the initial weight, and train on the data set established instep 1. , the loss function includes the class classification loss function loss_cls and the sill trough bounding box position regression loss function loss_bbox. In this embodiment, the category loss function adopts binary cross entropy, and the frame position regression loss function adopts the L2 loss function;

步骤3:设置停止策略,当达到指定的迭代次数,或者模型在验证集的预测精度达到设定值时停止训练。Step 3: Set a stopping strategy, when the specified number of iterations is reached, or the model stops training when the prediction accuracy of the validation set reaches the set value.

在本实施例中地坎槽图像目标检测模型采用YoLoV3, YoLoV3用于特征提取的backbone网络为darknet53网络,输出层有三个全卷积网络作为输出层,每个输出层在不同维度的特征图上输出结果,其输出维度为In this embodiment, the sill image target detection model adopts YoLoV3, the backbone network used by YoLoV3 for feature extraction is darknet53 network, and the output layer has three fully convolutional networks as output layers, and each output layer is on a feature map of different dimensions. The output result, whose output dimension is

Figure 93240DEST_PATH_IMAGE064
Figure 93240DEST_PATH_IMAGE064

其中S是S×S特征图的尺度大小,B表示每个格子输出的边框数目,C是检测的类别数,5是输出的4个位置边框坐标和属于该物体的置信度得分。本实施例中只有地坎槽一个类别因此C为1,输入图像大小为416×416,预测((52×52)+(26×26)+ (13×13)) ×3=10647个边界框。where S is the scale of the S×S feature map, B is the number of bounding boxes output by each grid, C is the number of detected categories, and 5 is the coordinates of theoutput 4 position bounding boxes and the confidence score belonging to the object. In this example, there is only one category of sills, so C is 1, the input image size is 416×416, and the prediction is ((52×52)+(26×26)+ (13×13))×3=10647 bounding boxes .

本实施例中,数据集可采用摄像头采集开门期间电梯轿厢图片后用标注工具LabelImg对含有地坎槽的轿厢图片进行位置和类别的标注后生成。在获得数据集后,对其做数据清理后按照8:2随机划分为训练集和验证集。使用在ILSVRC 图像数据集上训练过的darknet53 模型作为网络backbone的初始权重,并用he_normal方法初始化除初始权重外的其他参数。训练中使用的损失函数包括类别损失函数以及边框位置回归损失函数,类别损失函数采用二值交叉熵,边框位置回归损失函数采用L2损失函数。在训练集上做训练并在验证集上验证以根据实时精度设置停止策略。In this embodiment, the data set can be generated by using a camera to collect pictures of the elevator car during door opening, and then using the labeling tool LabelImg to label the picture of the car containing the sill with the location and category. After the data set is obtained, it is randomly divided into training set and validation set according to 8:2 after data cleaning. Use the darknet53 model trained on the ILSVRC image dataset as the initial weights of the network backbone, and initialize other parameters except the initial weights with the he_normal method. The loss functions used in training include the category loss function and the border position regression loss function. The category loss function adopts binary cross entropy, and the border position regression loss function adopts the L2 loss function. Do train on the training set and validate on the validation set to set the stopping policy based on real-time accuracy.

所述模型训练模块30中的非平层开门图像分类模型训练单元,用于训练非平层开门识别模型,对地坎槽图像做二分类,以识别平层或非平层;The non-leveling door opening image classification model training unit in themodel training module 30 is used for training the non-leveling door opening recognition model, and the sill and groove images are classified into two to identify leveling or non-leveling;

Inception结构显著增加了每一步的神经单元数目,且在不同尺度上进行了预处理聚合,替代了人工确定卷积层中过滤器的类型,让网络自我学习参数。而Inception V3通过分解卷积核尺寸、改变降低特征图尺寸来达到堆积更多的inception模块提升计算资源的利用,其总计47层。The Inception structure significantly increases the number of neural units in each step, and performs preprocessing aggregation at different scales, instead of manually determining the type of filters in the convolutional layer, allowing the network to learn parameters by itself. Inception V3 achieves stacking more inception modules to improve the utilization of computing resources by decomposing the size of the convolution kernel and changing and reducing the size of the feature map, with a total of 47 layers.

训练非平层开门识别模型的方法包括如下步骤:The method for training a non-leveling door recognition model includes the following steps:

步骤1:制作地坎槽图像分类训练集,具体方法为开门状态下,采集厅门地坎槽和轿门地坎槽高度差绝对值小于等于10mm的地坎槽图像作为平层开门数据集,其他为非平层开门数据集;Step 1: Create a training set of sill image classification. The specific method is to collect the sill image with the absolute value of the height difference between the hall door sill and the car door sill less than or equal to 10mm in the open state as the leveling door opening data set. Others are non-leveling open door datasets;

步骤2:下载并加载Inception V3模型作为预训练模型;Step 2: Download and load the Inception V3 model as a pretrained model;

步骤3:执行迁移学习策略,去掉输出全连接层和softmax层,增加新的二分类的全连接层和softmax分类层,并可选地增删部分中间网络层如部分inception块、1×1卷积,作为改进的基于inception结构的深度卷积神经网络;网络含有Inception结构通过多卷积核融合提取图像不同尺度信息得到更好的表征,Inception结构含有1×1卷积以降维构建参数更少的稀疏网络结构。Step 3: Execute the transfer learning strategy, remove the output fully connected layer and softmax layer, add a new two-category fully connected layer and softmax classification layer, and optionally add or delete some intermediate network layers such as some inception blocks, 1×1 convolution , as an improved deep convolutional neural network based on the inception structure; the network contains the Inception structure to extract information at different scales of the image through multi-convolution kernel fusion, and the Inception structure contains 1 × 1 convolution to reduce dimensionality. Sparse network structure.

步骤4:加载步骤3得到的深度卷积神经网络,创建训练脚本文件;Step 4: Load the deep convolutional neural network obtained instep 3, and create a training script file;

步骤5:对地坎槽图像分类训练集样本做预处理,输入训练的参数batch_size,epoch,iteration等,batch_size表示一次参数更新过程中使用的所需样本数量,1个iteration等于使用batch_size个样本训练1次,epoch为所有样本总共迭代的次数。本实施例batch_size取64,epoch取100。Step 5: Preprocess the samples of the sill and trough image classification training set, and input the training parameters batch_size, epoch, iteration, etc. batch_size represents the required number of samples used in one parameter update process, and 1 iteration is equal to using batch_size samples fortraining 1 time, epoch is the total number of iterations for all samples. In this embodiment, batch_size is 64, and epoch is 100.

步骤6:设置停止策略,当迭代达到指定的epoch数和iteration数,或者模型在验证集的预测精度达到设定值时停止训练。Step 6: Set the stopping strategy. When the iteration reaches the specified number of epochs and iterations, or the model stops training when the prediction accuracy of the validation set reaches the set value.

步骤7:增设checkpoint机制,在每个epoch深度学习过程中达到最优时,输出模型文件;Step 7: Add a checkpoint mechanism, and output the model file when the optimum is reached in the deep learning process of each epoch;

步骤8:根据batch_size加载样本做数据预处理后执行训练过程。Step 8: Load samples according to batch_size for data preprocessing and execute the training process.

所述Softmax函数为归一化指数函数,是逻辑函数的推广,用于多分类。Softmax函数将多个神经元的输出映射到(0,1)区间内,表示输出概率,公式如下:The Softmax function is a normalized exponential function, which is a generalization of a logistic function and is used for multi-classification. The Softmax function maps the outputs of multiple neurons to the (0,1) interval, representing the output probability. The formula is as follows:

Figure 647029DEST_PATH_IMAGE066
Figure 647029DEST_PATH_IMAGE066

其中,

Figure 531809DEST_PATH_IMAGE067
表示推断属于第类的概率,
Figure 873108DEST_PATH_IMAGE069
表示上一层的输出,也即softmax的输入,其维度为C。in,
Figure 531809DEST_PATH_IMAGE067
represents the probability of inferring to belong to the first class,
Figure 873108DEST_PATH_IMAGE069
Represents the output of the previous layer, that is, the input of softmax, and its dimension is C.

所述的非平层开门图像分类模型训练单元,训练样本通过对原始样本做进行随机裁剪、翻转以及特征变换的方法获得;特征变换如公式(4)(5)(6)所示:In the non-leveling door image classification model training unit, the training samples are obtained by randomly cropping, flipping and feature transformation on the original samples; the feature transformations are shown in formulas (4) (5) (6):

Figure 948512DEST_PATH_IMAGE070
(4)
Figure 948512DEST_PATH_IMAGE070
(4)

Figure 754925DEST_PATH_IMAGE071
(5)
Figure 754925DEST_PATH_IMAGE071
(5)

Figure 571571DEST_PATH_IMAGE072
(6)
Figure 571571DEST_PATH_IMAGE072
(6)

其中,

Figure 856053DEST_PATH_IMAGE073
表示中心像素,对于给定中心点
Figure 176176DEST_PATH_IMAGE073
,其圆形邻域像素位置为
Figure 419070DEST_PATH_IMAGE074
Figure 67220DEST_PATH_IMAGE075
是采样半径
Figure 404660DEST_PATH_IMAGE076
表示第
Figure 861180DEST_PATH_IMAGE076
个采样点,
Figure 993085DEST_PATH_IMAGE077
是采样数目
Figure 800635DEST_PATH_IMAGE078
。是符号函数,若相邻位置像素与中间位置像素的差值为正数或0时返回1;否则为0。
Figure 987214DEST_PATH_IMAGE080
是旋转函数,
Figure 290019DEST_PATH_IMAGE081
表示将
Figure 319286DEST_PATH_IMAGE082
右循环
Figure 264108DEST_PATH_IMAGE083
位。特征变换的运算过程如图3所示。in,
Figure 856053DEST_PATH_IMAGE073
represents the center pixel, for a given center point
Figure 176176DEST_PATH_IMAGE073
, and its circular neighborhood pixel position is
Figure 419070DEST_PATH_IMAGE074
Figure 67220DEST_PATH_IMAGE075
is the sampling radius
Figure 404660DEST_PATH_IMAGE076
means the first
Figure 861180DEST_PATH_IMAGE076
sampling points,
Figure 993085DEST_PATH_IMAGE077
is the number of samples
Figure 800635DEST_PATH_IMAGE078
. is a sign function that returns 1 if the difference between the adjacent position pixel and the middle position pixel is positive or 0; otherwise, 0.
Figure 987214DEST_PATH_IMAGE080
is the rotation function,
Figure 290019DEST_PATH_IMAGE081
means to
Figure 319286DEST_PATH_IMAGE082
loop right
Figure 264108DEST_PATH_IMAGE083
bit. The operation process of feature transformation is shown in Figure 3.

在本实施例中假设设定:In this example it is assumed that:

非平层开门样本总数量为800张,平层开门的样本总数量为1000张;The total number of samples for non-leveling doors is 800, and the total number of samples for leveling doors is 1000;

batch_size =64,训练集:测试集=8:2;batch_size = 64, training set: test set = 8: 2;

测试集的混淆矩阵如下:The confusion matrix for the test set is as follows:

Figure 23117DEST_PATH_IMAGE085
Figure 23117DEST_PATH_IMAGE085

y=0代表真实负例的样本数量,y=1代表真实正例的样本数量;yhat=0代表推断出为负例的样本数量,yhat=1代表推断出为正例的样本数量。y=0 represents the number of samples of true negative examples, y=1 represents the number of samples of true positive examples; yhat=0 represents the number of samples inferred as negative examples, and yhat=1 represents the number of samples inferred as positive examples.

其中测试集的总数=(800+1000)*0.2=192+9+9+151=360;The total number of test sets = (800+1000)*0.2=192+9+9+151=360;

模型识别精度=(192+151)/360≈95.3%,满足模型预测精度的设定值要求。Model recognition accuracy=(192+151)/360≈95.3%, which meets the set value requirements of model prediction accuracy.

所述检测识别模块中的图像光照自适应矫正单元,具体用于对视频采集模块采集到的输入图像(即地坎槽图像)做光照自适应矫正,处理昏暗电梯的低照度图像,或强灯照射、观光电梯等的高照度图像,特别是金属地坎槽反光引起的过曝、高反光图像,以提高光照均匀度并增强图像质量,自适应处理方法如公式(7)(8)所示:The image illumination self-adaptive correction unit in the detection and recognition module is specifically used to perform self-adaptive correction of illumination on the input image (ie the sill image) collected by the video acquisition module, and to process low-illumination images of dim elevators, or strong lights. High-illuminance images of illumination, sightseeing elevators, etc., especially over-exposed and high-reflection images caused by reflection of metal sill grooves, in order to improve illumination uniformity and enhance image quality, the adaptive processing method is shown in formula (7) (8) :

Figure 766996DEST_PATH_IMAGE086
(7)
Figure 766996DEST_PATH_IMAGE086
(7)

Figure 1668DEST_PATH_IMAGE087
(8)
Figure 1668DEST_PATH_IMAGE087
(8)

其中,

Figure 235334DEST_PATH_IMAGE088
是矫正后的输出图像的光照特性,
Figure 504641DEST_PATH_IMAGE089
为输入图像,
Figure 165561DEST_PATH_IMAGE090
提取出的光照分量,m为光照分量的亮度均值。这里的
Figure 153109DEST_PATH_IMAGE091
系数为自适应系数,参数k和r为可用机器学习方法根据电梯轿厢实际光照条件迭代学习的可变参数。本实施例
Figure 190466DEST_PATH_IMAGE092
系数可取
Figure 579859DEST_PATH_IMAGE093
。in,
Figure 235334DEST_PATH_IMAGE088
is the illumination characteristic of the corrected output image,
Figure 504641DEST_PATH_IMAGE089
for the input image,
Figure 165561DEST_PATH_IMAGE090
The extracted illumination components, m is the mean brightness of the illumination components. here
Figure 153109DEST_PATH_IMAGE091
The coefficients are adaptive coefficients, and the parameters k and r are variable parameters that can be iteratively learned by machine learning methods according to the actual lighting conditions of the elevator car. This embodiment
Figure 190466DEST_PATH_IMAGE092
coefficient desirable
Figure 579859DEST_PATH_IMAGE093
.

所述检测识别模块40中的地坎槽检测单元,加载目标检测模型对地坎槽进行检测;当检测到地坎槽时即可判断为开门,进一步的,可根据检测到地坎槽长度和其总长度比值判断电梯开门程度α,检测到的地坎槽的实际长度和其实际总长度比值,等于其对应的像素比;当α为0时电梯未开门;当开门程度α大于等于设定的阈值时对地坎槽图像识别判断是否非平层开门。本实施例中设定α阈值为0.1。The sill groove detection unit in the detection and identification module 40 loads the target detection model to detect the sill groove; when the sill groove is detected, it can be judged as opening the door, and further, according to the detected sill groove length and Its total length ratio judges the elevator door opening degree α, the ratio between the actual length of the detected sill groove and its actual total length is equal to its corresponding pixel ratio; when α is 0, the elevator does not open the door; when the door opening degree α is greater than or equal to the setting When the threshold value is set, the image recognition of the sill groove is used to judge whether the door is not open on a leveling level. In this embodiment, the α threshold is set to 0.1.

所述检测识别模块40中的图像角度自适应矫正单元,其具体用于对检测到的地坎槽图像进行角度变换以适应不同镜头、不同门系统、不同开门方式等带来的角度畸变,如公式(9)(10)(11)(12)所示:The image angle adaptive correction unit in the detection and recognition module 40 is specifically used to perform angle transformation on the detected sill image to adapt to the angle distortion caused by different lenses, different door systems, different door opening methods, etc. Formulas (9) (10) (11) (12) are shown as:

Figure 677259DEST_PATH_IMAGE094
(9)
Figure 677259DEST_PATH_IMAGE094
(9)

Figure 496311DEST_PATH_IMAGE095
(10)
Figure 496311DEST_PATH_IMAGE095
(10)

Figure 55468DEST_PATH_IMAGE096
(11)
Figure 55468DEST_PATH_IMAGE096
(11)

Figure 50100DEST_PATH_IMAGE097
(12)
Figure 50100DEST_PATH_IMAGE097
(12)

其中

Figure 302090DEST_PATH_IMAGE098
是变换后像素点坐标,
Figure 608437DEST_PATH_IMAGE099
是变换前像素点坐标,
Figure 722018DEST_PATH_IMAGE100
分别是图像的宽度和高度,
Figure 820424DEST_PATH_IMAGE101
是相机镜头中心与地坎槽水平中心线的夹角,
Figure 994047DEST_PATH_IMAGE102
是相机镜头中心与地坎槽中心线的夹角。
Figure 53270DEST_PATH_IMAGE103
Figure 954230DEST_PATH_IMAGE104
是由
Figure 923454DEST_PATH_IMAGE101
Figure 782826DEST_PATH_IMAGE102
决定的衡量二维平面旋转角度和三维空间绕z轴旋转程度的向量,可作为超参数进行自适应训练。Among them,
Figure 302090DEST_PATH_IMAGE098
is the transformed pixel coordinates,
Figure 608437DEST_PATH_IMAGE099
is the pixel coordinates before transformation,
Figure 722018DEST_PATH_IMAGE100
are the width and height of the image, respectively,
Figure 820424DEST_PATH_IMAGE101
is the angle between the center of the camera lens and the horizontal centerline of the sill groove,
Figure 994047DEST_PATH_IMAGE102
It is the angle between the center of the camera lens and the center line of the sill groove.
Figure 53270DEST_PATH_IMAGE103
and
Figure 954230DEST_PATH_IMAGE104
By
Figure 923454DEST_PATH_IMAGE101
and
Figure 782826DEST_PATH_IMAGE102
The determined vector that measures the rotation angle of the two-dimensional plane and the rotation degree of the three-dimensional space around the z-axis can be used as a hyperparameter for adaptive training.

所述检测识别模块40中的非平层开门识别单元,具体用于加载非平层开门分类模型,判断厅门、轿门是否非平层并给出置信度β,当β大于设定的阈值时判断为非平层开门。本实施例中置信度的阈值设为90%。The non-leveling door opening identification unit in the detection and identification module 40 is specifically used to load the non-leveling door opening classification model, determine whether the hall door and the car door are not leveled, and give a confidence level β, when β is greater than the set threshold value When it is judged as non-leveling door opening. In this embodiment, the threshold of confidence is set to 90%.

在检测时,加载训练好的检测模型对图像中的地坎槽进行检测,将图片归一化之后输入到训练好的网络中可得到输出,并对输出做转换得到实际的位置边界框。输出转换公式如下:During detection, load the trained detection model to detect the sill grooves in the image, normalize the image and input it into the trained network to get the output, and convert the output to get the actual location bounding box. The output conversion formula is as follows:

Figure 174941DEST_PATH_IMAGE105
Figure 174941DEST_PATH_IMAGE105

其中,

Figure 733092DEST_PATH_IMAGE106
Figure 763365DEST_PATH_IMAGE107
Figure 531601DEST_PATH_IMAGE108
Figure 790675DEST_PATH_IMAGE109
为网络输出层直接输出的边框信息,
Figure 983759DEST_PATH_IMAGE110
Figure 947385DEST_PATH_IMAGE111
Figure 61971DEST_PATH_IMAGE112
Figure 124736DEST_PATH_IMAGE113
分别为特征图格子的左上角坐标和采用的anchor的宽、高。
Figure 906748DEST_PATH_IMAGE114
Figure 888610DEST_PATH_IMAGE115
Figure 506804DEST_PATH_IMAGE116
Figure 888107DEST_PATH_IMAGE117
为换算后实际图像上位置边框左上角坐标和边框的宽和高。in,
Figure 733092DEST_PATH_IMAGE106
,
Figure 763365DEST_PATH_IMAGE107
,
Figure 531601DEST_PATH_IMAGE108
,
Figure 790675DEST_PATH_IMAGE109
is the bounding box information directly output by the network output layer,
Figure 983759DEST_PATH_IMAGE110
,
Figure 947385DEST_PATH_IMAGE111
,
Figure 61971DEST_PATH_IMAGE112
,
Figure 124736DEST_PATH_IMAGE113
are the coordinates of the upper left corner of the feature map grid and the width and height of the anchor used.
Figure 906748DEST_PATH_IMAGE114
,
Figure 888610DEST_PATH_IMAGE115
,
Figure 506804DEST_PATH_IMAGE116
,
Figure 888107DEST_PATH_IMAGE117
The coordinates of the upper left corner of the position frame on the actual image after conversion and the width and height of the frame.

最后对得到的边框采用NMS算法滤除重叠的框,保留最终有效框。检测到的地坎槽图像随即作为非平层开门识别模型的输入。检测识别模块的工作流程如图4所示。Finally, the NMS algorithm is used for the obtained frame to filter out the overlapping frames, and the final valid frame is retained. The detected sill image is then used as the input of the non-leveling door recognition model. The workflow of the detection and identification module is shown in Figure 4.

请参阅图2,本发明实施例提供了一种基于计算机视觉的电梯非平层故障识别方法,包括如下步骤:Referring to FIG. 2, an embodiment of the present invention provides a computer vision-based elevator non-leveling fault identification method, including the following steps:

步骤1:图像采集模块启动;加速度监测模块采集电梯轿厢的加速度信号,并将加速度信号传输到微处理器;微处理器接收加速度信号,进行滤波平滑处理,并对完成滤波平滑处理后的加速度曲线进行分析,若判断为进入减速阶段准备停梯时进入步骤2,若判断为正常行驶则继续进行加速度采集;Step 1: The image acquisition module is started; the acceleration monitoring module collects the acceleration signal of the elevator car, and transmits the acceleration signal to the microprocessor; Analyze the curve, if it is judged to enter the deceleration stage and prepare to stop the elevator, go to step 2, and if it is judged to be driving normally, continue to collect acceleration;

步骤2:检测识别模块接收加速度信息,并根据加速度监测到准备停梯的时间截取电梯轿厢运行视频;对截取的视频进行帧处理,对每帧图像进行光照自适应矫正,进入步骤3;Step 2: The detection and identification module receives the acceleration information, and intercepts the running video of the elevator car according to the time when the acceleration is monitored to prepare to stop the elevator; frame processing is performed on the intercepted video, and the illumination adaptive correction is performed on each frame of image, and thestep 3 is entered;

步骤3:检测识别模块加载地坎槽检测模型,对步骤2得到的图像进行目标检测,当检测到地坎槽时即可判断为开门,进入步骤4;Step 3: The detection and recognition module loads the sill detection model, and performs target detection on the image obtained in step 2. When the sill is detected, it can be judged that the door is opened, and thestep 4 is entered;

步骤4:检测识别模块对步骤3检测到的地坎槽图像做角度自适应矫正,以处理不同镜头、不同型号的门系统、不同类型的开门方式等带来的角度畸变,进入步骤5;Step 4: The detection and recognition module performs angle adaptive correction on the sill image detected inStep 3 to deal with the angle distortion caused by different lenses, different types of door systems, different types of door opening methods, etc., and go toStep 5;

步骤5:检测识别模块加载非平层开门分类模型,判断步骤4处理后的图像是否为非平层开门,并给出置信度

Figure 9778DEST_PATH_IMAGE118
,当
Figure 287176DEST_PATH_IMAGE118
大于设定的阈值时判断为非平层开门;否则回到步骤1;本实施例置信度阈值可设置为90%。Step 5: The detection and recognition module loads the non-leveling door classification model, determines whether the image processed instep 4 is a non-leveling door, and gives the confidence level
Figure 9778DEST_PATH_IMAGE118
,when
Figure 287176DEST_PATH_IMAGE118
When it is greater than the set threshold, it is determined that the door is not leveled; otherwise, go back tostep 1; the confidence threshold in this embodiment can be set to 90%.

本发明实施例提供的一种基于计算机视觉的电梯非平层故障识别装置和方法,能够全覆盖到各种类型的电梯门系统,满足电梯行业快速发展的需要,实现对于电梯非平层开门的智能识别预测,克服了传统检测方式的不足,减少非平层目标样本的人工标定工作量,提高对电梯非平层图像和开关门图像的目标检测准确率和识别速度,模型识别精度达95.3%。本实施例采用领先的电梯故障识别技术,实现极强的兼容性。A computer vision-based elevator non-leveling fault identification device and method provided by the embodiments of the present invention can fully cover various types of elevator door systems, meet the needs of the rapid development of the elevator industry, and realize the detection of elevator non-leveling door openings. Intelligent recognition and prediction overcomes the shortcomings of traditional detection methods, reduces the workload of manual calibration of non-leveling target samples, and improves the target detection accuracy and recognition speed of elevator non-leveling images and door opening and closing images, and the model recognition accuracy reaches 95.3% . This embodiment adopts the leading elevator fault identification technology to achieve extremely strong compatibility.

需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本发明提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。It should be noted that the device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical unit, that is, it can be located in one place, or it can be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. In addition, in the drawings of the apparatus embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement it without creative effort.

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。The above description is only a preferred embodiment of the present invention, but the protection scope of the present invention is not limited to this. Substitutions should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (9)

1. A computer vision-based elevator non-flat layer door opening fault recognition device is characterized by comprising a video acquisition module, an acceleration monitoring module, a model training module and a detection recognition module; wherein,
the video acquisition module comprises a camera device and is used for acquiring an image of the elevator sill slot; the video acquisition module is electrically connected with the detection identification module; the lens of the camera device is arranged at a gap between the elevator car door and the hall door and is vertical to and right against the sill groove so as to shoot the hall door sill groove and the car door sill groove simultaneously;
the acceleration monitoring module comprises an acceleration sensor and a microprocessor; the acceleration monitoring module is used for monitoring the running acceleration of the elevator so as to pre-judge whether the elevator enters a deceleration and elevator stopping state, and the acceleration monitoring module is electrically connected with the detection and identification module;
the model training module comprises a sill slot target detection model training unit and a non-flat layer door opening classification model training unit; the sill trough target detection model training unit is used for pre-training a sill trough detection model for loading and using by the detection and identification module; the non-flat-layer door opening classification model training unit is used for pre-training a non-flat-layer door opening classification model for loading and using by the detection and recognition module;
and the detection and identification module is used for carrying out self-adaptive processing on the elevator sill groove image and loading the model trained by the model training module for prediction and identification when the elevator enters the deceleration and elevator stopping state according to the acceleration monitoring module so as to judge whether the elevator has a non-flat-layer door opening fault.
2. The elevator non-flat layer door opening fault recognition device based on the computer vision is characterized in that,
the microprocessor of the acceleration monitoring module is specifically used for detecting the acceleration of the acceleration curve after the filtering smoothing processing is finished by utilizing the variance, the range and the ratio of the index distance corresponding to the range to the length of the acceleration sequence so as to judge whether the elevator stops;
wherein the variance is used for measuring the fluctuation degree of the acceleration sequence and expressing the smoothness of the accelerationSex, by σ2Expressed as shown in equation (1):
Figure FDA0003153762730000011
wherein, acciThe ith acceleration value representing the acceleration sequence,
Figure FDA0003153762730000012
the acceleration mean value of the acceleration sequence is shown, n represents the length of the acceleration sequence, namely the acceleration sequence is a sequence consisting of n acceleration values;
the range is the maximum range for measuring the value variation, is an index for measuring the value variation, is the difference between the maximum value and the minimum value, and is represented by R, as shown in formula (2):
R=accmax-accmin (2)
wherein, accmaxRepresents the maximum value in the acceleration sequence, accminRepresents the minimum value of the acceleration sequence;
the proportion of the index distance corresponding to the range to the length of the acceleration sequence is characterized by the abrupt change degree of the acceleration, the proportion of the distance between the sequence positions of the maximum value and the minimum value to the whole running acceleration sequence is described, and is expressed by r, as shown in formula (3):
Figure FDA0003153762730000021
wherein,
Figure FDA0003153762730000022
indicating the sequence position in the acceleration sequence at which the maximum acceleration is located,
Figure FDA0003153762730000023
then the sequence position at which the minimum acceleration is located is indicated, the sequence positionDenoted as the second point; n is the length of the whole acceleration sequence;
when the variance is more than 1000, the range is more than 500 and/or the ratio of the index distance corresponding to the range to the length of the acceleration sequence is less than 10%, the elevator is considered to be about to stop; otherwise, the microprocessor judges that the acceleration is normal and the elevator is in normal operation.
3. The elevator non-flat layer door opening fault identification device based on the computer vision is characterized in that an acceleration sensor of the acceleration monitoring module has a plurality of acquisition time intervals; calculating the accuracy of the judgment of the microprocessor under each acquisition time interval by traversing the acquisition time interval of the acceleration sensor, and calculating the ratio of the accuracy to the information quantity acquired by the acceleration sensor in unit time; and when the ratio reaches the maximum value, setting the current corresponding acquisition time interval as a default acquisition time interval.
4. The elevator non-flat layer door opening fault recognition device based on the computer vision as claimed in claim 1, wherein the sill slot detection model training unit in the model training module comprises the following steps:
step 41: manufacturing a sill groove detection training set, and labeling a car picture containing a sill groove by using LabelImg, specifically framing out a sill groove image and labeling the type;
step 42: building a target detection model structure, using a model trained on an ILSVRC data set as an initial weight of a network backbone by adopting a transfer learning method, randomizing other parameters except the initial weight, and training on the sill-slot detection training set built in the step 41, wherein a loss function comprises a class classification loss function loss _ cls and a sill-slot boundary frame position return loss function loss _ bbox;
step 43: and setting a stopping strategy, and stopping training when the specified iteration times are reached or the prediction precision of the model in the verification set reaches a set value.
5. The elevator non-flat door opening fault recognition device based on the computer vision is characterized in that a non-flat door opening image classification model training unit in the model training module is used for training a non-flat door opening recognition model and performing two classifications on sill groove images to recognize a flat state;
the method for training the non-flat layer door opening classification model comprises the following steps:
step 51: the method comprises the steps of manufacturing a sill groove image classification training set, wherein in a door opening state, a sill groove image with the absolute value of the height difference between a hoistway door sill groove and a car door sill groove being less than or equal to 10mm is collected and used as a flat-layer door opening data set, and the rest sill groove image is a non-flat-layer door opening data set;
step 52: downloading and loading an inclusion V3 model as a pre-training model;
step 53: executing a transfer learning strategy, removing an output full connection layer and a softmax layer, adding a new two-classification full connection layer and a softmax classification layer, adding and deleting a preset intermediate network layer as an improved depth convolution neural network based on an initiation structure; the deep convolution neural network contains an inclusion structure, and different scale information of the image is extracted through multi-convolution kernel fusion to obtain better representation, wherein the inclusion structure contains a sparse network structure with 1 × 1 convolution to reduce dimension and build less parameters; the predetermined intermediate network layer comprises an initiation block, a 1 × 1 convolution;
step 54: loading the deep convolutional neural network obtained in the step 53, and creating a training script file;
step 55: preprocessing the sample of the classification training set of the sill-trough image, inputting the trained parameters of batch _ size, epoch and iteration, wherein the batch _ size represents the number of required samples used in one parameter updating process, 1 iteration is equal to 1 time of training by using the batch _ size samples, and the epoch is the total iteration times of all the samples;
step 56: setting a stopping strategy, and stopping training when iteration reaches a specified epoch number and iteration number or when the prediction precision of the model in the verification set reaches a set value;
and 57: a checkpoint mechanism is additionally arranged, and when the optimal value is reached in the process of training each epoch model, a model file is output;
step 58: and performing data preprocessing according to the batch _ size loading sample and then executing a training process.
6. The elevator non-flat layer door opening fault recognition device based on the computer vision is characterized in that the detection and recognition module comprises an image illumination self-adaptive correction unit, a sill groove detection unit and an image angle self-adaptive correction unit; wherein
The image illumination self-adaptive correction unit is specifically used for performing illumination self-adaptive correction on an elevator sill groove image acquired by the video acquisition module and processing the sill groove image when the ambient illumination is too dark and too bright so as to improve the illumination uniformity and enhance the image quality, and the self-adaptive processing method is as shown in the formula (4) (5):
Figure FDA0003153762730000041
Figure FDA0003153762730000042
wherein, O (x, y) is the illumination characteristic of the corrected output image, I (x, y) is the illumination component extracted from the input elevator sill groove image F (x, y), and m is the luminance average of the illumination component; the gamma coefficient is a self-adaptive coefficient, and the parameters k and r are variable parameters which are iteratively learned by a machine learning method according to the actual illumination condition of the elevator car;
the sill groove detection unit is used for: loading a target detection model to detect the sill slot, and judging the opening degree alpha of the elevator according to the detected length of the sill slot and the ratio of the total length of the sill slot when the opening of the sill slot is detected, wherein the ratio of the detected actual length of the sill slot and the actual total length of the sill slot is equal to the corresponding pixel ratio of the sill slot; when alpha is 0, the elevator is not opened; and when the door opening degree alpha is larger than or equal to the set threshold value, identifying and judging that the door is opened.
7. The elevator non-flat door opening fault recognition device based on computer vision of claim 6, wherein the image angle adaptive correction unit is specifically configured to perform angle transformation on the detected sill-slot image to adapt to angle distortion caused by different lenses, different door systems and different door opening modes, as shown in formulas (6) (7) (8) (9):
Figure FDA0003153762730000043
Figure FDA0003153762730000044
Figure FDA0003153762730000045
Figure FDA0003153762730000046
wherein, (x ', y') is the coordinate of pixel point after transformation, (x, y) is the coordinate of pixel point before transformation, w, h are the width and height of image respectively, theta is the included angle between the center of camera lens and the horizontal central line of sill trough, F (theta) and
Figure FDA0003153762730000047
is formed by a sum of
Figure FDA0003153762730000048
And determining vectors for measuring the rotation angle of the two-dimensional plane and the rotation degree of the three-dimensional space around the z axis, and performing self-adaptive training by taking the vectors as the hyper-parameters.
8. The elevator non-flat layer door opening fault recognition device based on the computer vision is characterized in that a non-flat layer door opening recognition unit in the detection recognition module is specifically used for loading a non-flat layer door opening classification model, judging whether a hoistway door and a car door are not flat layers and giving confidence degree beta, and judging that the hoistway door and the car door are not flat layer doors when the beta is larger than a set threshold value.
9. A non-flat layer door opening fault identification method based on deep learning is characterized by comprising the following steps:
step 101: starting a video acquisition module; the acceleration monitoring module acquires an acceleration signal of the elevator car and transmits the acceleration signal to the microprocessor; the microprocessor receives the acceleration signal, carries out filtering smoothing processing, analyzes an acceleration curve after the filtering smoothing processing is finished, and enters step 102 if the acceleration curve is judged to enter a deceleration and elevator stopping stage, and continues to carry out acceleration monitoring if the acceleration curve is judged to normally run;
step 102: the detection and identification module receives the information of the acceleration monitoring module and starts to intercept an elevator car running video according to the monitored time for preparing to stop the elevator; the detection and identification module carries out frame processing on the intercepted video, carries out illumination self-adaptive correction on each frame of image and enters step 103;
step 103: loading a acamprosate groove detection model by a detection and identification module, carrying out target detection on the image obtained in the step 102, judging that the door is opened when the acamprosate groove is detected, and entering the step 104;
step 104: the detection and identification module performs angle self-adaptive correction on the sill-slot image detected in the step 103, intelligently processes image angle distortion caused by different lenses, door systems of different models and door opening modes of different types, and enters a step 105;
step 105: the detection and recognition module loads a non-flat layer door opening classification model, judges whether the image processed in the step 104 is a non-flat layer door opening or not, gives a confidence coefficient beta, and judges that the image is a non-flat layer door opening when the beta is greater than a set threshold value; otherwise, go back to step 101.
CN202110400660.9A2021-04-142021-04-14 A computer vision-based elevator non-leveling door opening fault identification device and methodActiveCN112801072B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110400660.9ACN112801072B (en)2021-04-142021-04-14 A computer vision-based elevator non-leveling door opening fault identification device and method

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110400660.9ACN112801072B (en)2021-04-142021-04-14 A computer vision-based elevator non-leveling door opening fault identification device and method

Publications (2)

Publication NumberPublication Date
CN112801072A CN112801072A (en)2021-05-14
CN112801072Btrue CN112801072B (en)2021-11-02

Family

ID=75811344

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110400660.9AActiveCN112801072B (en)2021-04-142021-04-14 A computer vision-based elevator non-leveling door opening fault identification device and method

Country Status (1)

CountryLink
CN (1)CN112801072B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113936250A (en)*2021-10-182022-01-14日立楼宇技术(广州)有限公司 A method, device, computer equipment and medium for calculating the opening and closing amplitude of an elevator door
CN114572787B (en)*2022-03-042023-06-06陈小平Elevator non-flat-bed door fault identification device and method based on computer vision

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107416630A (en)*2017-09-052017-12-01广州日滨科技发展有限公司The detection method and system of the improper closing of elevator
CN107601199A (en)*2017-08-072018-01-19广州日滨科技发展有限公司The detection method and system of elevator components failure

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP2011011872A (en)*2009-07-022011-01-20Mitsubishi Electric Building Techno Service Co LtdFailure detecting device for elevator
CN107539855B (en)*2017-08-072019-09-06日立楼宇技术(广州)有限公司 Method and system for detecting elevator leveling faults
CN108358004B (en)*2018-02-052019-05-21苏州钜立智能系统有限公司Elevator operation monitoring method based on color identification technology
CN108341313A (en)*2018-03-282018-07-31灏景(厦门)文化传媒股份有限公司A kind of method for early warning and its multimedia Forewarning Terminal of elevator safety operation environmental monitoring
JP2020104983A (en)*2018-12-272020-07-09株式会社日立製作所Device and method for elevator operation control
CN110127475B (en)*2019-03-272020-12-25浙江新再灵科技股份有限公司Elevator taking personnel classification and elevator taking rule analysis method and system thereof
CN110407051A (en)*2019-08-022019-11-05杭州岁丰信息技术有限公司A kind of identification lift running safety monitoring of audio-video and pacify system
CN111144247B (en)*2019-12-162023-10-13浙江大学 A method for retrograde detection of escalator passengers based on deep learning
CN111792472B (en)*2020-06-032023-12-08上海三菱电梯有限公司Control method and control system for elevator leveling position
CN111731962B (en)*2020-06-292022-04-22浙江新再灵科技股份有限公司Opening and closing fault detection method and detection early warning system for door
CN112209193A (en)*2020-07-222021-01-12上海城建职业学院Intelligent elevator system
CN112347862A (en)*2020-10-202021-02-09浙江新再灵科技股份有限公司Elevator door fault real-time detection method based on machine vision
CN112357707B (en)*2020-10-212022-06-21日立楼宇技术(广州)有限公司 An elevator detection method, device, robot and storage medium
CN112591572A (en)*2020-12-032021-04-02日立楼宇技术(广州)有限公司Elevator leveling precision verification system, method and device and controller

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107601199A (en)*2017-08-072018-01-19广州日滨科技发展有限公司The detection method and system of elevator components failure
CN107416630A (en)*2017-09-052017-12-01广州日滨科技发展有限公司The detection method and system of the improper closing of elevator

Also Published As

Publication numberPublication date
CN112801072A (en)2021-05-14

Similar Documents

PublicationPublication DateTitle
CN111754498A (en) A Conveyor Belt Idler Detection Method Based on YOLOv3
CN111079640B (en)Vehicle type identification method and system based on automatic amplification sample
CN111784633A (en) An automatic detection algorithm for insulator defects for power inspection video
CN107220603A (en)Vehicle checking method and device based on deep learning
CN109711322A (en)A kind of people's vehicle separation method based on RFCN
CN112801072B (en) A computer vision-based elevator non-leveling door opening fault identification device and method
CN112508946B (en)Cable tunnel anomaly detection method based on antagonistic neural network
CN111160100A (en) A Lightweight Deep Model Aerial Vehicle Detection Method Based on Sample Generation
CN111881833B (en)Vehicle detection method, device, equipment and storage medium
CN112801071B (en) A system and method for elevator asynchronous door opening recognition based on deep learning
CN116311212B (en)Ship number identification method and device based on high-speed camera and in motion state
CN114255339A (en) A method, device and storage medium for identifying breakpoints of power transmission wires
CN109086803A (en)A kind of haze visibility detection system and method based on deep learning and the personalized factor
CN113343926A (en)Driver fatigue detection method based on convolutional neural network
CN106570885A (en)Background modeling method based on brightness and texture fusion threshold value
CN115187878A (en) Wind turbine blade defect detection method based on UAV image analysis
CN115953719A (en)Multi-target recognition computer image processing system
CN110163081A (en)SSD-based real-time regional intrusion detection method, system and storage medium
CN109359518A (en) A kind of infrared video moving object recognition method, system and alarm device
CN111860141B (en) A real-time pedestrian detection system and method based on scene structure
CN113822165A (en)Method for detecting vehicle window state of road bayonet and counting persons in vehicle
CN118962704A (en) A drone hanging line method and related device based on safety distance detection
CN112183287A (en) A People Counting Method for Mobile Robots in Complex Background
CN117876353A (en)Electronic equipment surface scratch detecting system based on visual recognition
CN116503664A (en)Classification method for distinguishing high-similarity target objects

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp