CN114527075A - Mask defect detection device and method - Google Patents
Mask defect detection device and method Download PDFInfo
- Publication number
- CN114527075A CN114527075A CN202210188343.XA CN202210188343A CN114527075A CN 114527075 A CN114527075 A CN 114527075A CN 202210188343 A CN202210188343 A CN 202210188343A CN 114527075 A CN114527075 A CN 114527075A
- Authority
- CN
- China
- Prior art keywords
- mask
- image
- detection
- defect
- area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 103
- 230000007547 defect Effects 0.000 title claims abstract description 63
- 238000000034 method Methods 0.000 title claims abstract description 19
- 230000007246 mechanism Effects 0.000 claims abstract description 58
- 230000002950 deficient Effects 0.000 claims abstract description 19
- 238000013135 deep learning Methods 0.000 claims abstract description 16
- 238000004519 manufacturing process Methods 0.000 claims abstract description 10
- 239000012528 membrane Substances 0.000 claims description 21
- 238000012549 training Methods 0.000 claims description 14
- 238000007664 blowing Methods 0.000 claims description 8
- 238000012545 processing Methods 0.000 claims description 8
- 238000012360 testing method Methods 0.000 claims description 8
- 238000013145 classification model Methods 0.000 claims description 6
- 238000011144 upstream manufacturing Methods 0.000 claims description 6
- 230000000694 effects Effects 0.000 claims description 4
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 238000013136 deep learning model Methods 0.000 claims description 3
- 230000036544 posture Effects 0.000 claims description 3
- 238000007781 pre-processing Methods 0.000 claims description 3
- 238000012795 verification Methods 0.000 claims description 3
- 238000007689 inspection Methods 0.000 claims description 2
- 238000003032 molecular docking Methods 0.000 claims description 2
- 230000008569 process Effects 0.000 description 2
- 230000032258 transport Effects 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 238000003915 air pollution Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 230000001681 protective effect Effects 0.000 description 1
- 238000003908 quality control method Methods 0.000 description 1
- 239000002994 raw material Substances 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 238000011179 visual inspection Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/01—Arrangements or apparatus for facilitating the optical investigation
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B07—SEPARATING SOLIDS FROM SOLIDS; SORTING
- B07C—POSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
- B07C5/00—Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
- B07C5/34—Sorting according to other particular properties
- B07C5/342—Sorting according to other particular properties according to optical properties, e.g. colour
- B07C5/3422—Sorting according to other particular properties according to optical properties, e.g. colour using video scanning devices, e.g. TV-cameras
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B07—SEPARATING SOLIDS FROM SOLIDS; SORTING
- B07C—POSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
- B07C5/00—Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
- B07C5/36—Sorting apparatus characterised by the means used for distribution
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/89—Investigating the presence of flaws or contamination in moving material, e.g. running paper or textiles
- G01N21/892—Investigating the presence of flaws or contamination in moving material, e.g. running paper or textiles characterised by the flaw, defect or object feature examined
Landscapes
- Chemical & Material Sciences (AREA)
- General Physics & Mathematics (AREA)
- Pathology (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Immunology (AREA)
- Biochemistry (AREA)
- Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Analytical Chemistry (AREA)
- Multimedia (AREA)
- Textile Engineering (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明涉及口罩生产技术领域,具体涉及一种口罩缺陷检测装置及方法。The invention relates to the technical field of mask production, in particular to a mask defect detection device and method.
背景技术Background technique
随着工业化和城市化进程的加速,空气污染越来越加剧,口罩作为一种重要的防控疫情的防护产品,已经成了必不可少的生活依赖品,口罩在大批量生产过程中,由于原材料、生产机器和人员操作等多种原因,会产生很多种缺陷的口罩产品,采用人工检测即依靠大批量线上质检人员对口罩进行离线检测,虽然能够实现一定的质量控制,但很容易出现人员疲劳、费时并且效率低的问题。人工目测的方法易受检查人员技术素质、经验及肉眼分辨率和疲劳等主观因素的影响,缺乏准确性和规范化,无法保证正常的产品质量。这些问题将直接导致缺失检测的低效率并使生产企业的利润下降,进而使得口罩生产企业产品竞争力下降,并最终可能被市场淘汰。因此,对自动缺陷检测装置的研发迫在眉睫,刻不容缓。With the acceleration of industrialization and urbanization, air pollution has become more and more intensified. As an important protective product for epidemic prevention and control, masks have become an indispensable daily dependency. In the process of mass production of masks, due to Due to various reasons such as raw materials, production machines, and personnel operations, there will be many types of defective mask products. Manual testing is to rely on a large number of online quality inspectors to conduct offline testing of masks. Although a certain quality control can be achieved, it is easy to Staff fatigue, time consuming and inefficiencies arise. The method of manual visual inspection is easily affected by subjective factors such as the technical quality, experience, visual resolution and fatigue of inspectors, lacks accuracy and standardization, and cannot guarantee normal product quality. These problems will directly lead to the inefficiency of missing detection and reduce the profits of manufacturers, which in turn will reduce the competitiveness of mask manufacturers' products, and may eventually be eliminated by the market. Therefore, the research and development of automatic defect detection device is imminent and urgent.
发明内容SUMMARY OF THE INVENTION
针对现有技术的不足,本发明提供了一种口罩缺陷检测装置及方法,解决目前口罩检测中通过人工检测效率低、成本高、质量品质得不到保障的技术问题。Aiming at the deficiencies of the prior art, the present invention provides a mask defect detection device and method, which solves the technical problems of low efficiency, high cost, and unguaranteed quality of the current mask detection through manual detection.
本发明通过以下技术方案予以实现:一种口罩缺陷检测装置,包括装置机柜,所述装置机柜上分别安装有:上料机构,提供待检测口罩;三段式皮带线输送机构,输送待检测口罩;图像采集机构,采集所述待检测口罩图像;图像处理软件,按照预设的口罩标准以及检测算法对所采集口罩图像进行判断并给出良品或不良品结果;剔除机构,对图像处理软件给出的不良品进行剔除;控制系统,用于电气连接所述上料机构、所述输送机构、所述图像采集机构、所述图像处理软件和所述剔除机构。The present invention is achieved through the following technical solutions: a mask defect detection device, comprising a device cabinet, and the device cabinet is respectively installed with: a feeding mechanism, which provides masks to be tested; a three-section belt line conveying mechanism, which transports masks to be tested The image acquisition mechanism collects the image of the mask to be detected; the image processing software judges the collected mask image according to the preset mask standard and detection algorithm and gives the result of good or bad product; the rejection mechanism provides the image processing software The defective products are rejected; the control system is used to electrically connect the feeding mechanism, the conveying mechanism, the image acquisition mechanism, the image processing software and the rejection mechanism.
优选的,所述图像采集机构包括:用于固定相机的支架;用于安装在所述支架上的、与所述图像处理软件通过电气连接的4K线阵相机;与所述 4K线阵相机接口匹配的、以及可微调光圈和焦距的定焦FA镜头;以及,与所述4K线阵相机通过电气连接的光电检测开关和编码器模块;其中两组所述4K线阵相机分别位于每相邻两段皮带的空隙处正下方和正上方。Preferably, the image acquisition mechanism includes: a bracket for fixing a camera; a 4K line scan camera installed on the bracket and electrically connected to the image processing software; an interface with the 4K line scan camera A matched fixed-focus FA lens with fine-tuning aperture and focal length; and a photoelectric detection switch and an encoder module electrically connected to the 4K line scan camera; wherein two groups of the 4K line scan cameras are located in each adjacent Just below and above the gap between the two belts.
优选的,所述图像采集机构还包括:四组高亮度线性光源;其中两组所述高亮度线性光源分别位于每相邻两段皮带的空隙处正上方和正下方,另外两组所述高亮度线性光源分别位于每相邻两段皮带的空隙处侧方 45°,即所述高亮度线性光源分别采用照射方向正对所述FA镜头的背光方式和与所述4K线阵相机中轴线成45°的正面打光方式;完成对所述待检测口罩打光。Preferably, the image acquisition mechanism further includes: four groups of high-brightness linear light sources; wherein two groups of the high-brightness linear light sources are located directly above and below the gap between each adjacent two belts, and the other two groups of the high-brightness linear light sources are located respectively. The linear light sources are located at 45° on the side of the gap between each two adjacent belts, that is, the high-brightness linear light sources are in the backlight mode with the irradiation direction facing the FA lens and 45° from the central axis of the 4K line scan camera. ° front lighting method; complete the lighting of the mask to be detected.
优选的,所述上料机构用于与上游的口罩生产输送线对接,接收上游的口罩生产输送线输送的待检测口罩。Preferably, the feeding mechanism is used for docking with the upstream mask production conveyor line to receive the masks to be tested conveyed by the upstream mask production conveyor line.
优选的,所述输送机构包括:第一输送皮带、第二输送皮带和第三输送皮带;以及用于驱动所述第一输送皮带、所述第二输送皮带和所述第三输送皮带运转的伺服电机;所述待检测口罩在所述第一输送皮带、所述第二输送皮带和所述第三输送皮带之间进行输送。Preferably, the conveying mechanism includes: a first conveying belt, a second conveying belt and a third conveying belt; and a belt for driving the first conveying belt, the second conveying belt and the third conveying belt to operate Servo motor; the mask to be tested is conveyed between the first conveying belt, the second conveying belt and the third conveying belt.
优选的,所述剔除机构包括:位于所述输送机构出料端的吹气气缸和位于所述吹气气缸的吹气喷嘴正下方的不良品收集箱。Preferably, the rejecting mechanism comprises: an air blowing cylinder located at the discharge end of the conveying mechanism and a defective product collection box located directly below the air blowing nozzle of the air blowing cylinder.
本发明还提供了如下技术方案:一种口罩缺陷检测方法,采用上述所述的一种口罩缺陷检测装置进行,所述检测方法的检测缺陷项目包括但不限于如下五类:口罩空袋/双胞胎口罩/半只,口罩褶皱,口罩膜接头,口罩耳带完整度检测以及口罩压耳带缺陷检测。The present invention also provides the following technical solutions: a mask defect detection method, which is carried out by using the above-mentioned mask defect detection device, and the detection defect items of the detection method include but are not limited to the following five categories: mask empty bag/twin Mask/half, mask folds, mask membrane joints, mask earband integrity detection and mask pressure earband defect detection.
优选的,所述检测方法包括如下步骤:Preferably, the detection method comprises the following steps:
S1、通过4K线阵相机采集待检测口罩的背景图像和采集待检测口罩图像,并将两幅图像进行作差,得到差值图像,记作Image_Sub;S1. Collect the background image of the mask to be detected and the mask image to be detected through a 4K line scan camera, and make a difference between the two images to obtain a difference image, which is recorded as Image_Sub;
S2、将差值图像Image_Sub从原始采集图像中裁剪出来,得到目标口罩区域图像Image_MaskRegion;S2. Crop the difference image Image_Sub from the original collected image to obtain the target mask area image Image_MaskRegion;
其中,口罩空袋/双胞胎口罩/半只、口罩褶皱两个检测项的检测方法的步骤包括:Among them, the steps of the detection method for the two detection items of mask empty bag/twin mask/half mask and mask fold include:
(a)对所述目标口罩区域图像Image_MaskRegion通过图像灰度化、图像二值化等预处理操作,并使用区域面积和几何形状特征筛选出待判定缺陷种类图像区域,记作ToJudgeRegion,并将上述待判定缺陷种类图像区域从原始采集图像中裁剪出来;(a) to the image of the target mask region Image_MaskRegion through image grayscale, image binarization and other preprocessing operations, and use the region area and geometric shape features to screen out the image region of the type of defect to be determined, denoted as ToJudgeRegion, and the above The image area of the defect type to be determined is cropped from the original captured image;
(b)对于所述待判定缺陷种类图像区域ToJudgeRegion,若所述区域面积和几何形状特征不符合口罩预先设定的特征范围,则直接判断为不良品,若所述区域面积和几何形状特征符合口罩预先设定的特征范围,则缓存该待判定缺陷种类图像,留作采用深度学习方式判断是否为高度重合的双胞胎口罩情形,规避高度重合的双胞胎口罩误判的风险;(b) For the image area ToJudgeRegion of the type of defect to be judged, if the area and geometrical features of the area do not meet the preset feature range of the mask, it is directly judged as a defective product, if the area and geometrical characteristics of the area meet The preset feature range of the mask, the image of the type of defect to be determined is cached, and reserved for the use of deep learning to determine whether it is a highly overlapping twin mask situation, to avoid the risk of misjudgment of highly overlapping twin masks;
S3、对于经上述步骤检测之后的缓存该待判定缺陷种类图像,检测口罩耳带完整度以及口罩压耳带缺陷时,由于口罩耳带相对于口罩本体的位置比较随意,传统的检测方法,会出现误判或者无法检测的情形,故考虑采用深度学习方式,进行口罩耳带完整度以及口罩压耳带缺陷检测。S3. For the cached image of the type of defect to be determined after the detection in the above steps, when detecting the integrity of the earband of the mask and the defect of the pressure earband of the mask, since the position of the earband of the mask relative to the mask body is relatively random, the traditional detection method will In case of misjudgment or undetectable situation, it is considered to use deep learning method to detect the integrity of mask earbands and the defects of mask earbands.
优选的,所述口罩膜接头检测项的检测方法的步骤具体包括:Preferably, the steps of the detection method of the mask membrane joint detection item specifically include:
(a)考虑到口罩膜接头的颜色特性,在完成上述检测项的基础上,在进行膜接头检测时,对所述目标口罩区域图像Image_MaskRegion,使用颜色空间转换算法,将所述采集图像从RGB空间转换成HSV空间,对经过通道分离的图像,使用S通道图像,将该通道图像进行图像二值化处理,使用区域面积和几何形状特征筛选出膜接头区域,记作MoJieTouRegion;(a) considering the color characteristics of the mask membrane joint, on the basis of completing the above-mentioned detection items, when carrying out the membrane joint detection, to the target mask region image Image_MaskRegion, use a color space conversion algorithm to convert the collected image from RGB Convert the space into HSV space, use the S channel image for the channel-separated image, perform image binarization processing on the channel image, and filter out the membrane junction area using the area area and geometric shape features, which is recorded as MoJieTouRegion;
(b)若从上述目标口罩区域中筛选出的膜接头区域MoJieTouRegion 非空,则检测结果判断为不良品,若从上述目标口罩区域中筛选出的膜接头区域MoJieTouRegion为空,则缓存该待判定缺陷种类图像,留作后续检测步骤使用。(b) if the membrane joint region MoJieTouRegion screened out from the above-mentioned target mask region is not empty, then the detection result is judged as a defective product, if the membrane joint region MoJieTouRegion screened out from the above-mentioned target mask region is empty, then cache this pending decision The image of the defect type is reserved for subsequent inspection steps.
优选的,使用深度学习方式进行口罩耳带完整度以及口罩压耳带缺陷检测项的检测方法的步骤具体包括:Preferably, the steps of using the deep learning method to detect the integrity of the mask earband and the detection method for the defect detection item of the mask pressure earband specifically include:
(a)分别采集耳带合格和不合格的口罩在各种光照强度和姿态下的大量图像,存放在OK和NG两个文件夹,作为深度学习方式分类模型的样本图片集;(a) Collect a large number of images of masks with qualified and unqualified ear straps under various light intensities and postures, and store them in the OK and NG folders as a sample image set of the deep learning classification model;
(b)使用经过预训练的二分类深度学习模型,设置模型训练的主要超参数,如batch_size和learning_rate,使用总的样本图片集的70%作为训练模型的训练图片集,对预训练模型进行训练;(b) Use the pre-trained binary deep learning model, set the main hyperparameters of model training, such as batch_size and learning_rate, use 70% of the total sample image set as the training image set of the training model, and train the pre-trained model ;
(c)使用总的样本图片集的20%作为训练模型的测试图片,对经过设置超参数训练模型进行测试。(c) Use 20% of the total sample image set as the test images for the trained model to test the model trained with hyperparameters.
(d)使用总的样本图片集的10%作为训练模型的验证图片,对经过设置超参数训练模型的分类效果进行验证。(d) Use 10% of the total sample image set as the verification image of the training model to verify the classification effect of the model trained by setting hyperparameters.
所述步骤(a)还包括以下处理步骤:Described step (a) also comprises the following processing steps:
搜集所述缓存的待判定缺陷种类图像,存放在NG文件夹,作为深度学习方式分类模型的样本图片集;使得整个检测方法可以兼容双胞胎口罩检测高度重合的双胞胎口罩情形。Collect the cached images of the types of defects to be determined, and store them in the NG folder as a sample image set for the deep learning classification model; so that the entire detection method can be compatible with twin masks to detect highly overlapping twin masks.
本发明的有益效果为:The beneficial effects of the present invention are:
本发明提供的一种口罩缺陷检测装置及方法,通过上料机构、输送机构实现自动送料,将待检测口罩输送至图像采集机构下方,图像采集机构采集待检测口罩图像传递至图像处理软件中,通过检测算法处理,处理信息反馈给电气控制系统,再通过电气控制系统来控制对不良品进行剔除,实现待检测口罩的自动检测。本发明的创新之处在于发明提供的检测装置搭配线阵相机方式完成口罩缺陷检测,并可以以模块化的方式快速灵活的部署,并且本发明提供的口罩缺陷检测方法使用传统BLOB检测方法和深度学习方式结合,完成所有待检测项的检测,检测方法的稳定性高,检测效率高,检测精度高,使得经过装置检测后的产品质量有保障。The invention provides a mask defect detection device and method, which realizes automatic feeding through a feeding mechanism and a conveying mechanism, and transports the mask to be detected under the image acquisition mechanism, and the image acquisition mechanism collects the image of the mask to be detected and transmits it to the image processing software. Through the detection algorithm processing, the processing information is fed back to the electrical control system, and then the electrical control system controls the rejection of defective products to realize the automatic detection of the masks to be detected. The innovation of the present invention lies in that the detection device provided by the present invention completes the mask defect detection by means of a line scan camera, and can be quickly and flexibly deployed in a modular manner, and the mask defect detection method provided by the present invention uses the traditional BLOB detection method and depth The combination of learning methods can complete the detection of all items to be detected. The detection method has high stability, high detection efficiency, and high detection accuracy, so that the product quality after the device detection is guaranteed.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.
图1为本发明实施例提供的口罩缺陷检测装置的结构示意图;Fig. 1 is the structural representation of the mask defect detection device provided in the embodiment of the present invention;
图2为本发明实施例提供的口罩检测方法整体流程图。Fig. 2 is the overall flow chart of the mask detection method provided by the embodiment of the present invention.
图中:1-上料机构;2-输送机构;21-第一输送皮带;22-第二输送皮带;23-第二输送皮带;3-图像采集机构;31-相机1;32-镜头1;33-光源 1;34-光源2;35-光源3;36-光源4;37-光电检测传感器;38-编码器模块;39-相机2;310-镜头2;4-剔除机构;41-不良品吹气喷嘴;42-不良品收集箱;5-图像处理软件;6-电气控制系统;7-待检测口罩。In the figure: 1-feeding mechanism; 2-conveying mechanism; 21-first conveyor belt; 22-second conveyor belt; 23-second conveyor belt; 3-image acquisition mechanism; 31-camera 1; 32-lens 1 33-light source 1; 34-
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, 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 These are some embodiments of the present invention, but not all 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:Example 1:
请参阅图1-2所示:本发明提供的一种口罩缺陷检测装置,包括:装置机柜(图中未示出);上料机构1,提供待检测口罩;三段式皮带线输送机构2,输送待检测口罩;图像采集机构3,采集所述待检测口罩图像;图像处理软件5,按照预设的口罩标准以及检测算法对所采集口罩图像进行判断并给出良品或不良品结果;剔除机构4,对图像处理软件给出的不良品进行剔除;以及连接所述上料机构1、输送机构2、图像采集机构3、图像处理软件5、剔除机构4的电气控制系统6。Please refer to Figures 1-2: a mask defect detection device provided by the present invention includes: a device cabinet (not shown in the figure); a feeding mechanism 1, which provides masks to be tested; a three-section belt
装置机柜作为装置承载主体,上料机构1与上游的口罩生产输送机构对接,接收上游的口罩生产输送机构输送的待检测口罩,输送机构2采用安装于机柜上的三段皮带线输送方式,三段皮带线21、22、23的控制采用同步带方式,控制三段皮带线的伺服电机的三相端子由一个控制器控制,并严格控制皮带线安装的水平度,实现最佳的传送效果,使得待检口罩克可以平稳的传送;图像采集机构3用于采集待检测口罩7图像并将采集图像传递给图像处理软件5,图像处理软件5安装于装置配备的计算机中,图像处理软件中的检测算法对采集图像进行检测,输出待检口罩是良品还是不良品结果。并将检测结果传递给电气控制机构6,电气控制机构6控制剔除机构4中的吹气喷嘴41将不良品进行剔除,并将剔除不良品口罩存放于不良品收集箱42中。The device cabinet acts as the main body of the device, and the feeding mechanism 1 is connected to the upstream mask production and conveying mechanism to receive the masks to be tested conveyed by the upstream mask production and conveying mechanism. The control of the
具体的,在本实施例中,图像采集机构3包括:通过固定支架安装于装置机柜上的4K线阵相机31和310,以及,与31和310相连接的FA镜头32和39,以及分别为光源照射方向正对FA镜头的背光方式的高亮线光源34和35和以及相机中轴线成45°的正面打光方式的高亮线光源33和 36。此外,图像采集机构配备有光电检测开关37和编码器模块38,用于控制图像采集的时序,实现完整口罩图像的采集。本发明提供的检测装置所图像采集机构共两套,分别安装于所述三段皮带线两两皮带线空隙处,用于灵活的完成多种类型口罩多面缺陷的检测。Specifically, in this embodiment, the
此外,本发明还提供了一种口罩缺陷检测方法,检测方法的检测缺陷项目包括但不限于如下五类:口罩空袋/双胞胎口罩/半只,口罩褶皱,口罩膜接头,口罩耳带完整度检测以及口罩压耳带缺陷检测,检测算法具体流程如图2所示,检测算法具体步骤如下:In addition, the present invention also provides a method for detecting defects of masks. The detection defect items of the detection method include but are not limited to the following five categories: empty mask bags/twin masks/half masks, mask folds, mask membrane joints, mask earband integrity Detection and mask pressure earband defect detection, the specific process of the detection algorithm is shown in Figure 2, and the specific steps of the detection algorithm are as follows:
S1、通过与图像处理软件相连的相机采集待检测口罩的背景图像和采集所述待检测口罩图像,并将所述两幅图像进行作差,得到差值图像,记作 Image_Sub;S1, collect the background image of the mask to be detected by the camera that is connected to the image processing software and collect the mask image to be detected, and make a difference between the two images, obtain the difference image, and denote it as Image_Sub;
S2、将所述差值图像Image_Sub从原始采集图像中裁剪出来,得到目标口罩区域图像Image_MaskRegion;S2, the difference image Image_Sub is cut out from the original collection image, and the target mask area image Image_MaskRegion is obtained;
口罩空袋/双胞胎口罩/半只、口罩褶皱两个检测项的检测方法的步骤包括:The steps of the detection method for the two detection items of mask empty bag/twin mask/half mask and mask fold include:
S3、对所述目标口罩区域图像Image_MaskRegion通过图像灰度化、图像二值化等预处理操作,并使用区域面积和几何形状特征筛选出待判定缺陷种类图像区域记作ToJudgeRegion,并将上述待判定缺陷种类图像区域从原始采集图像中裁剪出来;S3, perform preprocessing operations such as image grayscale, image binarization, etc. on the target mask region image Image_MaskRegion, and use the region area and geometric shape features to screen out the image region of the type of defect to be judged and record it as ToJudgeRegion, and the above to be judged The defect type image area is cropped from the original acquired image;
S4、对于所述待判定缺陷种类图像区域ToJudgeRegion,若所述区域面积和几何形状特征不符合口罩预先设定的特征范围,则直接判断为不良品,若所述区域面积和几何形状特征符合口罩预先设定的特征范围,则缓存该待判定缺陷种类图像,留作采用深度学习方式判断是否为高度重合的双胞胎口罩情形,规避高度重合的双胞胎口罩误判的风险;S4. For the image area ToJudgeRegion of the type of defect to be determined, if the area and geometric features of the area do not meet the preset feature range of the mask, it is directly judged as a defective product, if the area and geometric features of the area conform to the mask. For the preset feature range, the image of the type of defect to be determined is cached and reserved for the use of deep learning to determine whether it is a situation of highly overlapping twin masks, so as to avoid the risk of misjudgment of highly overlapping twin masks;
口罩膜接头检测项的检测方法的步骤包括:The steps of the detection method of the mask membrane joint detection item include:
S5、考虑到口罩膜接头的颜色特性,在完成上述检测项的基础上,在进行膜接头检测时,对所述目标口罩区域图像Image_MaskRegion,使用颜色空间转换算法,将所述采集图像从RGB空间转换成HSV空间,对经过通道分离的图像,使用S通道图像,将该通道图像进行图像二值化处理,使用区域面积和几何形状特征筛选出膜接头区域,记作MoJieTouRegion;S5, taking into account the color characteristics of the mask membrane joint, on the basis of completing the above detection items, when performing membrane joint detection, use a color space conversion algorithm for the target mask region image Image_MaskRegion to convert the collected image from the RGB space. Convert it into HSV space, use the S channel image for the channel-separated image, perform image binarization processing on the channel image, and filter out the membrane junction area using the area area and geometric shape features, which is recorded as MoJieTouRegion;
S6、若从上述目标口罩区域中筛选出的膜接头区域MoJieTouRegion非空,则检测结果判断为不良品,若从上述目标口罩区域中筛选出的膜接头区域MoJieTouRegion为空,则缓存该待判定缺陷种类图像,留作后续检测步骤使用;S6. If the membrane joint region MoJieTouRegion screened from the above-mentioned target mask region is not empty, the detection result is judged as a defective product, and if the membrane joint region MoJieTouRegion screened out from the above-mentioned target mask region is empty, then cache the to-be-determined defect Type images, reserved for subsequent detection steps;
S7、对于经上述步骤检测之后的缓存该待判定缺陷种类图像,检测口罩耳带完整度以及口罩压耳带缺陷时,由于口罩耳带相对于口罩本体的位置比较随意,传统的检测方法,会出现误判或者无法检测的情形,故考虑采用深度学习方式,进行口罩耳带完整度以及口罩压耳带缺陷检测;S7. For the cached image of the type of defect to be determined after the detection in the above steps, when detecting the integrity of the earband of the mask and the defect of the pressure earband of the mask, because the position of the earband of the mask relative to the mask body is relatively random, the traditional detection method will In case of misjudgment or undetectable situation, consider using deep learning method to detect the integrity of mask earbands and the defects of mask earbands;
使用深度学习方式进行口罩耳带完整度以及口罩压耳带缺陷检测主要步骤包括;The main steps of using the deep learning method to detect the integrity of the mask earbands and the defects of the mask earbands include;
S8、分别采集耳带合格和不合格的口罩在各种光照强度和姿态下的大量图像,存放在OK和NG两个文件夹,作为深度学习方式分类模型的样本图片集;S8. Collect a large number of images of qualified and unqualified masks with ear straps under various light intensities and postures, and store them in the OK and NG folders as sample image sets for the deep learning classification model;
S9、使用经过预训练的二分类深度学习模型,设置模型训练的主要超参数,如batch_size和learning_rate,使用总的样本图片集的70%作为训练模型的训练图片集,对预训练模型进行训练;S9. Use the pre-trained two-class deep learning model, set the main hyperparameters of model training, such as batch_size and learning_rate, and use 70% of the total sample image set as the training image set of the training model to train the pre-training model;
S10、使用总的样本图片集的20%作为训练模型的测试图片,对经过设置超参数训练模型进行测试。S10. Use 20% of the total sample image set as the test image of the training model, and test the model trained by setting the hyperparameters.
S11、使用总的样本图片集的10%作为训练模型的验证图片,对经过设置超参数训练模型的分类效果进行验证。S11. Use 10% of the total sample image set as a verification image of the training model, and verify the classification effect of the model trained by setting hyperparameters.
所述步骤S8还包括以下处理步骤:The step S8 also includes the following processing steps:
S81、搜集所述缓存的待判定缺陷种类图像,存放在NG文件夹,作为深度学习方式分类模型的样本图片集;使得整个检测方法可以兼容双胞胎口罩检测高度重合的双胞胎口罩情形。S81. Collect the cached images of the types of defects to be determined, and store them in the NG folder as a sample image set of the deep learning classification model; so that the entire detection method can be compatible with twin masks to detect highly overlapping twin masks.
以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。The above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The recorded technical solutions are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210188343.XA CN114527075B (en) | 2022-02-28 | 2022-02-28 | A mask defect detection device and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210188343.XA CN114527075B (en) | 2022-02-28 | 2022-02-28 | A mask defect detection device and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114527075A true CN114527075A (en) | 2022-05-24 |
CN114527075B CN114527075B (en) | 2025-01-24 |
Family
ID=81624094
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210188343.XA Active CN114527075B (en) | 2022-02-28 | 2022-02-28 | A mask defect detection device and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114527075B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115078388A (en) * | 2022-06-24 | 2022-09-20 | 中科芯集成电路有限公司 | N95 mask defect detection method based on traditional machine vision |
CN115587999A (en) * | 2022-10-27 | 2023-01-10 | 中科芯集成电路有限公司 | A detection method for dirty, damaged and wrinkled N95 mask surface based on deep learning |
CN115753788A (en) * | 2022-11-09 | 2023-03-07 | 中科芯集成电路有限公司 | Medical mask defect detection device and method based on computer vision |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105044122A (en) * | 2015-08-25 | 2015-11-11 | 安徽工业大学 | Copper part surface defect visual inspection system and inspection method based on semi-supervised learning model |
CN207119565U (en) * | 2017-07-12 | 2018-03-20 | 浙江双元科技开发有限公司 | Mouth mask flaw defect detecting device |
CN207238542U (en) * | 2017-08-09 | 2018-04-17 | 中国计量大学 | A kind of thin bamboo strip defect on-line detecting system based on machine vision |
CN108830272A (en) * | 2018-08-03 | 2018-11-16 | 中国农业大学 | Potato image collecting device and bud eye based on RGB-D camera identify and position method |
CN109374635A (en) * | 2018-11-20 | 2019-02-22 | 深圳市维图视技术有限公司 | A kind of mask defect detecting device and method |
CN111721782A (en) * | 2020-06-28 | 2020-09-29 | 苏州天准科技股份有限公司 | Optical detection device |
CN111768404A (en) * | 2020-07-08 | 2020-10-13 | 北京滴普科技有限公司 | Mask appearance defect detection system, method, device and storage medium |
CN113066056A (en) * | 2021-03-15 | 2021-07-02 | 南昌大学 | A deep learning-based detection method for welding spot of mask earband |
CN113221889A (en) * | 2021-05-25 | 2021-08-06 | 中科芯集成电路有限公司 | Anti-interference recognition method and device for chip characters |
CN113283405A (en) * | 2021-07-22 | 2021-08-20 | 第六镜科技(北京)有限公司 | Mask detection method and device, computer equipment and storage medium |
KR102314997B1 (en) * | 2021-05-20 | 2021-10-20 | (주)네온테크 | Mask manufacturing device capable of automatically inspecting mold compression condition of mask earband and inspection method for the same |
-
2022
- 2022-02-28 CN CN202210188343.XA patent/CN114527075B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105044122A (en) * | 2015-08-25 | 2015-11-11 | 安徽工业大学 | Copper part surface defect visual inspection system and inspection method based on semi-supervised learning model |
CN207119565U (en) * | 2017-07-12 | 2018-03-20 | 浙江双元科技开发有限公司 | Mouth mask flaw defect detecting device |
CN207238542U (en) * | 2017-08-09 | 2018-04-17 | 中国计量大学 | A kind of thin bamboo strip defect on-line detecting system based on machine vision |
CN108830272A (en) * | 2018-08-03 | 2018-11-16 | 中国农业大学 | Potato image collecting device and bud eye based on RGB-D camera identify and position method |
CN109374635A (en) * | 2018-11-20 | 2019-02-22 | 深圳市维图视技术有限公司 | A kind of mask defect detecting device and method |
CN111721782A (en) * | 2020-06-28 | 2020-09-29 | 苏州天准科技股份有限公司 | Optical detection device |
CN111768404A (en) * | 2020-07-08 | 2020-10-13 | 北京滴普科技有限公司 | Mask appearance defect detection system, method, device and storage medium |
CN113066056A (en) * | 2021-03-15 | 2021-07-02 | 南昌大学 | A deep learning-based detection method for welding spot of mask earband |
KR102314997B1 (en) * | 2021-05-20 | 2021-10-20 | (주)네온테크 | Mask manufacturing device capable of automatically inspecting mold compression condition of mask earband and inspection method for the same |
CN113221889A (en) * | 2021-05-25 | 2021-08-06 | 中科芯集成电路有限公司 | Anti-interference recognition method and device for chip characters |
CN113283405A (en) * | 2021-07-22 | 2021-08-20 | 第六镜科技(北京)有限公司 | Mask detection method and device, computer equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
孙学宏 等: "机器视觉技术及应用", 31 October 2021, 机械工业出版社, pages: 43 - 48 * |
李琼砚 等: "智能制造概论", 30 April 2021, 机械工业出版社, pages: 182 - 187 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115078388A (en) * | 2022-06-24 | 2022-09-20 | 中科芯集成电路有限公司 | N95 mask defect detection method based on traditional machine vision |
CN115587999A (en) * | 2022-10-27 | 2023-01-10 | 中科芯集成电路有限公司 | A detection method for dirty, damaged and wrinkled N95 mask surface based on deep learning |
CN115753788A (en) * | 2022-11-09 | 2023-03-07 | 中科芯集成电路有限公司 | Medical mask defect detection device and method based on computer vision |
CN115753788B (en) * | 2022-11-09 | 2025-01-24 | 中科芯集成电路有限公司 | A medical mask defect detection device and method based on computer vision |
Also Published As
Publication number | Publication date |
---|---|
CN114527075B (en) | 2025-01-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114527075A (en) | Mask defect detection device and method | |
CN109374635B (en) | Mask defect detection device and method | |
CN101349550B (en) | Online Rubber Bolt Shape Quality Inspection Machine | |
CN207057050U (en) | A kind of micro parts Appearance quality defect optical detection apparatus | |
CN103170459B (en) | Spectacle lens flaw detection system | |
CN110246122A (en) | Small size bearing quality determining method, apparatus and system based on machine vision | |
CN201218723Y (en) | Optoelectronic non-contact type image detection apparatus | |
CN102305793A (en) | Method and equipment for detecting appearance quality of product | |
CN207036727U (en) | Medicine bottle open defect on-line detecting system | |
KR200462977Y1 (en) | Inspecting apparatus for fixing member | |
WO2020103310A1 (en) | Mask defect detection device and method | |
CN205436353U (en) | Bearing sorting machine | |
CN103257144A (en) | Plastic bottleneck excess material detecting method and device based on machine vision | |
CN114018947B (en) | A device for detecting defects on the outer surface of highly reflective plastic bottle caps | |
CN102141379A (en) | Novel glass bottle and jar detection device | |
CN201707305U (en) | Inspection system for inspecting quality of container caps | |
CN203245133U (en) | Lens defect detecting system | |
CN110481847B (en) | Inner frame paper detection system and method of cigarette packaging machine | |
WO2024109669A1 (en) | Method for detecting material placement condition in packaging case | |
CN111000286A (en) | Anti-interference cigarette appearance quality online detection device and method | |
CN212220754U (en) | A cigarette rod anti-white detection system for packaging machine | |
CN109675821A (en) | A kind of tablet mass automatic packaging equipment | |
CN107931159B (en) | A kind of plastic containers automatic checkout system of view-based access control model | |
CN108152293A (en) | A kind of plastic containers on-line detecting system and detection method | |
CN108132255B (en) | A plastic container inspection system with self-correction function |
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 |