Product surface defect detection method and device

文档序号:1699849 发布日期:2019-12-13 浏览:20次 中文

阅读说明:本技术 一种产品表面缺陷检测方法及装置 (Product surface defect detection method and device ) 是由 庄浩 张继勇 张均贺 于 2019-07-19 设计创作,主要内容包括:本申请实施例提供了一种产品表面缺陷检测方法及装置,该方法包括:服务器接收来自终端的用于获取工艺线路上产品表面信息的请求。获取多个包含第一产品表面的第一图像、以及各第一图像的标签数据。根据多个第一图像和各第一图像的标签数据,更新预设的产品表面缺陷检测模型。接收来自图像采集设备的包含第二产品表面的第二图像。其中,第二产品的产品类型与第一产品的产品类型对应。根据更新后的产品表面缺陷检测模型对第二图像进行识别,确定第二图像中的产品表面是否存在缺陷。通过上述技术方案,能够在产品生产过程中实时检测产品表面缺陷,降低人力成本、提升整个生产过程的柔性程度。(The embodiment of the application provides a method and a device for detecting surface defects of a product, wherein the method comprises the following steps: the server receives a request from the terminal for obtaining surface information of a product on the process line. A plurality of first images including a surface of a first product, and label data for each first image are acquired. And updating a preset product surface defect detection model according to the plurality of first images and the label data of each first image. A second image containing a surface of a second product is received from the image capture device. Wherein the product type of the second product corresponds to the product type of the first product. And identifying the second image according to the updated product surface defect detection model, and determining whether the product surface in the second image has defects. Through above-mentioned technical scheme, can be in the product production process real-time detection product surface defect, reduce the human cost, promote the flexible degree of whole production process.)

1. A method for detecting surface defects of a product, the method comprising:

Receiving a request for acquiring product surface information on a process line from a terminal, wherein the product surface information comprises a product surface image and label data of the product surface image;

Acquiring a plurality of first images comprising the surface of a first product and label data of each first image; the label data of the first image is used for indicating whether the surface of the product corresponding to the first image has defects or not; the first products correspond to the first images one by one, and the product types of the first products are the same;

updating a preset product surface defect detection model according to the plurality of first images and the label data of each first image; the product surface defect detection model is used for detecting whether the product surface has defects;

Receiving a second image containing a surface of a second product from the image capture device; wherein the product type of the second product is the same as the product type of the first product;

And identifying the second image according to the updated product surface defect detection model, and determining whether the product surface in the second image has defects.

2. The method of claim 1,

The plurality of first images containing the surfaces of the first products are acquired by image acquisition equipment on the process line on the surfaces of the first products reaching the surface defect detection area;

the label data of each first image is obtained by identifying the electronic label on the first product by the label identification equipment on the process line.

3. the method of claim 1, wherein prior to receiving the second image comprising the second product surface from the image capture device, the method further comprises:

Receiving process standard information of the second product sent by a terminal;

Wherein the process standard information at least comprises: overall dimension information, position information corresponding to the surface on which defect detection is performed;

According to the process standard information, sending a corresponding adjusting instruction to a mechanical arm so that image acquisition equipment fixedly connected with the mechanical arm is adjusted to a position corresponding to the surface of the second product for defect detection; the mechanical arm is positioned on a process route of a product and used for adjusting the position and the direction of the image acquisition equipment.

4. The method of claim 1, wherein after said determining whether the product surface in the second image is defective, the method further comprises:

When the surface of the product in the second image has a defect, sending a direction instruction to a flow channel direction control device to enable the flow channel direction control device to control the second product corresponding to the second image to flow to a defective product flow channel;

The flow channel direction control device is positioned on the process line and used for adjusting the conveying direction of products on the process line.

5. The method of claim 1, wherein after said updating the pre-set product surface defect inspection model, the method further comprises:

Acquiring a plurality of prestored third images containing the surface of a third product and label data of each third image; wherein the product type of the third product is the same as the product type of the first product, and the label data of the third image is used for indicating whether a surface of the third product has a defect;

according to the plurality of third images and the label information of each third image, determining the accuracy of the third product with the surface defect identified according to the updated product surface defect detection model;

and under the condition that the accuracy exceeds a preset threshold value, determining that the updating of the preset product surface defect detection model is completed.

6. a product surface defect detection apparatus, the apparatus comprising:

