CN116778263B - Sorting apparatus control method, electronic apparatus, and computer-readable medium - Google Patents

Sorting apparatus control method, electronic apparatus, and computer-readable medium Download PDF

Info

Publication number
CN116778263B
CN116778263B CN202311057002.XA CN202311057002A CN116778263B CN 116778263 B CN116778263 B CN 116778263B CN 202311057002 A CN202311057002 A CN 202311057002A CN 116778263 B CN116778263 B CN 116778263B
Authority
CN
China
Prior art keywords
mobile phone
cover plate
phone cover
image
feature map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311057002.XA
Other languages
Chinese (zh)
Other versions
CN116778263A (en
Inventor
孙远忠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Kunhong Electronic Technology Co ltd
Original Assignee
Sichuan Kunhong Electronic Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Kunhong Electronic Technology Co ltd filed Critical Sichuan Kunhong Electronic Technology Co ltd
Priority to CN202311057002.XA priority Critical patent/CN116778263B/en
Publication of CN116778263A publication Critical patent/CN116778263A/en
Application granted granted Critical
Publication of CN116778263B publication Critical patent/CN116778263B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • G06V10/765Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects using rules for classification or partitioning the feature space
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration by the use of local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/806Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Abstract

Embodiments of the present disclosure disclose sorting apparatus control methods, electronic apparatuses, and computer-readable media. One embodiment of the method comprises the following steps: collecting a target mobile phone cover plate image; carrying out gray level conversion treatment on the target mobile phone cover plate image; carrying out noise reduction treatment on the gray level conversion mobile phone cover plate image; image segmentation processing is carried out on the noise reduction image of the mobile phone cover plate; inputting the mobile phone cover plate segmentation image into a feature extraction layer of a mobile phone cover plate defect detection model; inputting the mobile phone cover plate feature map to a feature fusion layer; carrying out convolution processing on the fusion characteristic diagram of the mobile phone cover plate; generating a classification characteristic diagram; generating a position feature map; inputting the classification characteristic diagram and the position characteristic diagram to a detection head layer; and controlling the sorting equipment to sort the mobile phone cover plates. According to the embodiment, the spatial dislocation contradiction between the position information and the category information prediction can be weakened, the accuracy of the generated mobile phone cover plate defect information is improved, and the occurrence times of mobile phone cover plate sorting and classifying errors are reduced.

Description

Sorting apparatus control method, electronic apparatus, and computer-readable medium
Technical Field
Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a sorting apparatus control method, an electronic apparatus, and a computer readable medium.
Background
The glass cover plate of the smart phone is positioned at the outermost layer of the screen of the smart phone and is a solid shell and a touch medium of the screen. With the rapid development of artificial intelligence and the advent of the 5G age, smart phones have become a necessary tool, and the quality requirements of people on smart phones are also higher and higher. At present, when a mobile phone cover plate is subjected to sorting operation, the following modes are generally adopted: the mobile phone cover plate image is preprocessed (for example, full image filtering processing and single threshold segmentation processing), mobile phone cover plate defect information is generated according to the preprocessed mobile phone cover plate image and a machine learning or deep learning model, and sorting operation is carried out on the mobile phone cover plate according to the generated mobile phone cover plate defect information.
However, the inventors have found that when the mobile phone cover plate is subjected to the sorting operation in the above manner, there are often the following technical problems:
firstly, in the process of predicting the defect information of the mobile phone cover plate through the model, different feature graphs are not adopted for predicting the position information and the category information, so that the problem of spatial dislocation of the position information and the category information prediction is outstanding, the generated defect information of the mobile phone cover plate is lower in accuracy, and the mobile phone cover plate sorting and classifying errors are more in occurrence frequency.
Secondly, in the process of preprocessing the mobile phone cover plate image, filtering processing is uniformly performed on the edge of the flaw image, so that more flaw image edge characteristic information is lost, the accuracy of the generated mobile phone cover plate defect information is lower, and the mobile phone cover plate sorting and classifying errors are more in number.
Thirdly, in the preprocessing process of threshold segmentation of the mobile phone cover plate image, the threshold selection is single, so that the segmented noise particles are more, and the segmentation effect of the mobile phone cover plate image with uneven illumination is poor. Therefore, the generated defect information of the mobile phone cover plate has lower accuracy, and the mobile phone cover plate is more in sorting and classifying errors.
The above information disclosed in this background section is only for enhancement of understanding of the background of the inventive concept and, therefore, may contain information that does not form the prior art that is already known to those of ordinary skill in the art in this country.
Disclosure of Invention
The disclosure is in part intended to introduce concepts in a simplified form that are further described below in the detailed description. The disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose sorting apparatus control methods, electronic apparatuses, and computer-readable media to address one or more of the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a sorting apparatus control method, the method comprising: acquiring a target mobile phone cover plate image through an associated image acquisition device; carrying out gray level conversion treatment on the target mobile phone cover plate image to obtain a target mobile phone cover plate image subjected to gray level conversion treatment as a gray level conversion mobile phone cover plate image; carrying out noise reduction treatment on the gray level conversion mobile phone cover plate image to obtain a noise reduction treated gray level conversion mobile phone cover plate image serving as a mobile phone cover plate noise reduction image; performing image segmentation processing on the mobile phone cover plate noise reduction image to obtain the mobile phone cover plate noise reduction image after the image segmentation processing as a mobile phone cover plate segmentation image; inputting the mobile phone cover plate segmentation image into a feature extraction layer of a pre-trained mobile phone cover plate defect detection model to obtain a mobile phone cover plate feature map, wherein the mobile phone cover plate defect detection model further comprises a feature fusion layer and a detection head layer; inputting the mobile phone cover plate feature map into the feature fusion layer to obtain a mobile phone cover plate fusion feature map; carrying out convolution processing on the fusion characteristic diagram of the mobile phone cover plate to generate a convolution fusion characteristic diagram; generating a classification feature map according to the convolution fusion feature map; generating a position feature map according to the convolution fusion feature map; inputting the classification characteristic diagram and the position characteristic diagram to a detection head layer to generate mobile phone cover plate defect information; and controlling associated sorting equipment to sort the mobile phone cover plates corresponding to the mobile phone cover plate defect information according to the generated mobile phone cover plate defect information.
In a second aspect, some embodiments of the present disclosure provide an electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors causes the one or more processors to implement the method described in any of the implementations of the first aspect above.
In a third aspect, some embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
The above embodiments of the present disclosure have the following advantageous effects: by the sorting equipment control method, the spatial dislocation contradiction between the position information and the category information prediction can be weakened, the accuracy of the generated mobile phone cover plate defect information is improved, and therefore the occurrence frequency of sorting and classifying errors of the mobile phone cover plate is reduced. Specifically, the spatial dislocation of the position information and the category information prediction is caused to be prominent, so that the accuracy of the generated mobile phone cover plate defect information is lower, and the reason that the occurrence number of the mobile phone cover plate sorting and classifying errors is more is caused is that: in the process of predicting the defect information of the mobile phone cover plate through the model, different feature graphs are not adopted for predicting the position information and the category information, so that the spatial dislocation contradiction of the position information and the category information prediction is highlighted, the accuracy of the generated defect information of the mobile phone cover plate is low, and the occurrence times of sorting and classifying errors of the mobile phone cover plate are high. Based on this, the sorting apparatus control method of some embodiments of the present disclosure first acquires a target cell phone cover plate image by an associated image acquisition device. Therefore, the target mobile phone cover plate image can be obtained, and the mobile phone cover plate image can be used for determining whether the mobile phone cover plate corresponding to the target mobile phone cover plate image has defects or not. And then, carrying out gray level conversion processing on the target mobile phone cover plate image to obtain the target mobile phone cover plate image after the gray level conversion processing as a gray level conversion mobile phone cover plate image. Therefore, the gray level conversion mobile phone cover plate image can be obtained, and the gray level conversion mobile phone cover plate image can be used for enhancing the contrast ratio of the target mobile phone cover plate image. And then, carrying out noise reduction treatment on the gray level conversion mobile phone cover plate image to obtain the noise reduction treated gray level conversion mobile phone cover plate image as a mobile phone cover plate noise reduction image. Therefore, the noise reduction image of the mobile phone cover plate can be obtained, and the method can be used for eliminating the salt and pepper noise of the target mobile phone cover plate image. And then, carrying out image segmentation processing on the mobile phone cover plate noise reduction image to obtain the mobile phone cover plate noise reduction image after the image segmentation processing as a mobile phone cover plate segmentation image. Therefore, the mobile phone cover plate segmentation image can be obtained, and the mobile phone cover plate segmentation image can be used for enhancing the distinguishing degree of the defect area and the background area in the target mobile phone cover plate image. And then, inputting the segmented images of the mobile phone cover plate into a feature extraction layer of a pre-trained mobile phone cover plate defect detection model to obtain a mobile phone cover plate feature map. The mobile phone cover plate defect detection model can further comprise a feature fusion layer and a detection head layer. Therefore, a mobile phone cover plate characteristic diagram representing each pixel characteristic included in the target mobile phone cover plate image can be obtained. And inputting the mobile phone cover plate feature map to the feature fusion layer to obtain the mobile phone cover plate fusion feature map. Therefore, a mobile phone cover plate fusion feature map for carrying out feature fusion on the low-dimensional features and the high-dimensional features can be obtained. Therefore, the method can be used for improving the accuracy of predicting the defect information of the mobile phone cover plate. And secondly, carrying out convolution processing on the fusion characteristic diagram of the mobile phone cover plate to generate a convolution fusion characteristic diagram. Therefore, the convolution fusion feature map can be obtained, so that the convolution fusion feature map can be used for compressing the feature map, enhancing the feature expression capability of the feature map and reducing the dimension. And then, generating a classification characteristic diagram according to the convolution fusion characteristic diagram. Thus, a classification characteristic diagram representing classification information can be obtained, and the classification characteristic diagram can be used for improving classification effect. And then, generating a position feature map according to the convolution fusion feature map. Thus, a position characteristic diagram representing the position information can be obtained, and the position characteristic diagram can be used for improving the accuracy of the predicted position information. And then, inputting the classification characteristic diagram and the position characteristic diagram into a detection head layer to generate mobile phone cover plate defect information. Thus, the defect information of the mobile phone cover plate, which characterizes the defect type and the defect position information, can be obtained. And finally, controlling the associated sorting equipment to sort the mobile phone cover plates corresponding to the mobile phone cover plate defect information according to the generated mobile phone cover plate defect information. Therefore, the mobile phone cover plate can be sorted according to the predicted defect type of the mobile phone cover plate. In the process of predicting the mobile phone cover plate defect information, the defect type and the feature point focused by the position information predicting task are different, the defect type focuses on which type of the extracted feature is closer to the existing type, and the position information focuses on the position coordinate to correct the boundary frame parameters, so that the spatial dislocation contradiction of the position information and the type information prediction can be weakened by respectively predicting by adopting two branches of the classification feature map and the position feature map, the accuracy of the generated mobile phone cover plate defect information is improved, and the occurrence times of sorting and classifying errors of the mobile phone cover plate can be reduced.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a flow chart of some embodiments of a sorting apparatus control method according to the present disclosure;
fig. 2 is a schematic structural diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Description of the embodiments
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings. Embodiments of the present disclosure and features of embodiments may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates a flow 100 of some embodiments of a sorting apparatus control method according to the present disclosure. The sorting equipment control method comprises the following steps:
step 101, acquiring an image of a target mobile phone cover plate through an associated image acquisition device.
In some embodiments, the execution subject (e.g., computing device) of the sorting apparatus control method may acquire the target cell phone cover image from the associated image acquisition device through a wired connection or a wireless connection. The related image acquisition device can be a device capable of acquiring images of the mobile phone cover plate corresponding to the target mobile phone cover plate image. For example, the associated image capture device may be an industrial camera. The target mobile phone cover plate image may be a mobile phone cover plate image collected by the image collecting device. It should be noted that the wireless connection may include, but is not limited to, 3G/4G connections, wiFi connections, bluetooth connections, wiMAX connections, zigbee connections, UWB (ultra wideband) connections, and other now known or later developed wireless connection means.
And 102, carrying out gray level conversion processing on the target mobile phone cover plate image to obtain the target mobile phone cover plate image subjected to the gray level conversion processing as a gray level conversion mobile phone cover plate image.
In some embodiments, the executing body may perform gray level conversion processing on the target mobile phone cover image, so as to obtain the target mobile phone cover image after the gray level conversion processing as the gray level conversion mobile phone cover image. The above gray level conversion process may include, but is not limited to: linear gray level transform processing, nonlinear gray level transform processing, and piecewise gray level transform processing. Here, the above-described gradation conversion process may be a nonlinear gradation conversion process. In practice, the executing body may perform nonlinear gray level conversion processing on the target mobile phone cover plate image, so as to obtain the target mobile phone cover plate image after the nonlinear gray level conversion processing as a gray level conversion mobile phone cover plate image.
And 103, carrying out noise reduction treatment on the gray level conversion mobile phone cover plate image to obtain the noise reduction treated gray level conversion mobile phone cover plate image as a mobile phone cover plate noise reduction image.
In some embodiments, the executing body may perform noise reduction processing on the gray level conversion mobile phone cover image, so as to obtain the noise reduction processed gray level conversion mobile phone cover image as a mobile phone cover noise reduction image.
In some optional implementations of some embodiments, the executing body may perform noise reduction processing on the gray-level-converted mobile phone cover image by using the gray-level-converted mobile phone cover image after the noise reduction processing as a mobile phone cover noise reduction image:
the first step, for each pixel point in the gray level conversion mobile phone cover plate image, executing the following steps:
and a first sub-step of generating a gray value region according to the pixel point, the first preset region length and the first preset region height. In practice, the execution body may construct a gray-scale value region with the pixel point as a center, a first preset region length as a region length, and a first preset region height as a region height. The first preset area length may be a preset area length. The first preset area length may represent a length of the gray value area in a horizontal direction. The first preset area height may be a preset area height. The first preset area height may represent a length of the gray value area in a vertical direction. For example, the first preset area may have a length of 5. The first preset area height may be 5.
And a second sub-step of generating a gray level limit value according to the gray level value corresponding to the pixel point and a preset gray level threshold value. In practice, the execution body may determine, as the gray-level threshold value, a sum of the gray-level value corresponding to the pixel point and a preset gray-level threshold value. The preset gray threshold may be a preset gray threshold. For example, the preset gray threshold may be 25.
And a third sub-step of sorting the gray values included in the gray value region to obtain a gray value sequence. In practice, the execution body may perform ascending sort processing on each gray value included in the gray value region to obtain a gray value sequence.
And a fourth sub-step of determining the median of the gray scale value sequence as a gray scale median.
And a fifth sub-step of determining the gray value with the largest value in the gray value sequence as the largest gray value.
And a sixth sub-step of determining the median gray value as the gray value corresponding to the pixel in response to determining that the gray limit value is greater than the maximum gray value.
And a seventh substep, determining the determined gray value corresponding to the pixel point as an updated gray value.
And an eighth substep, in response to determining that the gray-level threshold value is less than or equal to the maximum gray-level value, of determining a gray-level value corresponding to the pixel point as an updated gray-level value.
And secondly, determining the image formed by the pixel points corresponding to the determined updated gray values as a noise reduction image of the mobile phone cover plate.
The first step to the second step and related content serve as an invention point of the embodiments of the present disclosure, and the second technical problem mentioned in the background art is solved, in the process of preprocessing the mobile phone cover plate image, filtering processing is uniformly performed on the edge of the flaw image, so that the loss of characteristic information of the edge of the flaw image is more, and the generated accuracy of defect information of the mobile phone cover plate is lower, and further, the occurrence number of sorting and classifying errors of the mobile phone cover plate is more. The defect image edge characteristic information is more lost, so that the accuracy of the generated mobile phone cover plate defect information is lower, and the mobile phone cover plate sorting and classifying errors are more caused by the following factors: in the process of preprocessing the mobile phone cover plate image, filtering processing is uniformly performed on the edge of the flaw image, so that more flaw image edge characteristic information is lost, the accuracy of the generated mobile phone cover plate defect information is lower, and the occurrence times of sorting and classifying errors of the mobile phone cover plate are more. If the factors are solved, the effects of reducing the loss of the edge characteristic information of the flaw image, improving the accuracy of the generated defect information of the mobile phone cover plate and reducing the occurrence times of sorting and classifying errors of the mobile phone cover plate can be achieved. To achieve this, first, for each pixel point in the gray level conversion cell phone cover image, the following steps are performed: and generating a gray value region according to the pixel points, the first preset region length and the first preset region height. This can obtain a gradation value region, and can be used for filtering the pixel. And then, generating a gray level limit value according to the gray level value corresponding to the pixel point and a preset gray level threshold value. Thus, a gray level threshold value can be obtained, and thus the gray level threshold value can be used for determining whether the pixel point is a pixel point in a defect area in the target mobile phone cover plate image. And then, sequencing the gray values included in the gray value region to obtain a gray value sequence. Subsequently, the median of the above-described gradation value sequence is determined as the gradation median. Thus, a median value representing the average gray level of the gray value region can be obtained, and can be used for filtering the pixel. Then, the gray scale value with the largest value in the gray scale value sequence is determined as the largest gray scale value. Thereby, a maximum gradation value representing the maximum gradation range of the gradation value region can be obtained. And then, in response to determining that the gray scale threshold value is greater than the maximum gray scale value, determining the gray scale median value as the gray scale value corresponding to the pixel point. Thus, when the pixel is determined as a pixel of the background area, the pixel can be subjected to filtering denoising processing. Then, the determined gray value corresponding to the pixel point is determined as an updated gray value. Therefore, the updated gray value corresponding to the pixel point after the characterization filtering denoising processing can be obtained. And then, in response to determining that the gray scale threshold value is less than or equal to the maximum gray scale value, determining the gray scale value corresponding to the pixel point as an updated gray scale value. Therefore, when the pixel point is determined to be the pixel point corresponding to the defect area, the pixel point is not required to be subjected to filtering processing, so that the edge characteristic information of the defect area can be reserved. And finally, determining the image formed by the pixel points corresponding to the determined updated gray values as a noise reduction image of the mobile phone cover plate. Therefore, the noise-reduced image of the mobile phone cover plate after the noise removal processing can be obtained. Also, in the process of denoising the target mobile phone cover plate image, whether the pixel belongs to the pixel corresponding to the defect area can be determined according to the magnitude relation between the gray value of the pixel and the maximum gray value in the gray value area where the pixel is located. When the pixel points belong to the pixel points corresponding to the defect areas, no filtering processing is carried out on the pixel points, so that the edge characteristic information of the flaw image can be reserved, the accuracy of the generated defect information of the mobile phone cover plate can be improved, and the occurrence times of sorting and classifying errors of the mobile phone cover plate can be reduced.
And 104, performing image segmentation processing on the mobile phone cover plate noise reduction image to obtain the mobile phone cover plate noise reduction image after the image segmentation processing as a mobile phone cover plate segmentation image.
In some embodiments, the executing body may perform image segmentation processing on the mobile phone cover plate noise reduction image, so as to obtain the mobile phone cover plate noise reduction image after the image segmentation processing as a mobile phone cover plate segmentation image.
In some optional implementations of some embodiments, the executing body may further perform image segmentation processing on the mobile phone cover plate noise reduction image by using the mobile phone cover plate noise reduction image after the image segmentation processing as a mobile phone cover plate segmentation image:
the method comprises the steps of firstly, carrying out threshold segmentation processing on the mobile phone cover plate noise reduction image to obtain a mobile phone cover plate noise reduction image subjected to threshold segmentation processing as a threshold segmentation mobile phone cover plate image.
And secondly, carrying out morphological processing on the threshold segmentation mobile phone cover plate image to generate a morphological mobile phone cover plate image.
And thirdly, performing edge detection processing on the morphological mobile phone cover plate image to obtain the morphological mobile phone cover plate image after the edge detection processing as an edge detection mobile phone cover plate image. In practice, the execution body can perform edge detection processing on the morphological mobile phone cover plate image through a Sobel operator, and the morphological mobile phone cover plate image after the edge detection processing is obtained and is used as an edge detection mobile phone cover plate image.
And fourthly, carrying out region growing treatment on the edge detection mobile phone cover plate image to obtain the edge detection mobile phone cover plate image after the region growing treatment as a region growth mobile phone cover plate image. In practice, the executing body may perform an area growth process on the edge detection mobile phone cover plate image through an area growth network, so as to obtain an edge detection mobile phone cover plate image after the area growth process as an area growth mobile phone cover plate image. The above-mentioned region growing network may be an RPN (Region Proposal Network, region selection) network.
And fifthly, determining the area growing mobile phone cover plate image as a mobile phone cover plate segmentation image.
In some optional implementations of some embodiments, the executing body may perform a thresholding process on the phone cover noise reduction image by using the phone cover noise reduction image after the thresholding process as a thresholded phone cover image:
the first step, for each pixel point in the noise reduction image of the mobile phone cover plate, the following steps are executed:
and a first sub-step of generating a noise reduction gray value region according to the pixel points, the second preset region length and the second preset region height. In practice, the execution body may construct a noise reduction gray value region with the pixel point as a center, a second preset region length as a region length, and a second preset region height as a region height. The second preset area length may be a preset area length. The second preset region length may represent a length of the noise reduction gray value region in a horizontal direction. The second preset area height may be a preset area height. The second preset area height may represent a length of the noise reduction gray value area in a vertical direction. The second preset area length may be the same as the first preset area length. The second preset area height may be the same as the first preset area height.
And a second sub-step of determining an average value of the noise reduction gray values corresponding to the pixel points included in the noise reduction gray value region as a noise reduction gray average value.
And a third sub-step of determining the absolute value of the difference between the gray value corresponding to the pixel point and the noise reduction gray average value as a gray difference value.
And a fourth substep, determining the ratio of the gray value corresponding to the pixel point to the noise reduction gray average value as a gray ratio.
And a fifth substep, determining the noise reduction gray value with the largest gray value in the noise reduction gray value area as the area maximum noise reduction gray value.
And a sixth substep, determining the noise reduction gray value with the smallest gray value in the noise reduction gray value area as the area minimum noise reduction gray value.
And a seventh substep, determining the absolute value of the difference between the maximum noise reduction gray value of the region and the minimum noise reduction gray value of the region as a gray difference coefficient.
And an eighth substep, generating a noise reduction gray scale coefficient according to the gray scale difference value, the gray scale difference coefficient and a preset gray scale coefficient. In practice, first, the execution subject may determine the ratio of the gradation difference value to the gradation difference coefficient as the first gradation information. Then, a difference between the first gray information and a preset gray threshold may be determined as the second gray information. Then, the product of the second gray information and the preset gray coefficient may be determined as the third gray information. Finally, the sum of the third gray information and the preset gray threshold value can be determined as the noise reduction gray coefficient.
And a ninth substep, determining the product of the noise reduction gray coefficient and the noise reduction gray average value as noise reduction gray information.
And a tenth substep, determining a difference value between the noise reduction gray level information and the gray level ratio as a pixel point threshold value.
And secondly, determining the determined threshold area image corresponding to the threshold value of each pixel point as a threshold segmentation mobile phone cover plate image. Here, the corresponding threshold area image may be understood as a mobile phone cover plate image formed after updating the pixel threshold of each pixel in the noise reduction image of the mobile phone cover plate.
The first step to the second step and related content are taken as an invention point of the embodiments of the present disclosure, which solves the third technical problem mentioned in the background art, in the pretreatment process of threshold segmentation of the mobile phone cover plate image, the threshold selection is single, so that the segmented noise particles are more, and the segmentation effect of the mobile phone cover plate image with uneven illumination is poor. Therefore, the generated defect information of the mobile phone cover plate has lower accuracy, and the mobile phone cover plate is more in sorting and classifying errors. The noise particles after segmentation are more, and the segmentation effect on the mobile phone cover plate image with uneven illumination is also poor. Therefore, the accuracy of the generated defect information of the mobile phone cover plate is low, and the factors causing more times of sorting and classifying errors of the mobile phone cover plate are often as follows: in the pretreatment process of threshold segmentation of the mobile phone cover plate image, the threshold selection is single, so that the segmented noise particles are more, and the segmentation effect of the mobile phone cover plate image with uneven illumination is poor. Therefore, the generated defect information of the mobile phone cover plate has lower accuracy, and the mobile phone cover plate is more in sorting and classifying errors. If the factors are solved, noise particles after segmentation can be reduced, and the segmentation effect on the mobile phone cover plate image with uneven illumination can be enhanced. Thereby improving the accuracy of the generated defect information of the mobile phone cover plate and reducing the occurrence times of sorting and classifying errors of the mobile phone cover plate. To achieve this, first, for each pixel in the noise reduction image of the mobile phone cover plate, the following steps are performed: and generating a noise reduction gray value region according to the pixel points, the second preset region length and the second preset region height. Thus, a noise reduction gray value region can be obtained, and the pixel points can be subjected to threshold segmentation according to gray values corresponding to the pixel points in the noise reduction gray value region. Then, the average value of the noise reduction gray values corresponding to the pixel points included in the noise reduction gray value region is determined as a noise reduction gray average value. Thus, a noise reduction gray-scale average value can be obtained, and thus can be used to generate a threshold segmentation coefficient for threshold segmentation. And secondly, determining the absolute value of the difference between the gray value corresponding to the pixel point and the noise reduction gray average value as a gray difference value. And determining the ratio of the gray value corresponding to the pixel point to the noise reduction gray average value as a gray ratio. And determining the noise reduction gray value with the largest gray value in the noise reduction gray value area as the area maximum noise reduction gray value. And determining the noise reduction gray value with the smallest gray value in the noise reduction gray value area as the area minimum noise reduction gray value. And determining the absolute value of the difference between the maximum noise reduction gray value of the region and the minimum noise reduction gray value of the region as a gray difference coefficient. And generating a noise reduction gray scale coefficient according to the gray scale difference value, the gray scale difference coefficient and a preset gray scale coefficient. Thus, the noise reduction gray-scale coefficient of the threshold value division fluctuation range can be obtained. Then, the product of the noise reduction gray-scale coefficient and the noise reduction gray-scale average value is determined as noise reduction gray-scale information. Thus, noise reduction gray scale information representing the preliminary threshold segmentation can be obtained. And then, determining the difference value of the noise reduction gray level information and the gray level ratio as a pixel point threshold value. Thus, the pixel threshold value after the dynamic threshold value division processing can be obtained. And finally, determining the threshold region image corresponding to the determined pixel point threshold as a threshold segmentation mobile phone cover plate image. Therefore, the mobile phone cover plate image which represents the distinction between the background area and the defect area after the dynamic threshold segmentation can be obtained. The gray scale difference coefficient can be determined by the maximum noise reduction gray scale value of the region and the minimum noise reduction gray scale value of the region, the noise reduction gray scale coefficient can be generated according to the gray scale difference value, the gray scale difference coefficient and the preset gray scale coefficient, finally, the pixel points can be dynamically and smoothly subjected to threshold segmentation according to the noise reduction gray scale value region where each pixel point is located, the singleness of threshold selection is avoided, and therefore noise particles after segmentation can be further reduced, the segmentation effect on the mobile phone cover plate image with uneven illumination can be enhanced, the accuracy of the generated mobile phone cover plate defect information is improved, and the occurrence times of sorting and classifying errors of the mobile phone cover plate are reduced.
In some optional implementations of some embodiments, the executing body may perform morphological processing on the thresholded mobile phone cover plate image to generate a morphological mobile phone cover plate image by:
and firstly, performing morphological opening operation processing on the threshold segmentation mobile phone cover plate image to generate a mobile phone cover plate morphological opening processing image.
And secondly, carrying out morphological closing operation processing on the mobile phone cover plate morphological opening processing image to generate a mobile phone cover plate closing processing image.
And thirdly, determining the mobile phone cover plate closing processing image as a morphological mobile phone cover plate image. Therefore, after the threshold segmentation processing is carried out on the threshold segmentation mobile phone cover plate image, the image part has edge fracture and discontinuity, the morphological opening operation can eliminate tiny noise of the binary image and smooth the defect area, and the morphological closing operation can connect adjacent elements of the defect area and fill the cavity and fracture edge. Thereby, the divided defective area can be kept intact.
Step 105, inputting the mobile phone cover plate segmentation image into a feature extraction layer of a pre-trained mobile phone cover plate defect detection model to obtain a mobile phone cover plate feature map.
In some embodiments, the executing body may input the segmented image of the mobile phone cover plate to a feature extraction layer of a pre-trained mobile phone cover plate defect detection model to obtain a mobile phone cover plate feature map. The mobile phone cover plate defect detection model can further comprise a feature fusion layer and a detection head layer. The mobile phone cover plate defect detection model can be a network model which takes a mobile phone cover plate image as input and mobile phone cover plate defect information as output. The feature extraction layer may be a network layer capable of performing feature extraction on the split image of the mobile phone cover plate. The feature fusion layer may be a network layer capable of performing feature fusion on the low-dimensional features and the high-dimensional features of the mobile phone cover plate feature map. The detection head layer may be a network layer capable of detecting position information and defect type information of defects of the mobile phone cover plate corresponding to the target mobile phone cover plate image. The position information may be coordinate information of a defect corresponding to the mobile phone cover plate. The defect type information may include, but is not limited to: black spot defects, water drop defects, orange peel defects, scratch defects, irregular spot defects, brush mark defects, scratch defects, and ink defects.
In practice, the executing body may input the segmented image of the mobile phone cover plate to the feature extraction layer of the pre-trained mobile phone cover plate defect detection model, so as to obtain a mobile phone cover plate feature map.
In some optional implementations of some embodiments, the mobile phone cover defect detection model may be trained by:
first, a sample set is obtained. The samples in the sample set comprise sample mobile phone cover plate images and sample mobile phone cover plate defect information corresponding to the sample mobile phone cover plate images. The sample mobile phone cover plate defect information may be a label corresponding to the sample mobile phone cover plate image. It should be noted that, the execution subject for training the mobile phone cover plate defect detection model may be the execution subject, or may be other computing devices.
Second, the following training steps are performed based on the sample set:
the method comprises the steps of a first training step, namely respectively inputting sample mobile phone cover plate images of at least one sample in a sample set into an initial mobile phone cover plate defect detection model to obtain mobile phone cover plate defect information corresponding to each sample in the at least one sample. The initial mobile phone cover plate defect detection model is an initial neural network capable of obtaining mobile phone cover plate defect information according to a mobile phone cover plate image. The initial neural network may be a neural network to be trained.
And a second training step, comparing the mobile phone cover plate defect information corresponding to each sample in the at least one sample with the corresponding sample mobile phone cover plate defect information. Here, the comparison may be a comparison of the mobile phone cover defect information corresponding to each of the at least one sample with the corresponding sample mobile phone cover defect information. Specifically, whether the defect type corresponding to the mobile phone cover defect information corresponding to each sample in the at least one sample and the defect type corresponding to the corresponding sample mobile phone cover defect information are the same defect type may be determined.
And a third training step, determining whether the initial mobile phone cover plate defect detection model reaches a preset optimization target according to the comparison result. Here, the optimization target may be whether the accuracy of the initial mobile phone cover defect detection model prediction is greater than or equal to a preset accuracy threshold. Here, the preset accuracy threshold may be 0.98.
And a fourth training step, in response to determining that the initial mobile phone cover plate defect detection model reaches the optimization target, determining the initial mobile phone cover plate defect detection model as a mobile phone cover plate defect detection model after training.
Optionally, the step of training to obtain the mobile phone cover plate defect detection model may further include:
And fifth training, namely in response to the fact that the initial mobile phone cover plate defect detection model does not reach the optimization target, adjusting network parameters of the initial mobile phone cover plate defect detection model, forming a sample set by using unused samples, using the adjusted initial mobile phone cover plate defect detection model as the initial mobile phone cover plate defect detection model, and executing the training again. As an example, the network parameters of the initial handset cover defect detection model described above may be adjusted using a back propagation algorithm (Back Propagation Algorithm, BP algorithm) and a gradient descent method (e.g., a small batch gradient descent algorithm).
And 106, inputting the mobile phone cover plate feature map to a feature fusion layer to obtain the mobile phone cover plate fusion feature map.
In some embodiments, the executing body may input the mobile phone cover plate feature map to the feature fusion layer to obtain a mobile phone cover plate fusion feature map. In practice, the executing body can input the feature map of the mobile phone cover plate to the feature fusion layer to obtain the feature map of the mobile phone cover plate fusion.
And 107, performing convolution processing on the mobile phone cover plate fusion feature map to generate a convolution fusion feature map.
In some embodiments, the executing body may perform convolution processing on the mobile phone cover plate fusion feature map to generate a convolution fusion feature map. In practice, the execution body may perform convolution processing on the mobile phone cover plate fusion feature map to generate a convolution fusion feature map. Here, the size of the convolution block to be subjected to the convolution process may be 1*1.
And step 108, generating a classification characteristic diagram according to the convolution fusion characteristic diagram.
In some embodiments, the execution body may generate a classification feature map according to the convolution fusion feature map.
In some optional implementations of some embodiments, according to the convolution fusion feature map, the executing entity may generate the classification feature map by:
and a first step of carrying out convolution processing on the convolution fusion feature map to generate a first classification convolution feature map. Here, the size of the convolution block subjected to the convolution process may be 3*3.
And secondly, carrying out convolution processing on the first classification convolution feature map to generate a second classification convolution feature map. Here, the size of the convolution block subjected to the convolution process may be 3*3.
And thirdly, carrying out convolution processing on the second classified convolution feature map to generate a third classified convolution feature map. Here, the size of the convolution block subjected to the convolution process may be 1*1.
And fourthly, determining the third classification convolution characteristic map as a classification characteristic map. Therefore, the classification characteristic diagram representing the defect classification information can be generated for the prediction of the classification information, so that the accuracy of the predicted defect classification information can be improved.
And step 109, generating a position feature map according to the convolution fusion feature map.
In some embodiments, the execution body may generate a location profile from the convolution fusion profile. The position feature map can represent coordinate information and confidence information of the target mobile phone cover plate image. Here, the confidence information may characterize the confidence level of the model in framing the defective area. The confidence information may range from 0, 1.
In some optional implementations of some embodiments, according to the convolution fusion feature map, the executing entity may generate the location feature map by:
and a first step of carrying out convolution processing on the convolution fusion feature map to generate a first position convolution feature map. Here, the convolution block of the convolution process may have a size of 3*3.
And secondly, carrying out convolution processing on the first position convolution characteristic map to generate a second position convolution characteristic map. Here, the convolution block of the convolution process may have a size of 3*3.
And thirdly, generating a positioning convolution characteristic diagram according to the second position convolution characteristic diagram. Here, the convolution block of the convolution process may have a size of 1*1.
And fourthly, generating a confidence coefficient convolution characteristic map according to the second position convolution characteristic map.
And fifthly, combining the confidence coefficient convolution characteristic map and the positioning convolution characteristic map into a position characteristic map. In practice, the execution entity may combine the confidence convolution feature map and the location convolution feature map to generate a location feature map. Here, the combination may be splicing. Thus, a position feature map representing the position information can be generated for the prediction of the position information, and the method can be used for improving the accuracy of the predicted defect classification information.
Step 110, inputting the classification characteristic diagram and the position characteristic diagram to a detection head layer to generate mobile phone cover plate defect information.
In some embodiments, the executing body may input the classification feature map and the location feature map to a detection head layer to generate mobile phone cover defect information. In practice, the executing body may input the classification feature map and the position feature map to the detection head layer to generate defect information of the mobile phone cover plate.
And step 111, controlling the associated sorting equipment to sort the mobile phone cover plates corresponding to the mobile phone cover plate defect information according to the generated mobile phone cover plate defect information.
In some embodiments, according to the generated defect information of the mobile phone cover plate, the executing body may control the associated sorting device to sort the mobile phone cover plate corresponding to the defect information of the mobile phone cover plate. Wherein the associated sorting equipment may be an intelligent sorting robot. In practice, according to the defect type corresponding to the generated defect information of the mobile phone cover plate, the execution body can control the intelligent sorting robot to place the mobile phone cover plate corresponding to the defect information of the mobile phone cover plate in the recovery box corresponding to the defect type. The recycling bin can be a recycling bin capable of storing a defective mobile phone cover plate.
The above embodiments of the present disclosure have the following advantageous effects: by the sorting equipment control method, the spatial dislocation contradiction between the position information and the category information prediction can be weakened, the accuracy of the generated mobile phone cover plate defect information is improved, and therefore the occurrence frequency of sorting and classifying errors of the mobile phone cover plate is reduced. Specifically, the spatial dislocation of the position information and the category information prediction is caused to be prominent, so that the accuracy of the generated mobile phone cover plate defect information is lower, and the reason that the occurrence number of the mobile phone cover plate sorting and classifying errors is more is caused is that: in the process of predicting the defect information of the mobile phone cover plate through the model, different feature graphs are not adopted for predicting the position information and the category information, so that the spatial dislocation contradiction of the position information and the category information prediction is highlighted, the accuracy of the generated defect information of the mobile phone cover plate is low, and the occurrence times of sorting and classifying errors of the mobile phone cover plate are high. Based on this, the sorting apparatus control method of some embodiments of the present disclosure first acquires a target cell phone cover plate image by an associated image acquisition device. Therefore, the target mobile phone cover plate image can be obtained, and the mobile phone cover plate image can be used for determining whether the mobile phone cover plate corresponding to the target mobile phone cover plate image has defects or not. And then, carrying out gray level conversion processing on the target mobile phone cover plate image to obtain the target mobile phone cover plate image after the gray level conversion processing as a gray level conversion mobile phone cover plate image. Therefore, the gray level conversion mobile phone cover plate image can be obtained, and the gray level conversion mobile phone cover plate image can be used for enhancing the contrast ratio of the target mobile phone cover plate image. And then, carrying out noise reduction treatment on the gray level conversion mobile phone cover plate image to obtain the noise reduction treated gray level conversion mobile phone cover plate image as a mobile phone cover plate noise reduction image. Therefore, the noise reduction image of the mobile phone cover plate can be obtained, and the method can be used for eliminating the salt and pepper noise of the target mobile phone cover plate image. And then, carrying out image segmentation processing on the mobile phone cover plate noise reduction image to obtain the mobile phone cover plate noise reduction image after the image segmentation processing as a mobile phone cover plate segmentation image. Therefore, the mobile phone cover plate segmentation image can be obtained, and the mobile phone cover plate segmentation image can be used for enhancing the distinguishing degree of the defect area and the background area in the target mobile phone cover plate image. And then, inputting the segmented images of the mobile phone cover plate into a feature extraction layer of a pre-trained mobile phone cover plate defect detection model to obtain a mobile phone cover plate feature map. The mobile phone cover plate defect detection model can further comprise a feature fusion layer and a detection head layer. Therefore, a mobile phone cover plate characteristic diagram representing each pixel characteristic included in the target mobile phone cover plate image can be obtained. And inputting the mobile phone cover plate feature map to the feature fusion layer to obtain the mobile phone cover plate fusion feature map. Therefore, a mobile phone cover plate fusion feature map for carrying out feature fusion on the low-dimensional features and the high-dimensional features can be obtained. Therefore, the method can be used for improving the accuracy of predicting the defect information of the mobile phone cover plate. And secondly, carrying out convolution processing on the fusion characteristic diagram of the mobile phone cover plate to generate a convolution fusion characteristic diagram. Therefore, the convolution fusion feature map can be obtained, so that the convolution fusion feature map can be used for compressing the feature map, enhancing the feature expression capability of the feature map and reducing the dimension. And then, generating a classification characteristic diagram according to the convolution fusion characteristic diagram. Thus, a classification characteristic diagram representing classification information can be obtained, and the classification characteristic diagram can be used for improving classification effect. And then, generating a position feature map according to the convolution fusion feature map. Thus, a position characteristic diagram representing the position information can be obtained, and the position characteristic diagram can be used for improving the accuracy of the predicted position information. And then, inputting the classification characteristic diagram and the position characteristic diagram into a detection head layer to generate mobile phone cover plate defect information. Thus, the defect information of the mobile phone cover plate, which characterizes the defect type and the defect position information, can be obtained. And finally, controlling the associated sorting equipment to sort the mobile phone cover plates corresponding to the mobile phone cover plate defect information according to the generated mobile phone cover plate defect information. Therefore, the mobile phone cover plate can be sorted according to the predicted defect type of the mobile phone cover plate. In the process of predicting the defect information of the mobile phone cover plate, the defect type and the feature point focused by the position information predicting task are different, so that the problem of space dislocation easily occurs, the defect type focuses on the extracted feature which is closer to the existing type, the position information focuses on the position coordinates to correct the boundary frame parameters, and the effect is greatly reduced due to the fact that the two tasks adopt the same feature diagram. Therefore, by respectively adopting two branches of the classification characteristic diagram and the position characteristic diagram for prediction, the spatial dislocation contradiction between the prediction of the position information and the category information can be weakened, the accuracy of the generated defect information of the mobile phone cover plate is improved, and the occurrence frequency of the sorting and classifying errors of the mobile phone cover plate can be reduced.
Referring now to fig. 2, a schematic diagram of an electronic device 200 (e.g., a computing device) suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device shown in fig. 2 is merely an example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 2, the electronic device 200 may include a processing means 201 (e.g., a central processing unit, a graphics processor, etc.) that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 202 or a program loaded from a storage means 208 into a Random Access Memory (RAM) 203. In the RAM 203, various programs and data necessary for the operation of the electronic apparatus 200 are also stored. The processing device 201, ROM 202, and RAM 203 are connected to each other through a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
In general, the following devices may be connected to the I/O interface 205: input devices 206 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 207 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 208 including, for example, magnetic tape, hard disk, etc.; and a communication device 209. The communication means 209 may allow the electronic device 200 to communicate with other devices wirelessly or by wire to exchange data. While fig. 2 shows an electronic device 200 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 2 may represent one device or a plurality of devices as needed.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication device 209, or from the storage device 208, or from the ROM 202. The above-described functions defined in the methods of some embodiments of the present disclosure are performed when the computer program is executed by the processing device 201.
It should be noted that, the computer readable medium described in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (Hyper Text Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a target mobile phone cover plate image through an associated image acquisition device; carrying out gray level conversion treatment on the target mobile phone cover plate image to obtain a target mobile phone cover plate image subjected to gray level conversion treatment as a gray level conversion mobile phone cover plate image; carrying out noise reduction treatment on the gray level conversion mobile phone cover plate image to obtain a noise reduction treated gray level conversion mobile phone cover plate image serving as a mobile phone cover plate noise reduction image; performing image segmentation processing on the mobile phone cover plate noise reduction image to obtain the mobile phone cover plate noise reduction image after the image segmentation processing as a mobile phone cover plate segmentation image; inputting the mobile phone cover plate segmentation image into a feature extraction layer of a pre-trained mobile phone cover plate defect detection model to obtain a mobile phone cover plate feature map, wherein the mobile phone cover plate defect detection model further comprises a feature fusion layer and a detection head layer; inputting the mobile phone cover plate feature map into the feature fusion layer to obtain a mobile phone cover plate fusion feature map; carrying out convolution processing on the fusion characteristic diagram of the mobile phone cover plate to generate a convolution fusion characteristic diagram; generating a classification feature map according to the convolution fusion feature map; generating a position feature map according to the convolution fusion feature map; inputting the classification characteristic diagram and the position characteristic diagram to a detection head layer to generate mobile phone cover plate defect information; and controlling associated sorting equipment to sort the mobile phone cover plates corresponding to the mobile phone cover plate defect information according to the generated mobile phone cover plate defect information.
Computer program code for carrying out operations for some embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above technical features, but encompasses other technical features formed by any combination of the above technical features or their equivalents without departing from the spirit of the invention. Such as the above-described features, are mutually substituted with (but not limited to) the features having similar functions disclosed in the embodiments of the present disclosure.

Claims (8)

1. A sorting apparatus control method, characterized by comprising:
acquiring a target mobile phone cover plate image through an associated image acquisition device;
Performing nonlinear gray level conversion processing on the target mobile phone cover plate image to obtain a target mobile phone cover plate image subjected to the nonlinear gray level conversion processing as a gray level conversion mobile phone cover plate image;
the noise reduction processing is carried out on the gray level conversion mobile phone cover plate image to obtain a noise reduction processed gray level conversion mobile phone cover plate image as a mobile phone cover plate noise reduction image, wherein the noise reduction processing is carried out on the gray level conversion mobile phone cover plate image to obtain a noise reduction processed gray level conversion mobile phone cover plate image as a mobile phone cover plate noise reduction image, and the noise reduction processing comprises the following steps:
for each pixel point in the gray level conversion mobile phone cover plate image, executing the following steps:
generating a gray value region according to the pixel point, the first preset region length and the first preset region height;
generating a gray level limit value according to the gray level value corresponding to the pixel point and a preset gray level threshold value;
sequencing all gray values included in the gray value region to obtain a gray value sequence;
determining the median of the gray scale value sequence as a gray scale median value;
determining the gray value with the largest value in the gray value sequence as the largest gray value;
In response to determining that the gray scale threshold value is greater than the maximum gray scale value, determining the gray scale median value as the gray scale value corresponding to the pixel point;
determining the gray value corresponding to the determined pixel point as an updated gray value;
in response to determining that the gray limit value is less than or equal to the maximum gray value, determining a gray value corresponding to the pixel point as an updated gray value;
determining an image formed by the pixel points corresponding to the determined updated gray values as a noise reduction image of the mobile phone cover plate;
performing image segmentation processing on the mobile phone cover plate noise reduction image to obtain a mobile phone cover plate noise reduction image after the image segmentation processing as a mobile phone cover plate segmentation image, wherein the performing image segmentation processing on the mobile phone cover plate noise reduction image to obtain a mobile phone cover plate noise reduction image after the image segmentation processing as a mobile phone cover plate segmentation image comprises the following steps:
threshold segmentation processing is carried out on the mobile phone cover plate noise reduction image, and the mobile phone cover plate noise reduction image after the threshold segmentation processing is obtained and is used as a threshold segmentation mobile phone cover plate image;
performing morphological processing on the threshold segmentation mobile phone cover plate image to generate a morphological mobile phone cover plate image;
Performing edge detection processing on the morphological mobile phone cover plate image to obtain an edge-detected morphological mobile phone cover plate image serving as an edge-detected mobile phone cover plate image;
performing region growing treatment on the edge detection mobile phone cover plate image through a region growing network to obtain the edge detection mobile phone cover plate image after the region growing treatment as a region growth mobile phone cover plate image, wherein the region growing network is a region selecting network;
determining the area growing mobile phone cover plate image as a mobile phone cover plate segmentation image;
inputting the mobile phone cover plate segmentation image into a feature extraction layer of a pre-trained mobile phone cover plate defect detection model to obtain a mobile phone cover plate feature map, wherein the mobile phone cover plate defect detection model further comprises a feature fusion layer and a detection head layer, the detection head layer is a network layer for detecting position information and defect type information of defects of a mobile phone cover plate corresponding to a target mobile phone cover plate image, the position information is coordinate information of the defects corresponding to the mobile phone cover plate, and the defect type information comprises but is not limited to: black spot defects, water drop defects, orange line defects, scratch defects, concave-convex spot defects, brush mark defects, mark defects and ink defects;
Inputting the mobile phone cover plate feature map to the feature fusion layer to obtain a mobile phone cover plate fusion feature map;
performing convolution processing on the mobile phone cover plate fusion feature map to generate a convolution fusion feature map;
generating a classification feature map according to the convolution fusion feature map;
generating a position feature map according to the convolution fusion feature map;
inputting the classification characteristic diagram and the position characteristic diagram to a detection head layer to generate mobile phone cover plate defect information;
and controlling associated sorting equipment to sort the mobile phone cover plates corresponding to the mobile phone cover plate defect information according to the generated mobile phone cover plate defect information.
2. The method of claim 1, wherein generating a location profile from the convolutionally fused profile comprises:
performing convolution processing on the convolution fusion feature map to generate a first position convolution feature map;
performing convolution processing on the first position convolution feature map to generate a second position convolution feature map;
generating a positioning convolution feature map according to the second position convolution feature map;
generating a confidence coefficient convolution feature map according to the second position convolution feature map;
And combining the confidence convolution feature map and the positioning convolution feature map into a position feature map.
3. The method of claim 1, wherein generating a classification feature map from the convolutionally fused feature map comprises:
performing convolution processing on the convolution fusion feature map to generate a first classification convolution feature map;
performing convolution processing on the first classification convolution feature map to generate a second classification convolution feature map;
performing convolution processing on the second classified convolution feature map to generate a third classified convolution feature map;
and determining the third classification convolution feature map as a classification feature map.
4. The method of claim 1, wherein morphologically processing the thresholded cell phone overlay image to generate a morphology cell phone overlay image comprises:
performing morphological opening operation processing on the threshold segmentation mobile phone cover plate image to generate a mobile phone cover plate morphological opening processing image;
performing morphological closing operation processing on the mobile phone cover plate morphological opening processing image to generate a mobile phone cover plate closing processing image;
and determining the mobile phone cover plate closing processing image as a morphological mobile phone cover plate image.
5. The method of claim 1, wherein the cell phone cover defect detection model is trained by:
obtaining a sample set, wherein a sample in the sample set comprises a sample mobile phone cover plate image and sample mobile phone cover plate defect information corresponding to the sample mobile phone cover plate image;
the following training steps are performed based on the sample set:
respectively inputting sample mobile phone cover plate images of at least one sample in a sample set into an initial mobile phone cover plate defect detection model to obtain mobile phone cover plate defect information corresponding to each sample in the at least one sample;
comparing the mobile phone cover plate defect information corresponding to each sample in the at least one sample with the corresponding sample mobile phone cover plate defect information;
determining whether an initial mobile phone cover plate defect detection model reaches a preset optimization target according to a comparison result;
and determining the initial mobile phone cover plate defect detection model as a mobile phone cover plate defect detection model after training in response to determining that the initial mobile phone cover plate defect detection model reaches the optimization target.
6. The method of claim 5, wherein training the mobile phone cover defect detection model further comprises:
And in response to determining that the initial mobile phone cover plate defect detection model does not reach the optimization target, adjusting network parameters of the initial mobile phone cover plate defect detection model, using unused samples to form a sample set, using the adjusted initial mobile phone cover plate defect detection model as the initial mobile phone cover plate defect detection model, and executing the training step again.
7. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-6.
8. A computer readable medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method according to any of claims 1-6.
CN202311057002.XA 2023-08-22 2023-08-22 Sorting apparatus control method, electronic apparatus, and computer-readable medium Active CN116778263B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311057002.XA CN116778263B (en) 2023-08-22 2023-08-22 Sorting apparatus control method, electronic apparatus, and computer-readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311057002.XA CN116778263B (en) 2023-08-22 2023-08-22 Sorting apparatus control method, electronic apparatus, and computer-readable medium

Publications (2)

Publication Number Publication Date
CN116778263A CN116778263A (en) 2023-09-19
CN116778263B true CN116778263B (en) 2023-11-14

Family

ID=87991643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311057002.XA Active CN116778263B (en) 2023-08-22 2023-08-22 Sorting apparatus control method, electronic apparatus, and computer-readable medium

Country Status (1)

Country Link
CN (1) CN116778263B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106228138A (en) * 2016-07-26 2016-12-14 国网重庆市电力公司电力科学研究院 A kind of Road Detection algorithm of integration region and marginal information
CN107169972A (en) * 2017-06-07 2017-09-15 上海航天控制技术研究所 A kind of quick contour tracing method of noncooperative target
CN109993736A (en) * 2019-03-29 2019-07-09 浙江大学 It is a kind of that different method is looked into based on the electrical equipment thermal imaging segmentation for improving weighting otsu algorithm
CN110579485A (en) * 2019-09-30 2019-12-17 华南理工大学 device and method for rapidly detecting surface defects of glass cover plate of smart phone
CN110672617A (en) * 2019-09-14 2020-01-10 华南理工大学 Method for detecting defects of silk-screen area of glass cover plate of smart phone based on machine vision
CN111667462A (en) * 2020-05-12 2020-09-15 常熟理工学院 Automatic detection method and system for small and weak targets in welding defects
CN112630222A (en) * 2020-11-24 2021-04-09 河海大学常州校区 Mobile phone cover plate glass defect detection method based on machine vision
CN112907519A (en) * 2021-01-29 2021-06-04 广州信邦智能装备股份有限公司 Metal curved surface defect analysis system and method based on deep learning
CN113205063A (en) * 2021-05-19 2021-08-03 云南电网有限责任公司电力科学研究院 Visual identification and positioning method for defects of power transmission conductor
CN114486916A (en) * 2022-01-26 2022-05-13 上海电机学院 Mobile phone glass cover plate defect detection method based on machine vision
CN115330612A (en) * 2022-08-04 2022-11-11 深圳中广核工程设计有限公司 Irradiation image denoising method and system based on adaptive median filtering
CN115330758A (en) * 2022-10-11 2022-11-11 精技电子(南通)有限公司 Welding quality detection method based on denoising processing
CN115456941A (en) * 2022-08-02 2022-12-09 上海华讯网络系统有限公司 Novel electric power insulator defect detection and identification method and system
CN116503268A (en) * 2023-03-21 2023-07-28 中国人民解放军海军大连舰艇学院 Quality improvement method for radar echo image
CN116612106A (en) * 2023-06-06 2023-08-18 哈尔滨理工大学 Method for detecting surface defects of optical element based on YOLOX algorithm

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106228138A (en) * 2016-07-26 2016-12-14 国网重庆市电力公司电力科学研究院 A kind of Road Detection algorithm of integration region and marginal information
CN107169972A (en) * 2017-06-07 2017-09-15 上海航天控制技术研究所 A kind of quick contour tracing method of noncooperative target
CN109993736A (en) * 2019-03-29 2019-07-09 浙江大学 It is a kind of that different method is looked into based on the electrical equipment thermal imaging segmentation for improving weighting otsu algorithm
CN110672617A (en) * 2019-09-14 2020-01-10 华南理工大学 Method for detecting defects of silk-screen area of glass cover plate of smart phone based on machine vision
CN110579485A (en) * 2019-09-30 2019-12-17 华南理工大学 device and method for rapidly detecting surface defects of glass cover plate of smart phone
CN111667462A (en) * 2020-05-12 2020-09-15 常熟理工学院 Automatic detection method and system for small and weak targets in welding defects
CN112630222A (en) * 2020-11-24 2021-04-09 河海大学常州校区 Mobile phone cover plate glass defect detection method based on machine vision
CN112907519A (en) * 2021-01-29 2021-06-04 广州信邦智能装备股份有限公司 Metal curved surface defect analysis system and method based on deep learning
CN113205063A (en) * 2021-05-19 2021-08-03 云南电网有限责任公司电力科学研究院 Visual identification and positioning method for defects of power transmission conductor
CN114486916A (en) * 2022-01-26 2022-05-13 上海电机学院 Mobile phone glass cover plate defect detection method based on machine vision
CN115456941A (en) * 2022-08-02 2022-12-09 上海华讯网络系统有限公司 Novel electric power insulator defect detection and identification method and system
CN115330612A (en) * 2022-08-04 2022-11-11 深圳中广核工程设计有限公司 Irradiation image denoising method and system based on adaptive median filtering
CN115330758A (en) * 2022-10-11 2022-11-11 精技电子(南通)有限公司 Welding quality detection method based on denoising processing
CN116503268A (en) * 2023-03-21 2023-07-28 中国人民解放军海军大连舰艇学院 Quality improvement method for radar echo image
CN116612106A (en) * 2023-06-06 2023-08-18 哈尔滨理工大学 Method for detecting surface defects of optical element based on YOLOX algorithm

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
YOLOX:Exceeding YOLO Series in 2021;Zheng Ge 等;《arXiv》;1-7 *
基于小波压缩域的字符自动定位;李晓华;沈兰荪;;《电路与系统学报》(第05期);1-6 *
基于机器视觉的手机玻璃盖板缺陷检测与分拣系统;贺旖琳 等;《工业控制计算机》;第35卷(第12期);第74-75+79页第1-3节 *
改进中值滤波方法的图像预处理技术;王红君;施楠;赵辉;岳有军;;《计算机系统应用》;第24卷(第05期);237-240 *

Also Published As

Publication number Publication date
CN116778263A (en) 2023-09-19

Similar Documents

Publication Publication Date Title
US10672115B2 (en) Weakly supervised anomaly detection and segmentation in images
CN110705583B (en) Cell detection model training method, device, computer equipment and storage medium
CN110363753B (en) Image quality evaluation method and device and electronic equipment
CN110717919A (en) Image processing method, device, medium and computing equipment
CN111310815A (en) Image recognition method and device, electronic equipment and storage medium
CN111209856B (en) Invoice information identification method and device, electronic equipment and storage medium
CN112052730A (en) 3D dynamic portrait recognition monitoring device and method
CN110276405B (en) Method and apparatus for outputting information
CN113033715B (en) Target detection model training method and target vehicle detection information generation method
CN113822110B (en) Target detection method and device
CN111291761B (en) Method and device for recognizing text
CN116778263B (en) Sorting apparatus control method, electronic apparatus, and computer-readable medium
CN111783777A (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN116721091A (en) Cloth flaw detection method, device and readable medium
CN116486467A (en) Method, device, equipment and storage medium for determining eye detection frame
CN115019321A (en) Text recognition method, text model training method, text recognition device, text model training equipment and storage medium
CN114120423A (en) Face image detection method and device, electronic equipment and computer readable medium
CN113573137A (en) Video canvas boundary detection method, system, terminal equipment and storage medium
CN114764839A (en) Dynamic video generation method and device, readable storage medium and terminal equipment
CN117036965B (en) Bridge maintenance apparatus control method, electronic apparatus, and computer-readable medium
CN116704473B (en) Obstacle information detection method, obstacle information detection device, electronic device, and computer-readable medium
CN112486677B (en) Data graph transmission method and device
WO2024051482A1 (en) Method and system for automatic analysis of cellular monoclonal origin, and storage medium
CN111292329B (en) Training method and device of video segmentation network and electronic equipment
CN117745694A (en) Industrial product detection method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant