[go: up one dir, main page]

CN110405540B - Artificial intelligence broken cutter detection system and method - Google Patents

Artificial intelligence broken cutter detection system and method Download PDF

Info

Publication number
CN110405540B
CN110405540B CN201910616439.XA CN201910616439A CN110405540B CN 110405540 B CN110405540 B CN 110405540B CN 201910616439 A CN201910616439 A CN 201910616439A CN 110405540 B CN110405540 B CN 110405540B
Authority
CN
China
Prior art keywords
cutter
tool
image
broken
detection model
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
CN201910616439.XA
Other languages
Chinese (zh)
Other versions
CN110405540A (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.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
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 Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN201910616439.XA priority Critical patent/CN110405540B/en
Publication of CN110405540A publication Critical patent/CN110405540A/en
Application granted granted Critical
Publication of CN110405540B publication Critical patent/CN110405540B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23QDETAILS, COMPONENTS, OR ACCESSORIES FOR MACHINE TOOLS, e.g. ARRANGEMENTS FOR COPYING OR CONTROLLING; MACHINE TOOLS IN GENERAL CHARACTERISED BY THE CONSTRUCTION OF PARTICULAR DETAILS OR COMPONENTS; COMBINATIONS OR ASSOCIATIONS OF METAL-WORKING MACHINES, NOT DIRECTED TO A PARTICULAR RESULT
    • B23Q17/00Arrangements for observing, indicating or measuring on machine tools
    • B23Q17/09Arrangements for observing, indicating or measuring on machine tools for indicating or measuring cutting pressure or for determining cutting-tool condition, e.g. cutting ability, load on tool
    • B23Q17/0904Arrangements for observing, indicating or measuring on machine tools for indicating or measuring cutting pressure or for determining cutting-tool condition, e.g. cutting ability, load on tool before or after machining
    • B23Q17/0909Detection of broken tools
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23QDETAILS, COMPONENTS, OR ACCESSORIES FOR MACHINE TOOLS, e.g. ARRANGEMENTS FOR COPYING OR CONTROLLING; MACHINE TOOLS IN GENERAL CHARACTERISED BY THE CONSTRUCTION OF PARTICULAR DETAILS OR COMPONENTS; COMBINATIONS OR ASSOCIATIONS OF METAL-WORKING MACHINES, NOT DIRECTED TO A PARTICULAR RESULT
    • B23Q17/00Arrangements for observing, indicating or measuring on machine tools
    • B23Q17/24Arrangements for observing, indicating or measuring on machine tools using optics or electromagnetic waves
    • B23Q17/2452Arrangements for observing, indicating or measuring on machine tools using optics or electromagnetic waves for measuring features or for detecting a condition of machine parts, tools or workpieces
    • B23Q17/2457Arrangements for observing, indicating or measuring on machine tools using optics or electromagnetic waves for measuring features or for detecting a condition of machine parts, tools or workpieces of tools

Landscapes

  • Engineering & Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an artificial intelligence broken knife detection system which comprises an image acquisition module, a knife library, a cloud server and an image processing module, wherein the cloud server is used for obtaining a broken knife detection model based on knife intersection point characteristic training; the image processing module is used for preprocessing the cutter image, loading a cutter breaking detection model obtained by training in the cloud server, and then calculating a cutter detection result based on the cutter breaking detection model. The invention discloses an artificial intelligence broken cutter detection method, which comprises the steps of shooting a processed cutter image, marking an auxiliary line, extracting intersection point characteristics between a cutter point of a cutter and the auxiliary line to train a broken cutter detection model, and carrying out incremental training on the cutter image with errors to continuously update the broken cutter detection model, so that the detection of various cutters of different types can be realized, the influence of external environment is reduced, and the generalization capability and the detection accuracy of the broken cutter detection model are greatly improved.

Description

一种人工智能断刀检测系统及方法A kind of artificial intelligence broken knife detection system and method

技术领域technical field

本发明属于智能数控机床领域,更具体地,涉及一种人工智能断刀检测系统及方法。The invention belongs to the field of intelligent numerical control machine tools, and more particularly relates to an artificial intelligence tool breakage detection system and method.

背景技术Background technique

为了使数控机床更加智能化、自动化,保证数控机床高精度、高速度、高效率的自动化运行成为数控机床的主要研究方向之一。在加工过程中,数控机床加工刀具会随着加工过程发生不同程度的损坏,影响加工效率。因此,及时检测出刀具断损情况,可减少后续零件的报废率,降低机床的损耗,保证机床的加工效率。In order to make CNC machine tools more intelligent and automatic, ensuring the automatic operation of CNC machine tools with high precision, high speed and high efficiency has become one of the main research directions of CNC machine tools. During the machining process, the machining tools of CNC machine tools will be damaged to varying degrees along with the machining process, which will affect the machining efficiency. Therefore, timely detection of tool breakage can reduce the scrap rate of subsequent parts, reduce the loss of machine tools, and ensure the processing efficiency of machine tools.

现有的基于视觉的断刀检测方法主要分为间接检测和直接检测两种,其中间接检测对加工后的零件进行检测,在专利CN109540919A中,通过采用一级升降装置对零件进行检测,然后通过左右两边的光电装置以及固定装置检测装置实现对零件的左右两侧的检测,然后在工作台下方设置一个光电检测装置,对零件底部进行检测,从而判断是否出现断刀,这是一种间接的方式,这种方法不仅整个设备的成本比较高,而且需要针对不同类型的加工零件做不同的判断方法处理,整个设备的可使用范围比较狭窄。另一种直接检测的方法直接对刀具进行拍摄,判断刀具是否出现磨损,在编号为CN109500657A的专利中,首先通过设定的阈值获取对应的加工刀具的图像,通过将图像进行灰度化,得到对应的二值图像,进行形态学处理后,提取二值图像的轮廓,计算提取后的轮廓与标定的正常刀具的面积比,判断其与预设阈值之间的关系,实现对刀具的检测。该方法需要预先标定正常刀具的面积作为参考值,在对图片上的整个刀具面积进行标定时,人工标定误差的影响比较大,另外,在提取轮廓时,受光照和背景影响比较大,泛化能力较弱,当刀具种类较多时容错率较小,准确度较低。The existing vision-based tool breakage detection methods are mainly divided into two types: indirect detection and direct detection. The indirect detection detects the processed parts. The photoelectric devices on the left and right sides and the fixing device detection device realize the detection of the left and right sides of the part, and then a photoelectric detection device is set under the worktable to detect the bottom of the part to determine whether there is a broken knife, which is an indirect In this way, not only the cost of the entire equipment is relatively high, but also different judgment methods are required for different types of processed parts, and the usable range of the entire equipment is relatively narrow. Another direct detection method directly photographs the tool to determine whether the tool is worn or not. In the patent numbered CN109500657A, the image of the corresponding machining tool is first obtained through the set threshold value, and the image is grayed to obtain The corresponding binary image, after morphological processing, extracts the contour of the binary image, calculates the area ratio of the extracted contour and the calibrated normal tool, determines the relationship between it and the preset threshold, and realizes the detection of the tool. This method needs to pre-calibrate the area of the normal tool as a reference value. When calibrating the entire tool area on the picture, the influence of manual calibration error is relatively large. In addition, when extracting the contour, it is greatly affected by illumination and background, and generalization The ability is weak, when there are many types of tools, the fault tolerance rate is small and the accuracy is low.

因此,提出一种泛化能力强、准确度高的断刀检测系统及方法是亟需解决的问题。Therefore, it is an urgent problem to propose a broken tool detection system and method with strong generalization ability and high accuracy.

发明内容SUMMARY OF THE INVENTION

针对现有技术的缺陷,本发明的目的在于提出一种人工智能断刀检测系统及方法,旨在解决现有技术由于将预先标定的正常刀具的面积作为参考值进行断刀判断时受人工标定及光照及北京的影响较大而导致的准确度较低的问题。In view of the defects of the prior art, the purpose of the present invention is to propose an artificial intelligence tool breakage detection system and method, which aims to solve the problem that the prior art is subject to manual calibration when the pre-calibrated area of a normal tool is used as a reference value to judge a broken tool. And the problem of lower accuracy caused by the greater influence of light and Beijing.

为实现上述目的,本发明一方面提供了一种人工智能断刀检测系统,包括:In order to achieve the above object, one aspect of the present invention provides an artificial intelligence broken knife detection system, comprising:

图像采集模块、刀库、云服务器、图像处理模块;Image acquisition module, tool magazine, cloud server, image processing module;

其中,图像采集模块的输出端与图像处理模块的输入端相连,图像采集模块与刀库之间间隔一段距离,图像处理模块与云服务器之间通过以太网进行通讯;Wherein, the output end of the image acquisition module is connected with the input end of the image processing module, there is a distance between the image acquisition module and the tool magazine, and the image processing module and the cloud server communicate through Ethernet;

图像采集模块用于拍摄刀库中的待加工的刀具得到刀尖位置的标定信息,以及拍摄加工完成后的刀具得到背景模糊并且刀具对象凸显的刀具图像,并传输到图像处理模块中;The image acquisition module is used to capture the tool to be processed in the tool magazine to obtain the calibration information of the tool tip position, and to capture the tool image after processing to obtain a tool image with a blurred background and a prominent tool object, and transmit it to the image processing module;

刀库用于存放待加工的刀具以及加工完成后的待检测刀具;The tool magazine is used to store the tools to be processed and the tools to be tested after processing;

云服务器用于基于刀具交点特征训练得到断刀检测模型;The cloud server is used to obtain a broken tool detection model based on the tool intersection feature training;

图像处理模块用于对刀具图像进行预处理,加载云服务器中训练得到的断刀检测模型,然后基于该断刀检测模型计算刀具检测结果。The image processing module is used to preprocess the tool image, load the broken tool detection model trained in the cloud server, and then calculate the tool detection result based on the broken tool detection model.

进一步优选地,图像采集模块包括内窥镜,采用内窥镜拍摄刀库中的刀具,刀具未进行加工时,拍摄刀具图像,并标定刀具刀尖所在的位置信息,刀具加工完成后将刀具重新换回到刀库,采用内窥镜拍摄加工完成后的待检测刀具,得到背景模糊的刀具图像,以凸显刀具对象。Further preferably, the image acquisition module includes an endoscope, and the endoscope is used to photograph the tools in the tool magazine. When the tool is not being processed, the tool image is photographed, and the position information of the tool tip is calibrated. After the tool is processed, the tool is reset. Switch back to the tool magazine, use an endoscope to photograph the tool to be inspected after processing, and obtain a tool image with a blurred background to highlight the tool object.

进一步优选地,图像处理模块可以为装有AI芯片的IPC。Further preferably, the image processing module may be an IPC equipped with an AI chip.

进一步优选地,图像采集模块、刀库、图像处理模块均可嵌入到机床中;Further preferably, the image acquisition module, the tool magazine, and the image processing module can all be embedded in the machine tool;

进一步优选地,本发明另一方面提供了一种人工智能断刀检测方法,包括以下步骤:Further preferably, another aspect of the present invention provides a kind of artificial intelligence broken knife detection method, comprises the following steps:

S1、图像处理模块连接云服务器,从云服务器中下载断刀检测模型;S1. The image processing module is connected to the cloud server, and the broken knife detection model is downloaded from the cloud server;

S2、对刀库中的所有待加工刀具进行拍照并标定其刀尖位置;S2. Take pictures of all the tools to be processed in the tool magazine and calibrate the position of the tool tip;

S3、待加工刀具在加工完成后换回到刀库的对应位置,并对其进行拍照,得到待检测刀具图像;S3. The tool to be processed is changed back to the corresponding position of the tool magazine after the processing is completed, and a photo is taken to obtain the image of the tool to be detected;

S4、基于所标定的刀尖位置信息对待检测刀具图像进行预处理,得到带有辅助标记的刀具图像;S4. Preprocess the image of the tool to be detected based on the calibrated tool tip position information to obtain a tool image with auxiliary marks;

S5、提取待检测刀具图像的刀具刀尖与辅助线之间的交点特征;S5, extracting the intersection feature between the tool tip of the tool image to be detected and the auxiliary line;

S6、将交点特征输入到预先训练的断刀检测模型中,得到断刀检测结果;S6, input the intersection point feature into the pre-trained broken knife detection model to obtain the broken knife detection result;

S7、将检测错误的刀具图像样本传送到云服务器上,得到错误样本集。S7. Send the tool image samples that have detected errors to the cloud server to obtain an error sample set.

进一步优选地,上述步骤中对刀具图像进行预处理的方法包括以下步骤:Further preferably, the method for preprocessing the tool image in the above steps includes the following steps:

S41、以所标定的刀尖位置信息为基准,对刀具图像进行剪裁,得到固定大小的刀具图像;S41. Based on the calibrated tool tip position information, the tool image is trimmed to obtain a fixed-size tool image;

S42、对裁剪后的图像进行灰度处理,得到灰度图像;S42, performing grayscale processing on the cropped image to obtain a grayscale image;

S43、在所得灰度图像中的固定位置处绘制辅助线,得到带有辅助标记的刀具图像。S43, draw an auxiliary line at a fixed position in the obtained grayscale image to obtain a tool image with auxiliary marks.

进一步优选地,所有预处理图像的辅助线位置都相同。Further preferably, the auxiliary line positions of all preprocessed images are the same.

进一步优选地,辅助线的条数大于等于1,并且存在一定的倾斜角度且互相平行;进一步优选地,辅助线的条数为3。Further preferably, the number of auxiliary lines is greater than or equal to 1, and there is a certain inclination angle and are parallel to each other; further preferably, the number of auxiliary lines is 3.

进一步优选地,刀尖与辅助线之间的交点越多,为断刀的可能性越小。Further preferably, the more intersections between the tool tip and the auxiliary line, the less likely the tool is to be broken.

进一步优选地,可以采用GoogleNet提取刀具图像的刀具刀尖与辅助线之间的交点特征。Further preferably, GoogleNet can be used to extract the feature of the intersection between the tool tip and the auxiliary line of the tool image.

进一步优选地,步骤S6中得到断刀检测模型的方法包括以下步骤:Further preferably, the method for obtaining the broken knife detection model in step S6 comprises the following steps:

S61、判断云服务器端是否存在已训练好的断刀检测模型,若不存在,采集断裂刀具和正常刀具的图像数据集作为训练集,转至步骤S62;若存在,则转至步骤S63;S61, determine whether there is a trained broken tool detection model on the cloud server, if not, collect the image data set of the broken tool and the normal tool as a training set, and go to step S62; if there is, go to step S63;

S62、基于所得训练集在云服务器上训练断刀检测模型,转至S63;S62, train the broken knife detection model on the cloud server based on the obtained training set, and go to S63;

S63、当云服务器上的错误样本集中的样本个数大于可训练阈值C时,在当前断刀检测模型的基础上基于错误样本集进行增量训练,更新断刀检测模型。S63. When the number of samples in the error sample set on the cloud server is greater than the trainable threshold C, perform incremental training based on the error sample set on the basis of the current broken knife detection model, and update the broken knife detection model.

进一步优选地,步骤S62中训练断刀检测模型的方法包括以下步骤:Further preferably, the method for training the broken knife detection model in step S62 comprises the following steps:

S621、对训练集中的刀具图像进行预处理,构建带有辅助标记的训练集;S621. Preprocess the tool images in the training set to construct a training set with auxiliary marks;

S622、提取带有辅助标记的训练集中每幅刀具图像的刀具刀尖与辅助线之间的交点特征;S622, extracting the intersection point feature between the tool tip and the auxiliary line of each tool image in the training set with auxiliary marks;

S623、以训练集中正常刀具的交点特征为正样本,以训练集中断裂刀具的交点特征为负样本,对分类器进行训练,得到断刀检测模型。S623 , taking the intersection feature of the normal tool in the training set as a positive sample, and taking the intersection feature of the broken tool in the training set as a negative sample, train the classifier to obtain a broken tool detection model.

进一步优选地,可以使用SENet作为分类器。Further preferably, SENet can be used as the classifier.

通过本发明所构思的以上技术方案,与现有技术相比,能够取得下列有益效果:Through the above technical scheme conceived by the present invention, compared with the prior art, the following beneficial effects can be achieved:

1、本发明提供了一种人工智能断刀检测方法,通过提取刀具刀尖与辅助线之间的交点特征训练断刀检测模型,并对判断出错的刀具图像进行增量训练不断的对断刀检测模型进行更新,可以对多种不同类型的刀具进行检测,大大提高了断刀检测模型的泛化能力以及检测的准确率。1. The present invention provides an artificial intelligence tool breakage detection method, which trains a broken tool detection model by extracting the intersection point feature between the tool tip and the auxiliary line, and performs incremental training on the wrong tool image to continuously detect the broken tool. The detection model can be updated to detect a variety of different types of tools, which greatly improves the generalization ability of the broken tool detection model and the detection accuracy.

2、本发明提供了一种断刀检测系统,采用内窥镜拍摄刀具图像,可以使刀具图像的背景部分模糊,从而凸显出刀具对象,内窥镜成本低,安装简易,易于维护。另外在采集的刀具图像是刀具加工完成后的图像,减少了环境因素的干扰,避免了在刀具加工过程中对其进行拍摄时存在冷却液和工件遮挡问题,有效的减少整个加工过程中光线的影响,在加工环境比较恶劣的情况下也可以达到比较好的检测效果。2. The present invention provides a broken knife detection system, which uses an endoscope to capture a knife image, which can blur the background part of the knife image, thereby highlighting the tool object. The endoscope has low cost, simple installation and easy maintenance. In addition, the collected tool image is the image after the tool processing is completed, which reduces the interference of environmental factors, avoids the problem of coolant and workpiece occlusion when shooting the tool during processing, and effectively reduces the light exposure during the entire processing process. Influence, in the case of relatively harsh processing environment can also achieve better detection results.

3、本发明提供了一种人工智能断刀检测方法,在检测启动之前,预先标定待加工刀具的刀尖位置信息,通过刀尖位置信息来确定整个刀具的范围,这种处理方法相对于现有的采用阈值来确定刀具范围的方法得到的刀具信息更为准确,受到拍摄背景的影响更小。3. The present invention provides an artificial intelligence tool breakage detection method. Before the detection is started, the tool tip position information of the tool to be processed is pre-calibrated, and the entire tool range is determined by the tool tip position information. Some methods that use threshold to determine the tool range get more accurate tool information and are less affected by the shooting background.

4、本发明提供了一种人工智能断刀检测系统,在云服务器上训练断刀检测模型,当模型更新后可以及时的同步到不同的机床上,更加灵活,可以实现整个系统的数据进行汇总,有利于对整个机床的数据进行处理分析,同时也有比较好的可维护性。4. The present invention provides an artificial intelligence broken tool detection system. The broken tool detection model is trained on the cloud server. When the model is updated, it can be synchronized to different machine tools in time, which is more flexible and can realize the aggregation of the data of the entire system. , which is conducive to the processing and analysis of the data of the entire machine tool, and also has better maintainability.

附图说明Description of drawings

图1是本发明实施例所提供的一种人工智能断刀检测系统;Fig. 1 is a kind of artificial intelligence broken knife detection system provided by the embodiment of the present invention;

图2是本发明实施例所提供的一种人工智能断刀检测方法;Fig. 2 is a kind of artificial intelligence broken knife detection method provided by the embodiment of the present invention;

图3是本发明实施例所提供的一种断刀检测模型的训练方法;3 is a training method of a broken knife detection model provided by an embodiment of the present invention;

图4是本发明实施例所提供的预处理后带辅助标记的正常刀具图像;4 is a normal tool image with auxiliary marks after preprocessing provided by an embodiment of the present invention;

图5是本发明实施例所提供的预处理后带辅助标记的断裂刀具图像。FIG. 5 is an image of a broken tool with auxiliary marks after preprocessing provided by an embodiment of the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

本发明提出了一种人工智能断刀检测系统,如图1所示,包括图像采集模块1、刀库2、云服务器3、图像处理模块4;The present invention proposes an artificial intelligence broken knife detection system, as shown in FIG. 1 , including an image acquisition module 1, a tool magazine 2, a cloud server 3, and an image processing module 4;

其中,图像采集模块1的输出端与图像处理模块4的输入端相连,图像采集模块1与刀库2之间间隔一段距离,图像处理模块4与云服务器3之间通过以太网进行通讯;Wherein, the output end of the image acquisition module 1 is connected with the input end of the image processing module 4, there is a distance between the image acquisition module 1 and the tool magazine 2, and the image processing module 4 and the cloud server 3 communicate through Ethernet;

图像采集模块1用于拍摄刀库2中的待加工的刀具并标定得到刀尖位置的标定信息,以及拍摄加工完成后的刀具得到背景模糊并且刀具对象凸显的刀具图像,并传输到图像处理模块4中;The image acquisition module 1 is used to take pictures of the tools to be processed in the tool magazine 2 and calibrate to obtain the calibration information of the position of the tool tip, and to take pictures of the finished tools to obtain a tool image with a blurred background and a prominent tool object, and transmit it to the image processing module 4 in;

刀库2用于存放待加工的刀具以及加工完成后的待检测刀具;The tool magazine 2 is used to store the tools to be processed and the tools to be tested after the processing is completed;

云服务器3用于基于刀具交点特征训练得到断刀检测模型;The cloud server 3 is used to obtain a broken tool detection model based on the tool intersection feature training;

图像处理模块4用于对刀具图像进行预处理,加载云服务器中训练得到的断刀检测模型,然后基于该断刀检测模型计算刀具检测结果。The image processing module 4 is used to preprocess the tool image, load the broken tool detection model trained in the cloud server, and then calculate the tool detection result based on the broken tool detection model.

具体的,图像采集模块1包括内窥镜、照明灯、USB数据线,用支架将内窥镜固定在数控机床内,距离刀库中刀具10cm的位置,用USB数据线将内窥镜和数控机床中上位机相连。照明灯用于照亮刀库区,由于刀库位置光线较暗,使用照明灯能够使照片中的刀具更加清晰。采用内窥镜拍摄刀库中的刀具,刀具未进行加工时,拍摄刀具图像,并标定刀具刀尖所在的位置信息,刀具加工完成后刀具换回到刀库,采用内窥镜拍摄加工完成后的待检测刀具,得到背景模糊的刀具图像以凸显刀具对象,并将图片数据通过USB数据线传输到图像处理模块中。在刀具加工过程中对其进行拍摄时存在冷却液和工件遮挡问题,需要将刀具从加工区换置到刀库,避免遮挡问题。Specifically, the image acquisition module 1 includes an endoscope, a lighting lamp, and a USB data cable. The endoscope is fixed in the CNC machine tool with a bracket, and the distance from the tool in the tool magazine is 10 cm. The USB data cable is used to connect the endoscope and the CNC machine. The upper computer in the machine tool is connected. Lights are used to illuminate the tool magazine area. Since the tool magazine location is dimly lit, the use of lights can make the tools in the photo clearer. The endoscope is used to photograph the tools in the tool magazine. When the tool is not being processed, the tool image is taken and the position information of the tool tip is calibrated. After the tool is processed, the tool is returned to the tool magazine. The tool to be detected is obtained, the tool image with blurred background is obtained to highlight the tool object, and the image data is transmitted to the image processing module through the USB data line. There is a problem of coolant and workpiece occlusion when the tool is photographed during the machining process. The tool needs to be replaced from the machining area to the tool magazine to avoid the occlusion problem.

具体的,在云服务器上训练得到断刀检测模型并加载到图像处理模块中,将图像采集模块中拍摄到的刀具图像传输至图像处理模块中,预处理完成后,采用图像处理模块中的断刀检测模型对处理后的图像进行断刀检测。Specifically, the broken tool detection model is trained on the cloud server and loaded into the image processing module, and the tool image captured in the image acquisition module is transmitted to the image processing module. After the preprocessing is completed, the broken tool in the image processing module is used The knife detection model performs knife break detection on the processed image.

具体的,图像处理模块可以为装有AI芯片的IPC。Specifically, the image processing module may be an IPC equipped with an AI chip.

具体的,本发明另一方面提供了一种人工智能断刀检测方法,如图2所示,包括以下步骤:Specifically, another aspect of the present invention provides an artificial intelligence detection method for broken knife, as shown in Figure 2, comprising the following steps:

S1、图像处理模块连接云服务器,判断图像处理模块中的断刀检测模型是否存在,若不存在,从云服务器中下载断刀检测模型,若模型下载失败则返回错误信息,算法结束;若存在,转至步骤2;S1. The image processing module is connected to the cloud server to determine whether the broken knife detection model in the image processing module exists. If it does not exist, download the broken knife detection model from the cloud server. If the download of the model fails, an error message will be returned, and the algorithm will end; , go to step 2;

S2、采用内窥镜对刀库中的所有待加工刀具进行拍照并标定其刀尖位置;S2. Use an endoscope to take pictures of all the tools to be processed in the tool magazine and calibrate the position of the tool tip;

S3、在机床加工时,轮询机床的换刀信号,捕捉换刀信号后,加工完成后的待检测刀具回到刀库的对应位置,采用内窥镜对刀具进行拍照,得到待检测刀具图像;S3. When the machine tool is processing, poll the tool change signal of the machine tool, after capturing the tool change signal, the tool to be detected after the processing is returned to the corresponding position of the tool magazine, and the endoscope is used to take a picture of the tool to obtain the image of the tool to be detected. ;

S4、基于所标定的刀尖位置信息对待检测刀具图像进行预处理,得到带有辅助标记的刀具图像;S4. Preprocess the image of the tool to be detected based on the calibrated tool tip position information to obtain a tool image with auxiliary marks;

S5、采用GoogleNet提取待检测刀具图像的刀具刀尖与辅助线之间的交点特征;具体的,通过辅助线与刀具刀尖相交,增强交点附近像素的梯度变化,使得在提取图像特征时更易提取到交点,交点数量与位置又可反映刀具长度,由此做到将长短这种定性特征转化为交点位置与数量这种定量特征,从而使训练更快更准确。S5. Use GoogleNet to extract the intersection feature between the tool tip and the auxiliary line of the tool image to be detected; specifically, through the intersection of the auxiliary line and the tool tip, the gradient change of the pixels near the intersection is enhanced, making it easier to extract image features when extracting image features. At the intersection, the number and position of the intersection can reflect the length of the tool, so that the qualitative feature of length can be converted into the quantitative feature of the position and quantity of the intersection, so that the training is faster and more accurate.

S6、将交点特征输入到预先训练的断刀检测模型中,得到断刀检测结果,若预测为断刀,则向机床发送报警信号,否则继续轮询换刀信息。S6. Input the intersection point feature into the pre-trained tool break detection model to obtain the tool break detection result. If the tool is predicted to be broken, send an alarm signal to the machine tool, otherwise continue to poll the tool change information.

S7、判断检测的断刀结果是否正确,将检测错误的刀具图像样本传送到云服务器上,得到错误样本集,算法结束。S7 , judging whether the detected result of the broken tool is correct, and transmitting the tool image sample of the detected error to the cloud server to obtain the error sample set, and the algorithm ends.

具体的,在云服务器端训练断刀检测模型的方法,如图3所示,包括以下步骤:Specifically, the method for training a broken knife detection model on the cloud server, as shown in Figure 3, includes the following steps:

S61、判断云服务器端是否存在已训练好的断刀检测模型,若不存在,采集断裂刀具和正常刀具的图像数据集作为训练集,转至步骤S62;若存在,则转至步骤S63;具体的,训练集中的图像是包含刀尖的刀具图像;S61, determine whether there is a trained broken tool detection model on the cloud server, if not, collect image data sets of broken tools and normal tools as a training set, and go to step S62; if so, go to step S63; , the images in the training set are tool images that contain the tool tip;

S62、基于所得训练集在云服务器上训练断刀检测模型,转至S63;S62, train the broken knife detection model on the cloud server based on the obtained training set, and go to S63;

S63、判断云服务器上的错误样本集中的样本个数是否大于可训练阈值C,若大于可训练阈值C,则在当前断刀检测模型的基础上基于错误样本集进行增量训练,更新断刀检测模型,算法结束;否则,当前的断刀检测模型即为所得,算法结束。具体的,C取值为4000张,具体的,正常刀具样本数量为2000张,断裂刀具样本数量为2000张,通过在当前断刀检测模型现有参数的基础上对模型进行增量训练,可以提高模型的容错率和准确率。S63. Determine whether the number of samples in the error sample set on the cloud server is greater than the trainable threshold C, if it is greater than the trainable threshold C, perform incremental training based on the error sample set on the basis of the current broken knife detection model, and update the broken knife Detect the model, the algorithm ends; otherwise, the current broken knife detection model is the result, and the algorithm ends. Specifically, the value of C is 4000. Specifically, the number of normal tool samples is 2000, and the number of broken tool samples is 2000. By incrementally training the model on the basis of the existing parameters of the current broken tool detection model, it is possible to Improve the fault tolerance and accuracy of the model.

具体的,步骤S62中训练断刀检测模型的步骤包括:Specifically, the step of training the broken knife detection model in step S62 includes:

S621、对训练集中的刀具图像进行预处理,构建带有辅助标记的训练集;S621. Preprocess the tool images in the training set to construct a training set with auxiliary marks;

S622、采用GoogleNet模型提取带有辅助标记的训练集中每幅刀具图像的刀具刀尖与辅助线之间的交点特征;S622, using the GoogleNet model to extract the intersection feature between the tool tip and the auxiliary line of each tool image in the training set with auxiliary marks;

S623、以训练集中正常刀具的交点特征为正样本,以训练集中断裂刀具的交点特征为负样本,对SENet分类器进行训练,得到断刀检测模型。S623 , taking the intersection feature of the normal tool in the training set as a positive sample, and taking the intersection feature of the broken tool in the training set as a negative sample, train the SENet classifier to obtain a broken tool detection model.

具体的,上述步骤中的对刀具图像进行预处理的方法包括以下步骤:Specifically, the method for preprocessing the tool image in the above steps includes the following steps:

S41、以刀具加工前所标定的刀具图像中刀尖所在的位置(x,y)为基准,取x左右两边各50个像素点以及y以上的100个像素点对加工后的刀具图像进行剪裁,得到100×100的刀具图像;S41. Based on the position (x, y) of the tool tip in the tool image calibrated before tool processing, take 50 pixels on the left and right sides of x and 100 pixels above y to cut the processed tool image , get a 100×100 tool image;

S42、对裁剪后的图像进行灰度处理,得到灰度图像;S42, performing grayscale processing on the cropped image to obtain a grayscale image;

S43、在所得灰度图像下半部分固定位置处绘制3条带有一定倾斜角度的平行辅助线,得到带有辅助标记的刀具图像。具体的,所有预处理图像的辅助线位置都相同。具体的,如图4所示为预处理后的带辅助标记的正常刀具图像,如图5所示为预处理后的带辅助标记的断裂刀具图像。从图中可以看出,通过辅助线与刀具刀尖相交,刀具越长交点的数量越多,正常刀具与辅助线的交点明显多于断刀刀具,另外辅助线存在一定的倾斜角度可以增加交点的个数使检测更为准确。S43, draw three parallel auxiliary lines with a certain inclination angle at a fixed position in the lower half of the obtained grayscale image to obtain a tool image with auxiliary marks. Specifically, all the preprocessed images have the same position of the auxiliary lines. Specifically, FIG. 4 is a preprocessed image of a normal tool with auxiliary marks, and FIG. 5 is a preprocessed image of a broken tool with auxiliary marks. As can be seen from the figure, through the intersection of the auxiliary line and the tool tip, the longer the tool, the more the number of intersection points. The intersection of the normal tool and the auxiliary line is obviously more than that of the broken tool. In addition, the auxiliary line has a certain inclination angle to increase the intersection point. The number makes the detection more accurate.

通过本发明所提供的人工智能断刀检测系统及方法,通过提取刀具刀尖与辅助线之间的交点特征训练断刀检测模型,并收集判断出错的刀具图像进行增量训练,不断的对断刀检测模型进行更新,使其可以对多种不同类型的刀具进行检测,大大提高了断刀检测模型的泛化能力以及检测的准确率。对100×100的包含刀尖的刀具图像添加辅助线特征来训练模型,使模型的准确率提高3%。这里使用的训练集的大小是4000,其中断刀和正常刀具各类2000,使用的测试集数据是4000张,其中断刀和正常刀具各类2000,模型在测试集上最终的准确率是98.6%,准确率较高。Through the artificial intelligence broken tool detection system and method provided by the present invention, the broken tool detection model is trained by extracting the intersection point between the tool tip and the auxiliary line, and the wrong tool images are collected for incremental training, and the broken tool is continuously trained. The tool detection model is updated so that it can detect a variety of different types of tools, which greatly improves the generalization ability of the broken tool detection model and the detection accuracy. The model is trained by adding auxiliary line features to the 100×100 tool image containing the tool tip, which increases the accuracy of the model by 3%. The size of the training set used here is 4000, with 2000 for each type of interrupted knives and normal knives, and 4000 pieces of test set data, 2000 for each type of interrupted knives and normal knives, and the final accuracy rate of the model on the test set is 98.6 %, the accuracy rate is high.

本领域的技术人员容易理解,以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。Those skilled in the art can easily understand that the above are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention, etc., All should be included within the protection scope of the present invention.

Claims (8)

1. An artificial intelligence broken knife detection system is characterized by comprising an image acquisition module, a knife library, a cloud server and an image processing model;
the output end of the image acquisition module is connected with the input end of the image processing module, the image acquisition module and the tool magazine are separated by a certain distance, and the image processing module and the cloud server are communicated through Ethernet;
the image acquisition module is used for shooting a tool to be machined in the tool magazine to obtain the calibration information of the position of the tool tip, shooting the machined tool to obtain a tool image with a fuzzy background and a highlighted tool object, and transmitting the tool image to the image processing module;
the tool magazine is used for storing the tool to be machined and the tool to be machined after machining is finished;
the image processing module is used for preprocessing the cutter image: cutting the cutter image by taking the marked cutter point position information as a reference to obtain a cutter image with a fixed size, and performing gray processing on the cut image to obtain a gray image; drawing an auxiliary line at a fixed position in the gray level image to obtain a cutter image with an auxiliary mark, and extracting intersection point characteristics between the cutter point of the cutter image and the auxiliary line to obtain intersection point characteristics of the cutter; loading a broken cutter detection model obtained by training in a cloud server, and calculating a cutter detection result based on the broken cutter detection model;
the cloud server is used for obtaining a broken cutter detection model based on cutter intersection point characteristic training.
2. The system for detecting the broken cutter according to claim 1, wherein the image acquisition module comprises an endoscope, the endoscope is used for shooting a cutter in the tool magazine, when the cutter is not machined, an image of the cutter is shot, the position information of the point of the cutter is calibrated, the cutter is replaced to the tool magazine after the cutter is machined, the endoscope is used for shooting the cutter to be detected after the machining is finished, and a cutter image with a fuzzy background is obtained so as to highlight a cutter object.
3. The system of claim 1, wherein the image processing module is an IPC equipped with an AI chip.
4. An artificial intelligence knife-breaking detection method is characterized by comprising the following steps:
s1, connecting the image processing module with a cloud server, and downloading a broken cutter detection model from the cloud server;
s2, photographing all the to-be-machined tools in the tool magazine and calibrating the positions of tool tips of the to-be-machined tools;
s3, after the tool to be machined is machined, the tool to be machined is replaced to the corresponding position of the tool magazine, and the tool magazine is photographed to obtain an image of the tool to be machined;
s4, preprocessing the cutter image to be detected based on the marked cutter tip position information to obtain a cutter image with an auxiliary mark; wherein the auxiliary mark is an auxiliary line;
s5, extracting intersection point characteristics between the cutter point of the cutter to be detected and the auxiliary line;
s6, inputting the intersection point characteristics into a cutter breaking detection model trained in advance to obtain a cutter breaking detection result;
and S7, transmitting the tool image sample with the error detection to a cloud server to obtain an error sample set.
5. The method of claim 4, wherein the method of preprocessing the tool image comprises the steps of:
s41, cutting the cutter image by taking the marked cutter point position information as a reference to obtain a cutter image with a fixed size;
s42, carrying out gray scale processing on the cut image to obtain a gray scale image;
and S43, drawing an auxiliary line at a fixed position in the gray-scale image to obtain a tool image with an auxiliary mark.
6. The method according to claim 4 or 5, wherein the number of the auxiliary lines is 1 or more, and the auxiliary lines are parallel to each other at a predetermined inclination angle.
7. The method of claim 4, wherein the method of obtaining the pre-trained knife break detection model comprises the steps of:
s61, judging whether a trained broken cutter detection model exists at the cloud server side, if not, collecting image data sets of a broken cutter and a normal cutter as a training set, and turning to the step S62; if yes, go to step S63;
s62, training a broken cutter detection model on the cloud server based on the training set, and turning to S63;
and S63, when the number of samples in the error sample set on the cloud server is larger than a trainable threshold value C, performing incremental training based on the error sample set on the basis of the current tool breaking detection model, and updating the tool breaking detection model.
8. The method of claim 7, wherein the method of training the break detection model comprises the steps of:
s621, preprocessing the cutter images in the training set to construct a training set with auxiliary marks;
s622, extracting intersection point characteristics between the tool nose of each tool image in the training set with the auxiliary marks and the auxiliary lines;
and S623, training the classifier by taking the intersection point characteristics of the normal cutters in the training set as positive samples and the intersection point characteristics of the broken cutters in the training set as negative samples to obtain a broken cutter detection model.
CN201910616439.XA 2019-07-09 2019-07-09 Artificial intelligence broken cutter detection system and method Active CN110405540B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910616439.XA CN110405540B (en) 2019-07-09 2019-07-09 Artificial intelligence broken cutter detection system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910616439.XA CN110405540B (en) 2019-07-09 2019-07-09 Artificial intelligence broken cutter detection system and method

Publications (2)

Publication Number Publication Date
CN110405540A CN110405540A (en) 2019-11-05
CN110405540B true CN110405540B (en) 2020-07-10

Family

ID=68360863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910616439.XA Active CN110405540B (en) 2019-07-09 2019-07-09 Artificial intelligence broken cutter detection system and method

Country Status (1)

Country Link
CN (1) CN110405540B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112247675A (en) * 2020-11-04 2021-01-22 苏州众盈恒信息科技有限公司 A system and method for self-learning detection of tool life based on big data
CN113126964B (en) * 2021-03-31 2022-01-25 成都飞机工业(集团)有限责任公司 CATIA-based efficient cutter checking programming method
CN115365889A (en) * 2022-09-17 2022-11-22 杭州鹏润电子有限公司 Method, system and storage medium for detecting knife breaking
CN115741230B (en) * 2022-09-30 2024-09-10 成都飞机工业(集团)有限责任公司 Online cutter breakage detection system and method
CN115847187B (en) * 2023-02-27 2023-05-05 成都大金航太科技股份有限公司 Real-time monitoring system for deep and narrow groove turning

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6201567B1 (en) * 1995-12-20 2001-03-13 Komatsu Ltd. Turn broach abnormality sensing apparatus
CN102528562A (en) * 2012-02-28 2012-07-04 上海大学 On-line automatic tool setting and breakage detection device for minitype milling tool
CN104117876A (en) * 2013-04-28 2014-10-29 郑州大学 Method and device for checking whether cutting tool is broken or abraded or not
CN106584209A (en) * 2016-11-10 2017-04-26 哈尔滨理工大学 Real-time online monitoring method for tool wear based on cloud manufacturing
CN206855141U (en) * 2017-04-01 2018-01-09 深圳市蓝海永兴实业有限公司 A kind of milling cutter wears on-line measuring device
KR20180027078A (en) * 2016-09-06 2018-03-14 한국생산기술연구원 Machining equipment and method for inspection of tool wear and defects
CN108692709A (en) * 2018-04-26 2018-10-23 济南浪潮高新科技投资发展有限公司 A kind of farmland the condition of a disaster detection method, system, unmanned plane and cloud server
CN109191367A (en) * 2018-08-02 2019-01-11 哈尔滨理工大学 The joining method of tool wear image and the life-span prediction method of cutter
CN109500657A (en) * 2018-11-14 2019-03-22 华中科技大学 A kind of knife-breaking detecting method and system of view-based access control model
CN109822398A (en) * 2019-03-25 2019-05-31 华中科技大学 A deep learning-based tool breakage detection system and method for CNC machine tools
CN109919941A (en) * 2019-03-29 2019-06-21 深圳市奥特立德自动化技术有限公司 Internal screw thread defect inspection method, device, system, equipment and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010256341A (en) * 2009-03-31 2010-11-11 Toshiba Mach Co Ltd Cutting-edge position detecting method and cutting-edge position detecting apparatus

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6201567B1 (en) * 1995-12-20 2001-03-13 Komatsu Ltd. Turn broach abnormality sensing apparatus
CN102528562A (en) * 2012-02-28 2012-07-04 上海大学 On-line automatic tool setting and breakage detection device for minitype milling tool
CN104117876A (en) * 2013-04-28 2014-10-29 郑州大学 Method and device for checking whether cutting tool is broken or abraded or not
KR20180027078A (en) * 2016-09-06 2018-03-14 한국생산기술연구원 Machining equipment and method for inspection of tool wear and defects
CN106584209A (en) * 2016-11-10 2017-04-26 哈尔滨理工大学 Real-time online monitoring method for tool wear based on cloud manufacturing
CN206855141U (en) * 2017-04-01 2018-01-09 深圳市蓝海永兴实业有限公司 A kind of milling cutter wears on-line measuring device
CN108692709A (en) * 2018-04-26 2018-10-23 济南浪潮高新科技投资发展有限公司 A kind of farmland the condition of a disaster detection method, system, unmanned plane and cloud server
CN109191367A (en) * 2018-08-02 2019-01-11 哈尔滨理工大学 The joining method of tool wear image and the life-span prediction method of cutter
CN109500657A (en) * 2018-11-14 2019-03-22 华中科技大学 A kind of knife-breaking detecting method and system of view-based access control model
CN109822398A (en) * 2019-03-25 2019-05-31 华中科技大学 A deep learning-based tool breakage detection system and method for CNC machine tools
CN109919941A (en) * 2019-03-29 2019-06-21 深圳市奥特立德自动化技术有限公司 Internal screw thread defect inspection method, device, system, equipment and medium

Also Published As

Publication number Publication date
CN110405540A (en) 2019-11-05

Similar Documents

Publication Publication Date Title
CN110405540B (en) Artificial intelligence broken cutter detection system and method
CN109822398B (en) A deep learning-based tool breakage detection system and method for CNC machine tools
CN201218723Y (en) Optoelectronic non-contact type image detection apparatus
CN106226325A (en) A kind of seat surface defect detecting system based on machine vision and method thereof
CN101576508A (en) Device and method for automatically detecting chip appearance defects
CN110850723A (en) Fault diagnosis and positioning method based on transformer substation inspection robot system
CN109544548A (en) Defect inspection method, device, server, equipment and the storage medium of cutlery box
CN114972258B (en) Battery surface defect detection method and system based on machine vision and related equipment
CN109784200B (en) Binocular vision-based cow behavior image acquisition and body condition intelligent monitoring system
CN111612846A (en) Concrete crack width measuring method based on U-net CNN image recognition and pixel calibration
CN116297199B (en) Detection system for automatically detecting lithium battery parameters based on machine vision
WO2021103824A1 (en) Key point position determining method and device in robot hand-eye calibration based on calibration block
CN112016514B (en) Traffic sign recognition method, device, equipment and storage medium
CN112247675A (en) A system and method for self-learning detection of tool life based on big data
CN103785622A (en) Machine-vision-based part sorting device and method
CN103279760A (en) Real-time classifying method of plant quarantine larvae
CN116539626A (en) Lithium battery defect detection system and method
CN113778091A (en) A kind of inspection method for wind farm booster station equipment
CN116664846A (en) Method and system for realizing 3D printing bridge deck construction quality monitoring based on semantic segmentation
CN107608393A (en) A kind of positioning cutting system and method based on machine vision technique
CN114966631A (en) Fault diagnosis and processing method, device, medium and vehicle of vehicle lidar
CN111929239A (en) AOI detection device and detection method for PCB part defects
CN116205835A (en) Circuit board defect detection method, device and electronic equipment
CN113837044A (en) Organ positioning method based on ambient brightness and related equipment
CN209496276U (en) A kind of wheel hub Tool Management System

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant