A method and system for visually detecting defects on optical fiber drawing surface

Through clustering and dynamic compensation technology of optical fiber surface images, combined with cropped area input, the problem of excessive data volume caused by multi-angle shooting is solved, and the efficiency and accuracy of optical fiber surface defect identification are improved.

CN118587208BActive Publication Date: 2024-10-22PUTIAN CABLE GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411047635.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2024-10-22
Estimated Expiration
2044-08-01

AI Technical Summary

Technical Problem

Optical fiber images taken at multiple angles result in a large amount of image data being input to the defect recognition model, which increases the amount of data processed by the model and affects the recognition efficiency.

Method used

By acquiring optical fiber surface images, clustering and sliding windows are used to determine suspected defect areas, the image is updated after dynamic compensation, and the cropped area is input to the defect area identification model to reduce the amount of data and improve identification accuracy.

Benefits of technology

It effectively reduces the data input amount of the optical fiber surface defect recognition model, improves the recognition accuracy and efficiency, locally enhances edge features, and improves the accuracy of defect area recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587208B_ABST
    Figure CN118587208B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for visual detection of defects on the surface of optical fiber drawing, the method comprising: obtaining the area of ​​a region corresponding to at least one first suspected defect region, dynamically compensating at least one first suspected defect region according to the area of ​​each region, and obtaining at least one first target suspected defect region; and cropping other first optical fiber surface images to be tested in a set of first optical fiber surface images to be tested according to a certain defect region of a certain optical fiber object to be tested, and obtaining a first cropped area set and a second cropped area set, inputting the first cropped area set and the second cropped area set into a defect region recognition model in sequence, and determining abnormal information of other optical fiber objects to be tested according to the output results of the defect region recognition model. In this way, by inputting in batches, and first inputting the areas that are more likely to have defects into the defect region recognition model, the data processing amount of the defect region recognition model can be reduced as much as possible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image recognition, and in particular relates to a method and system for visually detecting surface defects of optical fiber drawing. Background Art

[0002] During the production process, the optical fiber surface coating is easily damaged. Scratches account for a relatively high proportion of all surface defects, which will affect the propagation and coupling efficiency of optical signals. Therefore, in order to ensure the use effect of optical fiber, scratch defects on the optical fiber surface need to be detected.

[0003] However, in the process of inspecting the optical fiber surface, since most optical fibers are cylindrical in shape, the prior art often uses multi-angle shooting of the optical fiber and defect identification of the multi-angle images. Although this makes it less likely to miss features during the identification process, the multi-angle optical fiber images will cause a large amount of image data to be input into the defect recognition model, thereby increasing the amount of data processed by the model. Summary of the invention

[0004] The present invention provides a method and system for visually detecting defects on the surface of optical fiber drawing, which are used to solve the technical problem that optical fiber images shot at multiple angles will cause a large amount of image data to be input into a defect recognition model, thereby increasing the amount of data processed by the model.

[0005] In a first aspect, the present invention provides a method for visually detecting surface defects of optical fiber drawing, comprising:

[0006] Acquire a first optical fiber surface image of each optical fiber object to be tested at a first shooting angle;

[0007] Clustering the first optical fiber surface images to be tested according to the diameter change rate of the optical fiber object to be tested in each first optical fiber surface image to be tested to obtain at least one first optical fiber surface image set to be tested;

[0008] Using a preset sliding window to determine whether there is at least one first suspected defect area in an edge area of ​​a first optical fiber surface image to be tested in a first optical fiber surface image set;

[0009] If there is at least one first suspected defect area, the area of ​​the area corresponding to the at least one first suspected defect area is obtained, the at least one first suspected defect area is dynamically compensated according to the area of ​​each area to obtain at least one first target suspected defect area, and a first surface image of the optical fiber to be tested is updated according to the at least one first target suspected defect area;

[0010] Inputting an updated surface image of a first optical fiber to be tested into a pre-built defect region recognition model, the defect region recognition model outputs a defect region of a certain optical fiber object to be tested, the defect region recognition model includes a forward generator, a reverse generator and a discriminator;

[0011] According to a certain defect area of ​​a certain optical fiber object to be tested, other first optical fiber surface images to be tested in the certain first optical fiber surface image set are cropped to obtain a first cropped area set and a second cropped area set, wherein the other first optical fiber surface images to be tested are first optical fiber surface images to be tested excluding a certain first optical fiber surface image to be tested in the certain first optical fiber surface image set;

[0012] The first cropping area set and the second cropping area set are sequentially input into the defect area recognition model, and abnormal information of other optical fiber objects to be tested is determined according to the output result of the defect area recognition model, wherein the first cropping area set only includes each target area image in the other first optical fiber surface images to be tested, and the target area image is an area image at the same position and size as a first optical fiber surface image to be tested where the certain defect area is located, and the second cropping area set only includes non-target area images.

[0013] In a second aspect, the present invention provides a system for visually detecting defects on the surface of optical fiber drawing, comprising:

[0014] An acquisition module is configured to acquire a first optical fiber surface image to be tested of each optical fiber object to be tested at a first shooting angle;

[0015] A clustering module configured to cluster the first optical fiber surface images to be tested according to the diameter change rate of the optical fiber object to be tested in each first optical fiber surface image to be tested, so as to obtain at least one first optical fiber surface image set to be tested;

[0016] A judgment module is configured to use a preset sliding window to judge whether there is at least one first suspected defect area in an edge area of ​​a first optical fiber surface image to be tested in a first optical fiber surface image set to be tested;

[0017] An updating module is configured to obtain, if there is at least one first suspected defect area, a region area corresponding to the at least one first suspected defect area, dynamically compensate the at least one first suspected defect area according to the area of ​​each region, obtain at least one first target suspected defect area, and update a first surface image of an optical fiber to be tested according to the at least one first target suspected defect area;

[0018] An output module is configured to input an updated surface image of a first optical fiber to be tested into a pre-built defect area recognition model, wherein the defect area recognition model outputs a defect area of ​​a certain optical fiber object to be tested, and the defect area recognition model includes a forward generator, a reverse generator and a discriminator;

[0019] A cropping module is configured to crop other first optical fiber surface images to be tested in the set of first optical fiber surface images according to a certain defect area of ​​a certain optical fiber object to be tested, so as to obtain a first cropping area set and a second cropping area set, wherein the other first optical fiber surface images to be tested are first optical fiber surface images to be tested excluding a certain first optical fiber surface image to be tested in the set of first optical fiber surface images;

[0020] A determination module is configured to input the first cropping area set and the second cropping area set into the defect area recognition model in sequence, and determine abnormal information of other optical fiber objects to be tested according to the output results of the defect area recognition model, wherein the first cropping area set only includes each target area image in the other first optical fiber surface images to be tested, and the target area image is an area image at the same position and size as a first optical fiber surface image to be tested where the defect area is located, and the second cropping area set only includes non-target area images.

[0021] According to a third aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the method for visual detection of surface defects of optical fiber drawing according to any embodiment of the present invention.

[0022] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor executes the steps of the method for visually detecting surface defects of optical fiber drawing according to any embodiment of the present invention.

[0023] The optical fiber drawing surface defect visual detection method and system of the present application obtains the area of ​​a region corresponding to at least one first suspected defect region, dynamically compensates at least one first suspected defect region according to the area of ​​each region, and obtains at least one first target suspected defect region, which can locally enhance the edge features of the first optical fiber surface image to be tested, thereby effectively improving the recognition accuracy of the subsequent defect region recognition model, and according to a defect region of a certain optical fiber object to be tested, other first optical fiber surface images to be tested in a set of first optical fiber surface images to be tested are cropped to obtain a first cropped region set and a second cropped region set, and the first cropped region set and the second cropped region set are sequentially input into the defect region recognition model, and abnormal information of other optical fiber objects to be tested is determined according to the output results of the defect region recognition model. In this way, by inputting in batches and first inputting the regions that are more likely to have defects into the defect region recognition model, the amount of data input into the defect region recognition model can be reduced as much as possible. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 A flow chart of a method for visually detecting surface defects of optical fiber drawing provided by one embodiment of the present invention;