The system comprises a first receiving unit, a second receiving unit and a control unit, wherein the first receiving unit is used for receiving a request for acquiring the surface information of a product on a process line from a terminal; the product surface information comprises a product surface image and label data of the product surface image; (ii) a

A first acquisition unit configured to acquire a plurality of first images including a surface of a first product, and label data of each of the first images; the label data of the first image is used for indicating whether the surface of the product corresponding to the first image has defects or not; the first products correspond to the first images one by one, and the types of the first products are the same;

the updating unit is used for updating a preset product surface defect detection model according to the plurality of first images and the label data of each first image; the product surface defect detection model is used for detecting whether the product surface has defects;

The second receiving unit is used for receiving a second image containing the surface of a second product from the image acquisition equipment; wherein the product type of the second product is the same as the product type of the first product;

and the first determining unit is used for identifying the second image according to the updated product surface defect detection model and determining whether the product surface in the second image has defects.

7. The apparatus of claim 6,

The plurality of first images containing the surfaces of the first products are acquired by image acquisition equipment on the process line on the surfaces of the first products reaching the surface defect detection area;

The label data of each first image is obtained by identifying the electronic label on the first product by the label identification equipment on the process line.

8. The apparatus of claim 6, further comprising:

The third receiving unit is used for receiving the process standard information of the second product sent by the terminal;

Wherein the process standard information at least comprises: overall dimension information, position information corresponding to the surface on which defect detection is performed;

The first sending unit is used for sending a corresponding adjusting instruction to the mechanical arm according to the process standard information so that the image acquisition equipment fixedly connected with the mechanical arm is adjusted to a position corresponding to the surface of the second product for defect detection; the mechanical arm is positioned on a process route of a product and used for adjusting the position and the direction of the image acquisition equipment.

9. The apparatus of claim 6, further comprising:

The second sending unit is used for sending a first direction instruction to the flow channel direction control device under the condition that the surface of the product in the second image has a defect, so that the flow channel direction control device controls the second product corresponding to the second image to flow to the defective product flow channel;

The flow channel direction control device is positioned on the process line and used for adjusting the conveying direction of products on the process line.

10. the apparatus of claim 6, further comprising:

A second acquisition unit configured to acquire a plurality of third images including a surface of a third product, which are stored in advance, and tag data of each of the third images; wherein the product type of the third product is the same as the product type of the first product, and the label data of the third image is used for indicating whether a surface of the third product has a defect;

A second determining unit, configured to determine, according to the plurality of third images and label data of each third image, an accuracy of a third product with a surface defect identified according to the updated product surface defect detection model;

and the third determining unit is used for determining that the updating of the preset updated product surface defect detection model is finished under the condition that the accuracy exceeds a preset threshold value.

Technical Field

The application relates to the technical field of detection, in particular to a method and a device for detecting surface defects of products.

Background

During the production process of the product, various defects such as dislocation, scratch, pollution and the like are inevitably generated on the surfaces of the product and parts of the product. Therefore, the detection of the surface defects of the products becomes an essential part of the quality detection link in the production process of the products.

At present, the detection method of the surface defect of the product mainly comprises two methods of manual detection and machine vision detection. The manual detection mode has the problems of low detection efficiency, high production cost of products and the like. The machine vision inspection mode can realize the automation of surface defect inspection, but the surface defect inspection models in the existing machine vision inspection only aim at the surface of a certain specific product or a certain type of specific defects for inspection. However, in an actual production process, a production line may produce a plurality of products, and the types of surface defects may be different for different types of products. At the moment, when the surface defects of different products are detected, different surface defect detection models need to be designed and developed, the whole process period is long, the consumed time and labor cost are high, and the flexibility is lacked.

Disclosure of Invention

The embodiment of the application provides a method and a device for detecting surface defects of products, and aims to solve the problems of high cost, poor flexibility and low flexibility degree of the existing method for detecting the surface defects of the products in the production process of various types of products.

the embodiment of the application provides a method for detecting surface defects of a product, which comprises the following steps: receiving a request for acquiring surface information of a product on a process line from a terminal; the product surface information comprises a product surface image and label data of the product surface image; (ii) a A plurality of first images including a surface of a first product, and label data for each first image are acquired. The label data of the first image is used for indicating whether the surface of the product corresponding to the first image has defects or not; the first products correspond to the first images one by one, and the types of the first products are the same. And updating a preset product surface defect detection model according to the plurality of first images and the label data of each first image. A second image containing a surface of a second product is received from the image capture device. Wherein the product type of the second product is the same as the product type of the first product. And identifying the second image according to the updated product surface defect detection model, and determining whether the product surface in the second image has defects.

