Firing profile segmentation method applied to laser spot quality measurement
Technical Field
The invention relates to an image contour segmentation method, in particular to a burning contour segmentation method applied to laser spot quality measurement.
Background
The laser spot is one of important characteristics of the quality of the laser beam and the performance of a laser, how to quickly, accurately and simply extract the shape profile characteristics of the laser spot has important significance for evaluating the quality of the laser beam, and M is2The factor is an important parameter for evaluating the quality of the laser beam, but because the measuring method is complex, the instrument is expensive, the requirement on the environment is high, most of the conditions are limited to be measured under laboratory conditions, and the method cannot be conveniently applied to the complex environment in the industry, the laser is incident on the photosensitive paper, the burning profile of the photosensitive paper is analyzed after laser spots are burned out, and the method is also a method for judging the quality of the laser beam.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides the firing profile segmentation method which has good robustness, high accuracy and strong general universality and can be applied to laser spot quality measurement.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a firing profile segmentation method applied to laser spot quality measurement comprises the following steps:
(1) acquiring a firing image of laser-fired photosensitive paper to manufacture a firing photosensitive paper data set, wherein the firing photosensitive paper data set comprises a training set and a testing set;
(2) carrying out pixel level two classification on the burning photosensitive paper data set, marking the part burned by the burning image as a foreground through a marking tool, and marking the part not burned as a background;
(3) performing data enhancement on the two classified burning photosensitive paper data sets;
(4) constructing a burning contour segmentation neural network based on DeepLabV3+, and setting the ratio of the input image resolution to the output resolution of the burning contour segmentation neural network as 4;
(5) training the firing profile segmentation neural network into a firing profile segmentation model through the training set after data enhancement, and then testing and evaluating the firing profile segmentation model through the test set after data enhancement;
(6) and burning the photosensitive paper by laser which actually needs to measure the quality to form a measurement picture, inputting the measurement picture into the burning profile segmentation model, and outputting a segmentation profile which can be used for judging the beam quality by the burning profile segmentation model.
And the data enhancement of the step 3 comprises the turning over and the angle rotation of the burning image and the angle rotation after the turning over.
The labeling tool of the step 2 is Labelme.
The invention has the beneficial effects that: the method comprises the steps of manufacturing a burning photosensitive paper data set, labeling and data enhancing the burning photosensitive paper data set, building a burning contour segmentation neural network based on DeepLabV3+, training the neural network into a burning contour segmentation model, and directly performing accurate and reliable contour segmentation on a measured picture by the burning contour segmentation model after testing.
Drawings
The invention is further illustrated with reference to the following figures and examples.
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
Referring to fig. 1, a burning profile segmentation method applied to laser spot quality measurement includes the following steps:
(1) the method comprises the steps of collecting firing images of laser firing photosensitive paper to manufacture a firing photosensitive paper data set, wherein the firing photosensitive paper data set comprises a training set and a testing set, the training set is only used for training a firing profile segmentation neural network, the testing set cannot be used for training and can only be used for evaluating a firing profile segmentation model, in the firing image manufacturing process, multi-angle firing is carried out on the photosensitive paper through different illumination and lasers, firing images with different laser beam qualities are formed, and the firing profile segmentation model after subsequent training and testing is more robust.
(2) Carrying out pixel level two classification on the burning photosensitive paper data set, marking the part burned by the burning image as a foreground through a marking tool Labelme, and marking the part not burned as a background;
(3) performing data enhancement on the two classified burning photosensitive paper data sets; the data enhancement comprises the turning of the burning image, the angle rotation and the turned angle rotation, so that the burning contour segmentation model after the subsequent training test has the advantage of high universality.
(4) The burning contour segmentation neural network is constructed based on DeepLabV3+, and the burning contour segmentation neural network is mainly different from the DeepLabV3+ network in that the ratio of the input image resolution to the output resolution of a DeepLabV3+ network coding stage is 16, the ratio of the input image resolution to the output resolution of the burning contour segmentation neural network is 4, and if the original ratio of the original DeepLabV3+ network is adopted, the burning contour segmentation model has large deviation on the contour segmentation of a measurement picture, so that the burning contour segmentation model cannot have the characteristic of high accuracy, and a more precise boundary segmentation effect cannot be obtained.
(5) The firing profile segmentation neural network is trained into a firing profile segmentation model through the training set after data enhancement, then the firing profile segmentation model is tested and evaluated through the testing set after data enhancement, the loss value of the training set and the precision of the training set are continuously observed in the training process, and when the firing profile segmentation model is converged and the best performance is achieved in the testing process, the training can be stopped.
(6) After the photosensitive paper is burned by the laser which actually needs to measure the quality to form a measurement picture, the measurement picture is input into the burning profile segmentation model, and the burning profile segmentation model outputs a segmentation profile (namely a segmentation result of the laser facula) which can be used for judging the quality of the laser beam, so that the accurate and reliable segmentation profile is provided for measuring the quality of the laser facula, and the method is extremely suitable for and beneficial to measuring and judging the quality of the laser beam.
The above embodiments do not limit the scope of the present invention, and those skilled in the art can make equivalent modifications and variations without departing from the overall concept of the present invention.