[0026] Figure 2 A structural block diagram of a visual inspection system for optical fiber drawing surface defects provided by an embodiment of the present invention;

[0027] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] See also Figure 1 , which shows a flow chart of a method for visually detecting surface defects of optical fiber drawing of the present application.

[0030] like Figure 1 As shown, the optical fiber drawing surface defect visual detection method specifically includes the following steps:

[0031] Step S101, obtaining a first optical fiber surface image of each optical fiber object to be tested at a first shooting angle.

[0032] In one embodiment, since the appearance of the optical fiber object to be tested is cylindrical, for one optical fiber object to be tested, it is actually only necessary to obtain a first optical fiber surface image to be tested at a first shooting angle and a second optical fiber surface image to be tested at a second shooting angle. The first shooting angle and the second shooting angle are positive and negative shooting angles of each other, and the entire appearance image of the optical fiber object to be tested (the first optical fiber surface image to be tested + the second optical fiber surface image to be tested) can be obtained. The first optical fiber surface image to be tested and the second optical fiber surface image to be tested at the two shooting angles are equivalent to the front view and the rear view of the optical fiber object to be tested. Therefore, the edge features of the first optical fiber surface image to be tested and the second optical fiber surface image to be tested obtained are both compressed, or in other words, they are reduced edge features.

[0033] When the defect features actually located at the edge of the optical fiber object to be tested are very few, the defect features at the edges of the projected first optical fiber surface image to be tested and the second optical fiber surface image to be tested will be even fewer. Therefore, it is necessary to execute steps S102 to S107 to enhance the edge features of the first optical fiber surface image to be tested and the second optical fiber surface image to be tested, so as to avoid missing edge features during the model recognition process.

[0034] Step S102: clustering the first optical fiber surface images to be tested according to the diameter change rate of the optical fiber object to be tested in each first optical fiber surface image to be tested, to obtain at least one first optical fiber surface image set to be tested.

[0035] In this step, during the fiber drawing process, the uniformity of the diameter is an important quality control indicator. However, due to the influence of various factors, the diameter of the optical fiber is not always completely uniform during the drawing process. Therefore, the diameter change rate is set as the ratio of the maximum diameter to the minimum diameter in the fiber object to be tested, and at least one fiber object to be tested with a diameter change rate within the same preset range is classified into the same type, and each first fiber surface image to be tested of a certain type of fiber object to be tested is clustered to obtain a certain first fiber surface image set to be tested, that is, to obtain at least one first fiber surface image set to be tested, which can achieve clustering of multiple fiber objects to be tested with relatively similar influencing factors, so as to perform a relatively rapid analysis of the same type of fiber objects to be tested later.

[0036] Step S103: using a preset sliding window to determine whether there is at least one first suspected defect region in the edge region of a first optical fiber surface image to be tested in a first optical fiber surface image set to be tested.

[0037] In this step, the edge area is the area covered by the sliding window during the sliding process. Specifically, the pixel value in the sliding window is obtained each time the sliding occurs, and it is determined based on the pixel value whether there is at least one first suspected defect area in the area covered by the sliding window each time the sliding occurs.

[0038] It should be noted that, by connecting a plurality of pixel points whose pixel values ​​exceed a preset pixel threshold, a first suspected defect area can be obtained.

[0039] In a specific embodiment, if there is no at least one first suspected defect region, a first surface image of the optical fiber to be tested is not updated, and the first surface image of the optical fiber to be tested is directly input into a pre-constructed defect region recognition model.

[0040] Step S104: if there is at least one first suspected defect area, the area of ​​the region corresponding to the at least one first suspected defect area is obtained, and the at least one first suspected defect area is dynamically compensated according to the area of ​​each region to obtain at least one first target suspected defect area, and a first surface image of the optical fiber to be tested is updated according to the at least one first target suspected defect area.