in one possible implementation, the plurality of first images including the surface of the first product are acquired by an image acquisition device on the process line for the surface of the first product reaching the surface defect detection area. The label data of each first image is obtained by identifying the electronic label on the first product by the label identification equipment on the process line.

in one possible implementation, before receiving the second image containing the surface of the second product from the image capture device, the method further comprises: and receiving the process standard information of the second product sent by the terminal. Wherein, the process standard information at least comprises: overall dimension information, and position information corresponding to a surface on which defect detection is performed. And sending a corresponding adjusting instruction to the mechanical arm according to the process standard information so that the image acquisition equipment fixedly connected with the mechanical arm is adjusted to a position corresponding to the surface of the second product for defect detection. The mechanical arm is positioned on a process route of a product and used for adjusting the position and the direction of the image acquisition equipment.

in one possible implementation, after determining whether the surface of the product in the second image has a defect, the method further includes: and sending a first direction instruction to the flow channel direction control device under the condition that the surface of the product in the second image has a defect, so that the flow channel direction control device controls the second product corresponding to the second image to flow to the defective product flow channel. The flow channel direction control device is positioned on the process line and used for adjusting the conveying direction of products on the process line.

in one possible implementation manner, after updating the preset product surface defect detection model, the method further includes: a plurality of third images including a surface of a third product, which are stored in advance, and label data of each of the third images are acquired. Wherein the product type of the third product is the same as the product type of the first product, and the label data of the third image is used for indicating whether the surface of the third product has a defect. And determining the accuracy of the third product with the surface defect identified according to the updated product surface defect detection model according to the plurality of third images and the label data of each third image. And under the condition that the accuracy exceeds a preset threshold, determining that the updated product surface defect detection model is updated.

Correspondingly, this application embodiment still provides a product surface defect detection device, and the device includes: the first receiving unit is used for receiving a request for acquiring the surface information of the product on the process line from the terminal. The product surface information comprises a product surface image and label data of the product surface image; . A first acquisition unit configured to acquire a plurality of first images including a surface of a first product, and label data of each of the first images; the label data of the first image is used for indicating whether the surface of the product corresponding to the first image has defects or not; the first products correspond to the first images one by one, and the types of the first products are the same. And the updating unit is used for updating the preset product surface defect detection model according to the plurality of first images and the label data of each first image. The product surface defect detection model is used for detecting whether the product surface has defects or not. The second receiving unit is used for receiving a second image containing the surface of a second product from the image acquisition equipment; wherein the product type of the second product is the same as the product type of the first product. And the first determining unit is used for identifying the second image according to the updated product surface defect detection model and determining whether the product surface in the second image has defects.

In a possible implementation manner, the first obtaining unit is specifically configured to: the plurality of first images containing the surfaces of the first products are acquired by image acquisition equipment on the process line on the surfaces of the first products reaching the surface defect detection area. The label data of each first image is obtained by identifying the electronic label on the first product by the label identification equipment on the process line.

In one possible implementation manner, the apparatus further includes: and the third receiving unit is used for receiving the process standard information of the second product sent by the terminal. Wherein, the process standard information at least comprises: overall dimension information, and position information corresponding to a surface on which defect detection is performed. The first sending unit is used for sending a corresponding adjusting instruction to the mechanical arm according to the process standard information so that the image acquisition equipment fixedly connected with the mechanical arm is adjusted to a position corresponding to the surface of the second product for defect detection; the mechanical arm is positioned on a process route of a product and used for adjusting the position and the direction of the image acquisition equipment.

in one possible implementation manner, the apparatus further includes: and the second sending unit is used for sending a first direction instruction to the flow channel direction control device under the condition that the surface of the product in the second image has a defect, so that the flow channel direction control device controls the second product corresponding to the second image to flow to the defective product flow channel. The flow channel direction control device is positioned on the process line and used for adjusting the conveying direction of products on the process line.

in one possible implementation manner, the apparatus further includes: and a second acquiring unit configured to acquire a plurality of third images including a surface of a third product and label data of each of the third images, which are stored in advance. Wherein the product type of the third product is the same as the product type of the first product, and the label information of the third image is used for indicating whether the surface of the third product has a defect. And the second determining unit is used for determining the accuracy of the third product with the surface defect identified according to the updated product surface defect detection model according to the plurality of third images and the label data of each third image. And the third determining unit is used for determining that the updated product surface defect detection model is updated under the condition that the accuracy exceeds the preset threshold.

The embodiment of the application provides a method and a device for detecting surface defects of products, and the method and the device finish updating of a preset product surface defect detection model by acquiring images and label data of a first product in an earlier stage. And according to the updated product surface defect detection model, the same type of products as the first product can be automatically identified. The training and generating cost of the product surface defect detection models corresponding to different types of products is reduced. Moreover, by the method and the device, when various types of products are produced, the surface defect detection of different types of products can be flexibly adapted, and flexible production is realized. And the device cost and the human cost for detecting the surface defects of the product are greatly reduced, and the working efficiency of production is improved.

Drawings

The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:

fig. 1 is an application scene diagram of a product surface defect detection method according to an embodiment of the present application;

FIG. 2 is a flowchart of a method for detecting surface defects of a product according to an embodiment of the present disclosure;

Fig. 3 is a flowchart of step S202 in fig. 2 according to an embodiment of the present disclosure;

Fig. 4 is a schematic structural diagram of a product surface defect detection apparatus according to an embodiment of the present application.

Detailed Description

in order to more clearly explain the overall concept of the present application, the following detailed description is given by way of example in conjunction with the accompanying drawings.

Fig. 1 is an application scenario diagram of a product surface defect detection method according to an embodiment of the present application. As shown in fig. 1, a plurality of processes, such as a surface defect detection process, are included in a production process line, and a robot arm 130 and an image capturing device 140 fixedly connected to the robot arm 130 are disposed in a surface defect detection area of the process line.

on the process line, the terminal 110 sends a request for detecting the surface defect of the product to the server 120, and when the product to be detected for detecting the surface defect reaches the surface defect detection area from the previous process, the server 120 sends corresponding instructions to the mechanical arm 130 and the image acquisition device 140. After the mechanical arm 130 adjusts to a proper position according to the received instruction, the image capturing device 140 captures a to-be-detected product, obtains a surface image of the to-be-detected product, and transmits the surface image to the server 120 through the terminal 110.

the server 120 identifies the received surface image of the product to be detected according to the product surface defect model, and determines whether the surface of the product to be detected has defects. When the surface of the product to be detected has defects, the flow channel direction control device 150 adjusts the flow direction of the product to be detected so that the product to be detected flows to the defective product flow channel from the surface defect detection process; in the case where there is no defect on the surface of the product, the flow path direction control device 150 controls the flow of the product to be inspected from the surface defect inspection process to the next production process.

In the present specification, the server 120 may be an edge computing server, and the edge computing server can reduce the time for requesting a response, reduce the network bandwidth, and ensure the security and privacy of the declarative data.

Fig. 2 is a schematic flowchart of a product surface detection method according to an embodiment of the present application, and as shown in fig. 2, the method includes the following steps:

S201, the terminal 110 sends a request for obtaining the surface information of the product on the process line to the server 120.

The product surface information comprises a product surface image and label data of the product surface image. The label data of the product surface image mentioned here is used to indicate whether the product surface corresponding to the image has defects or not

in the embodiment of the present application, the terminal may be a device such as a mobile phone and a computer.

S202, the server 120 obtains a plurality of first images including a surface of the first product and label data of each of the first images.

Wherein the label data of the first image is used to indicate whether a defect exists on the product surface of the first product. In addition, the first products correspond to the first images one by one, and the product types of the first products are the same.

In the embodiment of the application, the product types can be divided according to product process standards, for example, the tablet personal computer and the mobile phone need to detect whether the surfaces are divided, and the tablet personal computer and the mobile phone can be unified into one product type.

It should be noted that, in the actual production process of products, different types of products need to detect different types of surface defects, and the types of surface defects detected herein may include scratches, pits, spots, color differences, defects, dislocations, and the like. For example, type a products only need to confirm whether the surface has scratches during actual production, while type B products need to determine whether the surface has color differences during actual production.

