Detailed Description
The application solves the technical problem of poor accuracy of biological product seal failure detection in the prior art by providing the biological product seal failure detection method based on image recognition.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that the terms "comprises" and "comprising" are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
An embodiment, as shown in fig. 1, provides a method for detecting seal failure of a biological product based on image recognition, wherein the method comprises the following steps:
And sealing the biological product through a first flexible sealing material and a second flexible sealing material and transmitting the biological product to a first detection platform, wherein the biological product is provided with a sealing area positioning coordinate on the first detection platform, and the sealing area is a sealing junction area of the first flexible sealing material and the second flexible sealing material.
In the sealing detection process of biological products, first, a first flexible sealing material and a second flexible sealing material are adopted to seal the biological products, and after sealing is finished, the biological products are transmitted to a special first detection platform. Each biologic is assigned a precise seal area location coordinate on the first test platform that indicates the location of the seal area where the first flexible seal material and the second flexible seal material interface.
Further, the biological product is sealed by a first flexible sealing material and a second flexible sealing material and is transmitted to a first detection platform, the biological product has a sealing area positioning coordinate on the first detection platform, and the method comprises the following steps:
The method comprises the steps of obtaining sealing control parameters of a first flexible sealing material and a second flexible sealing material on the biological product, wherein the sealing control parameters are provided with coordinate feature identifiers, carrying out region clustering analysis on the coordinate feature identifiers according to the sealing control parameters to obtain region clustering results, wherein the same category of the region clustering results is provided with the same sealing control parameters, and adding the region clustering results into the sealing region positioning coordinates.
The method comprises the steps of obtaining key control parameters when a first flexible sealing material and a second flexible sealing material seal biological products, wherein the key control parameters not only reflect physical and chemical conditions of a sealing process, but also have coordinate characteristic identifiers, namely, the corresponding relation between the sealing control parameters and a sealing area in space, performing area clustering analysis by utilizing the sealing control parameters with the coordinate characteristic identifiers so as to divide data points with similar characteristics into the same category, optionally, clustering different coordinate characteristic identifiers by adopting K-means clustering according to the similarity of the sealing control parameters to form area clustering results, wherein the area clustering results of the same category have the same sealing control parameters, and integrating the area clustering results into positioning coordinates of the sealing area. By combining the region clustering result with the seal region positioning coordinates, the seal effect can be evaluated more accurately.
And activating a camera, and acquiring sealing area image information of the biological product based on the positioning coordinates of the sealing area.
Activating the high-precision camera, and acquiring image information of the sealing area of the biological product by utilizing the positioning coordinates of the sealing area. The image acquisition is carried out based on the coordinate information, so that the accuracy and pertinence of the image data are ensured, and a solid foundation is laid for subsequent analysis and processing.
And processing the image information of the sealing area through a defect identifier to extract a false defect area.
In the process of biological product sealing detection, the sealing area image information acquired by the camera is sent to a defect identifier for deep processing, so that an area with obvious difference from a normal area, namely a false defect area, is extracted, wherein the false defect area does not mean that the areas are defects, but needs further verification and analysis to determine whether the areas belong to the defect category.
Further, the processing of the seal area image information by the defect identifier, extracting a pseudo defect area, includes:
The method comprises the steps of obtaining a defect texture set, obtaining a positive sample sealing surface image of the biological product, wherein the positive sample sealing surface image is provided with a sealing area fold texture label, configuring defect compiling quantity constraint, randomly compiling the defect texture set to the positive sample sealing surface image according to the defect compiling quantity constraint, repeating the process for a plurality of times to obtain a negative sample sealing surface image, wherein the negative sample sealing surface image is provided with the defect texture label, outputting supervision data according to the positive sample sealing surface image and the negative sample sealing surface image serving as input data, and configuring the defect identifier by taking the defect texture label and the sealing area fold texture label as convolution network.
A series of defect texture images representing various possible seal area defects, such as breakage, smudge, fold anomalies, etc., are acquired from the big data and sorted into defect texture sets for subsequent compilation into a positive sample image. A series of biological sealing surface images are acquired from the big data as positive sample sealing surface images, and these positive sample images are labeled with sealing area fold texture labels to enable the normal texture to be distinguished from the defective texture during training, wherein the positive sample sealing surface images should have a clear sealing area and the sealing surface should be free of defects or have only normal fold texture. According to the practical requirement, configuring defect compiling quantity constraint, namely setting defect texture quantity compiled into positive sample images each time so as to control complexity and diversity of negative samples, randomly compiling textures in a defect texture set onto the positive sample sealing surface images by using an image processing technology, wherein each compiling follows the previously set defect compiling quantity constraint, repeating the compiling process for a plurality of times to generate enough negative sample sealing surface images, and labeling the negative sample images with defect texture labels so as to distinguish the negative sample images from the positive sample images in the training process. The method comprises the steps of using a positive sample sealing surface image and a negative sample sealing surface image as input data, using a defect texture label and a sealing area fold texture label as output supervision data to construct a Convolutional Neural Network (CNN), and obtaining a defect identifier after a model is subjected to repeated iterative training, wherein the defect identifier can accurately identify defect textures in a biological product sealing area.
And carrying out texture consistency analysis on the pseudo defect area to obtain a selected defect area.
After the processing of the image information of the sealing area is completed and the false defect area is extracted, the texture consistency analysis is carried out on the false defect area so as to further screen out the real defect area. The consistency and variability between different parts of the region are assessed by comparing their texture characteristics. If the majority of the texture features within the region are similar and conform to the texture pattern of the normal sealing surface, the region may be a false defect that is misjudged, whereas if there are significant texture variations or abnormal features within the region, it is more likely to be a truly defective region.
Further, as shown in fig. 2, performing texture consistency analysis on the pseudo defect area to obtain a selected defect area, including:
the method comprises the steps of carrying out longitudinal texture consistency analysis on the fake defect area to obtain a longitudinal selected defect area, carrying out transverse texture consistency analysis on the fake defect area to obtain a transverse selected defect area, and setting the union of the longitudinal selected defect area and the transverse selected defect area as the selected defect area.
Preferably, each of the pseudo-defect regions is subjected to texture uniformity analysis along its longitudinal direction (i.e., the direction perpendicular to the seal boundary) to obtain a longitudinal selected defect region, the pseudo-defect regions are subjected to texture uniformity analysis in the transverse direction (i.e., the direction parallel to the seal boundary) to obtain a transverse selected defect region by a method similar to the longitudinal texture uniformity analysis, and the union of the longitudinal selected defect region and the transverse selected defect region is set as the final selected defect region. Through the process, the texture consistency of the false defect area can be more comprehensively evaluated, and the real defect area can be more accurately identified.
Further, performing longitudinal texture consistency analysis on the pseudo defect region to obtain a longitudinal selected defect region, including:
The method comprises the steps of obtaining positioning coordinate information of a false defect area by falling the false defect area into a positioning space, traversing the false defect area based on the positioning coordinate information of the false defect area, extracting a feature set of the vertical distribution length of the false defect, carrying out outlier analysis according to the feature set of the vertical distribution length of the false defect to obtain a first outlier false defect, deleting the first outlier false defect from the positioning coordinate information of the false defect area to obtain positioning updating coordinate information of the false defect area, traversing adjacent false defect areas in the vertical direction according to the positioning updating coordinate information of the false defect area, extracting a feature set of the distribution interval of the false defect, wherein the defect interval is a defect vertical center distance, carrying out outlier analysis according to the feature set of the distribution interval of the false defect to obtain a second outlier false defect, and adding the first outlier false defect and the second outlier false defect into the longitudinally selected defect area.
The method comprises the steps of mapping each false defect area into a positioning space to obtain false defect area positioning coordinate information, traversing each false defect area to obtain the distribution length of the false defect area in the longitudinal direction (the direction perpendicular to a sealing boundary line) to form a vertical distribution length feature set of the false defects, conducting outlier analysis on the vertical distribution length feature set by using a statistical method (such as a box diagram and a Z-score), identifying outliers which are remarkably different from most data points, wherein the false defects corresponding to the outliers are regarded as first outlier false defects, deleting the first outlier false defects from the false defect area positioning coordinate information to obtain updated coordinate information, traversing the adjacent false defect areas in the longitudinal direction based on the updated false defect area positioning coordinate information to calculate the longitudinal center distance between the adjacent defects to serve as defect interval features, integrating all defect interval features to form the false defect distribution interval feature set, conducting outlier analysis on the defect interval feature set to identify outlier points which are remarkably different from other defects, and adding the outlier points which are remarkably different from other false defects into the first outlier defect and the second outlier defect area, and selecting the false defect to be significantly located in the second outlier defect. Through the above steps, the characteristics of the false defect region can be analyzed more finely, and outliers can be effectively identified and eliminated, so that the longitudinally selected defect region can be determined more accurately.
Further, performing outlier analysis according to the set of pseudo defect distribution interval features to obtain a second outlier pseudo defect, including:
And when the first distribution interval characteristic and the second distribution interval characteristic of the pseudo defect to be analyzed belong to the outlier interval characteristic set, adding the pseudo defect to be analyzed into the second outlier pseudo defect.
Preferably, the distribution pitch feature set of the false defects is subjected to an outlier analysis by using a statistical method (such as a box graph, an IQR, etc.), points which are significantly different from most pitch features are identified, pitch values corresponding to the points are regarded as outlier pitch features, all the outlier pitch features are integrated into one set, namely the outlier pitch feature set, a first distribution pitch feature and a second distribution pitch feature of the false defects to be analyzed are required to be calculated for each false defect to be analyzed, the first distribution pitch feature is the longitudinal center distance between the defect and the previous adjacent defect, the second distribution pitch feature is the longitudinal center distance between the defect and the next adjacent defect, the first distribution pitch feature and the second distribution pitch feature of the false defect to be analyzed are compared with the outlier pitch feature set, and if the two pitch features are all present in the outlier pitch feature set, namely that they are significantly deviated from the normal pitch range, the false defect to be analyzed can be considered to be abnormal in pitch, and likely to be a true defect, and the false defect to be added into the second distribution pitch feature set to be analyzed.
And when the size specification of the selected defect area meets the failure size specification, performing seal failure identification on the biological product.
After detailed analysis and verification of selected defect areas is completed, it can be assessed whether these defects have a substantial impact on the sealing performance of the bioproduct. Specifically, a series of failure dimensions are set according to the characteristics and the use requirements of the biological product, the dimensions define which defects in size and shape can cause sealing failure, the dimensions of the selected defect area are evaluated according to the preset failure dimensions, and if the dimensions of the selected defect area meet or exceed the preset failure dimensions, the biological product is immediately subjected to sealing failure identification.
Further, when the size specification of the selected defect area meets the failure size specification, performing seal failure identification on the biological product, including:
the method comprises the steps of extracting a color characteristic value set of a selected defect area, fitting the color characteristic value set through a defect color calibration network to obtain a defect color characteristic value set, distributing the defect color characteristic value set according to the color characteristic value distribution coordinate set to obtain a selected updated defect area, and carrying out seal failure identification on the biological product when the size specification of the selected updated defect area meets the failure size specification.
Preferably, the pixels in the selected defect area are subjected to color analysis, color characteristic values are extracted, the color characteristic values can comprise RGB values and HSV values, the color characteristic values are combined into a set, the distribution coordinates of each color characteristic value in the defect area are recorded at the same time to form a color characteristic value distribution coordinate set, a pre-trained defect color calibration network (such as a convolutional neural network CNN based on a deep learning model) is utilized to fit the extracted color characteristic value set, the defect color calibration network can identify a color characteristic mode highly related to the defect, a more accurate defect color characteristic value set is screened out from the original color characteristic value set, the screened defect color characteristic values are remapped back to an original image space to form a selected updated defect area, the position and shape of the actual defect are reflected more accurately, the size specification of the selected updated defect area is measured and comprises parameters such as length, width, area and the like, the size specification is compared with a preset size specification of the failure product, if any size specification of the selected updated defect area exceeds the preset size specification, the failure size specification is considered to be influenced by the biological size specification, and the failure performance of the biological product is considered to be influenced before the failure size is sealed according to the failure specification. Through the above process, the color features can be utilized to further refine and update the selected defect region, thereby improving the accuracy and reliability of seal detection.
Further, fitting the color eigenvalue set through a defect color calibration network to obtain a defect color eigenvalue set, including:
Collecting a non-sealing failure defect color characteristic value set and a sealing failure defect color characteristic value set, constructing a classifier input data set, and configuring the defect color calibration network according to the classifier input data set.
Selecting the areas containing various non-sealing failure defects (such as scratches, stains, chromatic aberration and the like) from the non-sealing failure biological product samples, extracting color characteristic values from the areas, combining the color characteristic values and labels corresponding to the color characteristic values (non-sealing failure) to form a non-sealing failure defect color characteristic value set as a part of a classifier input data set, selecting the areas containing the sealing failure defects (such as holes, cracks, bubbles and the like) from the sealing failure biological product samples, extracting the color characteristic values from the areas, combining the color characteristic values and labels corresponding to the color characteristic values (sealing failure) to form a sealing failure defect color characteristic value set as another part of the classifier input data set, combining the non-sealing failure defect color characteristic value set and the sealing failure defect color characteristic value set to form a complete classifier input data set, and training a defect color calibration network by using the constructed classifier input data set, wherein the defect color calibration network is constructed based on a convolutional neural network and can output a model of the defect type (non-sealing failure or sealing failure) according to the color characteristic value input. Through the steps, a defect color calibration network based on color characteristic values can be constructed and used for identifying seal failure defects in biological products.
In summary, the embodiment of the application has at least the following technical effects:
Firstly, sealing a biological product through a first flexible sealing material and a second flexible sealing material and transmitting the biological product to a first detection platform, wherein the biological product is provided with a sealing area positioning coordinate on the first detection platform, and the sealing area is a sealing interface area of the first flexible sealing material and the second flexible sealing material. Then, the camera is activated, and sealing area image information of the biological product is acquired based on the sealing area positioning coordinates. Then, the seal region image information is processed by a defect identifier to extract a pseudo defect region. And finally, carrying out texture consistency analysis on the pseudo defect area to obtain a selected defect area, and carrying out seal failure identification on the biological product when the size specification of the selected defect area meets the failure size specification. The technical problem of biological product seal failure detection accuracy is relatively poor in the prior art is solved, and the technical effects of improving detection efficiency and accuracy are achieved through an image recognition technology.
It should be noted that the sequence of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The foregoing description of the preferred embodiments of the application is not intended to limit the application to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the application are intended to be included within the scope of the application.
The specification and figures are merely exemplary illustrations of the present application and are considered to cover any and all modifications, variations, combinations, or equivalents that fall within the scope of the application. It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the scope of the application. Thus, the present application is intended to include such modifications and alterations insofar as they come within the scope of the application or the equivalents thereof.