CN111950457A - Oilfield Safety Production Image Recognition Method and System - Google Patents
Oilfield Safety Production Image Recognition Method and System Download PDFInfo
- Publication number
- CN111950457A CN111950457A CN202010808340.2A CN202010808340A CN111950457A CN 111950457 A CN111950457 A CN 111950457A CN 202010808340 A CN202010808340 A CN 202010808340A CN 111950457 A CN111950457 A CN 111950457A
- Authority
- CN
- China
- Prior art keywords
- image data
- design
- video
- video image
- value
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000004519 manufacturing process Methods 0.000 title claims abstract description 20
- 238000013461 design Methods 0.000 claims abstract description 82
- 230000004913 activation Effects 0.000 claims abstract description 24
- 230000007246 mechanism Effects 0.000 claims abstract description 21
- 238000012549 training Methods 0.000 claims abstract description 21
- 238000011176 pooling Methods 0.000 claims abstract description 20
- 238000001914 filtration Methods 0.000 claims abstract description 10
- 238000007781 pre-processing Methods 0.000 claims abstract description 3
- 238000012163 sequencing technique Methods 0.000 claims abstract 2
- 230000000007 visual effect Effects 0.000 claims description 17
- 238000004364 calculation method Methods 0.000 claims description 13
- 230000001149 cognitive effect Effects 0.000 claims description 11
- 238000012216 screening Methods 0.000 claims description 4
- 230000006870 function Effects 0.000 description 28
- 238000001514 detection method Methods 0.000 description 11
- 239000000779 smoke Substances 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 238000002372 labelling Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000005284 excitation Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000001681 protective effect Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/048—Activation functions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
- G06V10/443—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components by matching or filtering
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Multimedia (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Molecular Biology (AREA)
- General Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Biophysics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Biomedical Technology (AREA)
- Evolutionary Biology (AREA)
- Health & Medical Sciences (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明涉及石油安全技术领域,具体的说是一种油田安全生产图像识别方法及系统。The invention relates to the technical field of oil safety, in particular to an image recognition method and system for oil field safety production.
背景技术Background technique
油田安全作业中存在作业流动性大,业务作业交叉的不确定问题,现场作业需要配备相应的防护设备。整个作业过程涉及环境不安全因素、人的不安全行为、机器的不安全状态及管理上的缺陷可能会带来无法估量的危害和损失。In the safety operation of oilfields, there are uncertain problems such as large operation mobility and overlapping business operations. On-site operations need to be equipped with corresponding protective equipment. The whole operation process involves unsafe factors of the environment, unsafe behavior of people, unsafe state of machines and management defects, which may bring immeasurable harm and loss.
例如在油田安全作业中工人安全帽的佩戴、工服穿戴、火焰、烟雾、陌生人闯入、工人人脸等情况均需要严格把关。因此,在油田作业区域,已经出现了一些识别技术措施,来解决上述问题。For example, the wearing of safety helmets, work clothes, flames, smoke, intrusion of strangers, and workers' faces in oilfield safety operations all need to be strictly controlled. Therefore, in the oilfield operation area, some identification technology measures have appeared to solve the above problems.
其中,安全帽佩戴识别已有方法是用YOLOv3直接训练学习后对佩戴检测,通过利用前帧图像的视频流检测获得结果和对下一帧进行位置和类别信息的预测然后将检测框与预测框交并比关联最终实现跟踪,该方法的检测是依赖计算机视觉图像处理技术的目标检测算法和跟踪,核心技术是通过计算预测框的中心点坐标的准确率来提高检测及跟踪效果。但是由于本身下采样的方法导致识别小目标、遮挡问题困难,该方法中从算法本身来看在油田生产作业现场中分析目标较小很难。Among them, the existing method of helmet wearing recognition is to use YOLOv3 to directly train and learn to detect the wearing, obtain the result by using the video stream detection of the previous frame image and predict the position and category information of the next frame, and then combine the detection frame and the prediction frame. The intersection and ratio correlation finally realizes the tracking. The detection of this method relies on the target detection algorithm and tracking of computer vision image processing technology. The core technology is to improve the detection and tracking effect by calculating the accuracy of the center point coordinates of the prediction frame. However, due to its own downsampling method, it is difficult to identify small targets and block problems. From the perspective of the algorithm itself, it is difficult to analyze small targets in oilfield production operation sites.
工服识别是采用基于业务场景的数据使用安全帽识别同样的方法进行训练、测试、验证然后进行对场景图像数据进行预测类别和标出区域检测识别然后将结果得出进行存库及取证。由于工服检测识别方面一般在同一个业务场景中利用的现有技术的方法。虽然该方法在正常天气情况下通过行人检测可以解决基本业务问题,但是由于不同的天气状态下传感器存在漫反射导致图像数据和视频出现分辨率失真造成大量的错误识别问题。The identification of work clothes is to use the data based on the business scene to use the same method as the identification of helmets for training, testing, verification, and then to predict the category of scene image data and mark the area for detection and identification, and then the results are obtained for inventory and forensics. Due to the detection and identification of work clothes, the methods of the prior art are generally utilized in the same business scenario. Although this method can solve basic business problems through pedestrian detection under normal weather conditions, due to the diffuse reflection of the sensor in different weather conditions, the resolution distortion of image data and video results in a large number of false identification problems.
火焰识别是通过同样算法视频采集取证,图像标记预处理、火焰识别和烟雾定位烟雾和火焰的发生区域并及时告警同时将相关结果存储取证存入数据库分析及其他业务中使用。传统的火焰、烟雾检测同样是采用现有技术的方法上进行识别会存在出现大雾天气报警的错误现象问题。Flame recognition is to collect evidence through the same algorithm video, image marking preprocessing, flame recognition and smoke to locate the smoke and flame occurrence area and timely alarm, at the same time store the relevant results forensics and store them in the database for analysis and other services. The traditional flame and smoke detection also uses the prior art method to identify, and there is a problem of false alarms in foggy weather.
综上所述,上述问题在油田安全作业仍不能完善解决,仍然存在很大的安全隐患。To sum up, the above problems cannot be fully solved in oilfield safety operations, and there are still great potential safety hazards.
发明内容SUMMARY OF THE INVENTION
针对上述问题,本发明提供了一种油田安全生产图像识别方法,对石油生产现场视频图像进行获取,经暗通道滤波数据增强设计,消除了天气干扰,是图像更为准确清晰,再结合感受野设计、激活函数设计、通道注意力机制设计、激活函数设计、通道注意力机制设计、金字塔池化设计和不平衡训练设计得到识别对象,快速准确的提取出特征。便于对生产现场情况进行监管。In view of the above problems, the present invention provides an image recognition method for oilfield safety production. The video images of the oil production site are acquired, and the design is enhanced by dark channel filtering data, which eliminates weather interference, makes the image more accurate and clearer, and combines with the receptive field. Design, activation function design, channel attention mechanism design, activation function design, channel attention mechanism design, pyramid pooling design and unbalanced training design to identify objects and extract features quickly and accurately. It is convenient to supervise the situation on the production site.
为达到上述目的,本发明采用的具体技术方案如下:In order to achieve the above object, the concrete technical scheme adopted in the present invention is as follows:
一种油田安全生产图像识别方法,其关键技术在于:具体步骤为:An oilfield safety production image recognition method, the key technology of which is: the specific steps are:
S1:摄像设备实时摄取油田现场视频,并对油田现场视频中图片分批次进行预处理和编码后得到视频图像数据;S1: The camera equipment captures the field video of the oil field in real time, and preprocesses and encodes the pictures in the field video of the oil field in batches to obtain the video image data;
S2:根据天气时段情况,对视频图像数据进行暗通道滤波数据增强设计,得到增强视频图像数据;S2: According to the weather period, perform a dark channel filtering data enhancement design on the video image data to obtain enhanced video image data;
S3:对增强视频图像数据进行感受野设计,得到视野确定范围视频图像数据;S3: Design the receptive field for the enhanced video image data, and obtain the video image data with a certain field of view;
S4:确定识别特征,并对应设定识别特征的识别阈值,对视野确定范围视频图像数据进行激活函数设计和通道注意力机制设计,提取视野确定范围视频图像数据中的最终识别目标;S4: Determine the recognition features, set the recognition thresholds of the recognition features correspondingly, design the activation function and the channel attention mechanism for the video image data of the field of view determination range, and extract the final recognition target in the video image data of the field of view determination range;
S5:对视野确定范围视频图像数据中的每一个最终识别目标进行金字塔池化设计和不平衡训练设计,得到最终识别目标同尺寸视频图像数据;S5: Perform pyramid pooling design and unbalanced training design for each final recognition target in the video image data of the visual field-determined range to obtain video image data of the same size as the final recognition target;
S6:对最终识别目标同尺寸视频图像数据进行解码和帧排序后,得到识别视频,并输出并标记识别目标。S6: After decoding the video image data of the same size of the final recognition target and sorting the frames, the recognition video is obtained, and the recognition target is output and marked.
进一步的,为了进行图像识别设计处理,所述视频图像数据至少包括视频中所有图片的排列顺序、视频中每帧图片的原始像素值、每张图片的长度值和宽度值、视频图像数据中每一张输入图像的像素总数|w|、输入图像的像素方差每张图片的深度值、宽度值、高度值。其中每一张输入图像的像素总数|w|、输入图像的像素方差可经中间计算得到,该数据计算属于现有技术,不做赘述。Further, in order to carry out image recognition design processing, the video image data includes at least the arrangement order of all pictures in the video, the original pixel value of each frame of picture in the video, the length value and width value of each picture, each in the video image data. The total number of pixels in an input image |w|, the pixel variance of the input image The depth, width, and height values of each image. The total number of pixels in each input image |w|, the pixel variance of the input image It can be obtained through intermediate calculation, and the data calculation belongs to the prior art and will not be described in detail.
再进一步的技术方案为:步骤S2所述增强视频图像数据为增强设计求解到像素值对应的图像数据,增强设计后输出的图像像素值qi的计算函数为:A further technical solution is: the enhanced video image data described in step S2 is the image data corresponding to the pixel value obtained from the enhancement design, and the calculation function of the image pixel value qi outputted after the enhancement design is:
qi=akIi+bk;q i = ak I i +b k ;
qi为输出的增强视频图像数据中图像的像素值;Ii为图片的原始像素值;q i is the pixel value of the image in the output enhanced video image data; I i is the original pixel value of the picture;
k和i为像素索引值,ak,bk为当前图片中心坐标在k时刻该函数的系数;i取值是0-255;k and i are the pixel index values, a k , b k are the coefficients of the function at time k of the center coordinate of the current picture; the value of i is 0-255;
其中,系数bk为线性价值函数取值最小时对应的取值;Pi为输入图像的向量,ε为调整图像模糊程度参数,取值范围为0-2;∑iewk为输入损失函数;系数ak的计算公式为:Among them, the coefficient b k is a linear value function The corresponding value when the value is the smallest; P i is the vector of the input image, ε is the parameter for adjusting the blur degree of the image, and the value range is 0-2; ∑iew k is the input loss function; the calculation formula of the coefficient a k is:
|w|为输入的每一张图像的像素总数;为输入图像的像素方差。|w| is the total number of pixels of each input image; is the pixel variance of the input image.
采用以上计算方法求解得到常量系数对图像进行调整解决图像由于天气原因造成系统识别率效果较低问题。然后将图像数据标记主要是对图像传感器采集的图像使用x*y像素的RGB三通道归一化,然后将视频进行分帧采用标注工具标注,在训练过程我们前期采用半自动化训练识别然后对模型的伪标签进行分析损失函数的残差然后对波动太大的数据增强标记训练。The above calculation method is used to obtain constant coefficients to adjust the image to solve the problem that the system recognition rate is low due to the weather. Then the image data labeling is mainly to normalize the images collected by the image sensor using the RGB three-channel of x*y pixels, and then the video is framed and labeled with the labeling tool. In the early training process, we use semi-automatic training recognition and then model The pseudo-labels are used to analyze the residuals of the loss function and then enhance the labeling training on data that is too volatile.
再进一步的技术方案为,为了提取更多的特征信息,进行感受野设计。其中,步骤S3中经感受野设计后得到视野确定范围视频图像数据的图片大小O为:A further technical solution is to design a receptive field in order to extract more feature information. Wherein, after the receptive field design in step S3, the picture size O of the video image data of the visual field determination range is obtained as:
其中,i'为视频中图片的长度值和宽度值,二者相等;s为卷积核步长;p为增大感受视野时对应视野区域填充像素数值;k'为卷积核的大小;为3-9之间的奇数;d为引入的超参数;(d-1)为增大感受视野时插入的空格数。Among them, i' is the length value and width value of the picture in the video, the two are equal; s is the step size of the convolution kernel; p is the pixel value of the corresponding field of view area when increasing the perceived field of view; k' is the size of the convolution kernel; is an odd number between 3-9; d is the introduced hyperparameter; (d-1) is the number of spaces inserted when increasing the perceived field of view.
再进一步描述,所述识别特征为安全帽佩戴识别特征、工服识别特征、火焰识别特征、陌生人闯入识别特征、人脸识别特征。To further describe, the identification features are safety helmet wearing identification features, work clothes identification features, flame identification features, stranger intrusion identification features, and face identification features.
再进一步描述,所述激活函数设计采用Mish激活函数,具体为;Described further, the activation function design adopts Mish activation function, specifically;
Mish=x*tanh(ln(1+ex))Mish=x*tanh(ln(1+e x ))
ln为对数,e自然常数,x为视野确定范围视频图像数据;tanh为卷积过滤后高质量特征图像数据;ln is the logarithm, e is a natural constant, x is the video image data of the visual field to determine the range; tanh is the high-quality feature image data after convolution filtering;
通过该激活函数提高模型有用信息利用从而更好的泛化和准确的输出高质量特征信息。Through this activation function, the useful information utilization of the model is improved to better generalize and accurately output high-quality feature information.
再进一步描述,所述通道注意力机制设计函数为::To further describe, the channel attention mechanism design function is:
input:c×w×hinput: c×w×h
globalpooling:c×1×1globalpooling:c×1×1
FC: FC:
FC:c×1×1FC: c×1×1
sigmoid:c×1×1sigmoid: c×1×1
input=tanh,c w h分别为通道注意力机制设计前输入图像的深度、宽度、高度;globalpooling为全局池化;c为通道注意力机制设计后输出图像深度;sigmoid为Mish激活函数的子函数;input=tanh, c w h are the depth, width and height of the input image before the channel attention mechanism is designed; globalpooling is the global pooling; c is the output image depth after the channel attention mechanism is designed; sigmoid is a sub-function of the Mish activation function;
FC为全连接层输出预测值,该输出预测值包括预测目标类别和每个预测目标类别的概率;根据设定的识别阈值,提取到所述视野确定范围视频图像数据中的最终识别目标。FC is the output prediction value for the fully connected layer, and the output prediction value includes the predicted target category and the probability of each predicted target category; according to the set recognition threshold, the final recognition target in the video image data of the visual field determination range is extracted.
适当增加计算量同时更加高效准确利用特征信息模块设计,在图像识别和目标检测领域的注意力机制一般是关注软注意力,该设计通常是针对区域特征进行特征表达,软注意力更加关注区域或者通道实现注意力的确定性从而通过网络表达。Appropriately increase the amount of calculation and use the feature information module design more efficiently and accurately. The attention mechanism in the field of image recognition and target detection generally focuses on soft attention. The design usually expresses features for regional features. Soft attention pays more attention to regions or Channels enable deterministic attentional representation through the network.
SEblock主要是Squeeze和Excitation映射两个组成。由于卷积只是一个局部空间计算问题,因此很难获取全局通道信息分析网络中,全局信息通过感受野采集的重要性信息需要一种Squeeze特征编码方式编码为全局特征然使用了全局平均池化SEblock is mainly composed of Squeeze and Excitation mapping. Since convolution is only a local space calculation problem, it is difficult to obtain global channel information. In the analysis network, the importance information collected by the global information through the receptive field requires a Squeeze feature encoding method to encode it as a global feature. However, global average pooling is used.
Sequeeze是作为一种全局特征描述的方法提取通道之间存在的关系用来表达通道之间不是互斥的非线性特征,同时为了降低模型复杂性和提高模型的泛化能力采用全连接层的bottleneck结构的一个FC层降低维度。Sequeeze is a method of global feature description to extract the relationship between channels to express nonlinear features that are not mutually exclusive between channels. At the same time, in order to reduce the complexity of the model and improve the generalization ability of the model, the bottleneck of the fully connected layer is used. One FC layer of the structure reduces dimensionality.
Excitation是该维度的系数采用mish激活得到恢复原来的维度,最后对每个通道使用sigmoid激活方式实现gating乘法。Excitation is that the coefficient of this dimension is restored to the original dimension by using mish activation, and finally the gating multiplication is realized by using sigmoid activation method for each channel.
以上SEblock模块的通道注意力主要为了解决该项目我们目标存在遮挡问题检测,结合通道信息周边区域信息上下文更好的提高了模型准确率。The channel attention of the above SEblock module is mainly to solve the detection of the occlusion problem of our target in this project. Combined with the information context of the surrounding area of the channel information, the accuracy of the model is better improved.
再进一步描述,所述金字塔池化设计采用SPP Block金字塔池化模块对每个批次图片进行尺度训练,输出尺寸一致的图片。To further describe, the pyramid pooling design uses the SPP Block pyramid pooling module to perform scale training on each batch of pictures, and outputs pictures with the same size.
通过以上设计实现我们针对油田数字图像在设备发生变换的情况下我们只需要进行微调的模型更新不需要大规模初始化模型训练从而实现多尺度训练与识别解决模型针对不同尺寸的敏感性,保证模型输出的预测张量尺寸统一。Through the above design, we only need to perform fine-tuning model update when the equipment is transformed for oilfield digital images, so as to realize multi-scale training and recognition, and solve the sensitivity of the model to different sizes, ensuring the model output. The prediction tensor size is uniform.
一种油田安全生产图像识别系统,其关键技术在于:包括采集模块、算法模块、认知计算模块,所述采集模块与算法模块连接,所述算法模块与认知计算模块连接;所述采集模块内设置有摄像设备、数据筛选单元、增强设计单元;所述算法模块内设置有感受野设计单元、激活函数设计单元、通道注意力机制设计单元、金字塔池化设计单元、不平衡训练设计单元;所述认知计算模块包括微服务单元。An oilfield safety production image recognition system, the key technology of which is: comprising an acquisition module, an algorithm module, and a cognitive computing module, wherein the acquisition module is connected with the algorithm module, and the algorithm module is connected with the cognitive computing module; the acquisition module A camera device, a data screening unit, and an enhancement design unit are provided inside; the algorithm module is provided with a receptive field design unit, an activation function design unit, a channel attention mechanism design unit, a pyramid pooling design unit, and an unbalanced training design unit; The cognitive computing module includes a microservice unit.
其中,采集模块用于获取视频数据、筛选、增强、标记排序、分批次等。Among them, the acquisition module is used for acquiring video data, screening, enhancing, marking sorting, batching, etc.
算法模块内部设置商店算法系统,例如人脸识别算法、CAFENet算法、加密容器等,用于进行感受野设计单元、激活函数设计单元、通道注意力机制设计单元、金字塔池化设计单元、不平衡训练设计单元。The store algorithm system is set up in the algorithm module, such as face recognition algorithm, CAFENet algorithm, encryption container, etc., which are used for receptive field design unit, activation function design unit, channel attention mechanism design unit, pyramid pooling design unit, unbalanced training design unit.
认知计算模块包括微服务单元,主要是通过HTTP请求密度使用分布式微服务计算实现动态资源调度,实现人脸识别等功能。The cognitive computing module includes micro-service units, which mainly use distributed micro-service computing to realize dynamic resource scheduling through HTTP request density, and realize functions such as face recognition.
与现有技术相比,本发明的有益效果:Compared with the prior art, the beneficial effects of the present invention:
1、采用暗通道滤波数据增强设计,当大量的不同天气情况下进行视频数据采集时候需要进行引导滤波来对暗通道视频图像进行数据增强,有效克服天气变化和天气状态不同造成的图像失真。采用暗通道滤波数据增强设计,求解得到常量系数对图像进行调整解决图像由于天气原因造成系统识别率效果较低问题。1. The dark channel filter data enhancement design is adopted. When a large number of video data are collected under different weather conditions, guided filtering is required to enhance the data of the dark channel video image, which effectively overcomes the image distortion caused by weather changes and weather conditions. The dark channel filtering data enhancement design is adopted, and constant coefficients are obtained to adjust the image to solve the problem that the system recognition rate is low due to the weather.
2、通过感受野设计,实现扩大感受野,提取更多有用特征信息。2. Through the design of the receptive field, the receptive field can be expanded and more useful feature information can be extracted.
3、通过激活函数设计和通道注意力机制设计,得出更高质量、更准确的识别目标。解决现有技术中安全帽目标小无法识别的问题。3. Through activation function design and channel attention mechanism design, higher quality and more accurate recognition targets are obtained. The problem that the target of the safety helmet is small and cannot be identified in the prior art is solved.
4、通过金字塔池化设计和不平衡训练设计,使输出的同一批次数据一致,并且通过不平衡加权设计,使最终识别目标更加清晰,提高识别率。4. Through pyramid pooling design and unbalanced training design, the same batch of output data is consistent, and through unbalanced weighting design, the final recognition target is clearer and the recognition rate is improved.
附图说明Description of drawings
图1是本发明识别方法流程图;Fig. 1 is the identification method flow chart of the present invention;
图2是石油安全生产现场视频中任意帧图;Fig. 2 is the arbitrary frame picture in the video of oil safety production site;
图3是对图2的识别效果图;Fig. 3 is the recognition effect diagram to Fig. 2;
图4是识别系统框图。Figure 4 is a block diagram of the identification system.
说明:由于涉及图片识别,附图2和3采用彩色图片提交。Note: Since it involves image recognition, Figures 2 and 3 are submitted in color.
具体实施方式Detailed ways
下面结合附图对本发明的具体实施方式以及工作原理作进一步详细说明。The specific embodiments and working principles of the present invention will be further described in detail below with reference to the accompanying drawings.
结合图1可以看出,一种油田安全生产图像识别方法,具体步骤为:It can be seen from Figure 1 that a method for image recognition of oilfield safety production includes the following steps:
S1:摄像设备实时摄取油田现场视频,并对油田现场视频中图片分批次进行预处理和编码后得到视频图像数据;S1: The camera equipment captures the field video of the oil field in real time, and preprocesses and encodes the pictures in the field video of the oil field in batches to obtain the video image data;
在本实施例中,该视频图像数据包括视频中所有图片的排列顺序、视频中每帧图片的原始像素值、每张图片的长度值和宽度值、视频图像数据中每一张输入图像的像素总数|w|、输入图像的像素方差σk 2、每张图片的深度值、宽度值、高度值。In this embodiment, the video image data includes the arrangement order of all pictures in the video, the original pixel value of each frame of pictures in the video, the length and width values of each picture, and the pixels of each input image in the video image data. The total number |w|, the pixel variance σ k 2 of the input image, the depth value, width value, and height value of each image.
S2:根据天气时段情况,对视频图像数据进行暗通道滤波数据增强设计,得到增强视频图像数据;S2: According to the weather period, perform a dark channel filtering data enhancement design on the video image data to obtain enhanced video image data;
步骤S2所述增强视频图像数据为增强设计求解到像素值对应的图像数据,增强设计后输出的图像像素值qi的计算函数为:The enhanced video image data described in step S2 is the image data corresponding to the pixel value obtained from the enhanced design, and the calculation function of the image pixel value qi outputted after the enhanced design is:
qi=akIi+bk;q i = ak I i +b k ;
qi为输出的增强视频图像数据中图像的像素值;Ii为图片的原始像素值;q i is the pixel value of the image in the output enhanced video image data; I i is the original pixel value of the picture;
k和i为像素索引值,ak,bk为当前图片中心坐标在k时刻该函数的系数;i取值是0-255;k and i are the pixel index values, a k , b k are the coefficients of the function at time k of the center coordinate of the current picture; the value of i is 0-255;
其中,系数bk为线性价值函数取值最小时对应的取值;Pi为输入图像的向量;Among them, the coefficient b k is a linear value function The value corresponding to the smallest value; P i is the vector of the input image;
ε为调整图像模糊程度参数,在本实施例中,ε取值范围为2。ε is a parameter for adjusting the blur degree of the image, and in this embodiment, the value range of ε is 2.
∑iewk为输入损失函数;∑iew k is the input loss function;
系数ak的计算公式为:The formula for calculating the coefficient a k is:
|w|为输入的每一张图像的像素总数;为输入图像的像素方差。|w| is the total number of pixels of each input image; is the pixel variance of the input image.
在本实施例中,根据输出图像的像素值qi,可以得到增强视频图像数据。In this embodiment, the enhanced video image data can be obtained according to the pixel value qi of the output image.
采用以上计算方法求解得到常量系数对图像进行调整解决图像由于天气原因造成系统识别率效果较低问题。然后将图像数据标记主要是对图像传感器采集的图像使用906*720像素的RGB三通道归一化,然后将视频进行分帧采用标注工具标注,在训练过程我们前期采用半自动化训练识别然后对模型的伪标签进行分析损失函数的残差然后对波动太大的数据增强标记训练。The above calculation method is used to obtain constant coefficients to adjust the image to solve the problem that the system recognition rate is low due to the weather. Then the image data is marked mainly by normalizing the images collected by the image sensor with RGB three channels of 906*720 pixels, and then the video is framed and marked with the labeling tool. In the early stage of the training process, we use semi-automatic training recognition and then model The pseudo-labels are used to analyze the residuals of the loss function and then enhance the labeling training on data that is too volatile.
S3:对增强视频图像数据进行感受野设计,得到视野确定范围视频图像数据;S3: Design the receptive field for the enhanced video image data, and obtain the video image data with a certain field of view;
在本实施例中,S3中经感受野设计后得到视野确定范围视频图像数据的图片大小O的计算公式为:In the present embodiment, the calculation formula for obtaining the picture size O of the video image data of the visual field determination range after designing the receptive field in S3 is:
其中,i'为视频中图片的长度值和宽度值,二者相等;s为卷积核步长;p为增大感受视野时对应视野区域填充像素数值;Among them, i' is the length value and width value of the picture in the video, the two are equal; s is the step size of the convolution kernel; p is the pixel value of the corresponding field of view area when increasing the perceived field of view;
k'为卷积核的大小;为3-9之间的奇数;k' is the size of the convolution kernel; it is an odd number between 3-9;
在本实施例中,在进行卷积计算过程中,初始阶段,卷积核设定为9、7,随着卷积进行,卷积核大小最终设定为3。In this embodiment, during the convolution calculation process, in the initial stage, the convolution kernel is set to 9 and 7, and as the convolution proceeds, the size of the convolution kernel is finally set to 3.
d为引入的超参数;(d-1)为增大感受视野时插入的空格数。d is the introduced hyperparameter; (d-1) is the number of spaces inserted when increasing the perception field.
S4:确定识别特征,并对应设定识别特征的识别阈值,对视野确定范围视频图像数据进行激活函数设计和通道注意力机制设计,提取视野确定范围视频图像数据中的最终识别目标;S4: Determine the recognition features, set the recognition thresholds of the recognition features correspondingly, design the activation function and the channel attention mechanism for the video image data of the field of view determination range, and extract the final recognition target in the video image data of the field of view determination range;
在本实施例中,识别特征包括安全帽佩戴识别特征、工服识别特征、火焰识别特征、陌生人闯入识别特征、人脸识别特征。In this embodiment, the identification features include safety helmet wearing identification features, work clothes identification features, flame identification features, stranger intrusion identification features, and face identification features.
在本实施例中,所述激活函数设计采用Mish激活函数,具体为;In this embodiment, the activation function design adopts the Mish activation function, specifically:
Mish=x*tanh(ln(1+ex))Mish=x*tanh(ln(1+e x ))
ln为对数,e自然常数,x为视野确定范围视频图像数据;tanh为卷积过滤后高质量特征图像数据;所述通道注意力机制设计函数为:ln is the logarithm, e is a natural constant, and x is the video image data of the visual field to determine the range; tanh is the high-quality feature image data after convolution filtering; the design function of the channel attention mechanism is:
input:c×w×hinput: c×w×h
globalpooling:c×1×1globalpooling:c×1×1
FC: FC:
FC:c×1×1FC: c×1×1
sigmoid:c×1×1sigmoid: c×1×1
input=tanh,c w h分别为通道注意力机制设计前输入图像的深度、宽度、高度;globalpooling为全局池化;c为通道注意力机制设计后输出图像深度;sigmoid为Mish激活函数的子函数;input=tanh, c w h are the depth, width and height of the input image before the channel attention mechanism is designed; globalpooling is the global pooling; c is the output image depth after the channel attention mechanism is designed; sigmoid is a sub-function of the Mish activation function;
FC为全连接层输出预测值,该输出预测值包括预测目标类别和每个预测目标类别的概率;根据设定的识别阈值,提取到所述视野确定范围视频图像数据中的最终识别目标。FC is the output prediction value for the fully connected layer, and the output prediction value includes the predicted target category and the probability of each predicted target category; according to the set recognition threshold, the final recognition target in the video image data of the visual field determination range is extracted.
S5:对视野确定范围视频图像数据中的每一个最终识别目标进行金字塔池化设计和不平衡训练设计,得到最终识别目标同尺寸视频图像数据;S5: Perform pyramid pooling design and unbalanced training design for each final recognition target in the video image data of the visual field-determined range to obtain video image data of the same size as the final recognition target;
所述金字塔池化设计采用SPP Block金字塔池化模块对每个批次图片进行尺度训练,输出尺寸一致的图片。The pyramid pooling design uses the SPP Block pyramid pooling module to perform scale training on each batch of pictures, and outputs pictures with the same size.
S6:对最终识别目标同尺寸视频图像数据进行解码和帧排序后,得到识别视频,并输出并标记识别目标。S6: After decoding the video image data of the same size of the final recognition target and sorting the frames, the recognition video is obtained, and the recognition target is output and marked.
一种油田安全生产图像识别系统,结合图4可以看出,包括采集模块1、算法模块2、认知计算模块3,所述采集模块1与算法模块2连接,所述算法模块2与认知计算模块3连接;所述采集模块1内设置有摄像设备、数据筛选单元、增强设计单元;所述算法模块2内设置有感受野设计单元、激活函数设计单元、通道注意力机制设计单元、金字塔池化设计单元、不平衡训练设计单元;所述认知计算模块3包括微服务单元。An oilfield safety production image recognition system, as can be seen from Figure 4, includes an
在本实施例中,对比图2和图3可以看出,标记识别目标采用绿色、红色、紫色、蓝色等颜色的线框进行框选标记。In this embodiment, it can be seen from the comparison of FIG. 2 and FIG. 3 that the mark identification target is frame-selected and marked by using wire frames of green, red, purple, blue and other colors.
输出的识别目标后并输出识别标签,在本实施例中,识别标签包括:normal(正常状态),nohat(未佩戴安全帽),nocoverall(未穿工服),flame(着火),smoke(烟雾)。After outputting the identification target, output the identification label. In this embodiment, the identification label includes: normal (normal state), nohat (no helmet), nocoverall (no work clothes), flame (fire), smoke (smoke). ).
在本实施例中,结合图3可以看出,采用绿色线框框选未佩戴安全帽的识别目标;采用蓝色线框框选佩戴安全帽的识别目标;In this embodiment, it can be seen from FIG. 3 that a green wire frame is used to frame the identification target without a helmet; a blue wire frame is used to frame the identification target wearing a helmet;
在本实施例中,结合图3可以看出,采用紫色线框框选穿工服的识别目标;采用红色线框框选未穿工服的识别目标。In this embodiment, it can be seen in conjunction with FIG. 3 that a purple line frame is used to select a recognition target wearing work clothes; a red wire frame is used to select a recognition target that does not wear work clothes.
应当指出的是,上述说明并非是对本发明的限制,本发明也并不仅限于上述举例,本技术领域的普通技术人员在本发明的实质范围内所做出的变化、改性、添加或替换,也应属于本发明的保护范围。It should be noted that the above descriptions are not intended to limit the present invention, and the present invention is not limited to the above examples. Changes, modifications, additions or substitutions made by those of ordinary skill in the art within the scope of the present invention, It should also belong to the protection scope of the present invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010808340.2A CN111950457A (en) | 2020-08-12 | 2020-08-12 | Oilfield Safety Production Image Recognition Method and System |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010808340.2A CN111950457A (en) | 2020-08-12 | 2020-08-12 | Oilfield Safety Production Image Recognition Method and System |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111950457A true CN111950457A (en) | 2020-11-17 |
Family
ID=73332792
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010808340.2A Pending CN111950457A (en) | 2020-08-12 | 2020-08-12 | Oilfield Safety Production Image Recognition Method and System |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111950457A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113191983A (en) * | 2021-05-18 | 2021-07-30 | 陕西师范大学 | Image denoising method and device based on deep learning attention mechanism |
CN113610043A (en) * | 2021-08-19 | 2021-11-05 | 海默潘多拉数据科技(深圳)有限公司 | A method and system for structural identification of industrial drawing tables |
CN114169385A (en) * | 2021-09-28 | 2022-03-11 | 北京工业大学 | Combustion state identification method for MSWI process based on hybrid data enhancement |
CN118172714A (en) * | 2024-05-15 | 2024-06-11 | 中国石油大学(华东) | Multi-scale construction equipment robustness identification method in oilfield underground operation environment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103236038A (en) * | 2013-04-10 | 2013-08-07 | 成都国腾电子技术股份有限公司 | Quick defogging processing assembly for fog images |
CN110728223A (en) * | 2019-10-08 | 2020-01-24 | 济南东朔微电子有限公司 | Helmet wearing identification method based on deep learning |
CN111199523A (en) * | 2019-12-24 | 2020-05-26 | 深圳供电局有限公司 | Power equipment identification method and device, computer equipment and storage medium |
CN111507271A (en) * | 2020-04-20 | 2020-08-07 | 北京理工大学 | A method for intelligent detection and identification of airborne optoelectronic video targets |
-
2020
- 2020-08-12 CN CN202010808340.2A patent/CN111950457A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103236038A (en) * | 2013-04-10 | 2013-08-07 | 成都国腾电子技术股份有限公司 | Quick defogging processing assembly for fog images |
CN110728223A (en) * | 2019-10-08 | 2020-01-24 | 济南东朔微电子有限公司 | Helmet wearing identification method based on deep learning |
CN111199523A (en) * | 2019-12-24 | 2020-05-26 | 深圳供电局有限公司 | Power equipment identification method and device, computer equipment and storage medium |
CN111507271A (en) * | 2020-04-20 | 2020-08-07 | 北京理工大学 | A method for intelligent detection and identification of airborne optoelectronic video targets |
Non-Patent Citations (2)
Title |
---|
HE K 等: "Guided image filtering", 《IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE》, pages 1397 - 1409 * |
核桃分心木: "暗通道先验之Guided filter导向滤波", pages 1 - 2, Retrieved from the Internet <URL:https://zhuanlan.zhihu.com/p/36813673> * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113191983A (en) * | 2021-05-18 | 2021-07-30 | 陕西师范大学 | Image denoising method and device based on deep learning attention mechanism |
CN113610043A (en) * | 2021-08-19 | 2021-11-05 | 海默潘多拉数据科技(深圳)有限公司 | A method and system for structural identification of industrial drawing tables |
CN114169385A (en) * | 2021-09-28 | 2022-03-11 | 北京工业大学 | Combustion state identification method for MSWI process based on hybrid data enhancement |
CN114169385B (en) * | 2021-09-28 | 2024-04-09 | 北京工业大学 | MSWI process combustion state identification method based on mixed data enhancement |
CN118172714A (en) * | 2024-05-15 | 2024-06-11 | 中国石油大学(华东) | Multi-scale construction equipment robustness identification method in oilfield underground operation environment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022037258A1 (en) | Image authenticity detection method and apparatus, computer device and storage medium | |
Temel et al. | Traffic sign detection under challenging conditions: A deeper look into performance variations and spectral characteristics | |
CN111950457A (en) | Oilfield Safety Production Image Recognition Method and System | |
CN111178183B (en) | Face detection method and related device | |
CN113516076A (en) | An improved lightweight YOLO v4 security protection detection method based on attention mechanism | |
CN107808139A (en) | A kind of real-time monitoring threat analysis method and system based on deep learning | |
CN111539276B (en) | A method for real-time detection of helmets in electric power scenarios | |
Gao et al. | Let you see in haze and sandstorm: Two-in-one low-visibility enhancement network | |
Cheng et al. | Smoke detection and trend prediction method based on Deeplabv3+ and generative adversarial network | |
CN115035088A (en) | Helmet wearing detection method based on yolov5 and posture estimation | |
CN110942456B (en) | Tamper image detection method, device, equipment and storage medium | |
CN112396635B (en) | A multi-target detection method in complex environment based on multi-device | |
Singh et al. | Detection and localization of copy-paste forgeries in digital videos | |
CN110096945B (en) | Indoor monitoring video key frame real-time extraction method based on machine learning | |
CN113409248A (en) | No-reference quality evaluation method for night image | |
CN114066877A (en) | Image screening method and device, electronic equipment and storage medium | |
CN115131714A (en) | Video image intelligent detection and analysis method and system | |
CN104616321B (en) | A kind of luggage image motion behavior description method based on Scale invariant features transform | |
CN110009621A (en) | A tampered video detection method, device, device and readable storage medium | |
CN112801037A (en) | Face tampering detection method based on continuous inter-frame difference | |
CN118776479A (en) | A bridge health monitoring method integrating machine vision and edge computing | |
Qiang et al. | Underwater image enhancement based on multichannel adaptive compensation | |
Ashok et al. | Deepfake Detection Using XceptionNet | |
CN116228677A (en) | Ceramic tile surface color difference detection method and device, electronic equipment and storage medium | |
CN114694090A (en) | Campus abnormal behavior detection method based on improved PBAS algorithm and YOLOv5 |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20201117 |
|
RJ01 | Rejection of invention patent application after publication |