WO2021232611A1 - 酒瓶表面缺陷模型的评价方法、电子装置及存储介质 - Google Patents

酒瓶表面缺陷模型的评价方法、电子装置及存储介质 Download PDF

Info

Publication number
WO2021232611A1
WO2021232611A1 PCT/CN2020/112549 CN2020112549W WO2021232611A1 WO 2021232611 A1 WO2021232611 A1 WO 2021232611A1 CN 2020112549 W CN2020112549 W CN 2020112549W WO 2021232611 A1 WO2021232611 A1 WO 2021232611A1
Authority
WO
WIPO (PCT)
Prior art keywords
surface defect
wine bottle
model
value
evaluated
Prior art date
Application number
PCT/CN2020/112549
Other languages
English (en)
French (fr)
Inventor
邓辅秦
黄永深
黄杰文
冯华
李伟科
Original Assignee
五邑大学
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 五邑大学 filed Critical 五邑大学
Publication of WO2021232611A1 publication Critical patent/WO2021232611A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8854Grading and classifying of flaws
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection

Definitions

  • the invention relates to the technical field of wine bottle surface defect detection, in particular to an evaluation method, electronic device and storage medium of a wine bottle surface defect model.
  • the present invention aims to solve at least one of the technical problems existing in the prior art. For this reason, the present invention proposes an evaluation method of a wine bottle surface defect model, which can accurately and intuitively evaluate the convolutional neural network for detecting the surface defect of the wine bottle.
  • the invention also provides an electronic device with the above-mentioned method for evaluating the surface defect model of the wine bottle.
  • the present invention also provides a computer-readable storage medium having the above-mentioned evaluation method of the wine bottle surface defect model.
  • the training data set to the model to be evaluated to obtain surface defect information representing the surface defect corresponding to the surface picture of the wine bottle.
  • the surface defect information of the surface picture of the wine bottle includes category information and a detection rectangle.
  • the category information indicates the category of the surface defect, and the detection rectangular frame indicates the position of the surface defect;
  • the method for evaluating the surface defect model of a wine bottle has at least the following beneficial effects: first, the collected surface image of the wine bottle is input into the model to be evaluated, and then the model to be evaluated detects the image of the surface of the wine bottle and uses a detection rectangle. Frame the surface defects in the image of the wine bottle surface, identify the types of surface defects, output the category information of the surface defects and the detection rectangle, and finally calculate the model to be evaluated based on the detection rectangle and category information output by the model to be evaluated Scoring, so the scoring value allows users to more intuitively and accurately understand the ability of the currently trained model to be evaluated to detect surface defects of bottled wine bottles.
  • the evaluating the model to be evaluated according to the surface defect information includes the following steps:
  • the score of the model to be evaluated is calculated according to the average accuracy AP value and the weight value of the surface defect.
  • the following formula is used to calculate the IoU threshold according to the preset labeled rectangle:
  • IoU t is the IoU threshold
  • m is the preset number of pixels on the short side of the marked rectangular frame.
  • the calculation of the score of the model to be evaluated according to the average accuracy AP value and the weight value of the surface defect adopts the following formula:
  • score is the score
  • i is the category subscript value of the surface defect
  • c is the total category number corresponding to the training data set
  • k i is the weight value of the surface defect of the i-th type
  • AP i is the average accuracy AP value of the i-th type of surface defect.
  • the image of the surface of the wine bottle includes at least one of the surface defects.
  • An electronic device includes: a memory, a processor, and a computer program stored on the memory and capable of being run on the processor, and the processor executes the program as the present invention
  • an electronic device executes the method for evaluating a wine bottle surface defect model according to any one of the first aspect of the present invention, it has all the beneficial effects of the first aspect of the present invention.
  • a computer-readable storage medium stores computer-executable instructions for executing the wine bottle surface defect model according to any one of the first aspects of the present invention The evaluation method.
  • the computer-readable storage medium of the embodiment of the present invention stores computer-executable instructions for executing the method for evaluating the surface defect model of a wine bottle according to any one of the first aspects of the present invention, it has the first aspect of the present invention. All the beneficial effects.
  • Fig. 1 is a flowchart of a method for evaluating a wine bottle surface defect model according to an embodiment of the present invention
  • FIG. 2 is a flowchart of the step of evaluating the model to be evaluated based on the surface defect information in the method for evaluating the surface defect model of a wine bottle according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
  • the electronic device 100 the processor 101, and the memory 102.
  • the invention provides an evaluation method, an electronic device and a storage medium for a wine bottle surface defect model.
  • a data set to be trained includes a plurality of wine bottle surface images to be trained, and each image contains at least one surface defect.
  • the image is input to the convolution After the neural network, the convolutional neural network detects the position of the surface defect in the picture and uses the detection rectangle to frame the surface defect.
  • the picture also includes the surface defect that was artificially framed by the marked rectangle in advance, and the marked rectangle represents the actual location of the surface defect. Then calculate the IoU threshold according to the size of the short-side pixels of the labeled rectangular box, so as to use different IoU thresholds according to different sizes of surface defects, and calculate the IoU value of the detection rectangular box and the labeled rectangular box.
  • the IoU value is greater than the IoU threshold, it is considered to be detected If it succeeds, it is judged as a positive example. If it is less than the IoU threshold, it is a negative example. Then, by counting the number of positive examples of each type of surface defect, the average accuracy AP value of the type of surface defect of the model to be evaluated is calculated, and finally according to each The average accuracy AP value of this type of surface defect and the weight value of this type of surface defect get the score of the model to be evaluated.
  • the score intuitively and accurately shows the ability of the currently trained model to be evaluated to detect the surface defects of bottled wine bottles, so that users can understand
  • the current models to be evaluated have better detection capabilities for which surface defects and poor detection capabilities for which surface defects, providing users with directions and ideas for further improving the models to be evaluated.
  • an electronic device 100 provided by an embodiment of the first aspect of the present invention includes a memory 102 and a processor 101.
  • a processor 101 and a memory 102 are taken as an example.
  • the processor and the memory may be connected through a bus or in other ways.
  • the connection through a bus is taken as an example.
  • the memory 102 can be used to store non-transitory software programs and non-transitory computer-executable programs.
  • the memory 102 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices.
  • the memory 102 may optionally include a memory 102 remotely provided with respect to the processor, and these remote memories may be connected to the electronic device 100 via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • FIG. 3 does not constitute a limitation on the electronic device 100, and may include more or fewer components than shown, or a combination of certain components, or different component arrangements.
  • the processor 101 in the electronic device 100 can be used to call the evaluation method of the wine bottle surface defect model stored in the memory 102, and execute the following step:
  • the surface defect information of the surface image of the wine bottle includes category information and a detection rectangle.
  • the category information represents the category of the surface defect
  • the detection rectangle represents the location of the surface defect
  • FIG. 1 it is the evaluation method of the wine bottle surface defect model according to the embodiment of the second aspect of the present invention, including:
  • the surface defect information of the surface image of the wine bottle includes category information and a detection rectangle.
  • the category information represents the category of the surface defect
  • the detection rectangle represents the location of the surface defect
  • the data set to be trained includes ten types of surface defects, which are broken caps, deformed caps, broken sides of caps, swirling caps, broken points of caps, skewed labels, and wrinkled labels.
  • the model to be evaluated detects the surface picture of the wine bottle, and uses the inspection rectangle to frame the surface defects in the picture of the wine bottle surface
  • the type of surface defect is recognized, and the category information indicating the type of surface defect is output.
  • the score of the model to be evaluated is calculated according to the detection rectangle and category information output by the model to be evaluated, so that the user can intuitively based on the final score value , Accurately know the detection ability of the current model to be evaluated.
  • step S130 evaluating the model to be evaluated according to the surface defect information includes the following steps:
  • S132 Calculate the IoU value according to the detection rectangular frame and the preset labeled rectangular frame
  • S134 Calculate the score of the model to be evaluated according to the average accuracy AP value and the weight value of the surface defect.
  • the marked rectangle represents the actual location of the surface defect.
  • the model to be evaluated calculates different values according to each marked rectangle. IoU threshold, so that different IoU thresholds are set for each surface defect, which can reduce the impact of the two common methods of fixed IoU threshold and fixed IoU threshold for defect categories on the accuracy of model detection, thereby improving the accuracy of evaluation of the model to be evaluated;
  • the IoU value calculates the IoU value according to the detection rectangle and the label rectangle, and calculate the average accuracy AP value according to the IoU value and the IoU threshold. If the IoU value is greater than the IoU threshold, the detection is considered successful and judged as a positive example. If the IoU value is less than IoU The threshold is considered to be a failure of detection and judged as a negative example, and then by counting the number of positive examples of each type of surface defect, the average accuracy AP value of the type of surface defect of the model to be evaluated is calculated;
  • the convolutional neural network score is obtained according to the average accuracy AP value of each type of surface defect and the weight value of this type of surface defect.
  • the weight value of each type of surface defect is determined by the company’s tolerance for each type of surface defect. Instead of simply using a summation and average method for calculation, the final evaluation score of this embodiment is more accurate, intuitive, and more in line with the needs of real enterprises.
  • the weight value of each type of surface defect is shown in Table 1.
  • Table 1 The weight value of each type of bottled wine bottle surface defect
  • step S131 the following formula is used to calculate the IoU threshold according to the preset labeled rectangle in step S131:
  • IoU t is the IoU threshold
  • m is the preset number of pixels on the short side of the marked rectangular frame
  • the IoU threshold is calculated according to the size of the surface defect, and is fixed with the fixed IoU threshold or each type of surface defect.
  • this embodiment adopts a different IoU threshold for the size of each surface defect, so that the average accuracy AP value calculated subsequently is more accurate.
  • step S134 calculates the score of the model to be evaluated according to the average accuracy AP value and the weight value of the surface defect using the following formula:
  • score is the score
  • i is the type subscript value of the surface defect
  • c is the total number of categories corresponding to the training data set
  • k i is the weight value of the i-th type of surface defect
  • AP i is the average accuracy of the i-th type of surface defect AP is the value
  • the weight of each type of surface defects such as weight value k i
  • the final score value of the combined weight of the weighted average value of each type of defect accuracy values and the AP such surface defects are shown in table 1, so that more accurate numerical score , Which is more in line with the actual requirements of the enterprise, and the score value enables users to intuitively understand the detection ability of the currently trained model to be evaluated.
  • AP i users can also understand the detection ability of the model to be evaluated for a certain type of surface defect.
  • the image of the surface of the wine bottle contains at least one surface defect. If there are a large number of normal images in the training data set, there is no information on the surface defect of the bottled wine bottle that needs to be detected in the normal image, which does not help the training of the model. At the same time, the defective pictures also contain the characteristics of normal pictures. Therefore, if there are a large number of normal pictures in the training data set, the detection accuracy of the model to be evaluated will be unnecessarily reduced, and its score will also be reduced. However, this score is due to The training data set is not sufficient, so this score is not helpful to the improvement of the model to be evaluated. Therefore, in order to improve the evaluation accuracy of the final score on the model, the image in the training data set contains at least one surface defect feature.
  • the computer-readable storage medium of the embodiment of the third aspect of the present invention stores computer-executable instructions, and the computer-executable instructions are used to execute the evaluation method of the wine bottle surface defect model as described in the embodiment of the second aspect.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Biophysics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Biology (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Signal Processing (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)

Abstract

一种酒瓶表面缺陷模型的评价方法,并公开了具有酒瓶表面缺陷模型的评价方法的电子装置和计算机可读存储介质,其中酒瓶表面缺陷模型的评价方法包括:基于所获取到的酒瓶表面图片得到训练数据集(S110);将训练数据集输入到待评价模型,以获得表示酒瓶表面图片对应的表面缺陷的表面缺陷信息,酒瓶表面图片的表面缺陷信息包括类别信息和检测矩形框,类别信息表示表面缺陷的类别,检测矩形框表示表面缺陷的位置(S120);根据表面缺陷信息评价待评价模型(S130)。能够对检测酒瓶表面缺陷的卷积神经网络进行准确并直观的评价。

Description

酒瓶表面缺陷模型的评价方法、电子装置及存储介质 技术领域
本发明涉及酒瓶表面缺陷检测技术领域,特别涉及一种酒瓶表面缺陷模型的评价方法、电子装置及存储介质。
背景技术
在瓶装酒瓶的工业生产过程中会受到原材料质量、酒瓶图纸设计方案、加工工艺(灌装)以及机床设备质量、生产环境等因素的影响,最终形成的瓶装酒中可能存在各类表面缺陷而影响到整体的产品质量,当今消费者对工业产品的要求在不断提高,消费者的消费欲望并不再局限于产品的质量好坏,还对产品的外观、视觉效果也有着额外的需求,故针对酿酒行业而言,瓶装酒瓶表面缺陷的质检工作将显得尤为重要,提高瓶装酒瓶表面缺陷的质检能力能在一定程度上影响瓶装酒的销售前景。
而使用卷积神经网络模型对酒瓶表面缺陷进行检测前,需要对卷积神经网络模型进行训练,训练过程中需要配合针对酒瓶表面缺陷检测的卷积神经网络模型的评价方法,如今存在各种各样的针对卷积神经网络模型的评价方法,但尚未出现用于检测酒瓶表面缺陷的卷积神经网络模型的直观评价方法。
发明内容
本发明旨在至少解决现有技术中存在的技术问题之一。为此,本发明提出一种酒瓶表面缺陷模型的评价方法,能够对检测酒瓶表面缺陷的卷积神经网络进行准确并直观的评价。
本发明还提出一种具有上述酒瓶表面缺陷模型的评价方法的电子装置。
本发明还提出一种具有上述酒瓶表面缺陷模型的评价方法的计算机可读存储介质。
根据本发明的第一方面实施例的酒瓶表面缺陷模型的评价方法,包括:
基于所获取到的酒瓶表面图片得到训练数据集;
将所述训练数据集输入到待评价模型,以获得表示所述酒瓶表面图片对应的表面缺陷的表面缺陷信息,所述酒瓶表面图片的表面缺陷信息包括类别信息和检 测矩形框,所述类别信息表示所述表面缺陷的类别,所述检测矩形框表示所述表面缺陷的位置;
根据所述表面缺陷信息评价所述待评价模型。
根据本发明实施例的酒瓶表面缺陷模型的评价方法,至少具有如下有益效果:首先,将收集到的酒瓶表面图片输入待评价模型,然后,待评价模型检测酒瓶表面图片,并用检测矩形框框出酒瓶表面图片中的表面缺陷,同时识别出表面缺陷的种类,输出表面缺陷的类别信息和检测矩形框,最后根据待评价模型输出的检测矩形框和类别信息,计算得到待评价模型的评分,因此评分数值使用户更加直观、准确地了解当前训练的待评价模型对瓶装酒瓶表面缺陷的检测能力。
根据本发明的一些实施例,所述根据所述表面缺陷信息评价所述待评价模型包括以下步骤:
根据预设的标注矩形框计算IoU阈值;
根据所述检测矩形框与预设的所述标注矩形框计算IoU值;
根据所述IoU值和所述IoU阈值计算平均准确度AP值;
根据所述平均准确度AP值和所述表面缺陷的权重数值计算所述待评价模型的评分。
根据本发明的一些实施例,所述根据预设的标注矩形框计算IoU阈值采用如下公式:
Figure PCTCN2020112549-appb-000001
其中,IoU t为所述IoU阈值,m为预设的所述标注矩形框的短边的像素个数。
根据本发明的一些实施例,所述根据所述平均准确度AP值和所述表面缺陷的权重数值计算所述待评价模型的评分采用如下公式:
Figure PCTCN2020112549-appb-000002
其中,score为所述评分,i为所述表面缺陷的类别下标数值,c为所述训练数据集对应的总类别数,k i为第i类所述表面缺陷的所述权重数值,AP i为第i 类所述表面缺陷的所述平均准确度AP值。
根据本发明的一些实施例,所述酒瓶表面图片包含至少一个所述表面缺陷。
根据本发明的第二方面实施例的电子装置,包括:存储器、处理器及存储在所述存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如本发明第一方面中任一项所述的酒瓶表面缺陷模型的评价方法。
由于本发明实施例的一种电子装置执行如本发明第一方面中任一项所述的酒瓶表面缺陷模型的评价方法,因此具有本发明第一方面的所有有益效果。
根据本发明的第三方面实施例的计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行如本发明第一方面中任一项所述的酒瓶表面缺陷模型的评价方法。
由于本发明实施例的计算机可读存储介质上存储有用于执行如本发明第一方面中任一项所述的酒瓶表面缺陷模型的评价方法的计算机可执行指令,因此具有本发明第一方面的所有有益效果。
本发明的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。
附图说明
本发明的上述和/或附加的方面和优点从结合下面附图对实施例的描述中将变得明显和容易理解,其中:
图1为本发明实施例的酒瓶表面缺陷模型的评价方法的流程图;
图2为本发明实施例的酒瓶表面缺陷模型的评价方法的根据表面缺陷信息评价待评价模型这一步骤的流程图;
图3为本发明实施例提供的一种电子装置的结构示意图。
附图标记:
电子装置100、处理器101、存储器102。
具体实施方式
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本实用新型,而不能理解为对本实用新型的限制。
在本发明的描述中,大于、小于等理解为不包括本数。
本发明的描述中,除非另有明确的限定,设置、安装、连接等词语应做广义理解,所属技术领域技术人员可以结合技术方案的具体内容合理确定上述词语在本发明中的具体含义。
本发明提供了一种酒瓶表面缺陷模型的评价方法、电子装置及存储介质,待训练数据集包括多个待训练的酒瓶表面图片,每张图片包含至少一个表面缺陷,将图片输入卷积神经网络后,卷积神经网络检测图片中表面缺陷的位置并用检测矩形框将表面缺陷框出来,图片中还包括人为事先用标注矩形框框出的表面缺陷,标注矩形框表示表面缺陷的实际位置,然后根据标注矩形框的短边像素大小计算IoU阈值,从而根据不同大小的表面缺陷使用不同的IoU阈值,并计算检测矩形框与标注矩形框的IoU值,若IoU值大于IoU阈值时则认为检测成功,判断为正例,若小于IoU阈值则为负例,然后通过统计每一类表面缺陷的正例数量,计算得到待评价模型对该类表面缺陷的平均准确度AP值,最后根据每一类表面缺陷的平均准确度AP值和该类表面缺陷的权重数值得到待评价模型的评分,评分直观且准确的显示了当前训练的待评价模型对瓶装酒瓶表面缺陷的检测能力,使用户了解当前的待评价模型对哪一种表面缺陷的检测能力较好,对哪一种表面缺陷的检测能力较差,给用户提供了进一步改进待评价模型的方向和思路。
参照图3,为本发明第一方面实施例提供的一种电子装置100,包括存储器102、处理器101,图3中以一个处理器101和一个存储器102为例。
处理器和存储器可以通过总线或者其他方式连接,图3中以通过总线连接为例。
存储器102作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器102可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器102可选包括相对于处理器远程设置的存储器102,这些远程存储器可以通过网络连接至该电子装置100。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
本领域技术人员可以理解,图3中示出的装置结构并不构成对电子装置100的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部 件布置。
参照图1和图3所示,在本发明第一方面实施例的电子装置中,电子装置100中处理器101可以用于调用存储器102中存储的酒瓶表面缺陷模型的评价方法,并执行以下步骤:
S110、基于所获取到的酒瓶表面图片得到训练数据集;
S120、将训练数据集输入到待评价模型,以获得表示酒瓶表面图片对应的表面缺陷的表面缺陷信息,
酒瓶表面图片的表面缺陷信息包括类别信息和检测矩形框,类别信息表示表面缺陷的类别,检测矩形框表示表面缺陷的位置;
S130、根据表面缺陷信息评价待评价模型。
基于上述电子装置的硬件结构,提出本发明的一种酒瓶表面缺陷模型的评价方法的各个实施例。
参照图1所示,为本发明第二方面实施例的酒瓶表面缺陷模型的评价方法,包括:
S110、基于所获取到的酒瓶表面图片得到训练数据集;
S120、将训练数据集输入到待评价模型,以获得表示酒瓶表面图片对应的表面缺陷的表面缺陷信息,
酒瓶表面图片的表面缺陷信息包括类别信息和检测矩形框,类别信息表示表面缺陷的类别,检测矩形框表示表面缺陷的位置;
S130、根据表面缺陷信息评价待评价模型。
在本实施例中,待训练数据集共包括十种表面缺陷,分别是瓶盖破损、瓶盖变形、瓶盖坏边、瓶盖打旋、瓶盖断点、标贴歪斜、标贴起皱、标贴气泡、喷码正常、喷码异常,将收集到的酒瓶表面图片输入待评价模型,然后,待评价模型检测酒瓶表面图片,用检测矩形框框出酒瓶表面图片中的表面缺陷,同时识别出表面缺陷的种类,输出表示表面缺陷的种类的类别信息,最后根据待评价模型输出的检测矩形框和类别信息,计算得到待评价模型的评分,从而用户根据最后的评分数值能够直观、准确地得知当前的待评价模型的检测能力。
参照图2,在本实施例中,步骤S130根据表面缺陷信息评价待评价模型包括以下步骤:
S131、根据预设的标注矩形框计算IoU阈值;
S132、根据检测矩形框与预设的标注矩形框计算IoU值;
S133、根据IoU值和IoU阈值计算平均准确度AP值;
S134、根据平均准确度AP值和表面缺陷的权重数值计算待评价模型的评分。
在将酒瓶表面图片输入待评价模型之前,人为使用标注矩形框框出酒瓶表面图片中的表面缺陷,因此标注矩形框表示表面缺陷的实际位置,待评价模型根据每一个标注矩形框计算不同的IoU阈值,从而针对每个表面缺陷设定不同的IoU阈值,可降低固定IoU阈值和针对缺陷类别固定IoU阈值这两种常见方法对模型检测精度的影响,从而提高对待评价模型评价的准确度;
然后,根据检测矩形框与标注矩形框计算IoU值,并根据IoU值和IoU阈值计算平均准确度AP值,若IoU值大于IoU阈值时则认为检测成功,判断为正例,若IoU值小于IoU阈值则认为检测失败,判断为负例,然后通过统计每一类表面缺陷的正例数量,计算得到待评价模型对该类表面缺陷的平均准确度AP值;
最后根据每一类表面缺陷的平均准确度AP值和该类表面缺陷的权重数值得到卷积神经网络的评分,每一类表面缺陷的权重数值由企业对每种表面缺陷的容忍度来决定,而不是单纯使用求和平均的方式来计算,从而使本实施例最后的评价得分更加准确、直观,且更符合现实企业的需求,每一类表面缺陷的权重数值如表1所示。
表1每一类瓶装酒瓶表面缺陷的权重数值
Figure PCTCN2020112549-appb-000003
Figure PCTCN2020112549-appb-000004
参照图2,在本实施例中,步骤S131根据预设的标注矩形框计算IoU阈值采用如下公式:
Figure PCTCN2020112549-appb-000005
其中,IoU t为IoU阈值,m为预设的标注矩形框的短边的像素个数,从而IoU阈值是根据表面缺陷的大小计算得到的,与固定的IoU阈值或者每一类表面缺陷采用固定IoU阈值相比,本实施例针对每一个表面缺陷的大小采用不同的IoU阈值,使后续计算出来的平均准确度AP值更加准确。
参照图2,在本实施例中,步骤S134根据平均准确度AP值和表面缺陷的权重数值计算待评价模型的评分采用如下公式:
Figure PCTCN2020112549-appb-000006
其中,score为评分,i为表面缺陷的类别下标数值,c为训练数据集对应的总类别数,k i为第i类表面缺陷的权重数值,AP i为第i类表面缺陷的平均准确度AP值,每一类表面缺陷的权重数值k i如表1所示,最终的score数值结合了每一类缺陷的平均准确度AP值以及该类表面缺陷的权重数值,使score数值更加准确,更加符合企业的实际要求,同时score数值使用户能够直观地了解当前训练的待评价模型的检测能力,用户通过AP i还能够了解待评价模型对某一类表面缺陷的检测能力。
在本实施例中,酒瓶表面图片包含至少一个表面缺陷,如果训练数据集中存在了大量的正常图片,正常图片中并没有需要检测的瓶装酒瓶表面缺陷信息,对模型的训练并没有任何帮助,同时带缺陷的图片也包含正常图片的特征,因此若训练数据集中存在大量的正常图片,会造成待评价模型的检测准确度不必要的降低,其评分也会降低,但是这一评分是由于训练数据集不够充分造成的,因此这一评分对于待评价模型的改进毫无帮助,因此为了提高最终的评分对模型的评价准确度,训练数据集中的图片至少包含一个表面缺陷特征。
本发明第三方面实施例的计算机可读存储介质,存储有计算机可执行指令,计算机可执行指令用于执行如上述第二方面实施例所述的酒瓶表面缺陷模型的评价方法。
上面结合附图对本发明实施例作了详细说明,但是本发明不限于上述实施例,在所述技术领域普通技术人员所具备的知识范围内,还可以在不脱离本发明宗旨的前提下作出各种变化。

Claims (7)

  1. 一种酒瓶表面缺陷模型的评价方法,其特征在于,包括:
    基于所获取到的酒瓶表面图片得到训练数据集;
    将所述训练数据集输入到待评价模型,以获得表示所述酒瓶表面图片对应的表面缺陷的表面缺陷信息,所述酒瓶表面图片的表面缺陷信息包括类别信息和检测矩形框,所述类别信息表示所述表面缺陷的类别,所述检测矩形框表示所述表面缺陷的位置;
    根据所述表面缺陷信息评价所述待评价模型。
  2. 根据权利要求1所述的一种酒瓶表面缺陷模型的评价方法,其特征在于,所述根据所述表面缺陷信息评价所述待评价模型包括以下步骤:
    根据预设的标注矩形框计算IoU阈值;
    根据所述检测矩形框与预设的所述标注矩形框计算IoU值;
    根据所述IoU值和所述IoU阈值计算平均准确度AP值;
    根据所述平均准确度AP值和所述表面缺陷的权重数值计算所述待评价模型的评分。
  3. 根据权利要求2所述的一种酒瓶表面缺陷模型的评价方法,其特征在于,所述根据预设的标注矩形框计算IoU阈值采用如下公式:
    Figure PCTCN2020112549-appb-100001
    其中,IoU t为所述IoU阈值,m为预设的所述标注矩形框的短边的像素个数。
  4. 根据权利要求2所述的一种酒瓶表面缺陷模型的评价方法,其特征在于,所述根据所述平均准确度AP值和所述表面缺陷的权重数值计算所述待评价模型的评分采用如下公式:
    Figure PCTCN2020112549-appb-100002
    其中,score为所述评分,i为所述表面缺陷的类别下标数值,c为所述训练数据集对应的总类别数,k i为第i类所述表面缺陷的所述权重数值,AP i为第i 类所述表面缺陷的所述平均准确度AP值。
  5. 根据权利要求1所述的一种酒瓶表面缺陷模型的评价方法,其特征在于,所述酒瓶表面图片包含至少一个所述表面缺陷。
  6. 一种电子装置,包括:存储器、处理器及存储在所述存储器上并可在处理器上运行的计算机程序,其特征在于:所述处理器执行所述程序时实现如权利要求1至5中任一项所述的酒瓶表面缺陷模型的评价方法。
  7. 计算机可读存储介质,存储有计算机可执行指令,其特征在于:所述计算机可执行指令用于执行如权利要求1至5中任一项所述的酒瓶表面缺陷模型的评价方法。
PCT/CN2020/112549 2020-05-22 2020-08-31 酒瓶表面缺陷模型的评价方法、电子装置及存储介质 WO2021232611A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010440230.5A CN111709455A (zh) 2020-05-22 2020-05-22 酒瓶表面缺陷模型的评价方法、电子装置及存储介质
CN202010440230.5 2020-05-22

Publications (1)

Publication Number Publication Date
WO2021232611A1 true WO2021232611A1 (zh) 2021-11-25

Family

ID=72538074

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/112549 WO2021232611A1 (zh) 2020-05-22 2020-08-31 酒瓶表面缺陷模型的评价方法、电子装置及存储介质

Country Status (2)

Country Link
CN (1) CN111709455A (zh)
WO (1) WO2021232611A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117274257A (zh) * 2023-11-21 2023-12-22 山西集智数据服务有限公司 基于机器视觉的图书品相自动分级系统
CN117853481A (zh) * 2024-03-04 2024-04-09 枣庄矿业集团新安煤业有限公司 一种零速度乘人装置的直线导轨表面缺陷测量方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112329892A (zh) * 2020-12-03 2021-02-05 中国第一汽车股份有限公司 一种目标检测算法的评估方法、装置、设备及存储介质
CN118090743A (zh) * 2024-04-22 2024-05-28 山东浪潮数字商业科技有限公司 一种基于多模态图像识别技术的瓷质酒瓶质量检测系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108154508A (zh) * 2018-01-09 2018-06-12 北京百度网讯科技有限公司 产品缺陷检测定位的方法、装置、存储介质及终端设备
CN108765389A (zh) * 2018-05-18 2018-11-06 浙江大学 一种微观晶圆表面缺陷图像检测方法
CN109409517A (zh) * 2018-09-30 2019-03-01 北京字节跳动网络技术有限公司 物体检测网络的训练方法和装置
CN109726754A (zh) * 2018-12-25 2019-05-07 浙江大学昆山创新中心 一种lcd屏缺陷识别方法及装置
CN109993734A (zh) * 2019-03-29 2019-07-09 北京百度网讯科技有限公司 用于输出信息的方法和装置
CN110335242A (zh) * 2019-05-17 2019-10-15 杭州数据点金科技有限公司 一种基于多模型融合的轮胎x光病疵检测方法
CN111709452A (zh) * 2020-05-21 2020-09-25 五邑大学 酒瓶表面缺陷模型的评价方法、电子装置及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108154508A (zh) * 2018-01-09 2018-06-12 北京百度网讯科技有限公司 产品缺陷检测定位的方法、装置、存储介质及终端设备
CN108765389A (zh) * 2018-05-18 2018-11-06 浙江大学 一种微观晶圆表面缺陷图像检测方法
CN109409517A (zh) * 2018-09-30 2019-03-01 北京字节跳动网络技术有限公司 物体检测网络的训练方法和装置
CN109726754A (zh) * 2018-12-25 2019-05-07 浙江大学昆山创新中心 一种lcd屏缺陷识别方法及装置
CN109993734A (zh) * 2019-03-29 2019-07-09 北京百度网讯科技有限公司 用于输出信息的方法和装置
CN110335242A (zh) * 2019-05-17 2019-10-15 杭州数据点金科技有限公司 一种基于多模型融合的轮胎x光病疵检测方法
CN111709452A (zh) * 2020-05-21 2020-09-25 五邑大学 酒瓶表面缺陷模型的评价方法、电子装置及存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117274257A (zh) * 2023-11-21 2023-12-22 山西集智数据服务有限公司 基于机器视觉的图书品相自动分级系统
CN117274257B (zh) * 2023-11-21 2024-01-23 山西集智数据服务有限公司 基于机器视觉的图书品相自动分级系统
CN117853481A (zh) * 2024-03-04 2024-04-09 枣庄矿业集团新安煤业有限公司 一种零速度乘人装置的直线导轨表面缺陷测量方法
CN117853481B (zh) * 2024-03-04 2024-05-24 枣庄矿业集团新安煤业有限公司 一种零速度乘人装置的直线导轨表面缺陷测量方法

Also Published As

Publication number Publication date
CN111709455A (zh) 2020-09-25

Similar Documents

Publication Publication Date Title
WO2021232611A1 (zh) 酒瓶表面缺陷模型的评价方法、电子装置及存储介质
WO2021232613A1 (zh) 酒瓶表面缺陷检测方法、电子装置及存储介质
US10977523B2 (en) Methods and apparatuses for identifying object category, and electronic devices
EP3937128A2 (en) Image defect detection method and apparatus, electronic device, storage medium and product
WO2020156409A1 (zh) 数据处理方法、瑕疵的检测方法、计算设备及存储介质
CN111091109B (zh) 基于人脸图像进行年龄和性别预测的方法、系统和设备
CN103439348B (zh) 基于差影法的遥控器按键缺陷检测方法
WO2022227770A1 (zh) 目标对象检测模型的训练方法、目标对象检测方法和设备
CN111709452B (zh) 酒瓶表面缺陷模型的评价方法、电子装置及存储介质
WO2024032007A1 (zh) 电芯压伤检测方法、装置及系统
CN116012354A (zh) 片式电容丝印缺陷检测方法、装置、设备及存储介质
CN115272290A (zh) 一种缺陷检测方法、装置、电子设备及存储介质
CN115331132A (zh) 一种汽车零件的检测方法、装置、电子设备和存储介质
CN111709451B (zh) 酒瓶表面缺陷检测方法、电子装置及存储介质
CN117333330A (zh) 学生管理方法、装置、系统和存储介质
CN104123528A (zh) 一种识别图片的方法及装置
Li et al. Surface defect detection algorithm of aluminum based on improved faster RCNN
CN116309963B (zh) 一种图像的批量标注方法、装置、电子设备及存储介质
CN112749735A (zh) 基于深度学习的转炉出钢钢流识别方法、系统、介质及终端
CN116030013A (zh) 多目标多类别破损缺陷检测方法、系统及计算机存储介质
CN115359322A (zh) 一种目标检测模型训练方法、装置、设备和存储介质
CN113469984B (zh) 一种基于yolo结构的显示面板外观检测方法
CN115063405A (zh) 钢材表面缺陷检测的方法、系统、电子设备和存储介质
CN116883488B (zh) 一种圆形管的中心位置确定方法、装置、设备及介质
CN113327257B (zh) 一种汽车玻璃分区域判等方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20936770

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20936770

Country of ref document: EP

Kind code of ref document: A1