CN115908409A - Method and device for detecting defects of photovoltaic sheet, computer equipment and medium - Google Patents
Method and device for detecting defects of photovoltaic sheet, computer equipment and medium Download PDFInfo
- Publication number
- CN115908409A CN115908409A CN202310011665.1A CN202310011665A CN115908409A CN 115908409 A CN115908409 A CN 115908409A CN 202310011665 A CN202310011665 A CN 202310011665A CN 115908409 A CN115908409 A CN 115908409A
- Authority
- CN
- China
- Prior art keywords
- detection
- photovoltaic
- defect
- deep learning
- sample
- 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.)
- Pending
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02E—REDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
- Y02E10/00—Energy generation through renewable energy sources
- Y02E10/50—Photovoltaic [PV] energy
Landscapes
- Image Analysis (AREA)
Abstract
The invention discloses a detection method, a detection device, computer equipment and a medium for defects of a photovoltaic sheet, wherein the detection method of one embodiment comprises the following steps: detecting according to the received photovoltaic sheet gray-scale image of the photovoltaic sheet to be detected by using a preset photovoltaic defect detection deep learning model and outputting a first detection result; performing noise reduction processing on the photovoltaic sheet gray-scale image and performing machine vision detection to output a second detection result; and comparing the second detection result with the first detection result and outputting the defect grade of the photovoltaic sheet to be detected according to the comparison result. The detection method provided by the invention realizes the detection of a larger area through the photovoltaic defect detection deep learning model, realizes the detection of a smaller area which can be accurate to a pixel level by utilizing machine vision detection, and finally judges the defect level according to the proportion of two detection results, thereby realizing the accurate detection of the defects of the photovoltaic film and having practical application value.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for detecting defects of a photovoltaic sheet, computer equipment and a medium.
Background
In industrial photovoltaic sheet detection, photovoltaic sheet defect detection is of great significance for reducing production loss. In the related art, the defect detection is usually performed based on an RGB color image by using a conventional visual method, and there is a problem of poor generalization due to different illumination conditions.
Disclosure of Invention
In order to solve at least one of the above problems, a first aspect of the present invention provides a method for detecting defects of a photovoltaic panel, including:
detecting according to the received photovoltaic sheet gray-scale image of the photovoltaic sheet to be detected by using a preset photovoltaic defect detection deep learning model and outputting a first detection result;
performing noise reduction processing on the photovoltaic sheet gray-scale image and performing machine vision detection to output a second detection result;
and comparing the second detection result with the first detection result and outputting the defect grade of the photovoltaic sheet to be detected according to the comparison result.
Further, the detecting and outputting the first detection result according to the received photovoltaic slice gray-scale image of the photovoltaic slice to be detected by using the preset photovoltaic defect detection deep learning model further comprises:
converting the image size of the photovoltaic sheet gray-scale image into the network entrance size of the photovoltaic defect detection deep learning model and generating an entrance intermediate image;
performing noise reduction processing on the inlet intermediate map;
and carrying out normalization processing on the inlet intermediate graph subjected to noise reduction and inputting the inlet intermediate graph into the photovoltaic defect detection deep learning model for detection so as to output a first detection result.
Further, the noise reduction processing and the machine vision detection of the photovoltaic panel grayscale map to output a second detection result further include:
performing median filtering on the photovoltaic sheet gray level image and outputting a first intermediate image;
performing binary threshold segmentation on the first intermediate graph and outputting a second intermediate graph;
and performing machine vision detection on the second intermediate image and outputting a second detection result, wherein the second detection result is connected domain information and comprises at least one of pixel area, circumscribed rectangle, long and short sides and center of mass of the connected domain.
Further, the second intermediate image is a black-and-white image, and the performing machine vision detection on the second intermediate image and outputting the second detection result further includes:
searching operation is carried out on the second intermediate image by taking the pixel as a searching reference, and the searched first black pixel is taken as a starting point, searching is carried out according to a width-first algorithm, and a connected domain is obtained;
and acquiring at least one of the pixel area, the circumscribed rectangle, the long and short sides and the center of mass of the connected domain according to the connected domain.
Further, before the detecting is performed according to the received photovoltaic slice gray-scale image of the photovoltaic slice to be detected by using the preset photovoltaic defect detection deep learning model and outputting the first detection result, the detecting method further includes:
and training the photovoltaic defect detection deep learning model.
Further, the training the photovoltaic defect detection deep learning model further comprises:
performing data enhancement on the marked sample to obtain a first sample;
converting the image size of each image of the first sample and respectively carrying out normalization processing to obtain a second sample;
training a target detection model using the second sample to obtain the photovoltaic defect detection deep learning model.
Further, the data enhancement of the annotated sample to obtain the first sample further comprises at least one of the following steps:
performing random randomcrop operation on the marked samples to obtain enhanced samples with different scaling ratios and crop degrees;
turning over the marked sample to obtain an enhanced sample;
performing cutmix operation on the marked sample to obtain an enhanced sample fusing multiple defect images;
and carrying out random color jetter operation on the marked samples to obtain enhanced samples.
Further, training a target detection model using the second sample to obtain the photovoltaic defect detection deep learning model further comprises:
adjusting a loss function of the target detection model to enhance positive samples and/or attenuate negative samples.
A second aspect of the present invention provides a photovoltaic sheet defect inspection apparatus using the inspection method according to the first aspect, comprising a model inspection unit, a machine vision inspection unit, and a controller, wherein the controller is configured to:
detecting according to the received photovoltaic sheet gray-scale image of the photovoltaic sheet to be detected by using a preset photovoltaic defect detection deep learning model of the model detection unit and outputting a first detection result;
performing noise reduction processing on the photovoltaic sheet gray-scale image and performing machine vision detection through the machine vision detection unit to output a second detection result;
and comparing the second detection result with the first detection result and outputting the defect grade of the photovoltaic sheet to be detected according to the comparison result.
A third aspect of the invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method according to the first aspect.
A fourth aspect of the invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method according to the first aspect when executing the program.
The invention has the following beneficial effects:
aiming at the existing problems, the invention provides a method and a device for detecting defects of a photovoltaic sheet, which are characterized in that a grayscale map of the photovoltaic sheet is detected through a photovoltaic defect detection deep learning model to realize the detection of a larger area, then the grayscale map of the photovoltaic sheet subjected to noise reduction treatment is detected by machine vision to realize the detection of a smaller area accurate to a pixel level, and finally the defect level is judged according to the proportion of two detection results to realize the accurate detection of the defects of the photovoltaic sheet and effectively improve the detection precision; meanwhile, target detection is carried out on the photovoltaic sheet gray-scale image through the photovoltaic defect detection deep learning model, high-precision detection is carried out through machine vision detection, and the characteristics of the target detection and the machine vision detection are combined, so that the defect position can be quickly positioned, the calculation force requirement of data is reduced, the hardware configuration of an operation unit is reduced, the problems in the prior art are solved, and the photovoltaic defect detection deep learning model has practical application value.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 shows a flow diagram of a detection method according to an embodiment of the invention;
FIG. 2 is a block diagram of a detection device according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a gray scale map of a photovoltaic panel according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating model detection of a photovoltaic panel gray scale map according to an embodiment of the present invention;
FIG. 5 shows a schematic view of machine vision inspection of a photovoltaic tile gray scale map according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer device according to another embodiment of the present invention.
Detailed Description
In order to more clearly illustrate the invention, the invention is further described below with reference to preferred embodiments and the accompanying drawings. Similar parts in the figures are denoted by the same reference numerals. It is to be understood by persons skilled in the art that the following detailed description is illustrative and not restrictive, and is not to be taken as limiting the scope of the invention.
In view of the problems in the related art, as shown in fig. 1, an embodiment of the present invention provides a method for detecting defects of a photovoltaic panel, including:
detecting according to the received photovoltaic sheet gray-scale image of the photovoltaic sheet to be detected by using a preset photovoltaic defect detection deep learning model and outputting a first detection result;
performing noise reduction processing on the photovoltaic sheet gray-scale image and performing machine vision detection to output a second detection result;
and comparing the second detection result with the first detection result and outputting the defect grade of the photovoltaic sheet to be detected according to the comparison result.
In the embodiment, the photovoltaic sheet gray-scale map is detected through the photovoltaic defect detection deep learning model to realize the detection of a larger area, the photovoltaic sheet gray-scale map subjected to noise reduction processing is detected through machine vision to realize the detection of a smaller area accurate to a pixel level, and finally the defect level is judged according to the proportion of two detection results to realize the accurate detection of the defects of the photovoltaic sheet, so that the detection accuracy is effectively improved
In a specific example, as shown in fig. 1, the steps detail how to detect defects of a photovoltaic sheet, including:
the method comprises the steps of firstly, detecting according to a received photovoltaic sheet gray-scale image of a photovoltaic sheet to be detected by using a preset photovoltaic defect detection deep learning model and outputting a first detection result.
In this embodiment, the photovoltaic defect detection deep learning model is an artificial intelligence target detection model trained through labeled photovoltaic samples, and is used for detecting defects of photovoltaic cells. Specifically, the photovoltaic defect detection deep learning model is based on a target detection model, the target detection model of the embodiment is a Yolov5s model, the Yolov5 model is a target detection model published by Ultralytics corporation in 9.6.2020, the Yolov5 model is improved based on a Yolov3 model, and the model has four models, namely, yolov5s, yolov5m, yolov5l and Yolov5x, wherein the Yolov5s network model is a network model with the smallest depth and the smallest width of a feature map in a Yolov5 series, and therefore, the photovoltaic defect detection deep learning model has the characteristics of high speed and small calculation amount, is suitable for large target detection, effectively reduces calculation force requirements, and reduces hardware configuration requirements of a calculation unit of calculation hardware. According to the input requirement of the photovoltaic defect detection deep learning model, the photovoltaic film gray-scale image is used for detection, and a color image is not needed, so that the operation data is further reduced. The method specifically comprises the following steps:
firstly, converting the image size of the photovoltaic sheet gray-scale map into the network entrance size of the photovoltaic defect detection deep learning model and generating an entrance intermediate map.
In this embodiment, the image size of the photovoltaic patch gray scale map is adjusted according to the network entry size of the photovoltaic defect detection deep learning model, where the network entry size is 320 × 320 to 1080 × 1080, specifically, the network entry size of this embodiment is 640 × 640, and the image size of the photovoltaic patch gray scale map is converted into 640 × 640 so as to facilitate inputting the photovoltaic defect detection deep learning model.
In view of further improving the detection accuracy of the photovoltaic defect detection deep learning model, in an optional embodiment, the entry intermediate map is subjected to noise reduction processing.
In the embodiment, FFT Fourier transform is performed on the inlet intermediate graph after the image size is converted so as to remove the noise of the image, and therefore the detection precision of the photovoltaic defect detection deep learning model is effectively improved.
And secondly, normalizing the inlet intermediate graph and inputting the inlet intermediate graph into the photovoltaic defect detection deep learning model for detection so as to output a first detection result.
In this embodiment, normalization processing is performed according to the gray-level value of each pixel in the portal intermediate image, that is, the gray-level value of each pixel is converted to between 0 and 1, so as to increase the operation speed. The method specifically comprises the following steps:
where Input represents image data of each pixel in the diagram, mean represents an average value, the average value of this embodiment is [0.485], std represents a variance, and the variance of this embodiment is [0.229].
It should be noted that, in this embodiment, the normalization process is not specifically limited, and the mean value mean and the variance std, and the values of the mean value mean and the variance std are only used to describe a specific embodiment of the present application, and those skilled in the art should select appropriate parameters and values according to actual application requirements, for example, select corresponding data according to image data, and details are not described herein again.
And finally, inputting the image data of each pixel after the normalization processing into the photovoltaic defect detection deep learning model and acquiring a target detection result as a first detection result.
In this embodiment, as shown in fig. 3, a photovoltaic patch gray scale map is shown, and as shown in fig. 4, a first detection result output by the photovoltaic defect detection deep learning model, that is, a circled portion in the map, is obtained by performing target detection on the photovoltaic patch gray scale map through the photovoltaic defect detection deep learning model, so as to obtain a first detection result with a target frame.
In consideration of the influence of the training of the photovoltaic defect detection deep learning model on the detection result, in an alternative embodiment, the photovoltaic defect detection deep learning model is trained before the photovoltaic defect detection deep learning model is used.
In the embodiment, an artificial intelligence target detection model Yolov5s is trained through marked photovoltaic piece samples until the loss function of the model is stable, so that a photovoltaic defect detection deep learning model for detecting defects of the photovoltaic piece is formed.
The method specifically comprises the following steps:
first, data enhancement is performed on the labeled samples to obtain first samples.
In this embodiment, in consideration of the cost of labeling samples, on the basis of the existing labeled samples, a large number of samples that can be used for training are obtained by performing data enhancement on training samples. For example, the method includes at least one of a random randomcrop operation, a flip operation, a cutmix operation, and a random color jetter operation, it should be noted that the specific operation and operation sequence of data enhancement of the training sample are not specifically limited in this embodiment, and those skilled in the art should select an appropriate operation and sequence according to the actual application requirement, and details are not described herein again.
Specifically, the embodiment performs data enhancement of the training sample according to the following steps:
first, a random randomcrop operation is performed on the labeled samples to obtain first enhanced samples with different scales and crop degrees.
In this embodiment, a random randomcrop is performed on the labeled sample image, that is, the sample image is randomly cropped and scaled to form a first enhanced sample, so that on one hand, sample enhancement is realized, and on the other hand, the model is prevented from falling into overfitting in the training process.
Second, a flip operation is performed on the first enhancement sample to obtain a second enhancement sample.
In this embodiment, the second enhanced sample is formed by randomly flipping the clipped and scaled sample image left and right, so as to improve the generalization degree of the network.
Thirdly, performing a cutmix operation on the second enhanced sample to obtain a third enhanced sample fusing multiple defect images.
In this embodiment, cutmix operation combining CutOut and Mixup is performed on the second enhancement sample, the whole image information is effectively utilized, hard fusion is performed on the two selected marked images, and a marking soft fusion strategy is adopted, so that a third enhancement sample is formed by fusing different kinds of defect images, and the generalization is effectively improved.
Fourthly, carrying out random color jetter operation on the third enhanced sample to obtain the first sample.
In the present embodiment, exposure (exposure), saturation (saturation), and hue (hue) HSV of an image are randomly transformed by color dither (color jitter), so that a third enhanced sample is fitted under different illumination scenes, and further sample enhancement is performed to form a first sample.
And secondly, converting the image size of each image of the first sample and respectively carrying out normalization processing to obtain a second sample.
In this embodiment, the size of the sample image is converted into a size suitable for the input network model according to the network entry size, which is 640 × 640 in this embodiment, and the image size of each image of the first sample is converted into 640 × 640. Then, the data of each pixel of the image is normalized, thereby accelerating the running speed. The normalization process is the same as the foregoing embodiment, and is not repeated herein.
Finally, a target detection model is trained by using the second sample to obtain the photovoltaic defect detection deep learning model.
In this embodiment, the artificial intelligent neural network model Yolov5s model is trained using the second sample after data enhancement and preprocessing, and parameters of the model are adjusted according to a loss function of the model, so as to achieve rapid convergence of the model.
In an alternative embodiment, the loss function of the target detection model is adjusted to enhance the positive samples, or attenuate the negative samples, or enhance the positive samples and attenuate the negative samples, in view of the fast convergence of the model.
In the target detection model yolov5s used in the embodiment, the loss function loss plays a decisive role in training, and the loss function loss of the yolov5s is different from most traditional methods, so that a corresponding anchor frame is generated on the basis of a grid. Meanwhile, yolov5s demarcates positive and negative samples, and calculates 3 loss functions: the loss function loss of (1) box, (2) obj, and (3) cls, and those skilled in the art can select different loss functions according to different application scenarios.
In this embodiment, the degree of training of the model is measured by using the obj loss function loss of the Yolov5s model, and the obj loss function of the Yolov5s model is further adjusted, specifically:
wherein S is 2 Representing S × S grids; b represents that B candidate frames anchor box are generated for each grid;indicating that a parameter of an obj loss function is slave +>Adjusted to be->Thereby improving the convergence speed of the loss function, specifically, if the box at i, j has a target (positive sample), its value is 1.1, otherwise it is 0; />Indicating that a parameter of an obj loss function is slave +>Adjusted to be->To improve the convergence speed of the loss function, specifically, if the box at i, j has no target (negative sample), its value is changed from 1.0 to 0.9, otherwise it is 0, so as to improve the convergence speed of the loss function; meanwhile, the addition operation of the noobj item and the obj item in the calculation formula of the obj loss function of yolov5s is modified into the multiplication operation, so that the convergence speed of the loss function loss of the target detection model is increased.
In the embodiment, by modifying the loss function loss, compared with an unmodified deep learning model, the photovoltaic defect detection deep learning model obtained by training has the advantages that the model loss function loss is reduced from the original value (0.3271) to (0.1934), and meanwhile, the MAP 0.5 of the model is improved from 0.90212 to 0.9162, namely is increased by 1.56%; namely, the performance index of the photovoltaic defect detection deep learning model is effectively improved. Furthermore, the positive sample is effectively strengthened by adjusting the parameter value of the loss function of the positive sample, namely, increasing the parameter value from 1.0 to 1.1; the negative sample is effectively weakened by adjusting the parameter value of the loss function of the negative sample, namely, increasing the parameter value from 0.9 to 1.0; therefore, the convergence speed of the network model is accelerated, the gradient of each weight in the network is updated according to the back propagation of the loss function until the fluctuation of the loss function of the model reaches a preset fluctuation range, and the network model training is finished.
It should be noted that, the specific adjustment of the loss function is not limited in the present application, and those skilled in the art should perform the setting according to the actual application requirement, for example, only adjust the positive sample, or adjust the negative sample, or adjust the positive sample and the negative sample simultaneously, and details thereof are not repeated herein.
According to the embodiment, the target detection is carried out on the photovoltaic sheet gray-scale image through the photovoltaic defect detection deep learning model, the defect position can be quickly positioned, meanwhile, the calculation power requirement of data is reduced, and the hardware configuration of the operation unit is reduced.
And secondly, performing noise reduction processing on the photovoltaic sheet gray-scale image and performing machine vision detection to output a second detection result.
In this embodiment, an input photovoltaic slice grayscale image is preprocessed, and then, a machine vision is used to detect the pixel-level accuracy. The method specifically comprises the following steps:
firstly, median filtering is carried out on the photovoltaic slice gray-scale map, and a first middle map is output.
In this embodiment, a median filtering is performed on the photovoltaic sheet gray map to effectively remove most of the shadow effect to form a first intermediate map. The shadow influence is great when the photovoltaic piece gray scale image of this embodiment receives image acquisition to consider that machine vision detects can be accurate to the pixel level, consequently remove the shadow processing to the photovoltaic piece gray scale image, can effectively improve and detect the precision.
Then, the first intermediate map is subjected to binary threshold segmentation and a second intermediate map is output.
In this embodiment, the image of the first intermediate image is subjected to threshold binary segmentation, and the defect outline with threshold binary is 0 in black and 255 in white, where black is the defect area and white is the normal area, as shown in fig. 5.
And thirdly, performing machine vision detection on the second intermediate image and outputting a second detection result, wherein the second detection result is connected domain information and comprises at least one of pixel area, circumscribed rectangle, long and short sides and center of mass of the connected domain.
In the embodiment, the photovoltaic sheet gray-scale image is subjected to noise reduction and binarization, and then blob detection is performed to obtain the mass center and the long and short sides of the shape of the defect area. Specifically, the method comprises the following steps:
firstly, a searching operation is carried out in the second intermediate image by taking a pixel as a searching reference, and a connected domain is searched and acquired by taking the searched first black pixel as a starting point according to a width-first algorithm.
In this embodiment, a connected domain is obtained by searching through a pixel search and a width-first algorithm BFS, specifically, all pixels of a photovoltaic patch grayscale are traversed, a first searched black pixel is used as a starting point, all black pixels are searched according to the width-first algorithm to form a connected domain, each black pixel is marked, and a coordinate of the black pixel is recorded.
And then, acquiring at least one of pixel area, circumscribed rectangle, long and short sides and centroid according to the connected domain obtained by searching.
In this embodiment, as shown in fig. 5, for a defect area obtained by machine vision inspection, that is, a connected domain formed after a photovoltaic patch gray scale map is searched, a pixel area of the defect area is obtained by calculating according to coordinates of each black pixel, a centroid and a circumscribed rectangle of the defect are obtained through the coordinates, and a long side and a short side of a shape are obtained through the coordinates. It should be noted that, the present application does not limit the specific parameters of the obtained connected component, and those skilled in the art should select the required parameters according to the actual application requirements, for example, at least one of the pixel area, the circumscribed rectangle, the long and short sides, and the centroid of the connected component, which is not described herein again.
According to the embodiment, the photovoltaic sheet gray-scale image after the pretreatment is detected through machine vision, a relatively accurate defect detection result can be obtained, and the detection time is effectively shortened.
And thirdly, comparing the second detection result with the first detection result and outputting the defect grade of the photovoltaic sheet to be detected according to the comparison result.
In the embodiment, a larger defect area can be quickly positioned by performing target detection on a photovoltaic sheet gray-scale image according to a photovoltaic defect detection deep learning model, and a smaller defect connected domain accurate to a pixel level is obtained by detecting the preprocessed photovoltaic sheet gray-scale image through machine vision; and finally comparing the two, for example, judging the proportion of the defect connected domain to a larger defect area.
In this embodiment, if the area of the defect connected domain detected by the machine vision accounts for more than 90% of the frame area of the defect region detected by the deep learning model for detecting the photovoltaic defect, the defect is a serious defect, 10% -90% of the defect is a medium defect, and less than 10% of the defect is a light defect.
And finishing the detection of the defects of the photovoltaic sheet.
According to the method for detecting the defects of the photovoltaic sheet, the grayscale map of the photovoltaic sheet is detected through a photovoltaic defect detection deep learning model to realize detection of a large area, the grayscale map of the photovoltaic sheet subjected to noise reduction processing is detected through machine vision to realize detection of a small area accurate to a pixel level, and finally the defect level is judged according to the proportion of two detection results to realize accurate detection of the defects of the photovoltaic sheet and effectively improve the detection accuracy; meanwhile, the target detection is carried out on the photovoltaic sheet gray-scale image through the photovoltaic defect detection deep learning model, the high-precision detection is carried out through the machine vision detection, and the characteristics of the target detection and the machine vision detection are combined, so that the defect position can be quickly positioned, the calculation force requirement of data is reduced, the hardware configuration of an operation unit is reduced, the problems in the prior art are solved, and the practical application value is realized.
Corresponding to the detection method provided by the foregoing embodiment, an embodiment of the present application further provides a detection apparatus implementing the detection method, as shown in fig. 2, including a model detection unit, a machine vision detection unit, and a controller, where the controller is configured to: detecting according to the received photovoltaic sheet gray-scale image of the photovoltaic sheet to be detected by using a preset photovoltaic defect detection deep learning model of the model detection unit and outputting a first detection result; performing noise reduction processing on the photovoltaic sheet gray-scale image and performing machine vision detection through the machine vision detection unit to output a second detection result; and comparing the second detection result with the first detection result and outputting the defect grade of the photovoltaic sheet to be detected according to the comparison result.
According to the method, the photovoltaic defect detection deep learning model of the model detection unit is used for carrying out target detection on the photovoltaic gray-scale image, the machine vision detection unit is used for carrying out high-precision machine vision detection, and the characteristics of the photovoltaic defect detection deep learning model and the machine vision detection unit are combined, so that the defect position can be rapidly positioned, the calculation power requirement of data is reduced, the hardware configuration of the operation unit is reduced, the problems existing in the prior art are solved, and the method has practical application value.
Since the detection device provided in the embodiments of the present application corresponds to the detection methods provided in the above-mentioned several embodiments, the foregoing embodiments are also applicable to the detection device provided in the embodiments, and detailed description is omitted in the embodiments.
Another embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements: detecting according to the received photovoltaic sheet gray-scale image of the photovoltaic sheet to be detected by using a preset photovoltaic defect detection deep learning model and outputting a first detection result; performing noise reduction processing on the photovoltaic sheet gray-scale image and performing machine vision detection to output a second detection result; and comparing the second detection result with the first detection result and outputting the defect grade of the photovoltaic sheet to be detected according to the comparison result.
In practice, the computer-readable storage medium may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: 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 the present embodiment, 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.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may 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 wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + + or the like 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 type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
As shown in fig. 6, another embodiment of the present invention provides a schematic structural diagram of a computer device. The computer device 12 shown in FIG. 6 is only an example and should not impose any limitations on the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 6, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The processor unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing a method for detecting defects in a photovoltaic panel according to an embodiment of the present invention.
It should be understood that the above-described embodiments of the present invention are examples for clearly illustrating the invention, and are not to be construed as limiting the embodiments of the present invention, and it will be obvious to those skilled in the art that various changes and modifications can be made on the basis of the above description, and it is not intended to exhaust all embodiments, and obvious changes and modifications can be made on the basis of the technical solutions of the present invention.
Claims (11)
1. A method for detecting defects of a photovoltaic sheet is characterized by comprising the following steps:
detecting according to the received photovoltaic sheet gray-scale image of the photovoltaic sheet to be detected by using a preset photovoltaic defect detection deep learning model and outputting a first detection result;
performing noise reduction processing on the photovoltaic sheet gray-scale image and performing machine vision detection to output a second detection result;
and comparing the second detection result with the first detection result and outputting the defect grade of the photovoltaic sheet to be detected according to the comparison result.
2. The detection method according to claim 1, wherein the detecting according to the received photovoltaic sheet gray-scale map of the photovoltaic sheet to be detected and outputting the first detection result by using the preset photovoltaic defect detection deep learning model further comprises:
converting the image size of the photovoltaic sheet gray-scale image into the network entrance size of the photovoltaic defect detection deep learning model and generating an entrance intermediate image;
performing noise reduction processing on the inlet intermediate image;
and carrying out normalization processing on the inlet intermediate graph subjected to noise reduction and inputting the inlet intermediate graph into the photovoltaic defect detection deep learning model for detection so as to output a first detection result.
3. The detection method according to claim 1, wherein the denoising and machine vision detecting the photovoltaic patch gray scale map to output a second detection result further comprises:
performing median filtering on the photovoltaic sheet gray-scale image and outputting a first intermediate image;
performing binary threshold segmentation on the first intermediate graph and outputting a second intermediate graph;
and performing machine vision detection on the second intermediate image and outputting a second detection result, wherein the second detection result is connected domain information and comprises at least one of pixel area, circumscribed rectangle, long and short sides and center of mass of the connected domain.
4. The detection method according to claim 3, wherein the second intermediate map is a black-and-white map, and the performing machine vision detection on the second intermediate map and outputting the second detection result further comprises:
searching operation is carried out on the second intermediate image by taking the pixel as a searching reference, and the searched first black pixel is taken as a starting point, searching is carried out according to a width-first algorithm, and a connected domain is obtained;
and acquiring at least one of the pixel area, the circumscribed rectangle, the long and short sides and the center of mass of the connected domain according to the connected domain.
5. The detection method according to any one of claims 1 to 4, wherein before the detecting according to the received photovoltaic patch gray-scale map of the photovoltaic patch to be detected by using the preset photovoltaic defect detection deep learning model and outputting the first detection result, the detection method further comprises:
and training the photovoltaic defect detection deep learning model.
6. The inspection method of claim 5, wherein the training the photovoltaic defect detection deep learning model further comprises:
performing data enhancement on the marked sample to obtain a first sample;
converting the image size of each image of the first sample and respectively carrying out normalization processing to obtain a second sample;
training a target detection model using the second sample to obtain the photovoltaic defect detection deep learning model.
7. The method of claim 6, wherein the data enhancing the labeled sample to obtain the first sample further comprises at least one of:
performing random randomcrop operation on the marked samples to obtain enhanced samples with different scaling ratios and crop degrees;
turning over the marked sample to obtain an enhanced sample;
performing cutmix operation on the marked sample to obtain an enhanced sample fusing multiple defect images;
and carrying out random color jetter operation on the marked samples to obtain enhanced samples.
8. The inspection method of claim 6, wherein training a target inspection model using the second sample to obtain the photovoltaic defect inspection deep learning model further comprises:
adjusting a loss function of the target detection model to enhance positive samples and/or attenuate negative samples.
9. A photovoltaic sheet defect inspection apparatus using the inspection method of any one of claims 1-8, comprising a model inspection unit, a machine vision inspection unit, and a controller, wherein the controller is configured to:
detecting according to the received photovoltaic sheet gray-scale image of the photovoltaic sheet to be detected by using a preset photovoltaic defect detection deep learning model of the model detection unit and outputting a first detection result;
performing noise reduction processing on the photovoltaic sheet gray-scale image and performing machine vision detection through the machine vision detection unit to output a second detection result;
and comparing the second detection result with the first detection result and outputting the defect grade of the photovoltaic sheet to be detected according to the comparison result.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-8.
11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-8 when executing the program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310011665.1A CN115908409A (en) | 2023-01-05 | 2023-01-05 | Method and device for detecting defects of photovoltaic sheet, computer equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310011665.1A CN115908409A (en) | 2023-01-05 | 2023-01-05 | Method and device for detecting defects of photovoltaic sheet, computer equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115908409A true CN115908409A (en) | 2023-04-04 |
Family
ID=86489741
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310011665.1A Pending CN115908409A (en) | 2023-01-05 | 2023-01-05 | Method and device for detecting defects of photovoltaic sheet, computer equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115908409A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117523307A (en) * | 2023-11-24 | 2024-02-06 | 佛山众陶联供应链服务有限公司 | Tile sorting method and system based on opc and tile surface flaw identification model |
-
2023
- 2023-01-05 CN CN202310011665.1A patent/CN115908409A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117523307A (en) * | 2023-11-24 | 2024-02-06 | 佛山众陶联供应链服务有限公司 | Tile sorting method and system based on opc and tile surface flaw identification model |
CN117523307B (en) * | 2023-11-24 | 2024-04-19 | 佛山众陶联供应链服务有限公司 | Tile sorting method and system based on opc and tile surface flaw identification model |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109447154B (en) | Picture similarity detection method, device, medium and electronic equipment | |
CN111914698B (en) | Human body segmentation method, segmentation system, electronic equipment and storage medium in image | |
CN112989995B (en) | Text detection method and device and electronic equipment | |
US11386710B2 (en) | Eye state detection method, electronic device, detecting apparatus and computer readable storage medium | |
CN111325728B (en) | Product defect detection method, device, equipment and storage medium | |
CN114663389A (en) | Photovoltaic module hot spot detection method and device and storage medium | |
CN116385278B (en) | Low-light image visual characteristic self-supervision representation method and system | |
CN112597909A (en) | Method and equipment for evaluating quality of face picture | |
CN112651468A (en) | Multi-scale lightweight image classification method and storage medium thereof | |
CN111445496B (en) | Underwater image recognition tracking system and method | |
CN112966553A (en) | Strong coupling target tracking method, device, medium and equipment based on twin network | |
CN115908409A (en) | Method and device for detecting defects of photovoltaic sheet, computer equipment and medium | |
CN110472673B (en) | Parameter adjustment method, fundus image processing device, fundus image processing medium and fundus image processing apparatus | |
CN116802683A (en) | Image processing method and system | |
Zhou et al. | An improved algorithm using weighted guided coefficient and union self‐adaptive image enhancement for single image haze removal | |
Li et al. | Multi-scale fusion framework via retinex and transmittance optimization for underwater image enhancement | |
CN114529906A (en) | Method and system for detecting abnormity of digital instrument of power transmission equipment based on character recognition | |
CN116245866B (en) | Mobile face tracking method and system | |
CN116823864B (en) | Data processing method, device, equipment and medium based on balance loss function | |
Li et al. | Research on Oracle Bone Inscription Segmentation and Recognition Model Based on Deep Learning | |
CN113870142B (en) | Method and device for enhancing image contrast | |
CN114882298B (en) | Optimization method and device for confrontation complementary learning model | |
Rashed | Character Recognition of Low Illumination Product Marking Based on Vision | |
CN115690800A (en) | Automatic reading method, system, equipment and medium for digital instrument | |
Zhang et al. | Comparative Study and Performance Optimization of Object Detection Algorithms |
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 |