A method for preparing a fiber microstructure based on deep learning
By employing a deep learning-based method for fabricating fiber microstructures, and utilizing the EfficientNets model to extract image features and output displacement values, the high computational burden and low accuracy of traditional methods in complex image processing are resolved, thus achieving efficient and precise fabrication of fiber microstructures.
Patent Information
- Application Number
- CN202410992052.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-07-23
AI Technical Summary
Traditional fiber optic sensor fabrication methods suffer from high computational burden and are affected by noise when processing complex or highly variable images, making it difficult to achieve efficient and accurate fiber optic microstructure fabrication.
A deep learning-based fiber microstructure fabrication method is adopted. By training a deep learning model to extract image features, the displacement is directly output to focus the light spot, eliminating the need for traditional filtering and peak detection steps. The EfficientNets model is used for image processing and focusing.
It significantly improves the speed and accuracy of fiber optic focusing, making it suitable for large-scale or real-time processing tasks. It can identify subtle features that traditional algorithms ignore, achieving more precise focusing.
Smart Images

Figure CN119027717B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to optical fiber device preparation technology, and in particular to a method for preparing optical fiber microstructure. BACKGROUND
[0002] Optical fiber sensors realize the detection of environmental parameters through the internal optical fiber microstructure (including but not limited to optical fiber gratings, optical fiber microcavities or optical fiber weak reflection points, etc.). Due to its inherent passive, strong anti-interference ability, remote telemetry, easy networking and multiplexing, it is widely used in key fields such as structural health monitoring, oil and gas exploration and clinical medical detection.
[0003] The traditional automatic preparation method of optical fiber sensor mainly includes the following steps: first, manually aligning the optical fiber, and capturing the image of the core area of the optical fiber by a CCD camera. Next, filter the image to make the fiber boundary visible, then convert the original ccd image into a gray value image using image processing technology for boundary recognition, and statistically analyze the inflection points, peak values and other information of the gray value image by rows and columns, so as to realize automatic focusing of the optical fiber position. The starting point and the end point of the microstructure preparation process are input into a three-dimensional displacement platform, and the laser is turned on and the displacement table is moved to prepare the microstructure.
[0004] However, the traditional algorithm usually relies on image filtering and calculation of gray value distribution peak to determine the displacement, which is relatively simple and effective when dealing with single or low variability image data. However, in the face of complex or changing application environment, the performance of different types or quality changes of image may be affected, and manual adjustment of parameters is needed to adapt to new image features. The traditional algorithm needs to perform filtering and peak detection steps every time it processes an image, which may cause high computational burden in large-scale or real-time processing requirements. And when the image has noise or other interference factors, the accuracy of the traditional algorithm may decrease, especially the peak detection step is easily affected by noise. SUMMARY
[0005] In order to solve the above technical problems of the prior art, the present application provides a method for preparing optical fiber microstructure based on deep learning, which can improve the focusing speed and accuracy of the optical fiber.
[0006] The technical problem to be solved by the present application is solved by the following technical scheme:
[0007] A method for preparing optical fiber microstructure based on machine learning, the optical fiber to be processed has at least one processing area; the method for preparing optical fiber microstructure includes the following steps:
[0008] Step S1: acquiring a first end image of the processing area;
[0009] Step S2: calculate the gray position distribution map of the head-end image;
[0010] Step S3: input the gray position distribution map of the head-end image into the deep learning model that has been trained, to obtain the head-end displacement amount output by the deep learning model;
[0011] Step S4: drive the processing region to displace according to the head-end displacement amount, so as to focus the spot focus of the femtosecond laser on the center of the head end of the processing region, and obtain the head-end center coordinate;
[0012] Step S5: collect the tail-end image of the processing region;
[0013] Step S6: calculate the gray position distribution map of the tail-end image;
[0014] Step S7: input the gray position distribution map of the tail-end image into the deep learning model that has been trained, to obtain the tail-end displacement amount output by the deep learning model;
[0015] Step S8: drive the processing region to displace according to the tail-end displacement amount, so as to focus the spot focus of the femtosecond laser on the center of the tail end of the processing region, and obtain the tail-end center coordinate;
[0016] Step S9: determine the central axis of the processing region according to the head-end center coordinate and the tail-end center coordinate of the processing region;
[0017] Step S10: drive the processing region to displace according to the central axis of the processing region, so as to prepare the required microstructure in the processing region by the spot focus of the femtosecond laser.
[0018] Further, the optical fiber microstructure preparation method further comprises training the deep learning model, wherein the step of training the deep learning model is as follows:
[0019] Step 100: obtain multiple optical fiber images of a sample optical fiber at different positions;
[0020] Step 200: calculate the gray position distribution map of each optical fiber image;
[0021] Step 300: determine whether each optical fiber image has an obvious core boundary and the position of the core center according to the gray position distribution map of each optical fiber image, and mark the corresponding label;
[0022] Step 400: divide the gray position distribution maps of the optical fiber images into a training data set and a test data set;
[0023] Step 500: constructing the deep learning model, training the deep learning model using the training data set, and testing the deep learning model using the test data set.
[0024] Further, in step 200, each optical fiber image is preprocessed to enhance the gray scale features of each optical fiber image, and then the gray scale position distribution map of each optical fiber image is calculated.
[0025] Further, in the preprocessing, first, a Gaussian filter is used to filter each optical fiber image, and then two Gaussian filters with different standard deviations are used to convolve each optical fiber image to obtain images I and I', and the image I and the image I' of each optical fiber image are subtracted to finally obtain the optical fiber image after the second filtering processing.
[0026] Further, the displacement corresponding to each label is configured.
[0027] Further, in steps S3 and S7, after obtaining the label output by the deep learning model, the displacement corresponding to the label is matched by looking up the table.
[0028] Further, the deep learning model is an EfficientNets model.
[0029] Further, in step 500, the training of the deep learning model using the training data set is as follows:
[0030] Step 510: using 32 3x3x3 convolution kernels to downsample the training data set with a step size of 2x2, and then passing through a batch normalization layer and an activation function to output a first batch of feature maps with a size of 112x112x32;
[0031] Step 520: using the mobile flip bottleneck convolution module to perform depth convolution, global average pooling, and compression excitation operations on the first batch of feature maps to output a second batch of feature maps with a size of 112x112x16;
[0032] Step 530: performing mobile flip bottleneck convolution twice on the second batch of feature maps, and then performing pointwise convolution, depth convolution, and compression excitation operations, with a dilation ratio of 6 for the mobile flip bottleneck convolution, to output a third batch of feature maps with a size of 56x56x96;
[0033] Step 540: performing mobile flip bottleneck convolution with a 5x5 convolution kernel multiple times on the third batch of feature maps to gradually reduce the resolution and increase the depth, including multiple compression excitation operations and connection inactivation operations, to output a fourth batch of feature maps with a size of 7x7x192;
[0034] Step 550: single moving flip bottleneck convolution is performed on the fourth batch of feature maps to expand the number of channels to 320, and a fifth batch of feature maps with an output size of 7x7x320 is output;
[0035] Step 560: 1x1 convolution is performed on the fifth batch of feature maps, then a batch normalization layer and Swish activation are performed, and then a global average pooling layer and random inactivation operation are performed to a fully connected layer, and finally a classification layer is output to output a classification result.
[0036] Further, in step 500, when the test data set is input into the deep learning model for testing, the labels of each gray position distribution map in the test data set output by the deep learning model are received, and the labels output by the deep learning model are compared with the labels marked in step 300, the accuracy of the deep learning model is calculated, when the accuracy reaches the preset value, the training of the deep learning model is ended, when the accuracy does not reach the preset value, the model parameters of the deep learning model are optimized, and retraining and testing are performed until the accuracy reaches the preset value.
[0037] Further, the model parameters of the deep learning model are optimized by using an sgd optimizer.
[0038] The present application has the following advantages:
[0039] The optical fiber microstructure preparation method of the present application can learn more complex image features and internal laws from a large amount of data by training a deep learning model based on a large number of optical fiber images, thus having better adaptability to new or changed image features; and once the training is completed, the deep learning model can be directly applied to new images, eliminating the filtering and peak detection steps in the traditional steps, significantly improving the processing speed, and being particularly suitable for large-scale or real-time processing tasks. The deep learning model can recognize and utilize subtle features that may be ignored by traditional algorithms through training, which can include minor changes in images, complex texture information, etc., thereby achieving more accurate focusing. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 The system architecture block diagram of the optical fiber microstructure preparation system based on machine learning provided by the present application is provided.
[0041] Figure 2 The system structure schematic diagram of the optical fiber microstructure preparation system based on machine learning provided by the present application is provided.
[0042] Figure 3 The step block diagram of the optical fiber microstructure preparation method based on machine learning provided by the present application is provided.
[0043] Figure 4 A step block diagram for training a deep learning model in a machine learning based optical fiber microstructure preparation method provided by the present application.
[0044] Figure 5 A step block diagram for step 500 in a machine learning based optical fiber microstructure preparation method provided by the present application. DETAILED DESCRIPTION
[0045] The present application will be described in detail below with reference to the drawings and examples, examples of which are shown in the drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions throughout. The examples described below by reference to the drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application.
[0046] In the description of the present application, it should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the purpose of facilitating the description of the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.
[0047] In addition, the terms "first", "second", "third" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined with "first", "second", "third" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise explicitly specified and limited.
[0048] In the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connection", "fixing", "setting" and the like should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or it can be integrated; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements or the interaction relationship between two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0049] Example one
[0050] As shown in Figures 1-2 A machine learning based optical fiber microstructure preparation method for a preparation system, the preparation system comprising:
[0051] The three-axis displacement device 1 is used to drive the optical fiber to be processed to move.
[0052] Imaging device 2 is used to image the optical fiber to be processed;
[0053] Femtosecond laser device 3 is used to emit femtosecond lasers to prepare microstructures within the optical fiber to be processed;
[0054] The position detection device 4 is used to detect the core center of the optical fiber to be processed;
[0055] The control device 5 is used to connect and control the triaxial displacement device 1, the imaging device 2, the femtosecond laser device 3, and the position detection device 4.
[0056] like Figure 3 As shown, the optical fiber to be processed has at least one processing region along the X-axis direction, where the X-axis direction is the direction of the fiber axis; the method for fabricating the optical fiber microstructure includes the following steps:
[0057] Step S1: Acquire the image of the beginning of the processing area.
[0058] In step S1, the control device 5 controls the three-axis displacement device 1 to move the processing area along the X-axis direction to move the head end of the processing area into the imaging range of the imaging device 2, and then controls the imaging device 2 to image the head end of the processing area, and finally obtain the head end image.
[0059] Step S2: Calculate the grayscale position distribution map of the first image.
[0060] In step S2, the control device 5 calculates the cumulative grayscale value or average grayscale value of each row / column pixel in the first-end image, and then establishes the grayscale position distribution map with the row / column position as the horizontal axis and the cumulative grayscale value or average grayscale value as the vertical axis. Specifically, the cumulative grayscale value of each row / column pixel is obtained by summing the grayscale values of all pixels in each row / column pixel, and the average grayscale value of each row / column pixel is obtained by dividing the cumulative grayscale value by the number of pixels in each row / column pixel.
[0061] If the fiber optic axis direction in the first image is parallel to the row direction of the image, then the row position is used as the horizontal axis of the grayscale position distribution map, and the cumulative grayscale value or average grayscale value of each row of pixels is calculated as the vertical axis of the grayscale position distribution map; if the fiber optic axis direction in the first image is parallel to the column direction of the image, then the column position is used as the horizontal axis of the grayscale position distribution map, and the cumulative grayscale value or average grayscale value of each column of pixels is calculated as the vertical axis of the grayscale position distribution map.
[0062] Preferably, in this step S2, the leading end image is pre-processed to enhance the gray scale features of the leading end image, and then the gray scale position distribution map of the leading end image is calculated.
[0063] In the pre-processing, the control module first filters the leading end image by using a Gaussian filter or the like to reduce the noise of the leading end image, so that the leading end image is clearer, and then convolves the leading end image by using two Gaussian filters with different standard deviations to obtain images I and I', and subtracts the images I and I' to enhance the gray scale features of the leading end image, and finally obtains the leading end image after the second filtering processing.
[0064] Step S3: inputting the gray scale position distribution map of the leading end image into the deep learning model which is completed training to obtain the leading end displacement amount output by the deep learning model.
[0065] In this step S3, the deep learning model is integrated in the position detection device 4, and the deep learning model is trained by a large number of fiber images in advance, can extract and automatically classify the gray scale features of the gray scale position distribution map, and output the displacement amount corresponding thereto.
[0066] Due to the influence of the resources of the deep learning model, the gray scale position distribution map of the leading end image needs to be converted into an image with a predetermined size before being input into the deep learning model.
[0067] Step S4: driving the processing area to displace according to the leading end displacement amount, so as to focus the spot focus of the femtosecond laser on the center of the leading end of the processing area, and obtain the center coordinates of the leading end.
[0068] In this step S4, since the focusing objective 6 is shared by the femtosecond laser device 3 and the imaging device 2, the spot focus of the femtosecond laser device 3 and the imaging focus of the imaging device 2 are coincident, the control device 5 controls the three-axis displacement device 1 to drive the processing area to displace along the Y-axis direction and the Z-axis direction according to the leading end displacement amount, the Y-axis direction and the Z-axis direction are two fiber radial directions perpendicular to each other, so that the core boundary (focusing in the Z-axis direction) appears obviously in the leading end image collected by the imaging device 2 in real time, and the center of the leading end of the processing area is displaced to the image center, so that the spot focus of the femtosecond laser can be focused on the center of the leading end of the processing area, and then the three-axis displacement device 1 obtains and records the center coordinates (X1, Y1, Z1) of the leading end.
[0069] Wherein, the XY plane is the imaging plane of the imaging device 2, and the Z-axis direction is also the incident direction of the femtosecond laser.
[0070] Step S5: capturing an end image of the processing region.
[0071] In this step S5, the control device 5 controls the three-axis displacement device 1 to displace the processing region along the X-axis direction, so as to displace the end of the processing region into the shooting range of the imaging device 2, and then controls the imaging device 2 to image the end of the processing region, and finally obtains the end image.
[0072] Step S6: calculating a gray position distribution map of the end image.
[0073] In this step S6, the control device 5 calculates the gray accumulated value or the gray average value of each row / column pixel point in the end image, and establishes the gray position distribution map by taking the row / column position as the horizontal axis and taking the gray accumulated value or the gray average value as the vertical axis. The gray accumulated value of each row / column pixel point is obtained by accumulating the gray values of all pixel points in each row / column pixel point, and the gray average value of each row / column pixel point is obtained by dividing the gray accumulated value by the number of pixel points in each row / column pixel point.
[0074] If the fiber axis direction in the end image is parallel to the image row direction, the row position is taken as the horizontal axis of the gray position distribution map, and the gray accumulated value or the gray average value of each row pixel point is calculated as the vertical axis of the gray position distribution map; if the fiber axis direction in the end image is parallel to the image column direction, the column position is taken as the horizontal axis of the gray position distribution map, and the gray accumulated value or the gray average value of each column pixel point is calculated as the vertical axis of the gray position distribution map.
[0075] Preferably, in this step S6, the end image is preprocessed to enhance the gray feature of the end image, and then the gray position distribution map of the end image is calculated.
[0076] In the preprocessing, the control module first filters the end image by using a Gaussian filter or the like to reduce the noise of the end image, so that the end image is clearer, and then convolves the end image by using two Gaussian filters with different standard deviations to obtain an image I and an image I', and subtracts the image I from the image I' to enhance the gray feature of the end image, and finally obtains the end image after the secondary filtering.
[0077] Step S7: inputting the gray position distribution map of the end image into the deep learning model after training to obtain the end displacement amount output by the deep learning model.
[0078] In this step S7, the position detection device 4 is integrated with the deep learning model, which is trained in advance by a large number of fiber images, can extract gray-scale features and automatically classify the gray-scale position distribution map, and output the corresponding displacement amount.
[0079] Due to the resource limitation of the deep learning model, the gray-scale position distribution map of the end image needs to be converted into a predetermined size image before being input into the deep learning model.
[0080] Step S8: According to the end displacement amount, drive the processing area to displace, so that the focal point of the femtosecond laser spot is focused on the center of the end of the processing area, and the first end center coordinate is obtained.
[0081] In this step S8, since the femtosecond laser device 3 and the imaging device 2 share the focusing objective 6, the focal point of the femtosecond laser device 3 and the imaging focal point of the imaging device 2 are coincident, the control device 5 controls the three-axis displacement device 1 to drive the processing area to displace along the Y-axis direction and the Z-axis direction according to the end displacement amount, the Y-axis direction and the Z-axis direction are two fiber radial directions perpendicular to each other, so that the end image collected by the imaging device 2 in real time has obvious core boundary (focusing in the Z-axis direction), and the center of the end of the processing area is displaced to the image center (focusing in the Y-axis direction), that is, the focal point of the femtosecond laser spot is focused on the center of the end of the processing area, then the three-axis displacement device 1 obtains and records the end center coordinate (X2, Y2, Z2).
[0082] Wherein, the XY plane is the imaging plane of the imaging device 2, and the Z-axis direction is also the incident direction of the femtosecond laser.
[0083] Step S9: According to the first end center coordinate and the end center coordinate of the processing area, determine the center axis of the processing area.
[0084] In this step S9, the line connecting the first end center and the end center is the center axis of the processing area, and the control module calculates the straight line equation of the center axis according to the first end center coordinate (X1, Y1, Z1) and the end center coordinate (X2, Y2, Z2).
[0085] Step S10: According to the center axis of the processing area, drive the processing area to displace, so that the focal point of the femtosecond laser spot is prepared in the processing area to prepare the required microstructure.
[0086] In this step S10, the control device 5 first controls the three-axis displacement device 1 to displace the machining region along the X-axis direction, Y-axis direction and Z-axis direction to refocus the focal point of the femtosecond laser spot on the center of the first end of the machining region, and then determines the displacement amount of each machining point in the microstructure in the X-axis direction, Y-axis direction and Z-axis direction relative to the center axis according to the machining track of the microstructure, and controls the three-axis displacement device 1 to displace the machining region along the X-axis direction, Y-axis direction and Z-axis direction to prepare each machining point of the microstructure.
[0087] Embodiment Two
[0088] As an optimization scheme of Embodiment One, in this embodiment, the optical fiber microstructure preparation method further comprises training the deep learning model, wherein, as shown in the following steps, the deep learning model is trained as follows: Figure 4
[0089] Step 100: Obtain multiple optical fiber images of the sample optical fiber at different positions.
[0090] In this step 100, different positions mainly refer to the positions of the sample optical fiber in the Y-axis direction and Z-axis direction. When the three-axis displacement device 1 only moves the sample optical fiber along the X-axis direction, the optical fiber image collected by the imaging device 2 hardly changes. When the three-axis displacement device 1 moves the sample optical fiber along the Y-axis direction, the position of the core center in the optical fiber image collected by the imaging device 2 changes. When the three-axis displacement device 1 moves the sample optical fiber along the Z-axis direction, the definition of the core boundary in the optical fiber image collected by the imaging device 2 changes.
[0091] The control device 5 controls the three-axis displacement device 1 to displace the sample optical fiber along the Y-axis direction and Z-axis direction to displace different positions of the sample optical fiber into the shooting range of the imaging device 2, and then controls the imaging device 2 to image different positions of the sample optical fiber, and finally obtains multiple optical fiber images of different positions.
[0092] In this embodiment, the sample optical fiber can be only one or multiple, and the sample optical fiber is of the same type as the machining optical fiber.
[0093] Step 200: Calculate the gray position distribution map of each optical fiber image.
[0094] In the step 200, the control device 5 calculates the gray value accumulation or average of each row / column pixel in each fiber image, and establishes the gray position distribution map with the row / column position as the horizontal axis and the gray value accumulation or average as the vertical axis. The gray value accumulation of all the pixels in each row / column pixel is calculated, and the gray value average of each row / column pixel is calculated by dividing the gray value accumulation by the number of pixels in each row / column.
[0095] If the axis direction of the sample fiber in each fiber image is parallel to the image row direction, the row position is taken as the horizontal axis of the gray position distribution map, and the gray value accumulation or average of each row pixel is calculated as the vertical axis of the gray position distribution map. If the axis direction of the sample fiber in each fiber image is parallel to the image column direction, the column position is taken as the horizontal axis of the gray position distribution map, and the gray value accumulation or average of each column pixel is calculated as the vertical axis of the gray position distribution map.
[0096] Preferably, in the step 200, each fiber image is preprocessed to enhance the gray feature of each fiber image before the gray position distribution map of each fiber image is calculated.
[0097] In the preprocessing, the control module first filters each fiber image by using a Gaussian filter to reduce the noise of each fiber image and make each fiber image clearer, and then convolves each fiber image by using two Gaussian filters with different standard deviations to obtain images I and I', and subtracts the image I from the image I' to enhance the gray feature of each fiber image, and finally obtains the fiber image after the secondary filtering.
[0098] Step 300: According to the gray position distribution map of each fiber image, it is determined whether each fiber image has an obvious core boundary and the position of the core center, and the corresponding label is marked.
[0099] In the step 300, the control device 5 mainly classifies the labels according to the distribution of the peak and valley in the gray position distribution map.
[0100] In different positions in the Z-axis direction, the optical fiber image has three cases, i.e. no core boundary, no obvious core boundary and obvious core boundary, which are respectively reflected in the gray position distribution diagram as no double peak (or no double valley), double peak but small peak value (or double valley but large valley value) and double peak and large peak value (or double valley and small valley value), the former two cases are defined as that the sample optical fiber has not completed focusing in the Z-axis direction and are labeled as Z-axis unfocused, and the latter case is defined as that the sample optical fiber has completed focusing in the Z-axis direction and is labeled as Z-axis focused; and whether the core boundary is obvious is judged by a preset peak value (or a preset valley value), i.e. if the double peak peak value of the gray position distribution diagram is less than the preset peak value (or the double valley valley value is greater than the preset valley value), the control module judges that the core boundary in the optical fiber image is not obvious, and if the double peak peak value of the gray position distribution diagram is greater than the preset peak value (or the double valley valley value is less than the preset valley value), the control module judges that the core boundary in the optical fiber image is obvious.
[0101] When the focusing in the Z-axis direction has been completed, in different positions in the Y-axis direction, the core center in the optical fiber image will be in different row / column positions, which is reflected in the gray position distribution diagram as different middle positions of double peak (or double valley), wherein the middle position of double peak (or double valley) in the gray position distribution diagram is the row / column position of the core center in the optical fiber image, all row / column positions can be artificially divided into a plurality of position ranges, one position range corresponds to one label, and when the middle position of double peak (or double valley) in the gray position distribution diagram falls within a certain position range, the control device 5 labels the gray position distribution diagram with a label corresponding to the position range.
[0102] Step 400: dividing the gray position distribution diagrams of each optical fiber image into a training data set and a test data set.
[0103] In this step 400, the gray position distribution diagrams of each optical fiber image are randomly allocated to the training data set and the test data set, wherein the training data set accounts for 80% and the test data set accounts for 20%.
[0104] Step 500: constructing the deep learning model, training the deep learning model by using the training data set, and testing the deep learning model by using the test data set.
[0105] In this step 500, the control device 5 first inputs the training data set into the deep learning model for learning training, and then inputs the test data set into the deep learning model for testing, receives the labels of the gray position distribution maps in the test data set output by the deep learning model, and compares the labels output by the deep learning model with the labels marked in step 300 to calculate the accuracy of the deep learning model. When the accuracy reaches a preset value, the training of the deep learning model is ended. When the accuracy does not reach the preset value, the model parameters of the deep learning model are optimized, and the retraining and testing are performed until the accuracy reaches the preset value.
[0106] It can be seen that the deep learning model actually outputs labels corresponding to the gray position distribution map, rather than directly outputs displacement amounts, so it is necessary to configure corresponding displacement amounts for different labels. In steps S3 and S7, after the control device 5 obtains the labels output by the deep learning model, the displacement amounts corresponding to the labels can be matched by looking up the table.
[0107] Moreover, for each label divided in the Z-axis direction, only the Z-axis displacement amount is configured, and for each label divided in the Y-axis direction, only the Y-axis displacement amount is configured. When the optical fiber microstructure is prepared, steps S1-S4 can be repeatedly executed to first displace the processing region along the Z-axis direction multiple times to focus the spot focal point of the femtosecond laser on the Z-axis center of the first end, and then displace the processing region along the Y-axis direction multiple times to focus the spot focal point of the femtosecond laser on the Y-axis center of the first end. Similarly, when the optical fiber microstructure is prepared, steps S5-S8 can be repeatedly executed to first displace the processing region along the Z-axis direction multiple times to focus the spot focal point of the femtosecond laser on the Z-axis center of the end, and then displace the processing region along the Y-axis direction multiple times to focus the spot focal point of the femtosecond laser on the Y-axis center of the end.
[0108] Due to the resources of the deep learning model, each gray position distribution map in the training data set and the test data set needs to be converted into an image of a predetermined size before being input into the deep learning model.
[0109] Embodiment Three
[0110] As an optimization scheme of embodiment two, in this embodiment, the deep learning model is an EfficientNets model, which is composed of 16 mobile flip bottleneck convolution modules, 2 convolution layers, 1 global average pooling layer, and 1 classification layer, as shown in Figure 5As shown, in step 500, the step of training the deep learning model with the training data set is as follows:
[0111] Step 510: Down-sampling operation is performed on the training data set with 32 3x3x3 convolution kernels, with a step size of 2x2, and then batch normalization layer and activation function are used, and the output size of the first batch of feature maps is 112x112x32;
[0112] Step 520: The first batch of feature maps is subjected to deep convolution, global average pooling and compression excitation operation by using the mobile flip bottleneck convolution module, and the output size of the second batch of feature maps is 112x112x16;
[0113] Step 530: The second batch of feature maps is subjected to two mobile flip bottleneck convolutions, and then point-by-point convolution, deep convolution and compression excitation operation are performed, the expansion ratio of the mobile flip bottleneck convolution is 6, and the output size of the third batch of feature maps is 56x56x96;
[0114] Step 540: The third batch of feature maps is subjected to multiple mobile flip bottleneck convolutions with 5x5 convolution kernels to gradually reduce the resolution and increase the depth operation, including multiple compression excitation operations and connection inactivation operations, and the output size of the fourth batch of feature maps is 7x7x192;
[0115] Step 550: Single mobile flip bottleneck convolution is performed on the fourth batch of feature maps to expand the channel number to 320, and the output size of the fifth batch of feature maps is 7x7x320;
[0116] Step 560: 1x1 convolution is performed on the fifth batch of feature maps, and then batch normalization layer and Swish activation are used, and global average pooling layer and random inactivation operation are performed to the full connection layer, and finally the classification result is output by the classification layer.
[0117] In this embodiment, the activation function is a Swish function, and the classification layer uses a Softmax function.
[0118] Preferably, the model parameters of the EfficientNets model can be optimized by using the sgd optimizer, and the optimal model parameters are detected and saved, and the optimal model parameters are obtained by manually scheduling the learning rate based on the optimal model parameters.
[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present application, but not to limit them, although the embodiments of the present application have been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the embodiments of the present application can be modified or replaced by equivalents, and these modifications or equivalent replacements cannot make the modified technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A deep learning-based method for fabricating a fiber microstructure, characterized by, The fiber to be processed has at least one processing region; the fiber microstructure preparation method comprises the following steps: Step S1: acquiring a first-end image of the processing region; Step S2: calculating a gray position distribution map of the first-end image; Step S3: inputting the gray position distribution map of the first-end image into a deep learning model that has been trained, obtaining a label corresponding to the gray position distribution map output by the deep learning model, and matching a first-end displacement corresponding to the label through a lookup table; Step S4: driving the processing region to displace according to the first-end displacement, so as to focus a focal point of a femtosecond laser spot on a first-end center of the processing region, and obtaining a first-end center coordinate; Step S5: acquiring a last-end image of the processing region; Step S6: calculating a gray position distribution map of the last-end image; Step S7: inputting the gray position distribution map of the last-end image into a deep learning model that has been trained, obtaining a label corresponding to the gray position distribution map output by the deep learning model, and matching a last-end displacement corresponding to the label through a lookup table; Step S8: driving the processing region to displace according to the last-end displacement, so as to focus a focal point of a femtosecond laser spot on a last-end center of the processing region, and obtaining a last-end center coordinate; Step S9: determining a central axis of the processing region according to the first-end center coordinate and the last-end center coordinate of the processing region; Step S10: driving the processing region to displace according to the central axis of the processing region, so as to prepare a required microstructure in the processing region by the focal point of the femtosecond laser spot.
2. The method for fabricating optical fiber microstructures according to claim 1, characterized in that, The fiber microstructure preparation method further comprises training the deep learning model, wherein the training of the deep learning model comprises the following steps: Step 100: obtaining multiple fiber images of a sample fiber at different positions; Step 200: calculating a gray position distribution map of each fiber image; Step 300: determining whether each fiber image has an obvious fiber core boundary and the position of the fiber core center according to the gray position distribution map of each fiber image, and marking a corresponding label; Step 400: dividing the gray position distribution maps of the fiber images into a training data set and a test data set; Step 500: constructing the deep learning model, training the deep learning model by using the training data set, and testing the deep learning model by using the test data set.
3. The method for fabricating optical fiber microstructures according to claim 2, characterized in that, In step 200, each fiber image is preprocessed to enhance the gray features of each fiber image, and then the gray position distribution map of each fiber image is calculated.
4. The method of claim 3, wherein the step of applying the first and second layers of material is performed by a process selected from the group consisting of: spin coating, dip coating, spray coating, and combinations thereof. In the preprocessing, first, a Gaussian filter is used to filter each fiber image, and then two Gaussian filters with different standard deviations are used to convolve each fiber image to obtain images I and I', and the images I and I' of each fiber image are subtracted to finally obtain a fiber image that has been subjected to twice filtering.
5. The method of claim 2, wherein the step of forming the microstructure comprises the step of: Different labels are configured to correspond to different displacement amounts. 6. The method of claim 1, wherein, The deep learning model is an EfficientNets model.
7. The method of claim 2, wherein the step of forming the microstructure comprises the step of: In step 500, the training of the deep learning model using the training data set is as follows: Step 510: The training data set is down-sampled using 32 3x3x3 convolution kernels with a step size of 2x2, followed by a batch normalization layer and an activation function, and the output size of the first batch of feature maps is 112x112x32; Step 520: The first batch of feature maps is subjected to deep convolution, global average pooling and compression excitation operations using the mobile flip bottleneck convolution module, and the output size of the second batch of feature maps is 112x112x16; Step 530: The second batch of feature maps is subjected to two mobile flip bottleneck convolutions, followed by point-wise convolution, deep convolution and compression excitation operations, and the expansion ratio of the mobile flip bottleneck convolution is 6, and the output size of the third batch of feature maps is 56x56x96; Step 540: The third batch of feature maps is subjected to multiple mobile flip bottleneck convolutions with 5x5 convolution kernels to gradually reduce the resolution and increase the depth operations, including multiple compression excitation operations and connection inactivation operations, and the output size of the fourth batch of feature maps is 7x7x192; Step 550: The fourth batch of feature maps is subjected to a single mobile flip bottleneck convolution to expand the channel number to 320, and the output size of the fifth batch of feature maps is 7x7x320; Step 560: The fifth batch of feature maps is subjected to 1x1 convolution, then batch normalization layer and Swish activation, and finally global average pooling layer and random inactivation operation to fully connected layer, and finally classification layer outputs the classification result.
8. The method of claim 2, wherein the step of forming the microstructure comprises the step of: In step 500, the test data set is input into the deep learning model for testing, and then the labels of each gray position distribution map in the test data set output by the deep learning model are received, and the labels output by the deep learning model are compared with the labels marked in step 300, and the accuracy of the deep learning model is calculated. When the accuracy reaches the preset value, the training of the deep learning model is ended, and when the accuracy does not reach the preset value, the model parameters of the deep learning model are optimized, and retrained and tested until the accuracy reaches the preset value. 9. The method of claim 8, wherein the step of applying the first and second layers of material is performed by a process selected from the group consisting of: spin coating, dip coating, spray coating, and combinations thereof. The model parameters of the deep learning model are optimized using the sgd optimizer.
Citation Information
Patent Citations
Intelligent optical fiber distributed acoustic wave sensing system based on AI chip and method
CN110487391A
Dam monitoring system based on optical fiber sensor network
CN113643424A