In one embodiment of the present application, the plurality of first images including the surface of the first product and the label data of each first image may be obtained by the following steps, as shown in fig. 3, including:

S301, the terminal 110 sends process standard information of the first product to the server 120. Wherein, the process standard information at least comprises: overall dimension information, and position information corresponding to a surface on which defect detection is performed.

s302, the server 120 sends a corresponding adjustment instruction to the robot 130 in the process line according to the process standard information.

Different products have different positions of the surface needing defect detection due to the unique characteristics of the products. In order to acquire a proper surface image, the image acquisition device 140 needs to be placed at different positions to acquire a proper surface image, and the image acquisition device 140 is fixedly connected with the mechanical arm 130, wherein the fixedly connection can be in the form of clamping, welding, bonding and the like, and the position of the image acquisition device 140 can be adjusted by adjusting the mechanical arm 130. For example, adjusting the angle of the robot arm 130 to 50 degrees may cause the image capturing device 140 to capture the upper surface of the a product.

in this embodiment, the mechanical arm 130 is fixedly connected with the image acquisition device 140, and the mechanical arm 130 adjusts its own angle according to a corresponding adjustment instruction, so as to adjust the orientation and angle of the image acquisition device 140, and adjust the image acquisition device 140 to a position corresponding to the surface of the second product for defect detection. And, the information of the process standard information of the product corresponding to the position of the image pickup device 140 may be stored in advance so as to be called at any time.

S303, on the actually produced process line, a sensor (not shown in the figure) collects data of the surface defect detection area on the process line in real time to determine whether the first product on the process line reaches the surface defect detection area.

the surface defect detection area refers to an area on the process line where surface defects of products are detected.

The sensor may be a pressure sensor, an infrared sensor, or the like. For example, a pressure sensor may be placed below the belt in the surface defect detection zone, and when the data collected by the pressure sensor matches a predetermined threshold, it is determined that the product has reached the surface defect detection zone.

S304, after the first product is determined to reach the surface defect detection area, the image acquisition equipment 140 shoots the surface of the first product to acquire a first image.

after determining that the first product reaches the surface defect detection area on the process line, the server 120 sends an instruction to the image capturing device 140, where the instruction is used to instruct the image capturing device 140 to capture a picture.

In the embodiment of the present application, the image capturing device 140 may be a camera, a video camera, a device with a photographing function (mobile phone), and the like.

S305, a tag identification device (not shown in the figure) identifies an electronic tag on the product to obtain tag data of the first image.

And the label data of the first image is used for indicating whether the surface of the product corresponding to the first image has defects or not.

In this embodiment of the application, the product corresponding to the first image is a product with an electronic tag, where the electronic tag may be a tag in the form of a barcode, a two-dimensional code, or the like, and the tag identification device on the process line may identify the electronic tag on the product to obtain the tag data of the first image corresponding to the product. For example, if the electronic tag of the B product is a barcode, the corresponding tag identification device may be a barcode scanner.

In addition, the label identification device may be attached to the mechanical arm through the image capturing device 140, the label identification device may be attached to the mechanical arm 130 of the image capturing device 140, or may be attached to a different mechanical arm 130, it is obvious to a person skilled in the art that the step S305 may be completed before the step S301, or may be completed at any time after the step S301, and the embodiment of the present application is not limited thereto.

in addition, in another embodiment of the present application, after the server 120 receives the request for obtaining the product surface information on the process line, a large number of first images, the label data of each first image, and the product type, which are stored in advance, may be obtained for updating the preset product surface defect detection model.

The preset product surface defect detection model is a trained neural network model.

In the actual application process, a large amount of sample data is needed for training the neural network model, and the consumed computer resources are large, so that the application scene of the neural network model is restricted, and therefore a method for compressing the neural network model is needed.

in the embodiment of the present application, the network model may be compressed by the following method:

For an output layer in the neural network model, all input parameters in the output layer are found out and are expressed in a set mode, and an input parameter set of the output layer is obtained.

For each input parameter x in the model parameter set N separatelyiPerforming log transformation to obtain a log parameter set M, wherein elements in the log parameter set M are transformation parameters yi. Wherein x isiis the ith input parameter, y, of the set of input parameters Niis the ith transformation parameter in the log parameter set M.

it should be noted that, in order to decompress the compressed data for normal use in the subsequent practical application, the parameter values after compression need to be subjected to exponential transformation to transform the parameter values into the original data types.

