Crucible defect detection method, device and computer equipment
Through deep learning algorithms and dual-model detection technology, quartz crucible defects are automatically identified and similar areas are merged, solving the high cost and low accuracy problems of traditional manual inspection and achieving efficient and accurate crucible quality control.
Patent Information
- Application Number
- CN202411746307.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-12-02
AI Technical Summary
Traditional quartz crucible defect detection relies on manual quality inspection, resulting in high labor costs and low accuracy.
A deep learning algorithm is used to identify defects in crucible images. By merging defect detection areas of the same type with a distance less than a threshold, and combining dual-model detection and grayscale threshold segmentation, the detection accuracy and robustness are improved.
It realizes the automatic identification of crucible defects, reduces labor costs, improves detection accuracy and explainability, and reduces misjudgments.
Smart Images

Figure CN119251210B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of semiconductor industry production technology, and in particular to a crucible defect detection method, device and computer equipment. Background Art
[0002] As a stable and high-purity experimental product, quartz crucible plays an indispensable role in the production process of the semiconductor industry.
[0003] Traditionally, quartz crucibles require quality inspection during the production process. This inspection often involves manually measuring the crucible's dimensions with a ruler to ensure they meet requirements, and visually or by hand to determine if there are any defects. Manual quality inspection methods are often limited by the inspector's expertise and offer limited accuracy.
[0004] Therefore, the current crucible defect detection still has the problems of high labor cost and low accuracy. Summary of the Invention
[0005] Based on this, it is necessary to provide a crucible defect detection method, device and computer equipment that can reduce labor costs and improve accuracy to address the above technical problems.
[0006] In a first aspect, the present application provides a crucible defect detection method, the crucible defect detection method comprising:
[0007] Defect recognition is performed on the crucible image to be inspected to obtain multiple defect detection areas; each defect detection area corresponds to a defect type;
[0008] Merging the defect detection areas with the same defect type and a distance between the areas less than a preset threshold among the multiple defect detection areas;
[0009] Determine a defect detection result based on the multiple defect detection areas after merging.
[0010] In one embodiment, performing defect recognition on the crucible image to be inspected to obtain multiple defect detection areas includes:
[0011] Perform grayscale threshold segmentation on the crucible image to be detected to obtain a target detection area; the target detection area includes the straight wall of the crucible;
[0012] Defect recognition is performed based on the target detection area to obtain multiple defect detection areas.
[0013] In one embodiment, the defect identification includes:
[0014] Amplifying the image of the crucible to be inspected or the target inspection area according to a preset magnification to obtain an enlarged image;
[0015] The crucible image to be inspected or the target inspection area is input into a pre-trained first inspection model, and the enlarged image is input into a pre-trained second inspection model to obtain a plurality of defect inspection areas.
[0016] In one embodiment, inputting the crucible image to be inspected or the target inspection area into a pre-trained first inspection model and inputting the magnified image into a pre-trained second inspection model to obtain a plurality of defect inspection areas comprises:
[0017] Acquire a plurality of historical crucible images and defect annotations of each of the historical crucible images;
[0018] obtaining a global image training set based on the plurality of historical crucible images and the defect annotations;
[0019] Based on the global image training set, a first deep learning network is trained to obtain a first detection model.
[0020] In one embodiment, after acquiring a plurality of historical crucible images and annotating defects in each of the historical crucible images, the method further includes:
[0021] cropping the plurality of historical crucible images based on the preset magnification to obtain a plurality of historical crucible sub-images and defect annotations corresponding to each of the historical crucible sub-images;
[0022] obtaining a local image training set based on the plurality of historical crucible sub-images and the defect annotations;
[0023] Based on the local image training set, a second deep learning network is trained to obtain a second detection model.
[0024] In one embodiment, merging the defect detection areas having the same defect type and a distance between the areas less than a preset threshold in the plurality of defect detection areas includes:
[0025] Calculate the distance between each two defect detection areas with the same defect type in sequence;
[0026] If the area distance is smaller than a preset threshold, the two current defect detection areas are merged based on the minimum area that can cover the two current defect detection areas.
[0027] In one embodiment, sequentially calculating the distance between each two defect detection areas having the same defect type includes:
[0028] Based on the relative positions of the two defect detection areas, edge reference points of the two defect detection areas are determined respectively;
[0029] Based on the edge reference points of the two defect detection areas, the area distance between the two defect detection areas is calculated.
[0030] In one embodiment, determining the defect detection result based on the plurality of defect detection areas further comprises:
[0031] Calculating the number of horizontal pixels and the number of vertical pixels of each defect detection area;
[0032] Based on the number of horizontal pixels and the number of vertical pixels of each defect detection area, the actual width and the actual height of each defect detection area are determined.
[0033] In a second aspect, the present application provides a crucible defect detection device, comprising:
[0034] An identification module is used to identify defects in the crucible image to be inspected, and obtain multiple defect detection areas; each defect detection area corresponds to a defect type;
[0035] A merging module is used to merge defect detection areas with the same defect type and an area spacing less than a preset threshold to obtain a merged defect detection area;
[0036] A determination module is used to determine a defect detection result based on the multiple defect detection areas.
[0037] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-described method when executing the computer program.
[0038] The above-mentioned crucible defect detection method, device and computer equipment obtain multiple defect detection areas by performing defect recognition on the crucible image to be inspected, which can realize automatic recognition of defects in the crucible image to be inspected, avoiding the problems of inconsistent standards and high labor costs caused by manual inspection by quality inspectors; each defect detection area corresponds to a defect type; defect detection areas with the same defect type and an area spacing less than a preset threshold are merged to obtain a merged defect detection area; based on the multiple defect detection areas, the defect detection results are determined, which can realize the merging and classification of multiple defect detection areas that may exist under non-continuous defects, further improving the accuracy and interpretability of defect detection, thereby achieving the effect of reducing labor costs and improving accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A diagram showing an application environment of a crucible defect detection method according to an embodiment;
[0040] Figure 21 is a schematic flow chart of a crucible defect detection method according to an embodiment;
[0041] Figure 3 Schematic diagram of a process for detecting crucible defects in another embodiment;
[0042] Figure 4 1 is a schematic diagram of the process of dual-model training and inference in one embodiment;
[0043] Figure 5 Schematic diagram of detection frame distance determination in one embodiment;
[0044] Figure 6 is a structural block diagram of a crucible defect detection device in one embodiment;
[0045] Figure 7 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0047] The crucible defect detection method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. The terminal 102 communicates with the server 104 through the network. The data storage system can store data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. The terminal 102 obtains the image of the crucible to be inspected by communicating with the server 104, and performs defect recognition on the image of the crucible to be inspected to obtain multiple defect detection areas; each defect detection area corresponds to a defect type; defect detection areas with the same defect type and an area spacing less than a preset threshold are merged to obtain a merged defect detection area; based on the multiple defect detection areas, the defect detection results are determined. The terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices, etc. The server 104 can be implemented as an independent server or a server cluster consisting of multiple servers.
[0048] In one embodiment, Figure 2 As shown, a crucible defect detection method is provided, which is applied to Figure 1 Taking the terminal 102 in FIG. 1 as an example, the method includes the following steps:
[0049] In step S100 , defect recognition is performed on the crucible image to be inspected to obtain a plurality of defect detection areas; each defect detection area corresponds to a defect type.
[0050] Defect recognition of the crucible image to be inspected can be performed by automatically identifying potential defects in the image based on a deep learning algorithm, thereby obtaining multiple defect detection areas. It is understood that each defect in the crucible image to be inspected can be identified as a defect detection area and labeled with a defect type.
[0051] Defect detection regions can be the recognition results obtained by the deep learning algorithm. Each defect detection region corresponds to one or more defects. Each defect detection region can be marked in the image of the crucible to be inspected with a detection frame to display multiple detected defect regions in the image.
[0052] The defect type can be used to indicate the form of the defect and can also be used to characterize the cause of the defect. For example, the defect type can include cracks, bubbles, impurities, etc., and can also include other defect types set based on production conditions, which are not limited in this embodiment.
[0053] In step S200 , defect detection areas with the same defect type and an interval between the areas smaller than a preset threshold are merged among the plurality of defect detection areas.
[0054] The inventors have discovered that interval defects may appear on the actual crucible to be inspected. Interval defects can be understood as multiple defects with large intervals, such as linear black spots, bubble groups, etc., including areas composed of several black spots or bubbles with intervals. In traditional technology, defect areas caused by the same defect are usually identified as multiple defect detection areas by deep learning algorithms due to size, quantity, and quality control considerations, that is, they are distinguished as different defects. However, if the above defect detection areas are judged separately, it may affect the judgment of quality. The crucible defect detection method provided in this embodiment merges the defect detection areas of defect areas caused by the same defect, thereby realizing the merged processing of interval defects, thereby achieving the effect of reducing misjudgment and improving detection accuracy.
[0055] Since multiple defect detection areas under interval-type defects may not intersect, but still have adjacent distances, multiple defect detection areas with the same defect type and an area spacing less than a preset threshold can be merged.
[0056] Specifically, the defect types can be screened, and under the same defect type, the area distance between each two defect detection areas is calculated separately. When the area distance is less than a preset threshold, the two defect detection areas are merged, and the area range of the merged defect detection area is re-determined.
[0057] It can be understood that the merging process can be to merge only the defect detection areas that meet the same defect type and the area spacing is less than the preset threshold condition among multiple defect detection areas. For defect detection areas that may not meet the conditions, the merging process may not be performed. Therefore, the multiple defect detection areas after the merging process may be composed of all the defect detection areas that have been merged, or may be composed of some of the defect detection areas that have been merged, and defect detection areas that have not been merged. When there is no defect detection area that meets the conditions among multiple defect detection areas, the defect detection area after the merging process may be composed of defect detection areas that have not been merged.
[0058] Step S300: Determine a defect detection result based on the multiple defect detection areas after merging.
[0059] Among them, based on the multiple defect detection areas after merging processing, the defect detection results are determined. The multiple defect detection areas can be displayed as defect detection results, or further analysis can be performed based on the multiple defect detection areas, such as evaluating the identified areas. The evaluation content includes but is not limited to factors such as the number, size, and location of the defects to determine whether it will affect the performance of the product.
[0060] It can be understood that the multiple defect detection areas after the merging process may include some unmerged defect detection areas and some merged defect detection areas, or may include all merged defect detection areas.
[0061] The present embodiment provides a crucible defect detection method, which performs defect recognition on the crucible image to be inspected to obtain multiple defect detection areas, thereby realizing automatic recognition of defects in the crucible image to be inspected, thereby avoiding the problems of inconsistent standards and high labor costs caused by manual inspection by quality inspectors; each defect detection area corresponds to a defect type; defect detection areas with the same defect type and an area spacing less than a preset threshold are merged to obtain a merged defect detection area; based on the multiple defect detection areas, the defect detection results are determined, and it is possible to merge and classify multiple defect detection areas that may exist under non-continuous defects, thereby further improving the accuracy and explainability of defect detection, thereby achieving the effect of reducing labor costs and improving accuracy.
[0062] In one embodiment, defect recognition is performed on the crucible image to be inspected, and multiple defect detection areas are obtained, including:
[0063] Perform grayscale threshold segmentation on the crucible image to be detected to obtain the target detection area;
[0064] Defect recognition is performed based on the target detection area to obtain multiple defect detection areas.
[0065] The target detection area includes the straight crucible wall. Grayscale threshold segmentation can be performed on the crucible image to be detected by first converting the color crucible image to be detected into a grayscale image. Based on a preset threshold, the grayscale image is segmented into two images, one above the threshold and one below the threshold. It is understood that the crucible image to be detected includes the straight crucible wall and the background. Grayscale threshold segmentation can be used to segment a detection area consisting solely of the straight crucible wall as the target detection area.
[0066] Defect recognition based on the target detection area can avoid identifying some features in the background as defect detection areas and reduce false alarms.
[0067] The present embodiment provides a crucible defect detection method that performs defect identification after obtaining a target detection area through grayscale threshold segmentation, thereby reducing the occurrence of false alarms and improving the accuracy of defect identification.
[0068] In one embodiment, defect identification includes:
[0069] Amplifying the image of the crucible to be inspected or the target inspection area according to a preset magnification to obtain an enlarged image;
[0070] The crucible image to be inspected or the target inspection area is input into a pre-trained first inspection model, and the enlarged image is input into a pre-trained second inspection model to obtain multiple defect inspection areas.
[0071] In this embodiment, a first detection model and a second detection model are used for defect recognition, respectively. The first detection model is used to identify the crucible image to be detected or the target detection area to obtain the defect detection area under the overall perspective, and the second detection model is used to identify the enlarged image to obtain the defect detection area under the local perspective.
[0072] The preset magnification can be selected to enhance local details while preserving the overall image structure. Amplification according to the preset magnification can be performed using image processing techniques, such as bilinear interpolation or bicubic interpolation, to amplify the crucible image to be inspected or the target inspection area to obtain an enlarged image. The preset magnification can correspond to the image size used during model training.
[0073] This embodiment provides a crucible defect detection method, which obtains multiple defect detection areas by inputting the image of the crucible to be detected or the target detection area into a pre-trained first detection model, and inputting the enlarged image into a pre-trained second detection model. This can eliminate the image cropping process, thereby further improving the processing speed and achieving the effect of improving the accuracy and robustness of defect recognition.
[0074] In one embodiment, the process of inputting the image of the crucible to be inspected or the target inspection area into a pre-trained first inspection model and inputting the magnified image into a pre-trained second inspection model to obtain the plurality of defect inspection areas includes:
[0075] Acquire multiple historical crucible images and defect annotations for each historical crucible image;
[0076] Based on multiple historical crucible images and defect annotations, a global image training set is obtained;
[0077] Based on the global image training set, a first deep learning network is trained to obtain a first detection model.
[0078] Among them, the first detection model is trained based on a global image training set consisting of historical crucible images and defect annotation results.
[0079] Historical crucible images can be crucible images taken at historical moments. Each crucible image can include defects of varying types and severity to ensure the generalization capabilities of the model. Defect annotation can be performed manually or through semi-automatic annotation tools, and the annotation content can include defect location, defect size, and defect type.
[0080] Based on multiple historical crucible images and defect annotations, a global image training set is generated. This process may also include data cleaning of the historical crucible images to remove blurry, damaged, or non-compliant images. Furthermore, data augmentation and formatting of the historical crucible images may be performed. The global image training machine is then used to train a first deep learning network. The first deep learning network may employ a deep learning model architecture such as a convolutional neural network, YOLO, or Faster R-CNN.
[0081] This embodiment provides a crucible defect detection method, which trains a first deep learning network using a global image training set constructed from historical crucible images and defect annotations to obtain a first detection model, thereby improving the accuracy and robustness of defect recognition.
[0082] In one embodiment, after acquiring a plurality of historical crucible images and annotating defects in each historical crucible image, the method further includes:
[0083] cropping the plurality of historical crucible images based on the preset magnification to obtain a plurality of historical crucible sub-images and defect annotations corresponding to each historical crucible sub-image;
[0084] Based on multiple historical crucible sub-images and defect annotations, a local image training set is obtained;
[0085] Based on the local image training set, the second deep learning network is trained to obtain a second detection model.
[0086] Among them, the second detection model can be trained based on the cropped historical crucible image, and the historical crucible image can be cropped according to a preset size or a preset ratio to obtain multiple historical crucible sub-images corresponding to each historical crucible image, and defects are annotated through manual annotation or semi-automatic annotation tools.
[0087] Based on multiple historical crucible sub-images and defect annotations, a local image training set is generated. This process may also include data cleaning, data augmentation, and formatting of the historical crucible sub-images, which are not detailed here. The global image training machine is then used to train a second deep learning network. This second deep learning network can utilize a deep learning model architecture such as a convolutional neural network, YOLO, or Faster R-CNN.
[0088] It can be understood that by cropping the historical crucible sub-image, the second deep neural network can understand more accurate detail features. In actual application, processing the enlarged image can obtain more accurate defect recognition results.
[0089] This embodiment provides a crucible defect detection method, which trains a second deep learning network using a local image training set constructed from historical crucible sub-images and defect annotations to obtain a second detection model, thereby improving the accuracy and robustness of defect recognition.
[0090] In one embodiment, merging the defect detection areas having the same defect type and an area spacing less than a preset threshold in the plurality of defect detection areas includes:
[0091] Calculate the distance between each two defect detection areas with the same defect type in sequence;
[0092] If the area distance is less than a preset threshold, the two current defect detection areas are merged based on the minimum area that can cover the two current defect detection areas.
[0093] Among them, the area spacing between every two defect detection areas with the same defect type is calculated in turn. The defect types can be screened first, and the area spacing between defect detection areas with the same defect type is calculated two by two in turn. Alternatively, the area spacing between defect detection areas can be calculated two by two first, and one or more pairs of defect detection areas with an area spacing less than a second preset threshold are screened out to determine whether the two defect detection areas are of the same defect type, and then determine whether the area spacing is less than the preset threshold.
[0094] If the area distance is less than the preset threshold, it means that the two defect detection areas are the same defect detection area, and the minimum area that can cover the current two defect detection areas will be used as the merged defect detection area.
[0095] A crucible defect detection method provided in this embodiment can cover the minimum area of the current two defect detection areas after determining that the area spacing is less than a preset threshold. The minimum area is used as the merged defect detection area, which can reduce redundant detection results and make the merged detection area more consistent with the actual situation, avoiding misjudgment caused by multiple small areas, thereby improving the robustness and accuracy of defect detection.
[0096] In one embodiment, sequentially calculating the distance between each two defect detection areas having the same defect type includes:
[0097] Based on the relative positions of the two defect detection areas, edge reference points of the two defect detection areas are determined respectively;
[0098] Based on the edge reference points of the two defect detection areas, the area distance between the two defect detection areas is calculated.
[0099] The edge reference points that are the farthest or closest to each other in the two defect detection areas can be determined based on their relative positions, wherein the edge reference point can be any point on the edge of the detection area, such as a corner point or any point on the straight line edge formed by adjacent corner points. For example, when defect detection area A is located in the upper left of defect detection area B, the distance between the upper left point of defect detection area A and the lower right point of defect detection area B is the farthest, and the distance between the lower right point of defect detection area A and the upper left point of defect detection area B is the closest. Then, when the delineation rule of the edge reference point is the farthest distance delineation rule, the upper left point of defect detection area A and the lower right point of defect detection area B are used as the edge reference points; when the delineation rule of the edge reference point is the closest distance delineation rule, the closest corner point can be determined first, and then the closest distance between the edge of the other defect detection area and the corner point can be determined based on the corner point of one of the defect detection areas.
[0100] Furthermore, determining the distance between two defect detection areas through the reference points may be performed by calculating the Euclidean distance between the two reference points.
[0101] The present embodiment provides a crucible defect detection method, which determines the reference points of the two defect detection areas based on their relative positions and uses them to calculate the area spacing. This method can more accurately provide feedback on the actual distance between the two defect detection areas to determine whether the defect detection areas need to be merged, thereby improving the accuracy and robustness of the defect detection results.
[0102] In one embodiment, determining the defect detection result based on the multiple defect detection areas further includes:
[0103] Calculate the number of horizontal pixels and vertical pixels of each defect detection area;
[0104] Based on the number of horizontal pixels and the number of vertical pixels of each defect detection area, the actual width and the actual height of each defect detection area are determined.
[0105] Calculating the number of horizontal pixels and vertical pixels of each defect detection area may be performed by counting the pixel space occupied by the defect detection area in the image of the crucible to be detected to obtain the number of horizontal pixels and the number of vertical pixels.
[0106] Furthermore, the actual width and height of each defect detection area can be determined using a preset image pixel count-actual size mapping table or a preset size mapping ratio. The preset mapping table and the preset size mapping ratio can be determined based on prior knowledge.
[0107] The crucible defect detection method provided in this embodiment can provide reliable data support for subsequent quality control and decision-making by converting the size of the defect detection area into the actual size, so as to more intuitively evaluate the size of the defect and improve the reliability of the detection results.
[0108] In order to more clearly illustrate the technical solution of this application, this application also provides a detailed embodiment.
[0109] In one embodiment, Figure 3 As shown, a crucible defect detection method is provided, comprising:
[0110] Grayscale threshold segmentation is used to extract the target area. The target area is intercepted from the image of the crucible wall taken by the industrial camera, and the interference of useless background information is removed to obtain the target detection area. The crucible wall includes the inner wall and the outer wall.
[0111] Considering that the defects on the straight wall of quartz crucibles vary in size, and some defects have large scale differences, using a single deep learning model may lead to poor detection of some defects with extreme scales, such as small bubble defects, with a minimum size of about ten pixels. This application provides a dual-model detection method that integrates a large model and a small model to detect defects in crucible images, wherein the large model is the first detection model, which is used to detect larger defects, and the small model is the second detection model, which is used to assist in detecting smaller defects. Figure 4 As shown in the figure, during training and actual reasoning, the original image is input into the large model for training and reasoning, and the cropped small image and the enlarged original image are input into the small model for training and reasoning, respectively.
[0112] Furthermore, unlike general deep learning algorithms in which the small model directly crops the image before testing, the small model in this embodiment is trained on the cropped image, but directly enlarges the original image for reasoning during inference. The enlargement ratio of the original image is calculated according to the ratio of the cropped image during training and the training size, and the small model is used to reason on the enlarged original image, which can avoid the time-consuming problem caused by the inference of the cropped image with the small model.
[0113] After using dual-model reasoning to obtain all detection frames of the crucible image, for some defects that may exist in intervals, such as linear black spots and bubble clusters, the model may mark different segments of the same defect with one detection frame respectively, causing the same defect to be divided into several segments, resulting in errors in defect quantity statistics and size measurement.
[0114] To this end, it is necessary to use a detection frame merging strategy to determine the detection frames at different locations of the same defect and merge the detection frames of the same type.
[0115] After research, the inventors discovered that conventional algorithms that directly use the Euclidean distance between the center points of the detection frames to determine the position of the detection frames are not adaptable to different locations of the same defect and cannot reflect the true distance between the detection frames. Therefore, this embodiment provides a method for determining the distance between the detection frames, including: first determining the specific direction between the detection frames. For example, based on the coordinates of the detection frames, the second detection frame is determined to be located to the lower right of the first detection frame. Based on this direction, the Euclidean distance is calculated by selecting the lower right point of the first detection frame and the upper left point of the second detection frame. A distance threshold is then set. If the threshold is met, the two detection frames are merged into a single defect.
[0116] like Figure 5As shown, in traditional distance judgment, the Euclidean distance is often obtained by calculating the distance between the center points through 1-1 and 2-1 in the figure, while in the distance judgment of this application, the reference point with the minimum distance between the two detection frames is obtained based on the relative positions of the two detection frames, and the area spacing between the two detection frames is calculated based on the reference point.
[0117] Calculate the true size of the detection frame: For all defects, calculate the pixel width and height of the defect in the image according to the detection frame. Based on the true size corresponding to the pixel value of the image captured by the industrial camera, convert the detection frame of all detected defects into the true width and height.
[0118] The present embodiment provides a method for detecting defects in crucible straight walls, which uses a deep learning network to detect defects in the types of detection, with high coverage and accuracy. By setting up a dual-model fusion detection method, it is possible to meet the needs of defect recognition of different sizes, thereby improving the reliability and robustness of the detection results of defects of different sizes. Through a distance judgment strategy based on position direction, multiple detection frames under interval defects can be fused, thereby assisting in optimizing the problem of identifying multiple detection frames under interval defects. By using the method of grayscale segmentation and cropping the image, the original image is segmented by grayscale values, and the deep learning model is detected after intercepting the target detection area, which can reduce the misjudgment and time consumption of defect detection.
[0119] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0120] Based on the same inventive concept, embodiments of the present application also provide a crucible defect detection device for implementing the aforementioned crucible defect detection method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more crucible defect detection device embodiments provided below can be found in the above-described limitations of the crucible defect detection method and will not be further elaborated here.
[0121] In one embodiment, Figure 6As shown, a crucible defect detection device is provided, comprising: an identification module 100, a merging module 200 and a determination module 300, wherein:
[0122] The recognition module 100 is used to perform defect recognition on the crucible image to be inspected, and obtain multiple defect detection areas; each defect detection area corresponds to a defect type;
[0123] A merging module 200 is configured to merge the defect detection areas having the same defect type and a distance between the areas less than a preset threshold among the plurality of defect detection areas;
[0124] The determination module 300 is configured to determine a defect detection result based on the plurality of defect detection areas after the merging process.
[0125] In one embodiment, the identification module 100 is further configured to:
[0126] Perform grayscale threshold segmentation on the crucible image to be inspected to obtain a target detection area; the target detection area includes the straight wall of the crucible;
[0127] Defect recognition is performed based on the target detection area to obtain multiple defect detection areas.
[0128] In one embodiment, the identification module 100 is further configured to:
[0129] Amplifying the image of the crucible to be inspected or the target inspection area according to a preset magnification to obtain an enlarged image;
[0130] The crucible image to be inspected or the target inspection area is input into a pre-trained first inspection model, and the enlarged image is input into a pre-trained second inspection model to obtain multiple defect inspection areas.
[0131] In one embodiment, the identification module 100 is further configured to:
[0132] Acquire multiple historical crucible images and defect annotations for each historical crucible image;
[0133] Based on multiple historical crucible images and defect annotations, a global image training set is obtained;
[0134] Based on the global image training set, a first deep learning network is trained to obtain a first detection model.
[0135] In one embodiment, the identification module 100 is further configured to:
[0136] cropping the plurality of historical crucible images based on the preset magnification to obtain a plurality of historical crucible sub-images and defect annotations corresponding to each historical crucible sub-image;
[0137] Based on multiple historical crucible sub-images and defect annotations, a local image training set is obtained;
[0138] Based on the local image training set, the second deep learning network is trained to obtain a second detection model.
[0139] In one embodiment, the merging module 200 is further configured to:
[0140] Calculate the distance between each two defect detection areas with the same defect type in sequence;
[0141] If the area distance is less than a preset threshold, the two current defect detection areas are merged based on the minimum area that can cover the two current defect detection areas.
[0142] In one embodiment, the merging module 200 is further configured to:
[0143] Based on the relative positions of the two defect detection areas, edge reference points of the two defect detection areas are determined respectively;
[0144] Based on the edge reference points of the two defect detection areas, the area distance between the two defect detection areas is calculated.
[0145] In one embodiment, the determination module 300 is further configured to:
[0146] Calculate the number of horizontal pixels and vertical pixels of each defect detection area;
[0147] Based on the number of horizontal pixels and the number of vertical pixels of each defect detection area, the actual width and the actual height of each defect detection area are determined.
[0148] Each module in the crucible defect detection device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.
[0149] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, memory, a communication interface, a display screen, and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal via wired or wireless communication. The wireless communication can be achieved via Wi-Fi, a mobile cellular network, NFC (near-field communication), or other technologies. When executed by the processor, the computer program implements a crucible defect detection method. The display screen of the computer device can be a liquid crystal display or an electronic ink display. The input device of the computer device can be a touch layer covering the display screen, or keys, a trackball, or a touchpad provided on the computer device housing, or an external keyboard, touchpad, or mouse.
[0150] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0151] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the crucible defect detection method of any of the above embodiments is implemented:
[0152] Defect recognition is performed on the crucible image to be inspected to obtain multiple defect detection areas; each defect detection area corresponds to a defect type;
[0153] Merging the defect detection areas with the same defect type and a distance between the areas less than a preset threshold among the multiple defect detection areas;
[0154] Determine a defect detection result based on the multiple defect detection areas after merging.
[0155] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the crucible defect detection method of any of the above embodiments is implemented:
[0156] Defect recognition is performed on the crucible image to be inspected to obtain multiple defect detection areas; each defect detection area corresponds to a defect type;
[0157] Merging the defect detection areas with the same defect type and a distance between the areas less than a preset threshold among the multiple defect detection areas;
[0158] Determine a defect detection result based on the multiple defect detection areas after merging.
[0159] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0160] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processors (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.
[0161] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0162] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A crucible defect detection method, characterized in that: The crucible defect detection method comprises: Defect recognition is performed on the crucible image to be inspected to obtain multiple defect detection areas; each defect detection area corresponds to a defect type; the defect recognition includes: enlarging the crucible image to be inspected or the target detection area according to a preset magnification to obtain an enlarged image; inputting the crucible image to be inspected or the target detection area into a pre-trained first detection model, and inputting the enlarged image into a pre-trained second detection model to obtain multiple defect detection areas; the defect detection areas include defect detection areas under an overall perspective and defect detection areas under a local perspective; before inputting the crucible image to be inspected or the target detection area into the pre-trained first detection model, and inputting the enlarged image into the pre-trained second detection model to obtain multiple defect detection areas, the method also includes: cropping multiple historical crucible images based on a preset magnification to obtain multiple historical crucible sub-images and defect annotations corresponding to each of the historical crucible sub-images; obtaining a local image training set based on the multiple historical crucible sub-images and the defect annotations; training a second deep learning network based on the local image training set to obtain a second detection model; Merging the defect detection areas with the same defect type and a distance between the areas less than a preset threshold among the multiple defect detection areas; Determine a defect detection result based on the multiple defect detection areas after merging.
2. The crucible defect detection method according to claim 1, characterized in that: The defect recognition of the crucible image to be inspected to obtain multiple defect detection areas includes: Perform grayscale threshold segmentation on the crucible image to be detected to obtain a target detection area; the target detection area includes the straight wall of the crucible; Defect recognition is performed based on the target detection area to obtain multiple defect detection areas.
3. The crucible defect detection method according to claim 1, characterized in that: The step of inputting the crucible image to be inspected or the target inspection area into a pre-trained first inspection model and inputting the magnified image into a pre-trained second inspection model to obtain a plurality of defect inspection areas includes: Acquire a plurality of historical crucible images and defect annotations of each of the historical crucible images; obtaining a global image training set based on the plurality of historical crucible images and the defect annotations; Based on the global image training set, a first deep learning network is trained to obtain a first detection model.
4. The crucible defect detection method according to claim 1, characterized in that: The merging of the defect detection areas having the same defect type and a distance between the areas less than a preset threshold in the plurality of defect detection areas comprises: Calculate the distance between each two defect detection areas with the same defect type in sequence; If the area distance is smaller than a preset threshold, the two current defect detection areas are merged based on the minimum area that can cover the two current defect detection areas.
5. The crucible defect detection method according to claim 4, characterized in that: The step of sequentially calculating the distance between each two defect detection areas having the same defect type includes: Based on the relative positions of the two defect detection areas, edge reference points of the two defect detection areas are determined respectively; Based on the edge reference points of the two defect detection areas, the area distance between the two defect detection areas is calculated.
6. The crucible defect detection method according to claim 1, characterized in that: The determining of the defect detection result based on the plurality of defect detection areas further comprises: Calculating the number of horizontal pixels and the number of vertical pixels of each defect detection area; Based on the number of horizontal pixels and the number of vertical pixels of each defect detection area, the actual width and the actual height of each defect detection area are determined.
7. A crucible defect detection device, characterized in that: The crucible defect detection device comprises: an identification module for performing defect identification on the crucible image to be inspected to obtain a plurality of defect detection areas; each defect detection area corresponds to a defect type; the defect identification comprises: amplifying the crucible image to be inspected or the target detection area according to a preset magnification to obtain an enlarged image; inputting the crucible image to be inspected or the target detection area into a pre-trained first detection model, and inputting the enlarged image into a pre-trained second detection model to obtain a plurality of defect detection areas; the defect detection areas comprise defect detection areas under an overall perspective and defect detection areas under a local perspective; before inputting the crucible image to be inspected or the target detection area into the pre-trained first detection model, and inputting the enlarged image into the pre-trained second detection model to obtain a plurality of defect detection areas, the module further comprises: cropping a plurality of historical crucible images based on a preset magnification to obtain a plurality of historical crucible sub-images and defect annotations corresponding to each of the historical crucible sub-images; obtaining a local image training set based on the plurality of historical crucible sub-images and the defect annotations; and training a second deep learning network based on the local image training set to obtain a second detection model; A merging module is used to merge defect detection areas with the same defect type and an area spacing less than a preset threshold to obtain a merged defect detection area; A determination module is used to determine a defect detection result based on the multiple defect detection areas.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.