[0041] In this step, the area of ​​a certain region corresponding to a certain first suspected defect region is obtained; a certain contour of a certain first suspected defect region is obtained, a certain height of a certain first suspected defect region is determined according to a certain contour, and a certain height and a certain average diameter of a certain optical fiber object to be tested at a certain first suspected defect region are determined; a first target area and a second target area are calculated according to a certain height and a certain average diameter, wherein the first target area is obtained by multiplying a certain height, a certain average diameter and pi, and the second target area is obtained by multiplying a certain height and a certain average diameter; a compensation area of ​​a certain first suspected defect region is calculated according to the first target area, the second target area and the area of ​​a certain region, and a certain first suspected defect region is dynamically compensated according to the compensation area to obtain a first target suspected defect region, wherein the expression for calculating the compensation area is:

[0042] ,

[0043] In the formula, is the compensation area of ​​a first suspected defect area, is the first target area, is the second target area, The area of ​​a certain region.

[0044] It should be noted that the dynamic compensation of a first suspected defect area according to the compensation area is specifically as follows: target pixels are intercepted in the first suspected defect area until the area formed by the connection of the target pixels is equal to the compensation area, and then the target pixels are replaced by other pixels around the first suspected defect area.

[0045] Step S105, inputting the updated surface image of a first optical fiber to be tested into a pre-built defect region recognition model, and the defect region recognition model outputs a defect region of a first optical fiber to be tested.

[0046] In this step, a first normal sample data set and a first defect sample data set are collected from the surface of the optical fiber; a conditional generative adversarial network model is constructed, and the features and Gaussian noise of the first normal sample data set are processed by the conditional generative adversarial network model to obtain a first generated image; adversarial training is performed on the conditional generative adversarial network model according to the first generated image, the first defect sample data set and the features; the first generated image is added to the first defect sample data set to form a second defect sample data set; a cyclic generative adversarial network model is constructed, and adversarial training is performed on the cyclic adversarial network model according to the first normal sample data set and the second defect sample data set to obtain a second generated image and a second normal sample data set; the second generated image is added to the second defect sample data set to expand it to obtain an expanded second defect sample data set, and the expanded second defect sample data set is used to continue training the cyclic generative adversarial network model to obtain a defect area recognition model.

[0047] It should be noted that the defect area recognition model includes a forward generator, a reverse generator and a discriminator.

[0048] Step S106, cropping other first optical fiber surface images in the first optical fiber surface image set according to a defect area of ​​a certain optical fiber object to be tested, to obtain a first cropping area set and a second cropping area set.

[0049] In this step, the other first optical fiber surface images to be tested are first optical fiber surface images to be tested excluding a first optical fiber surface image to be tested from a set of first optical fiber surface images to be tested.

[0050] Step S107: input the first cropping area set and the second cropping area set into the defect area recognition model in sequence, and determine abnormal information of other optical fiber objects to be tested according to the output result of the defect area recognition model.

[0051] It should be noted that the first cropped area set only includes each target area image in other first optical fiber surface images to be tested, and the target area image is an area image of the same position and size as a first optical fiber surface image to be tested where a defect area is located, and the second cropped area set only includes non-target area images. Non-target area images are area images of other first optical fiber surface images to be tested excluding each target area image.

[0052] In this step, each target area image in another first cropping area set corresponding to another first optical fiber surface image to be tested is input into the defect area recognition model, and it is determined whether each target area image in another first cropping area set has a defect area according to the defect area recognition model, wherein another first optical fiber surface image to be tested is any first optical fiber surface image to be tested among other first optical fiber surface images to be tested; if a target area image in another first cropping area set has a defect area, the recognition of another second cropping area set corresponding to another first optical fiber surface image to be tested is directly stopped, and it is determined that another optical fiber object to be tested has a defect abnormality; if each target area image in another first cropping area set does not have a defect area, each non-target area image in another second cropping area set corresponding to another first optical fiber surface image to be tested is input into the defect area recognition model.