Then, through a preset quantization formula:Respectively converting each conversion parameter yiAnd quantizing the data to a digit axis with the interval of the preset quantization step length and taking an integer to obtain the value of the quantization parameter corresponding to the input parameter. The preset quantization step may be determined according to actual requirements. Wherein round () is a rounding function, s is a preset quantization step, hiIs the value of the ith quantization parameter, which is determined by the ith conversion parameter yiAnd obtaining the product after quantization.

And sequencing the values of the plurality of quantization parameters from large to small, selecting the values of the number of the targets arranged in front from the sequenced values of the plurality of quantization parameters, and taking the quantization parameters corresponding to the values arranged in front as sampling quantization points.

Calculating a square value of a difference value between the value of the ith quantization parameter and each sampling quantization point respectively aiming at the ith quantization parameter, then selecting a minimum value from a plurality of square values, determining an identification value of the sampling quantization point corresponding to the minimum value in the plurality of square values, and taking the identification value as the quantization value of the ith model parameter when the value of the ith model parameter is a positive number; and when the value of the ith model parameter is a negative number, calculating a sum value between the identification value and the target number, and taking the sum value as a quantized value of the ith model parameter.

After the quantized value of each input parameter is obtained, each input parameter can be compressed and stored according to the quantized value of each input parameter, so that the purpose of compression is achieved.

S203, the server 120 updates a preset product surface defect detection model according to the obtained plurality of first images and the label data of each first image.

In the embodiment of the present application, the preset product surface defect detection model is generated in advance, and the preset product surface defect detection model may be generated by using the surface image of the product and the label data of each surface image as training samples. The surface image used for generating the preset product surface defect model may be a sample with defects, a sample without defects, or both.

S204, the server 120 determines whether the preset product surface defect detection model is completely updated.

wherein, the updating is completed to indicate whether the updated product surface defect model meets the requirements under the product type. For example, the updated product surface defect detection model needs to detect a type a product, the product needs to detect whether the upper surface of the type a product has a scratch, and the accuracy of the updated product surface defect detection model for detecting the surface defect of the type a product exceeds a threshold.

In one embodiment of the application, the server 120 determines whether the preset product surface defect detection model is updated, and may be implemented by:

A plurality of pre-stored third images containing a surface of a third product and label data for each third image are acquired. The product type of the third product corresponds to the product type of the first product, and the label data of the third image is used for indicating whether the surface of the third product has defects or not;

according to the plurality of third images and the label data of each third image, determining the accuracy of the third product with the surface defect identified according to the updated product surface defect detection model;

and under the condition that the accuracy exceeds a preset threshold value, determining that the updating of the preset product surface defect detection model is finished.

S205, in case the updated product surface defect detection model is completely updated, the server 120 receives a second image including a second product surface from the image capturing device 140.

Wherein the first product is of the same product type as the second product. For example, the product type of the first product is a tablet computer, and the product type of the second product is also a tablet computer.

In the embodiment of the present application, the method for acquiring the second image is similar to the method for acquiring the first image, which is already described above and is not repeated herein.

s206, the server 120 identifies the second image according to the updated product surface defect detection model, and determines whether the product surface in the second image has defects.

In the embodiment of the present application, as shown in fig. 1, after determining that the surface of the product corresponding to the second image has a defect, in an actual process line, the flow channel direction control device 150 controls the product with the defect on the surface of the product to flow to the defective product flow channel. In addition, when it is determined that the surface of the product corresponding to the second image has no defect, the flow path direction control device 150 controls the product having no defect on the surface to flow to the next process in the process line,

specifically, the flow channel direction control device 150 is configured to receive a direction instruction sent by the server 120, and send an instruction for instructing the product to flow to the defective product flow channel to the flow channel direction control device 150 when the server 120 determines that the product corresponding to the second image has a defect; conversely, the server 120 sends an instruction to the flow path direction control device 150 to instruct the product flow to the next process. The defective product flow path is a flow path for a product having a defect on the surface.

in the embodiment of the present application, the flow channel direction control device 150 may flow the product currently passing through the product surface defect detecting process to the next process or the defective product flow channel by means of a slide rail, a rolling device, or a belt line.

In step S202, when it is determined that the product surface in the first image has a defect, the flow path direction control device 150 also flows the product having the defect to the defective product flow path.

