A method and system for processing fiber bragg grating based on machine vision
By automatically identifying the focal plane of the fiber core using machine vision and neural network models, the problem of laser focus alignment in fiber Bragg grating processing has been solved, enabling high-precision and high-efficiency automated processing and promoting the development of fiber optic communication and sensing fields.
Patent Information
- Application Number
- CN202411645046.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-11-18
AI Technical Summary
In the existing technology, the processing of fiber Bragg gratings relies on human eye identification of the fiber core center, resulting in low automation, long processing time and low repeatability, making it difficult to achieve fast and high-repeatability processing of high-quality fiber Bragg gratings.
By employing a machine vision-based approach combined with a neural network model, the focal plane of the fiber core is automatically identified and the laser focus is precisely controlled, thereby achieving automated processing of fiber Bragg gratings.
It achieves high precision and high efficiency in fiber Bragg grating processing, supports the development of fiber optic communication and sensing fields, and provides automated and intelligent processing solutions for fiber Bragg gratings.
Smart Images

Figure CN119596443B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of laser micro-nano processing, and in particular to a fiber Bragg grating processing method and system based on machine vision. BACKGROUND
[0002] Fiber Bragg Grating (FBG) has become an indispensable component in many high-tech fields such as communication network systems, sensing technology fields, medical applications, and fiber lasers, due to its excellent precision, compact size, outstanding electromagnetic resistance, chemical inertness, excellent heat resistance, and powerful multiplexing capability. FBG is formed by implementing a permanent periodic refractive index (RI) modulation inside the fiber core and exhibits a unique narrow-band Bragg reflection characteristic. This reflection characteristic is directly determined by the pitch of the periodic RI modulation, which can be precisely controlled during the manufacturing process.
[0003] In the traditional approach, FBG is mainly manufactured by phase mask and interference lithography technology through ultraviolet exposure. These technologies have achieved remarkable success in the commercial field due to their simplicity and efficiency. However, as the application range of FBG continues to expand and demand grows, the FBG manufactured by traditional technology gradually exposes some limitations. Specifically, traditional FBG cannot withstand high-temperature environments exceeding 450℃ and is prone to thermal decay in such environments. In addition, the selection of fiber core materials is limited to photosensitive materials, and additional hydrogen loading is usually required to enhance the photosensitivity of the fiber. Furthermore, different mask plates need to be used to make FBGs with different characteristics (such as period length and spectral characteristics), which undoubtedly increases the complexity and cost of manufacturing.
[0004] Therefore, researchers continue to explore new technologies to produce new FBGs that can overcome the above limitations. In 2001, Oi et al. pioneered the method of using near-infrared femtosecond (fs) laser to make FBG. Femtosecond laser, with its extremely high peak intensity and ultra-short pulse width, when used with a high numerical aperture (Numerical Aperture, NA) objective lens, can induce nonlinear absorption effects within the focal volume, thereby achieving RI modification of almost all types of optical materials, including non-photosensitive materials such as pure silica, sapphire, etc.
[0005] In addition, the femtosecond laser direct writing (DLW) technology has also developed to the stage of making FBG without phase mask, and can realize accurate and flexible control of the grating period, shape and RI modulation position. Using the fs DLW technology, high-quality FBG with high reflectivity, low insertion loss, stable operation in harsh environment such as high pressure and ionizing radiation, and high temperature resistance up to 1900℃ has been successfully prepared.
[0006] The fs DLW technology can be divided into point-by-point (PbP), line-by-line (LbL) and surface-by-surface technologies. In the PbP technology, the femtosecond laser is accurately focused to the center position of the fiber core to permanently change the refractive index in the focal volume; the LbL technology uses a focused femtosecond laser beam to write a series of parallel lines in the fiber core; and the surface-by-surface technology forms a grating plane by irradiating the entire core. Compared with the other two methods, the PbP technology is preferred due to its many advantages, including relatively low femtosecond pulse energy (10-100nJ) during the manufacturing process, higher manufacturing efficiency by only point manufacturing, and more convenient control of the RI modulation period by changing the translation speed of the fiber or adjusting only the femtosecond pulse repetition rate.
[0007] In the PbP technology, a sub-micron femtosecond laser spot is accurately focused to the center position of the fiber core (specifically, the focal plane of the fiber core) to manufacture a periodic RI modulation point array with a limited diameter. However, the current processing scheme still relies on the human eye to identify the center position of the fiber core, which completely depends on the experience level of the operator. At the same time, this method has the problems of long processing time and low repetition rate due to the inability to realize automatic processing.
[0008] Therefore, how to accurately and automatically align the laser focus with the center position of the fiber core has become a key technical difficulty and challenge for processing high-quality fiber gratings using the PbP fs DLW technology, especially for realizing fast and high-repetition-rate processing.
[0009] The above information is given as background information only to assist with an understanding of the present disclosure, and does not determine or acknowledge whether any of the above is applicable as prior art with respect to the present disclosure. SUMMARY
[0010] The present application provides a fiber Bragg grating processing method and system based on machine vision to solve the problems in the prior art.
[0011] To achieve the above-mentioned purpose, the present application provides the following technical solutions:
[0012] In a first aspect, the present application provides a method for processing fiber Bragg grating based on machine vision, comprising:
[0013] scanning the fiber core at the starting point and collecting an image at the position of the starting point;
[0014] inputting the image at the position of the starting point into a trained neural network model, locating the focal plane of the fiber core at the position of the starting point, and obtaining a fiber tilt angle;
[0015] determining a termination point according to the fiber tilt angle and a given processing length;
[0016] scanning the fiber core at the termination point and collecting an image at the position of the termination point;
[0017] inputting the image at the position of the termination point into the trained neural network model, locating the focal plane of the fiber core at the position of the termination point;
[0018] controlling the laser focus to focus on the focal plane of the fiber core at the position of the starting point, and starting to process the fiber core until the focal plane of the fiber core at the position of the termination point is reached, to obtain a fiber Bragg grating.
[0019] Further, in the method for processing fiber Bragg grating based on machine vision, before the step of scanning the fiber core at the starting point and collecting an image at the position of the starting point, the method further comprises:
[0020] selecting an arbitrary point in the fiber core as the starting point.
[0021] Further, in the method for processing fiber Bragg grating based on machine vision, the step of scanning the fiber core at the starting point and collecting an image at the position of the starting point specifically comprises:
[0022] scanning the fiber core within a range of ±30μm at the starting point and collecting an image at the position of the starting point.
[0023] Further, in the method for processing fiber Bragg grating based on machine vision, the step of determining a termination point according to the fiber tilt angle and a given processing length specifically comprises:
[0024] moving a given processing length along a direction tilted by the fiber tilt angle to determine the termination point.
[0025] Further, in the method for processing fiber Bragg grating based on machine vision, the step of scanning the fiber core at the termination point and collecting an image at the position of the termination point specifically comprises:
[0026] At the termination point, the fiber core is scanned within a range of ±30 μm, and an image at the termination point position is collected.
[0027] Further, the method for processing the fiber Bragg grating based on machine vision further comprises:
[0028] establishing a neural network model;
[0029] The collected defocus images and focus images are divided into a training set and a verification set; the defocus images include images focused too deeply and images focused too shallowly;
[0030] The training set is input into the neural network model to train the neural network model;
[0031] The verification set is input into the neural network model to verify the neural network model, and a trained neural network model is obtained.
[0032] Further, in the method for processing the fiber Bragg grating based on machine vision, before the step of inputting the training set into the neural network model to train the neural network model, the method further comprises:
[0033] Each image is classified and labeled;
[0034] Each image is background-subtracted;
[0035] A region of interest containing two boundary lines of the fiber core is cropped from the background-subtracted image;
[0036] The boundary lines in the cropped region of interest are subjected to gray value calculation, and the calculation results are extracted as features of the boundary lines.
[0037] Further, in the method for processing the fiber Bragg grating based on machine vision, the neural network model comprises an input layer, four dense layers, and an output layer;
[0038] A nonlinear activation function is used between each adjacent two dense layers;
[0039] The first dense layer contains 32 neurons;
[0040] The second dense layer contains 64 neurons;
[0041] The third dense layer contains 64 neurons;
[0042] The fourth dense layer contains 3 neurons and adopts a SoftMax function for output.
[0043] Further, in the method for processing fiber Bragg grating based on machine vision, the step of inputting the training set into the neural network model to train the neural network model comprises:
[0044] allocating random values to the weights of the neural network model;
[0045] inputting an image in the training set into the neural network model to perform forward propagation to generate a predicted value and output;
[0046] calculating the loss between the predicted value and the corresponding true value, and the loss function is mean square error;
[0047] updating the weights of the neural network model using the calculated loss;
[0048] continuing to input the next image in the training set into the neural network model to perform forward propagation, loss calculation and weight update until a preset termination condition is met.
[0049] In a second aspect, the present application provides a system for processing fiber Bragg grating based on machine vision, which comprises a laser, a beam splitter, an oil lens, a red light source, a CCD camera, a 3D motorized stage and a computer; wherein,
[0050] the 3D motorized stage is used to carry and move the optical fiber;
[0051] the laser is located above the 3D motorized stage and is used to emit a laser beam;
[0052] the oil lens is located between the 3D motorized stage and the laser and is used to focus the laser beam;
[0053] the red light source is located below the 3D motorized stage and is used to emit red illumination light to illuminate the optical fiber;
[0054] the beam splitter is located between the oil lens and the laser and is used to reflect the red illumination light to the CCD camera;
[0055] the CCD camera is located on the reflection surface of the beam splitter and is used to collect the image of the optical fiber;
[0056] the computer is used to:
[0057] control the movement of the 3D motorized stage and control the CCD camera to scan the core of the optical fiber at a starting point and collect the image at the starting point;
[0058] inputting the image at the starting point position into the trained neural network model, locating the focal plane of the fiber core of the optical fiber at the starting point position, and obtaining an optical fiber tilt angle;
[0059] determining a termination point according to the optical fiber tilt angle and a given processing length;
[0060] controlling the 3D motorized stage to move and controlling the CCD camera to scan the fiber core of the optical fiber at the termination point and collect an image at the termination point position;
[0061] inputting the image at the termination point position into the trained neural network model, locating the focal plane of the fiber core of the optical fiber at the termination point position;
[0062] controlling the 3D motorized stage to move to focus the laser focal point of the laser to the focal plane of the fiber core of the optical fiber at the starting point position and start processing the fiber core of the optical fiber until the focal plane of the fiber core of the optical fiber at the termination point position is processed to obtain an optical fiber Bragg grating.
[0063] Compared with the prior art, the present application has the following beneficial effects:
[0064] The present application provides a kind of processing method and system of optical fiber Bragg grating based on machine vision, by combining advanced machine vision technology and neural network model technology, the focal plane of the fiber core of optical fiber is automatically identified, so as to automatically focus the laser focal point to the focal plane of the fiber core of optical fiber, so as to realize the automation and intelligentization of optical fiber Bragg grating processing process, not only with high precision, high efficiency characteristics, also show broad application prospect, provide strong support for the development of optical fiber communication, sensing and other fields.
[0065] The present application has other characteristics and advantages, which will be apparent or will be described in detail in the accompanying drawings and subsequent specific embodiments incorporated herein, which are collectively used to explain the specific principles of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the accompanying drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0067] Figure 1is a flowchart of a fiber Bragg grating processing method based on machine vision provided by the embodiment one of the present application;
[0068] Figure 2 is an example diagram of different categories of images mentioned by the embodiment one of the present application;
[0069] Figure 3 is a process diagram of image denoising mentioned by the embodiment one of the present application;
[0070] Figure 4 is a structure diagram of a neural network model mentioned by the embodiment one of the present application;
[0071] Figure 5 In a, b and c, a is a training and verification loss and training cycle number curve diagram, b is a fiber core recognition time statistical diagram based on repeated measurement, and c is a fiber core recognition accuracy comparison diagram before and after denoising processing;
[0072] Figure 6 In a and b, a is a microscopic image of a periodic RI modulation point in a manufactured FBG, and the period is 1.6 μm, and b is a reflection spectrum diagram of a 2 mm FBG with a measurement period of 1.6 μm;
[0073] Figure 7 is a measured signal-to-noise ratio diagram of FBG reflectivity;
[0074] Figure 8 In a, b, c and d, a is a measured reflection spectrum diagram of six FBGs with the same manufacturing parameters, b is a measured Bragg wavelength diagram of each FBG, c is a measured FWHM diagram of each reflection spectrum, and d is a measured signal-to-noise ratio diagram of each reflection spectrum;
[0075] Figure 9 is a structure diagram of a fiber Bragg grating processing system based on machine vision provided by the embodiment two of the present application.
[0076] Reference signs:
[0077] Laser 1, beam splitter 2, oil mirror 3, red light source 4, CCD camera 5, 3D motorized stage 6, computer 7. DETAILED DESCRIPTION
[0078] In order to explain the possible application scenarios, technical principles, specific schemes that can be implemented, purposes and effects that can be achieved, etc. of the present application in detail, the following will be described in detail in combination with the specific embodiments listed and with the aid of the drawings. The embodiments described in this paper are only used to more clearly illustrate the technical solutions of the present application, and therefore only serve as examples, and cannot limit the protection scope of the present application.
[0079] The term "embodiment" is mentioned herein means that the specific features, structures, or characteristics described in connection with the embodiment can be included in at least one embodiment of the present application. The term "embodiment" appearing in various places in the specification does not necessarily refer to the same embodiment, nor does it particularly limit the independence or association between other embodiments. In principle, in the present application, as long as there is no technical contradiction or conflict, each technical feature mentioned in each embodiment can be combined in any way to form a corresponding implementable technical solution.
[0080] Unless otherwise defined, the meanings of the technical terms used herein are the same as those commonly understood by those skilled in the art to which the present application belongs; the use of related terms herein is only for the purpose of describing specific embodiments, and is not intended to limit the present application.
[0081] In the description of the present application, the phrase "and / or" is a description of the logical relationship between the objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases: A exists, B exists, and A and B exist at the same time. In addition, the character " / " herein generally represents that the associated objects before and after are a "or" logical relationship.
[0082] In the present application, the terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual quantity, primary and secondary or order relationship between the entities or operations.
[0083] In the present application, without more limitation, the "includes", "contains", "has" or other similar expressions used in the sentence are intended to cover non-exclusive inclusion, and these expressions do not exclude the presence of other elements in the process, method or product including the described elements, so that the process, method or product including a series of elements can not only include those limited elements, but also include other elements not explicitly listed, or also include the elements inherent to such process, method or product.
[0084] In the present application, the expressions "greater than", "less than", "exceed" and the like are understood as not including the number; the expressions "above", "below", "within" and the like are understood as including the number. In addition, in the description of the embodiments of the present application, the meaning of "multiple" is more than two (including two), and similar expressions related to "multiple" are also understood in this way, for example, "multiple groups", "multiple times" and the like, unless otherwise explicitly limited.
[0085] In the description of the embodiments of the present application, the spatially relative terms, such as "central", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "vertical", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", and the like, indicate the orientation or positional relationship based on the orientation or position relationship shown in the specific embodiment or the accompanying drawings, and are only used to facilitate the description of the specific embodiment of the present application or facilitate the understanding of the reader, and do not indicate or imply that the indicated device or component must have a particular position, a particular orientation, or be constructed or operated in a particular orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.
[0086] Unless otherwise expressly specified or limited, the terms "mount", "connect", "connection", "fixed", "set", and the like used in the description of the embodiments of the present application should be interpreted broadly. For example, the "connection" can be a fixed connection, or a detachable connection, or an integral setting; it can be a mechanical connection, or an electrical connection, or a communication connection; it can be a direct connection, or an indirect connection through an intermediate medium; it can be a communication or interaction between two elements. For those skilled in the art, the specific meaning of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0087] Embodiment one
[0088] In view of the defects of the prior art, the present applicant, based on years of rich practical experience and professional knowledge in the field of design and manufacture, and with the application of theory, actively researches and innovates, in the hope of creating a technology that can solve the defects in the prior art. After continuous research, design, and repeated trial of samples and improvement, the present invention is finally created, which has practical value.
[0089] Please refer to Figure 1 A flowchart of a machining method of a fiber Bragg grating based on machine vision is provided for embodiment one of the present application. The method is suitable for the scene of machining the fiber core with femtosecond laser. The method specifically comprises the following steps:
[0090] S1, scanning the fiber core at the starting point, and collecting the image at the starting point position.
[0091] It should be noted that at the starting point position of the fiber core machining, the machine vision system (such as CCD camera) is used to scan the fiber core, and the image is continuously collected in the process of scanning. This image will be used for subsequent analysis and processing to determine the focal plane of the fiber core at the starting point position.
[0092] In one implementation of the embodiment, step S1 can be further specified as follows:
[0093] At the starting point, the fiber core is scanned within a range of ±30 pm, and an image at the starting point position is collected.
[0094] It should be noted that the selection of the scanning range of ±30 pm centered on the starting point aims to fully consider the possible slight deviations or irregularities of the fiber core, thereby ensuring that the image information of the starting point position and its surrounding area can be fully and accurately captured.
[0095] In one implementation of the embodiment, a crucial preliminary step, i.e., starting point selection, is added before the formal start of the entire processing flow in step S1.
[0096] An arbitrary point in the fiber core is selected as the starting point.
[0097] It should be noted that in this step, the operator needs to select an arbitrary point from the fiber core and set it as the starting point of the entire processing flow. This selection process needs to fully consider the physical properties of the fiber, processing requirements, and the continuity of subsequent steps to ensure the smooth progress of the entire processing flow. Through the setting of this preliminary step, a solid foundation is laid for the image collection, focal plane positioning, and laser processing in the subsequent steps, and the flexibility and operability of the entire processing process are further enhanced.
[0098] After the selection of the starting point is completed, the entire processing flow formally enters step S1, i.e., the starting point scanning and image collection phase, and then proceeds according to the established process until the final processing of the fiber Bragg grating is completed. The introduction of this implementation not only optimizes the processing flow but also significantly improves the processing efficiency and accuracy, providing more reliable technical support for the manufacturing of fiber Bragg gratings.
[0099] S2, input the image at the starting point position into the trained neural network model, locate the focal plane of the fiber core at the starting point position, and obtain the fiber tilt angle.
[0100] It should be noted that this step is to input the image collected at the starting point position into a pre-trained neural network model. This model can recognize and analyze images to determine the focal plane of the fiber core at the starting point position, i.e., the exact position where the laser should be focused at the starting point position. At the same time, the model can further recognize and analyze the image to determine whether the fiber is tilted and then determine the tilt angle of the fiber, which is crucial for ensuring correct laser focusing.
[0101] S3. Determine the termination point according to the fiber tilt angle and the given machining length.
[0102] It should be noted that the termination point is determined by the fiber tilt angle provided by the neural network model and the given machining length. This process takes into account the tilt of the fiber, ensuring that the laser machining path is accurate.
[0103] In one embodiment of the present embodiment, step S3 can be further specified as follows:
[0104] Move the given machining length in the direction of the fiber tilt angle to determine the termination point.
[0105] It should be noted that the termination point is the end point of the machining path. This process of determining the termination point is not simply extending the machining length in a straight line, but fully considers the possible tilt of the fiber.
[0106] Specifically, the given machining length is moved in the direction of the fiber tilt angle, i.e. the tangent direction of the actual fiber path. This movement process not only ensures that the machining path matches the actual shape of the fiber, but also avoids the machining errors that may be caused by straight-line extension.
[0107] Through this detailed calculation and movement process, the position of the termination point can be accurately determined, providing accurate targets for subsequent steps such as fiber core scanning, image acquisition, and laser machining. The introduction of this detailed implementation not only improves the accuracy and precision of the entire machining process, but also further enhances the processing quality and consistency of the fiber Bragg grating.
[0108] S4. Scan the fiber core at the termination point and acquire the image at the termination point.
[0109] It should be noted that at the determined termination point, the fiber core is scanned again using the machine vision system, and the image at this position is acquired. This image will be used for subsequent focusing plane positioning of the fiber core at the termination point.
[0110] In one embodiment of the present embodiment, step S4 can be further specified as follows:
[0111] At the termination point, scan the fiber core within a range of ±30μm and acquire the image at the termination point.
[0112] It should be noted that after the termination point of the machining path is accurately determined, the fiber core is then scanned in a small range of ± 30 μm centered on the termination point. This scanning step is similar to the scanning process at the starting point and takes into account, but the purpose is different. At the starting point, the scanning is mainly to capture the focal plane of the fiber core at the starting point position, while at the termination point, the scanning is to capture the focal plane of the fiber core at the termination point position.
[0113] S5, input the image at the termination point position into the trained neural network model to locate the focal plane of the fiber core at the termination point position.
[0114] It should be noted that this step is to input the image collected at the termination point position into the same neural network model, which will identify and analyze the image and determine the focal plane position of the fiber core at the termination point position, i.e. the exact position where the laser should be focused at the termination point position.
[0115] S6, control the laser focus to focus on the focal plane of the fiber core at the starting point position, and start machining the fiber core until the machining reaches the focal plane of the fiber core at the termination point position to obtain a fiber Bragg grating.
[0116] It should be noted that according to the focal plane coordinate positions of the fiber core at the starting point and the termination point provided by the neural network model, the focus of the femtosecond laser can be accurately controlled to focus on the focal plane of the fiber core and machined along the length direction of the fiber until the termination point is reached. This process will create a periodic refractive index change to form a fiber Bragg grating.
[0117] In one embodiment of the present embodiment, the method further comprises the establishment, training and verification process of the neural network model, i.e.:
[0118] establishing a neural network model;
[0119] dividing the collected defocus images and focus images into a training set and a verification set; the defocus images include images focused too deep and images focused too shallow;
[0120] inputting the training set into the neural network model to train the neural network model;
[0121] inputting the verification set into the neural network model to verify the neural network model, and obtaining the trained neural network model.
[0122] It should be noted that, specifically, first, according to the image recognition requirements in the process of fiber Bragg grating processing, a suitable neural network model is designed and built. The model should have powerful image processing capability, which can accurately distinguish out-of-focus images and in-focus images, and locate the focal plane of the fiber core.
[0123] Secondly, a large number of out-of-focus images and in-focus images are collected, which should cover the fiber core morphology under different focusing states. Among them, the out-of-focus images include images with too deep focus (i.e. the focus point is below the fiber core) and too shallow focus (i.e. the focus point is above the fiber core), to ensure that the neural network model can learn the changes of the focusing state comprehensively.
[0124] These images are divided into training set and validation set according to certain proportion. The training set is used for the training process of the neural network, while the validation set is used to evaluate the performance of the model, to ensure the generalization ability of the model.
[0125] Furthermore, the training set is input into the neural network model, and through multiple iterations and back propagation algorithm, the model parameters are constantly adjusted, so that the model can accurately identify and locate the focal plane of the fiber core. During the training process, the loss function and accuracy of the model can be monitored to evaluate the training effect of the model.
[0126] Finally, the validation set is input into the trained neural network model, and the performance of the model is evaluated by comparing the predicted results with the actual results.
[0127] After verification, if the model performance meets the requirements, it is considered as a trained neural network model and applied to the processing of fiber Bragg grating. If the model performance is not good, the model structure needs to be adjusted, the training data needs to be increased or the training strategy needs to be optimized to improve the recognition ability of the model.
[0128] This detailed embodiment not only reveals the important role of neural network model in the process of fiber Bragg grating processing, but also provides a complete process of model establishment, training and verification, which provides strong technical support for practical application.
[0129] In one embodiment of the present embodiment, before the step of inputting the training set into the neural network model to train the neural network model, the method further includes a pre-processing process of the image, namely:
[0130] Classifying and labeling each image;
[0131] Background subtraction is performed on each image;
[0132] The region of interest containing two boundary lines of the fiber core is cropped from the background-subtracted image;
[0133] The boundary line in the cropped region of interest is calculated for gray value to extract the calculation result as the feature of the boundary line.
[0134] It should be noted that by performing data preprocessing on the image, the accuracy and success rate of the evaluation can be improved, which is crucial for the deep learning process. Specifically, first, the interference information (such as dust or background noise) is minimized to ensure that the neural network model can pick up the key features. At the same time, the key features useful for the neural network model to extract discriminative information should be retained. Therefore, the image is preprocessed in two steps, including labeling and denoising.
[0135] During the processing, the fiber core is located on a 3D motorized stage, which moves along the z direction according to the feedback of the neural network model, which can inform the 3D motorized stage whether it has reached the focus position, i.e. whether the laser focus is focused on the focal plane of the fiber core. The neural network model only needs to provide a reference for the moving direction of the 3D motorized stage. In other words, the neural network model needs to identify whether the position of the laser focus is too deep (defocus, over-focusing, negative) or too shallow (defocus, under-focusing, positive) relative to the focus position, so that the 3D motorized stage can move in the opposite direction to reach the focus state. Therefore, the evaluation result is divided into three categories: defocus (negative), focus and defocus (positive). In order to take a large number of images for deep learning, when the 3D motorized stage moves along the z direction to scan the fiber core, a continuous video (resolution of 1,024 x 1,024, frame rate of 23) is taken. In order for the neural network model to know the classification of each image, each image in the video needs to be labeled (which can be manual labeling). Figure 2 Examples of images of different categories are shown. Due to the diffraction of the fiber core boundary, when the fiber core is defocused (negative), two white lines will appear, as shown in Figure 2 a, when the fiber core is defocused (positive), two black lines will appear, as shown in Figure 2 c. When the fiber core is focused, the diffraction disappears, as shown in Figure 2 b. These features provide useful information to identify the focus position.
[0136] Then, background subtraction is performed on each image to minimize the noise information that may interfere with the deep learning process, as shown in Figure 3 . In this way, the salient features that need to be identified can be highlighted. In addition, in order to further reduce the influence of the area without boundary lines and speed up the deep learning process, the region of interest containing the two boundary lines of the fiber core is cropped for deep learning processing, and then the average gray value of the boundary line is calculated to extract the calculation result as the feature of the boundary line, which is input into the model for training.
[0137] In one embodiment of the present embodiment, as shown inFigure 4 As shown, the neural network model adopts a multi-layer perceptron (MLP) model, including an input layer, four dense layers and an output layer; each dense layer is composed of multiple neurons, responsible for calculating hidden information. A nonlinear activation function (such as a rectified linear unit (ReLU) activation function) is used between each adjacent two dense layers to make the information nonlinear, trying to capture more nonlinear information in the information propagation process;
[0138] As shown in the embodiment, the first dense layer contains 32 neurons, followed by a ReLU activation function; then, the results of the first dense layer pass through the second and third dense layers with different numbers of neurons, also using the ReLU activation function; Figure 4 The second dense layer contains 64 neurons;
[0139] The third dense layer contains 64 neurons;
[0140] The fourth dense layer contains 3 neurons and uses a SoftMax function for output.
[0141] It should be noted that the purpose of the embodiment is to enable the MLP model to learn deep features through different dense layers, in which different numbers of neurons capture different aspects of deep features, and the ReLU activation function can make the features nonlinear. The last dense layer is composed of 3 neurons corresponding to three classes, followed by a SoftMax function (mapping the results to the probability of each class).
[0142]
[0143] … (1);
[0144] … (2);
[0145] where k is equal to the number of categories, and x is the result before ReLU function activation.
[0146] In the embodiment, the MLP model is trained using a training set of 8000 images. An early stopping strategy is adopted to select the best model according to the loss of the validation set (2000 images). The purpose of training is to minimize the loss through weight updates.
[0147] In one embodiment of the embodiment, the step of inputting the training set into the neural network model to train the neural network model can be further refined to include the following content:
[0148] Random values are assigned to the weights of the neural network model; the selection of these initial values has an important influence on the training effect of the model;
[0149] An image in the training set is input into the neural network model for forward propagation to generate a prediction and output;
[0150] The loss between the prediction and the corresponding true value is calculated;
[0151] The weights of the neural network model are updated using the calculated loss; this step aims to reduce the difference between the prediction and the true value by adjusting the weights, thereby improving the accuracy of the model;
[0152] The next image in the training set is input into the neural network model for forward propagation, loss calculation, and weight update until the pre-set termination condition is met. The termination condition can include reaching a specified number of iterations, the loss value being less than a certain threshold, or the performance of the model no longer improving on the validation set, etc.
[0153] It should be noted that the loss function used in the training process is Mean Squared Error (MSE), and the learning rate (λ) is set to 0.0001. Formula (3) defines the calculation of MSE, and formula (4) shows the training optimization process. Figure 5 The loss monitoring during the training process is shown.
[0154] … (3);
[0155] … (4);
[0156] wherein, is the true value of the sample, is the prediction of the sample, is the parameter of the layer, τ is the learning rate, is the updated parameter of the layer, L is the loss. The training is optimized by monitoring the loss at each step, as shown in a. In the step of verifying the minimum loss, the optimal model is selected. Figure 5
[0157] Accuracy and efficiency are key parameters for evaluating the goodness of the model. The accuracy is determined by using 1408 test images (out-of-focus (positive): 627; in-focus: 84; out-of-focus (negative): 717) that are not used in the model training to identify the fiber core. Table 1 shows the classification confusion matrix.
[0158] Table 1:
[0159]
[0160] Accuracy is a metric for measuring the performance of a focus recognition model, and it is defined as:
[0161] ... (5);
[0162] Where TP represents true positive, TN represents true negative, FP represents false positive, and FN represents false negative. According to Table 1, the accuracy rate of the fiber core identification model is 96.09%, which is very high and confirms the success of the model.
[0163] Furthermore, fiber core identification efficiency is measured by the output time per image, such as... Figure 5 As shown in b in the figure. The average prediction time is approximately 0.002 seconds (using a Windows laptop equipped with an Intel Core i7-10875H@2.30 GHz CPU, 32GB RAM, and an RGX3070 GPU), equivalent to approximately 500 FPS. This fast response time makes the model suitable for real-time fiber core identification. To further understand the method, experiments were conducted in this embodiment to observe the denoising effect (e.g., Figure 5 (As shown in c). Under the same conditions, the recognition accuracy of the denoised image is much higher than that of the undenoised image, confirming the necessity of denoising.
[0164] By utilizing the fabrication method provided in this embodiment, the inventors successfully fabricated a series of FBGs in commercial Corning SMF-28 optical fiber. Figure 6 Figure 'a' shows a local microscopic image of a 2 mm long FBG with a RI modulation point period of 1.6 μm. The corresponding fabrication parameters are: femtosecond laser power of 70 μW, femtosecond laser pulse width of 100 fs, repetition rate of 1 kHz, fabrication speed of 8 μm / s, fabrication frequency of 5 Hz, and fabrication duty cycle of 50%. A tunable fiber laser source (ANDO AQ4321D, spectral region 1520-1620) was directly introduced into the FBG, and the reflection spectrum of the FBG was measured. Figure 6 Figure b shows the measured reflectance spectrum of the FBG, with a full width at half maximum (FWHM) of approximately 0.4 nm, a signal-to-noise ratio of approximately 30 dB, and a Bragg wavelength of 1537.65 nm, following the equation mλFBG = 2neffΛ, where m is the grating order, neff is the effective refractive index of the fiber, and Λ is the period of the point. Therefore, the new AI-driven PbP fs DLW system demonstrates its ability to fabricate high-quality FBGs.
[0165] Furthermore, to fabricate higher-quality FBGs using this method, the fabrication parameters were optimized in this embodiment. The two main parameters requiring optimization are the FBG length and the femtosecond laser power. In this embodiment, the RI modulation point period is still set to 1.6 μm, resulting in a fabrication speed of 8 μm / s, a fabrication frequency of 5 Hz, and a fabrication duty cycle of 50%. This embodiment fabricated a series of FBGs with lengths of 1, 2, 3, and 5 mm, each fabricated using different femtosecond laser powers: from 65 to 90 μW. Figure 7 The measured signal-to-noise ratios of the reflectance of these FBGs were plotted. Within the experimental parameter range, two obvious conclusions can be drawn: first, the longer the FBG, the greater the reflectance; second, when the femtosecond laser power is set to 70 μW, FBGs of various lengths with the highest reflectance can be fabricated.
[0166] Repeatability is one of the most important characteristics of a mature and reliable machining method. Therefore, based on optimized machining parameters, this embodiment tests the repeatability of the machining method by machining six 2 mm FBGs with identical parameters: RI modulation point period of 1.6 μm; fs laser power of 70 μW; fs laser pulse width of 100 fs; repetition rate of 1 kHz; machining speed of 8 μm / s; machining frequency of 5 Hz; and machining duty cycle of 50%. The measured reflectance spectra of these FBGs are as follows: Figure 8 As shown in a, they almost overlap, ignoring the fluctuations caused by the connection between the FBG and the fiber laser source. Figure 8 In this example, 'b' represents the Bragg wavelength of the six FBGs, which is 1537.6 nm. The measurement error of ±0.05 nm is negligible. This embodiment uses a Gaussian distribution to fit these reflectance spectra and calculates their full width at half maximum (FWHM). Figure 8 As shown in c, the FWHM is 0.4 ± 0.03 nm. Figure 8 The 'd' in the figure represents the signal-to-noise ratio of the reflectance spectrum, which is as high as 30 ± 2 dB. Therefore, this processing method has proven its repeatability in high-quality FBG manufacturing, making it one of the most efficient and simplest techniques for large-scale FBG production.
[0167] This invention demonstrates the broad application prospects of machine vision in the field of femtosecond laser FBG processing. This advancement in low-cost and high-speed technology will further promote the commercialization and application of femtosecond FBG processing.
[0168] Although this application uses terms such as machine vision, focal plane, and fiber optics frequently, the possibility of using other terms is not excluded. These terms are used merely for the convenience of describing and explaining the essence of the invention; interpreting them as any additional limitation would contradict the spirit of the invention.
[0169] The embodiment of the present application provides a fiber Bragg grating processing method based on machine vision, which realizes automatic identification of the focal plane of the fiber core by combining advanced machine vision technology and neural network model technology, so as to automatically focus the laser focal point to the focal plane of the fiber core, thereby realizing the automation and intelligentization of the fiber Bragg grating processing process, which not only has the characteristics of high precision and high efficiency, but also has broad application prospects, and provides strong support for the development of fiber communication, sensing and other fields.
[0170] Embodiment two
[0171] Please refer to Figure 9 The embodiment two of the present application provides a fiber Bragg grating processing system based on machine vision, which comprises a laser 1, a beam splitter 2, an oil lens 3, a red light source 4, a CCD camera 5, a 3D motorized stage 6 and a computer 7; wherein,
[0172] The 3D motorized stage 6 is used for carrying the optical fiber and driving the optical fiber to move;
[0173] The laser 1 is located above the 3D motorized stage 6 and is used for emitting a laser beam;
[0174] The oil lens 3 is located between the 3D motorized stage 6 and the laser 1 and is used for focusing the laser beam;
[0175] The red light source 4 is located below the 3D motorized stage 6 and is used for emitting red illumination light to illuminate the optical fiber;
[0176] The beam splitter 2 is located between the oil lens 3 and the laser 1 and is used for reflecting the red illumination light to the CCD camera 5;
[0177] The CCD camera 5 is located on the reflection light surface of the beam splitter 2 and is used for collecting the image of the optical fiber;
[0178] The computer 7 is used for:
[0179] Controlling the 3D motorized stage 6 to move, controlling the CCD camera 5 to scan the core of the optical fiber at a starting point, and collecting the image at the starting point position;
[0180] Inputting the image at the starting point position into a trained neural network model, positioning the focal plane of the core of the optical fiber at the starting point position, and obtaining the fiber tilt angle;
[0181] Determining a termination point according to the fiber tilt angle and a given processing length;
[0182] controlling the 3D motorized stage 6 to move, and controlling the CCD camera 5 to scan the fiber core at the termination point and collect an image at the termination point position;
[0183] inputting the image at the termination point position into a trained neural network model to locate the focal plane of the fiber core at the termination point position;
[0184] controlling the 3D motorized stage 6 to move to focus the laser focal point of the laser 1 to the focal plane of the fiber core at the starting point position, and start processing the fiber core until the focal plane of the fiber core at the termination point position, to obtain a fiber Bragg grating.
[0185] It should be noted that the laser 1 can be a femtosecond laser with a wavelength of 800 nm, a pulse width of 100 fs, and a variable repetition rate. The collimated fs laser beam is focused into the fiber core through an oil objective 3 (100x magnification) with a high NA (1.45). The fiber can be mounted in a V-groove holder, which is fixed on a 3D motorized stage 6 with nanometer-level resolution. A 650 nm red light source 4 (LED light source) is placed below the fiber for illumination, and the illumination light is reflected into the CCD camera 5 through the beam splitter 2. During the FBG manufacturing process, the fiber core images collected by the CCD camera 5 are transmitted to the computer 7 in real time, and the computer 7 realizes the automatic identification of the focal plane of the fiber core by combining advanced machine vision technology and neural network model technology, so as to automatically focus the laser focal point to the focal plane of the fiber core, thereby realizing the automation and intelligentization of the fiber Bragg grating processing process. It not only has the characteristics of high precision and high efficiency, but also has broad application prospects, and provides strong support for the development of fiber communication, sensing and other fields.
[0186] Finally, it should be noted that although the above embodiments have been described in the specification and drawings of the present application, they do not limit the scope of patent protection of the present application. Any equivalent structure or equivalent flow replacement or modification based on the essential concept of the present application, using the content described in the specification and drawings of the present application, as well as the direct or indirect implementation of the technical solutions of the above embodiments in other related technical fields, are all included in the scope of patent protection of the present application.
Claims
1. A method of machining a fiber Bragg grating based on machine vision, characterized by, The method comprises: scanning the fiber core at the starting point and collecting an image at the starting point position; inputting the image at the starting point position into a trained neural network model, locating the focal plane of the fiber core at the starting point position, and obtaining a fiber tilt angle; determining a termination point according to the fiber tilt angle and a given processing length; scanning the fiber core at the termination point and collecting an image at the termination point position; inputting the image at the termination point position into the trained neural network model, locating the focal plane of the fiber core at the termination point position; controlling the laser focus to focus on the focal plane of the fiber core at the starting point position, and starting to process the fiber core until the focal plane of the fiber core at the termination point position is processed to obtain a fiber Bragg grating.
2. The method of claim 1, wherein the method further comprises: Before the step of scanning the fiber core at the starting point and collecting an image at the starting point position, the method further comprises: selecting any point in the fiber core as the starting point.
3. The method of claim 1, wherein the method further comprises: The step of scanning the fiber core at the starting point and collecting an image at the starting point position specifically comprises: scanning the fiber core at the starting point within a range of ±30μm and collecting an image at the starting point position.
4. The method of claim 1, wherein the method further comprises: The step of determining a termination point according to the fiber tilt angle and a given processing length specifically comprises: moving along a direction tilted by the fiber tilt angle by a given processing length to determine the termination point.
5. The method of claim 1, wherein the method further comprises: The step of scanning the fiber core at the termination point and collecting an image at the termination point position specifically comprises: scanning the fiber core at the termination point within a range of ±30μm and collecting an image at the termination point position.
6. The method of claim 1, wherein the method further comprises: The method further comprises: establishing a neural network model; dividing the collected defocused images and focused images into a training set and a validation set; the defocused images include over-focused images and under-focused images; inputting the training set into the neural network model to train the neural network model; inputting the validation set into the neural network model to verify the neural network model, thereby obtaining the trained neural network model.
7. The method of claim 6, wherein the method further comprises: Before the step of inputting the training set into the neural network model to train the neural network model, the method further comprises: performing classification annotation on each image; performing background subtraction on each image; cropping a region of interest containing two boundary lines of the fiber core from the background-subtracted image; performing gray value calculation on the boundary lines in the cropped region of interest to extract the calculation results as features of the boundary lines.
8. The method of claim 6, wherein the method further comprises: The neural network model comprises an input layer, four dense layers, and an output layer; a nonlinear activation function is used between each adjacent two dense layers; the first dense layer contains 32 neurons; the second dense layer contains 64 neurons; the third dense layer contains 64 neurons; the fourth dense layer contains 3 neurons and adopts a SoftMax function for output.
9. The method of claim 6, wherein the method further comprises: The step of inputting the training set into the neural network model to train the neural network model comprises: allocating random values to weights of the neural network model; inputting an image in the training set into the neural network model for forward propagation to generate a predicted value and output; calculating a loss between the predicted value and a corresponding true value, the loss function being mean square error; updating the weights of the neural network model using the calculated loss; continuing to input the next image in the training set into the neural network model for forward propagation, loss calculation and weight updating until a preset termination condition is met.
10. A machine vision based fiber Bragg grating processing system, characterized by, The system comprises a laser, a beam splitter, an oil lens, a red light source, a CCD camera, a 3D motorized stage and a computer; wherein, The 3D motorized stage is used to carry and move the optical fiber; The laser is located above the 3D motorized stage and is used to emit a laser beam; The oil lens is located between the 3D motorized stage and the laser and is used to focus the laser beam; The red light source is located below the 3D motorized stage and is used to emit red illumination light to illuminate the optical fiber; The beam splitter is located between the oil lens and the laser and is used to reflect the red illumination light to the CCD camera; The CCD camera is located on the reflection surface of the beam splitter and is used to collect the image of the optical fiber; The computer is used to: control the 3D motorized stage to move and control the CCD camera to scan the fiber core at a starting point and collect the image at the starting point; input the image at the starting point into the trained neural network model, locate the focal plane of the fiber core at the starting point, and obtain the fiber tilt angle; determine a termination point according to the fiber tilt angle and a given processing length; control the 3D motorized stage to move and control the CCD camera to scan the fiber core at the termination point and collect the image at the termination point; input the image at the termination point into the trained neural network model, locate the focal plane of the fiber core at the termination point; control the 3D motorized stage to move to focus the laser focal point of the laser to the focal plane of the fiber core at the starting point, and start processing the fiber core until the focal plane of the fiber core at the termination point is reached, to obtain the fiber Bragg grating.
Citation Information
Patent Citations
Method for preparing phase shift optical fiber bragg grating based on femtosecond laser direct writing
CN106291802A
Image processing method and device, computer readable storage medium, and computer equipment
CN108764370A