[0053] Specifically, since multiple optical fiber objects to be tested with relatively similar influencing factors are clustered, the locations of defects in the first optical fiber surface image to be tested of multiple optical fiber objects to be tested of the same type may also be the same. By first identifying the first cropping area set, when defects exist in the first cropping area set, there is no need to identify the second cropping area set, which may further reduce the amount of data input into the defect area recognition model.

[0054] In summary, the method of the present application obtains the area of ​​a region corresponding to at least one first suspected defect region, dynamically compensates at least one first suspected defect region according to the area of ​​each region, and obtains at least one first target suspected defect region, which can locally enhance the edge features of the first optical fiber surface image to be tested, thereby being able to better improve the recognition accuracy of the subsequent defect area recognition model, and according to a defect area of ​​a certain optical fiber object to be tested, other first optical fiber surface images to be tested in a set of first optical fiber surface images to be tested are cropped to obtain a first cropped area set and a second cropped area set, and the first cropped area set and the second cropped area set are sequentially input into the defect area recognition model, and abnormal information of other optical fiber objects to be tested is determined according to the output results of the defect area recognition model. In this way, by inputting in batches and first inputting the areas that are more likely to have defects into the defect area recognition model, the amount of data input into the defect area recognition model can be reduced as much as possible.

[0055] See also Figure 2 , which shows a structural block diagram of a visual inspection system for optical fiber drawing surface defects of the present application.

[0056] like Figure 2 As shown, the optical fiber drawing surface defect visual inspection system 200 includes an acquisition module 210, a clustering module 220, a judgment module 230, an update module 240, an output module 250, a cutting module 260 and a determination module 270.

[0057] The acquisition module 210 is configured to acquire a first optical fiber surface image of each optical fiber object to be tested at a first shooting angle;

[0058] A clustering module 220 is configured to cluster the first optical fiber surface images to be tested according to the diameter change rate of the optical fiber object to be tested in each first optical fiber surface image to be tested, so as to obtain at least one first optical fiber surface image set to be tested;

[0059] The judgment module 230 is configured to use a preset sliding window to judge whether there is at least one first suspected defect area in the edge area of ​​a first optical fiber surface image to be tested in a first optical fiber surface image set;

[0060] The updating module 240 is configured to obtain the area of ​​a region corresponding to the at least one first suspected defect region if there is at least one first suspected defect region, dynamically compensate the at least one first suspected defect region according to the area of ​​each region, obtain at least one first target suspected defect region, and update a first surface image of the optical fiber to be tested according to the at least one first target suspected defect region;

[0061] The output module 250 is configured to input the updated surface image of a first optical fiber to be tested into a pre-built defect area recognition model, and the defect area recognition model outputs a defect area of ​​a certain optical fiber object to be tested, and the defect area recognition model includes a forward generator, a reverse generator and a discriminator;

[0062] The cropping module 260 is configured to crop other first optical fiber surface images to be tested in the first optical fiber surface image set according to a certain defect area of ​​a certain optical fiber object to be tested, so as to obtain a first cropping area set and a second cropping area set, wherein the other first optical fiber surface images to be tested are first optical fiber surface images to be tested excluding a certain first optical fiber surface image to be tested in the first optical fiber surface image set;

[0063] The determination module 270 is configured to input the first cropping area set and the second cropping area set into the defect area recognition model in sequence, and determine the abnormal information of other optical fiber objects to be tested according to the output results of the defect area recognition model, wherein the first cropping area set only includes each target area image in the other first optical fiber surface images to be tested, and the target area image is an area image at the same position and size as a first optical fiber surface image to be tested where the defect area is located, and the second cropping area set only includes non-target area images.

[0064] It should be understood that Figure 2 Modules and references documented in Figure 1 Therefore, the operations and features described above for the method and the corresponding technical effects are also applicable to Figure 2 The modules in it will not be described in detail here.

[0065] In some other embodiments, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor is caused to execute the optical fiber drawing surface defect visual detection method in any of the above method embodiments;

[0066] As an implementation mode, the computer-readable storage medium of the present invention stores computer-executable instructions, and the computer-executable instructions are configured as follows:

[0067] Acquire a first optical fiber surface image of each optical fiber object to be tested at a first shooting angle;

[0068] Clustering the first optical fiber surface images to be tested according to the diameter change rate of the optical fiber object to be tested in each first optical fiber surface image to be tested to obtain at least one first optical fiber surface image set to be tested;

[0069] Using a preset sliding window to determine whether there is at least one first suspected defect area in an edge area of ​​a first optical fiber surface image to be tested in a first optical fiber surface image set;

[0070] If there is at least one first suspected defect area, the area of ​​the area corresponding to the at least one first suspected defect area is obtained, the at least one first suspected defect area is dynamically compensated according to the area of ​​each area to obtain at least one first target suspected defect area, and a first surface image of the optical fiber to be tested is updated according to the at least one first target suspected defect area;

[0071] Inputting an updated surface image of a first optical fiber to be tested into a pre-built defect region recognition model, the defect region recognition model outputs a defect region of a certain optical fiber object to be tested, the defect region recognition model includes a forward generator, a reverse generator and a discriminator;

[0072] According to a certain defect area of ​​a certain optical fiber object to be tested, other first optical fiber surface images to be tested in the certain first optical fiber surface image set are cropped to obtain a first cropped area set and a second cropped area set, wherein the other first optical fiber surface images to be tested are first optical fiber surface images to be tested excluding a certain first optical fiber surface image to be tested in the certain first optical fiber surface image set;

[0073] The first cropping area set and the second cropping area set are sequentially input into the defect area recognition model, and abnormal information of other optical fiber objects to be tested is determined according to the output result of the defect area recognition model, wherein the first cropping area set only includes each target area image in the other first optical fiber surface images to be tested, and the target area image is an area image at the same position and size as a first optical fiber surface image to be tested where the certain defect area is located, and the second cropping area set only includes non-target area images.

[0074] Figure 3 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 3 As shown, the device includes: a processor 310 and a memory 320. The electronic device may also include: an input device 330 and an output device 340. The processor 310, the memory 320, the input device 330 and the output device 340 may be connected via a bus or other means. Figure 3 In the example, the connection via bus is used. The memory 320 is the above-mentioned computer-readable storage medium. The processor 310 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 320, that is, the optical fiber drawing surface defect visual detection method of the above-mentioned method embodiment is realized. The input device 330 can receive input digital or character information, and generate key signal input related to user settings and function control of the optical fiber drawing surface defect visual detection system. The output device 340 may include display devices such as display screens.

[0075] The electronic device can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.

[0076] As an embodiment, the electronic device is applied to a visual inspection system for optical fiber drawing surface defects, and is used for a client, and includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can:

[0077] Acquire a first optical fiber surface image of each optical fiber object to be tested at a first shooting angle;

[0078] Clustering the first optical fiber surface images to be tested according to the diameter change rate of the optical fiber object to be tested in each first optical fiber surface image to be tested to obtain at least one first optical fiber surface image set to be tested;

[0079] Using a preset sliding window to determine whether there is at least one first suspected defect area in an edge area of ​​a first optical fiber surface image to be tested in a first optical fiber surface image set;

[0080] If there is at least one first suspected defect area, the area of ​​the area corresponding to the at least one first suspected defect area is obtained, the at least one first suspected defect area is dynamically compensated according to the area of ​​each area to obtain at least one first target suspected defect area, and a first surface image of the optical fiber to be tested is updated according to the at least one first target suspected defect area;

[0081] Inputting an updated surface image of a first optical fiber to be tested into a pre-built defect region recognition model, the defect region recognition model outputs a defect region of a certain optical fiber object to be tested, the defect region recognition model includes a forward generator, a reverse generator and a discriminator;

[0082] According to a certain defect area of ​​a certain optical fiber object to be tested, other first optical fiber surface images to be tested in the certain first optical fiber surface image set are cropped to obtain a first cropped area set and a second cropped area set, wherein the other first optical fiber surface images to be tested are first optical fiber surface images to be tested excluding a certain first optical fiber surface image to be tested in the certain first optical fiber surface image set;