The embodiment of the application provides a method for detecting surface defects of products, which is used for completing the updating of a preset product surface defect detection model by acquiring images and labels of a first product in an earlier stage. And according to the updated product surface defect detection model, the same type of products as the first product can be automatically identified. The training and generating cost of the product surface defect detection models corresponding to different types of products is reduced. Moreover, by the method, when various types of products are produced, the surface defect detection of different types of products can be flexibly adapted, and flexible production is realized. The device cost and the human cost for detecting the surface defects of the product are greatly reduced, and the working efficiency of production is improved.

The embodiment of the present application further provides an apparatus for detecting surface defects of a product, as shown in fig. 4, the apparatus 400 includes: a first receiving unit 410, a first obtaining unit 420, an updating unit 430, a second receiving unit 440, and a first determining unit 450. The first receiving unit 410 is configured to receive a request from a terminal for obtaining product surface information on a process line, where the product surface information includes a product surface image and tag data of the product surface image. . The first acquiring unit 420 is configured to acquire a plurality of first images including a surface of a first product and label data of each of the first images. The label data of the first image is used for indicating whether the surface of the product corresponding to the first image has defects or not; the first products correspond to the first images one by one, and the types of the first products are the same. The updating unit 430 is configured to update a preset product surface defect detection model according to the plurality of first images and the label data of each first image; the product surface defect detection model is used for detecting whether the product surface has defects; . The second receiving unit 440 is configured to receive a second image including a surface of a second product from the image capturing device. Wherein the product type of the second product is the same as the product type of the first product. The first determining unit 450 is configured to identify the second image according to the updated product surface defect detection model, and determine whether a defect exists on the product surface in the second image.

In one embodiment of the present application, the plurality of first images comprising the surface of the first product are captured by an image capture device on the process line on the surface of the first product reaching the surface defect detection area. The label data of each first image is obtained by identifying the electronic label on the first product by the label identification equipment on the process line.

In one embodiment of the present application, the apparatus 400 further comprises: a third receiving unit 460 and a first transmitting unit 470. The third receiving unit 460 is configured to receive process standard information of the second product sent by the terminal. Wherein, the process standard information at least comprises: overall dimension information, and position information corresponding to a surface on which defect detection is performed. The first sending unit 470 is configured to send a corresponding adjustment instruction to the mechanical arm according to the process standard information, so that the image capturing device fixedly connected to the mechanical arm is adjusted to a position corresponding to a surface of the second product for defect detection. The mechanical arm is positioned on a process route of a product and used for adjusting the position and the direction of the image acquisition equipment.

in one embodiment of the present application, the apparatus 400 further comprises: and a second transmitting unit 480. The second sending unit 480 is configured to send a direction instruction to the flow channel direction control device when a surface of a product in the second image has a defect, so that the flow channel direction control device controls the second product corresponding to the second image to flow to the defective product flow channel. The flow channel direction control device is positioned on the process line and used for adjusting the conveying direction of products on the process line.

In one embodiment of the present application, the apparatus 400 further comprises: a second obtaining unit 490, a second determining unit 401, and a third determining unit 402. The second acquiring unit 490 is configured to acquire a plurality of pre-stored third images including the surface of the third product, and tag data of each third image. Wherein the product type of the third product is the same as the product type of the first product, and the label information of the third image is used for indicating whether the surface of the third product has a defect. The second determining unit 401 is configured to determine, according to the plurality of third images and the label data of each third image, an accuracy of a third product with a surface defect identified according to the updated product surface defect detection model. The third determining unit 402 is configured to determine that the updating of the preset product surface defect detection model is completed when the accuracy exceeds the preset threshold.

The embodiment of the application provides a product surface defect detection device, through the collection to the image and the label of first product earlier stage, accomplishes the update of preset product surface defect detection model. And according to the updated product surface defect detection model, the same type of products as the first product can be automatically identified. The training and generating cost of the product surface defect detection models corresponding to different types of products is reduced. Moreover, by the method, when various types of products are produced, the surface defect detection of different types of products can be flexibly adapted, and flexible production is realized. The device cost and the human cost for detecting the surface defects of the product are greatly reduced, and the working efficiency of production is improved.

The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.

The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present specification.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于机器视觉的圆柱金属表面缺陷检测装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!