[0083] The first cropping area set and the second cropping area set are sequentially input into the defect area recognition model, and abnormal information of other optical fiber objects to be tested is determined according to the output result of the defect area recognition model, wherein the first cropping area set only includes each target area image in the other first optical fiber surface images to be tested, and the target area image is an area image at the same position and size as a first optical fiber surface image to be tested where the certain defect area is located, and the second cropping area set only includes non-target area images.

[0084] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.

[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for visually detecting surface defects of optical fiber drawing. It is characterized in that include: Acquire a first optical fiber surface image of each optical fiber object to be tested at a first shooting angle; Clustering the first optical fiber surface images to be tested according to the diameter change rate of the optical fiber object to be tested in each first optical fiber surface image to be tested to obtain at least one first optical fiber surface image set to be tested; Using a preset sliding window to determine whether there is at least one first suspected defect area in an edge area of ​​a first optical fiber surface image to be tested in a first optical fiber surface image set; If there is at least one first suspected defect area, the area of ​​the area corresponding to the at least one first suspected defect area is obtained, the at least one first suspected defect area is dynamically compensated according to the area of ​​each area to obtain at least one first target suspected defect area, and a first surface image of the optical fiber to be tested is updated according to the at least one first target suspected defect area; Inputting an updated surface image of a first optical fiber to be tested into a pre-built defect region recognition model, the defect region recognition model outputs a defect region of a certain optical fiber object to be tested, the defect region recognition model includes a forward generator, a reverse generator and a discriminator; According to a certain defect area of ​​a certain optical fiber object to be tested, other first optical fiber surface images to be tested in the certain first optical fiber surface image set are cropped to obtain a first cropped area set and a second cropped area set, wherein the other first optical fiber surface images to be tested are first optical fiber surface images to be tested excluding a certain first optical fiber surface image to be tested in the certain first optical fiber surface image set; The first cropping area set and the second cropping area set are sequentially input into the defect area recognition model, and abnormal information of other optical fiber objects to be tested is determined according to the output result of the defect area recognition model, wherein the first cropping area set only includes each target area image in the other first optical fiber surface images to be tested, and the target area image is an area image at the same position and size as a first optical fiber surface image to be tested where the certain defect area is located, and the second cropping area set only includes non-target area images.

2. A method for visually detecting surface defects of optical fiber drawing according to claim 1, It is characterized in that The diameter change rate is the ratio of the maximum diameter to the minimum diameter of the optical fiber object to be tested; The step of clustering the first optical fiber surface images to be tested according to the diameter change rate of the optical fiber object to be tested in each first optical fiber surface image to be tested to obtain at least one first optical fiber surface image set to be tested comprises: Classifying at least one optical fiber object to be tested whose diameter change rate is within the same preset range as the same type; The first optical fiber surface images to be tested of a certain type of optical fiber object to be tested are clustered to obtain a certain first optical fiber surface image set to be tested, that is, to obtain at least one first optical fiber surface image set to be tested.

3. A method for visually detecting surface defects of optical fiber drawing according to claim 1, It is characterized in that The edge area is the area covered by the sliding window during sliding; The method of using a preset sliding window to determine whether there is at least one first suspected defect area in the edge area of ​​a first optical fiber surface image to be tested in the first optical fiber surface image aggregation includes: The pixel values ​​in the sliding window at each sliding are obtained, and it is determined according to the pixel values ​​whether there is at least one first suspected defect area in the area covered by the sliding window at each sliding.

4. A method for visually detecting surface defects of optical fiber drawing according to claim 1, It is characterized in that After using a preset sliding window to determine whether there is at least one first suspected defect area in the edge area of ​​a first optical fiber surface image to be tested in a first optical fiber surface image aggregation, the method further includes: If there is no at least one first suspected defect area, the first surface image of the optical fiber to be tested is not updated, and the first surface image of the optical fiber to be tested is directly input into the pre-constructed defect area recognition model.

5. A method for visually detecting surface defects of optical fiber drawing according to claim 1, It is characterized in that The acquiring of the area of ​​the region corresponding to the at least one first suspected defect region, and dynamically compensating the at least one first suspected defect region according to the area of ​​each region to obtain at least one first target suspected defect region comprises: Obtaining an area of ​​a region corresponding to a first suspected defect region; Acquire a certain contour of a certain first suspected defect area, determine a certain height of the certain first suspected defect area according to the certain contour, and determine a certain height and a certain average diameter of a certain optical fiber object to be tested at the certain first suspected defect area; Calculate a first target area and a second target area according to the certain height and the certain average diameter, wherein the first target area is obtained by multiplying the certain height, the certain average diameter and pi, and the second target area is obtained by multiplying the certain height and the certain average diameter; The compensation area of ​​the first suspected defect area is calculated according to the first target area, the second target area and the area of ​​the certain area, and the first suspected defect area is dynamically compensated according to the compensation area to obtain a first target suspected defect area, wherein the expression for calculating the compensation area is: , In the formula, is the compensation area of ​​a first suspected defect area, is the first target area, is the second target area, The area of ​​a certain region.

6. A method for visually detecting surface defects of optical fiber drawing according to claim 1, It is characterized in that The step of sequentially inputting the first cropping area set and the second cropping area set into the defect area recognition model, and determining abnormal information of other optical fiber objects to be tested according to an output result of the defect area recognition model comprises: Inputting each target area image in another first cropping area set corresponding to another first optical fiber surface image to be tested into a defect area recognition model, and judging whether each target area image in another first cropping area set has a defect area according to the defect area recognition model, wherein the another first optical fiber surface image to be tested is any first optical fiber surface image to be tested among the other first optical fiber surface images to be tested; If a defective area exists in a target area image in another first cropping area set, directly stop identifying another second cropping area set corresponding to another first optical fiber surface image to be tested, and determine that another optical fiber object to be tested has a defect abnormality; If each target area image in another first cropping area set does not have a defect area, each non-target area image in another second cropping area set corresponding to another first optical fiber surface image to be tested is input into the defect area recognition model.

7. A visual inspection system for optical fiber drawing surface defects, It is characterized in that include: An acquisition module is configured to acquire a first optical fiber surface image to be tested of each optical fiber object to be tested at a first shooting angle; A clustering module configured to cluster the first optical fiber surface images to be tested according to the diameter change rate of the optical fiber object to be tested in each first optical fiber surface image to be tested, so as to obtain at least one first optical fiber surface image set to be tested; A judgment module is configured to use a preset sliding window to judge whether there is at least one first suspected defect area in an edge area of ​​a first optical fiber surface image to be tested in a first optical fiber surface image set to be tested; An updating module is configured to obtain, if there is at least one first suspected defect area, a region area corresponding to the at least one first suspected defect area, dynamically compensate the at least one first suspected defect area according to the area of ​​each region, obtain at least one first target suspected defect area, and update a first surface image of an optical fiber to be tested according to the at least one first target suspected defect area; An output module is configured to input an updated surface image of a first optical fiber to be tested into a pre-built defect area recognition model, wherein the defect area recognition model outputs a defect area of ​​a certain optical fiber object to be tested, and the defect area recognition model includes a forward generator, a reverse generator and a discriminator; A cropping module is configured to crop other first optical fiber surface images to be tested in the set of first optical fiber surface images according to a certain defect area of ​​a certain optical fiber object to be tested, so as to obtain a first cropping area set and a second cropping area set, wherein the other first optical fiber surface images to be tested are first optical fiber surface images to be tested excluding a certain first optical fiber surface image to be tested in the set of first optical fiber surface images; A determination module is configured to input the first cropping area set and the second cropping area set into the defect area recognition model in sequence, and determine abnormal information of other optical fiber objects to be tested according to the output results of the defect area recognition model, wherein the first cropping area set only includes each target area image in the other first optical fiber surface images to be tested, and the target area image is an area image at the same position and size as a first optical fiber surface image to be tested where the defect area is located, and the second cropping area set only includes non-target area images.

8. An electronic device, It is characterized in that include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.