Crucible defect detection method and device and computer equipment
By automatically identifying and combining the quartz crucible images, the deep learning model is used to solve the problems of high manual detection cost and low accuracy, and the high accuracy detection and interpretability of crucible defects are achieved.
Patent Information
- Application Number
- CN202411746307.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-12-02
AI Technical Summary
In the prior art, the defect detection of quartz crucibles relies on manual measurement and naked eye judgment, resulting in high cost and low accuracy.
By identifying defects on the crucible image, multiple defect detection areas are obtained, and combined according to the defect type and area spacing, the pre-trained deep learning model is used to automatically identify and merge, and the defect detection results are determined.
It realizes automatic identification of crucible defects, reduces labor costs, improves detection accuracy and interpretability, reduces misjudgment, and is suitable for the merging and classification of non-continuous defects.
Smart Images

Figure CN119251210A_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 equipment, quartz crucible plays an indispensable role in the production process of semiconductor industry.
[0003] In traditional technology, the quality of quartz crucibles needs to be inspected during the production process, and this inspection is often done manually by using a ruler to measure whether the crucible size meets the requirements, and by using the naked eye or touch to determine whether the crucible has defects. The manual quality inspection method is often limited by the professional level of the quality inspector and has a low accuracy rate.
[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 in response to the above technical problems.
[0006] In a first aspect, the present application provides a crucible defect detection method, the crucible defect detection method comprising: 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; Merging the defect detection areas with the same defect type and an area spacing 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.
[0007] In one embodiment, the step of performing defect recognition on the crucible image to be inspected to obtain a plurality of defect detection areas comprises: 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.
[0008] In one embodiment, the defect identification includes: Amplifying the image of the crucible to be inspected or the target inspection area according to a preset magnification to obtain an enlarged image; 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.
[0009] In one embodiment, the step of inputting the to-be-detected crucible image 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 comprises: Acquire a plurality of historical crucible images and defect annotations of each of the historical crucible images; Based on the plurality of historical crucible images and the defect annotations, a global image training set is obtained; Based on the global image training set, a first deep learning network is trained to obtain a first detection model.
[0010] In one embodiment, after acquiring a plurality of historical crucible images and annotating defects of each of the historical crucible images, the method further includes: 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; Based on the plurality of historical crucible sub-images and the defect annotations, a local image training set is obtained; Based on the local image training set, a second deep learning network is trained to obtain a second detection model.
[0011] In one embodiment, the merging of 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 comprises: Calculate the area distance between every 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.
[0012] In one embodiment, sequentially calculating the area spacing between every two defect detection areas with 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.
[0013] In one embodiment, determining 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.
[0014] In a second aspect, the present application provides a crucible defect detection device, the crucible defect detection device comprising: An identification module is used to identify defects on the crucible image to be inspected, and obtain multiple defect detection areas; each defect detection area corresponds to a defect type; 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.
[0015] In a third aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned method when executing the computer program.
[0016] The above-mentioned crucible defect detection method, device and computer equipment can realize automatic identification of defects in the crucible image to be detected by performing defect recognition on the crucible image to be detected to obtain multiple defect detection areas, 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, further improving the accuracy and explainability of defect detection, thereby achieving the effect of reducing labor costs and improving accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is an application environment diagram of a crucible defect detection method in one embodiment; Figure 2 A schematic diagram of a process of a crucible defect detection method in one embodiment; Figure 3 A schematic diagram of a process of a crucible defect detection method in another embodiment; Figure 4 A schematic diagram of the process of dual-model training and reasoning in one embodiment; Figure 5 is a schematic diagram of detecting frame distance determination in one embodiment; Figure 6 is a structural block diagram of a crucible defect detection device in one embodiment; Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0019] The crucible defect detection method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 obtains the image of the crucible to be detected by communicating with the server 104, and performs defect recognition on the image of the crucible to be detected to obtain multiple defect detection areas; each defect detection area corresponds to a defect type; the defect detection areas with the same defect type and the area spacing less than the preset threshold are merged to obtain a merged defect detection area; based on the multiple defect detection areas, the defect detection results are determined. Among them, 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 with an independent server or a server cluster consisting of multiple servers.
[0020] In one embodiment, Figure 2 As shown, a crucible defect detection method is provided, which is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, and the following steps are included: Step S100 , performing defect recognition on the crucible image to be inspected to obtain a plurality of defect detection areas; each defect detection area corresponds to a defect type.
[0021] Among them, defect recognition of the crucible image to be inspected can be based on a deep learning algorithm to automatically identify potential defects in the image, thereby obtaining multiple defect detection areas. It can be understood that in the crucible image to be inspected, each defect can be identified as a defect detection area and marked with a defect type.
[0022] The defect detection area can be the recognition result obtained by the deep learning algorithm, and each defect detection area corresponds to one or more defects. Each defect detection area can be marked in the image of the crucible to be detected by a detection frame to display multiple detection defect areas in the image.
[0023] 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.
[0024] Step S200 , merging defect detection areas with the same defect type and an area spacing smaller than a preset threshold among a plurality of defect detection areas.
[0025] The inventors have found 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, defective 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 defective areas caused by the same defect, thereby merging the interval defects, thereby reducing misjudgment and improving detection accuracy.
[0026] Since multiple defect detection areas under interval defects may not intersect, but there is still an adjacent distance, multiple defect detection areas with the same defect type and an area spacing less than a preset threshold can be merged.
[0027] Specifically, the defect types may be screened, and under the same defect type, the area distance between each two defect detection areas is calculated respectively. 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.
[0028] It can be understood that the merging process may be to merge only the defect detection areas that meet the same defect type and the area spacing less than the preset threshold condition among multiple defect detection areas. For defect detection areas that may not meet the conditions, no merging process may 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 are no defect detection areas that meet the conditions among multiple defect detection areas, the defect detection areas after the merging process may be composed of defect detection areas that have not been merged.
[0029] Step S300, determining a defect detection result based on the multiple defect detection areas after merging processing.
[0030] 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.
[0031] 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.
[0032] A crucible defect detection method provided in the present embodiment performs defect recognition on a crucible image to be detected to obtain multiple defect detection areas, thereby realizing automatic recognition of defects in the crucible image to be detected, 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.
[0033] In one embodiment, defect recognition is performed on the crucible image to be inspected, and multiple defect detection areas are obtained, including: Perform grayscale threshold segmentation on the crucible image to be inspected to obtain the target detection area; Defect recognition is performed based on the target detection area to obtain multiple defect detection areas.
[0034] The target detection area includes the straight wall of the crucible. The grayscale threshold segmentation of the crucible image to be detected can be performed by first converting the color crucible image to be detected into a grayscale image, and then segmenting the grayscale image into two images above the threshold and below the threshold based on a preset threshold. It can be understood that the crucible image to be detected includes the straight wall of the crucible and the background. By grayscale threshold segmentation, a detection area including only the straight wall of the crucible can be segmented as the target detection area.
[0035] Defect recognition based on the target detection area can avoid identifying some features in the background as defect detection areas and reduce false alarms.
[0036] The present embodiment provides a crucible defect detection method, which performs defect identification after obtaining a target detection area through grayscale threshold segmentation, thereby reducing the occurrence of false alarms and achieving the effect of improving the accuracy of defect identification.
[0037] In one embodiment, defect identification includes: Amplifying the image of the crucible to be inspected or the target inspection area according to a preset magnification to obtain an enlarged image; 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.
[0038] In this embodiment, a first detection model and a second detection model are used for defect identification respectively, wherein the first detection model is used to identify the crucible image to be inspected 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.
[0039] The preset magnification may be selected to enhance local details while retaining the overall structure of the image. Enlarging according to the preset magnification may be performed by using image processing techniques, such as bilinear interpolation, bicubic interpolation, etc., to enlarge the crucible image to be inspected or the target inspection area to obtain an enlarged image. The preset magnification may correspond to the image size used in the training model process.
[0040] A crucible defect detection method provided in this embodiment obtains multiple defect detection areas by inputting the crucible image 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. The image cropping process can be omitted, thereby further improving the processing speed and achieving the effect of improving the accuracy and robustness of defect recognition.
[0041] 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 enlarged image into a pre-trained second inspection model to obtain a plurality of defect inspection areas comprises: Acquire multiple historical crucible images and defect annotations of each historical crucible image; Based on multiple historical crucible images and defect annotations, a global image training set is obtained; Based on the global image training set, a first deep learning network is trained to obtain a first detection model.
[0042] Among them, the first detection model is trained based on a global image training set consisting of historical crucible images and defect annotation results.
[0043] The historical crucible image can be a crucible image taken at a historical moment, and each crucible image can cover defects of different types and degrees to ensure the generalization ability of the model. Defect annotation can be performed by manual annotation or semi-automatic annotation tools, and the annotation content can include defect location, defect size, defect type, etc.
[0044] Based on multiple historical crucible images and defect annotations, a global image training set is obtained, which can also include data cleaning of historical crucible images, removing blurred, damaged or non-compliant images, and data enhancement and format unification of historical crucible images, and then the global image training machine is used to train the first deep learning network. The first deep learning network can adopt a deep learning model architecture such as a convolutional neural network, YOLO, and Faster R-CNN.
[0045] A crucible defect detection method provided in this embodiment trains a first deep learning network by using a global image training set constructed from historical crucible images and defect annotations to obtain a first detection model, thereby achieving the effect of improving the accuracy and robustness of defect recognition.
[0046] In one embodiment, after acquiring a plurality of historical crucible images and defect annotations of each historical crucible image, the method further includes: Based on the preset magnification, the plurality of historical crucible images are cropped to obtain a plurality of historical crucible sub-images and defect annotations corresponding to each historical crucible sub-image; Based on multiple historical crucible sub-images and defect annotations, a local image training set is obtained; Based on the local image training set, the second deep learning network is trained to obtain a second detection model.
[0047] 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.
[0048] Based on multiple historical crucible sub-images and defect annotations, a local image training set is obtained, which may also include data cleaning, data enhancement and format unification of the historical crucible sub-images, which will not be described in detail in this embodiment. The global image training machine is then used to train the second deep learning network. The second deep learning network can adopt a deep learning model architecture such as a convolutional neural network, YOLO, or Faster R-CNN.
[0049] It can be understood that by cropping the historical crucible sub-image, the second deep neural network can understand more accurate detail features. In practical applications, processing the enlarged image can obtain more accurate defect recognition results.
[0050] A crucible defect detection method provided in this embodiment 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 achieving the effect of improving the accuracy and robustness of defect recognition.
[0051] In one embodiment, merging the defect detection areas in the plurality of defect detection areas with the same defect type and an area spacing less than a preset threshold comprises: Calculate the area distance between every 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.
[0052] 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 then 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.
[0053] 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.
[0054] A crucible defect detection method provided in this embodiment can cover the minimum area of the current two defect detection areas after judging that the area spacing is less than a preset threshold, and use it as the merged defect detection area. This can reduce redundant detection results and make the merged detection area more in line with the actual situation, avoid misjudgment caused by multiple small areas, and achieve the effect of improving the robustness and accuracy of defect detection.
[0055] In one embodiment, sequentially calculating the area spacing between every two defect detection areas with 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.
[0056] Among them, the edge reference points that are farthest or closest in the two defect detection areas can be determined according to the relative positions of the two defect detection areas, wherein the edge reference point can be any point on the edge of the detection area, for example, it can be a corner point, or it can be any point on the straight line edge formed by adjacent corner points. Exemplarily, when the defect detection area A is located at the upper left of the defect detection area B, the distance between the upper left point of the defect detection area A and the lower right point of the defect detection area B is the farthest, and the distance between the lower right point of the defect detection area A and the upper left point of the defect detection area B is the shortest. Then, when the delineation rule of the edge reference point is the delineation rule of the farthest distance, the upper left point of the defect detection area A and the lower right point of the defect detection area B are used as the edge reference points; when the delineation rule of the edge reference point is the delineation rule of the shortest distance, the nearest corner point can be determined first, and then the shortest distance between the edge of the other defect detection area and the corner point can be determined according to the corner point of one of the defect detection areas.
[0057] Furthermore, determining the area distance between two defect detection areas through the reference points may be performed by calculating the Euclidean distance between the two reference points.
[0058] A crucible defect detection method provided in this embodiment determines the reference points of the two defect detection areas based on the relative positions of the two defect detection areas, and uses them to calculate the area spacing. This can more accurately feedback the actual distance between the two defect detection areas to determine whether the defect detection areas need to be merged, thereby achieving the effect of improving the accuracy and robustness of the defect detection results.
[0059] In one embodiment, determining the defect detection result based on the multiple defect detection areas further includes: Calculate the number of horizontal pixels and 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, an actual width and an actual height of each defect detection area are determined.
[0060] The calculation of the number of horizontal pixels and the number of 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.
[0061] Furthermore, the actual width and actual height of each defect detection area can be determined by a preset image pixel number-actual size mapping relationship table or a preset size mapping ratio. The preset mapping relationship table and the preset size mapping ratio can be determined based on prior knowledge.
[0062] A 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, thereby achieving the effect of improving the reliability of the detection result.
[0063] In order to more clearly illustrate the technical solution of the present application, the present application also provides a detailed embodiment.
[0064] In one embodiment, Figure 3 As shown, a crucible defect detection method is provided, comprising: Grayscale threshold segmentation is used to extract the target area, and the image of the straight wall of the crucible taken by the industrial camera is intercepted to obtain the target area, and the interference of useless background information is removed to obtain the target detection area. The straight wall of the crucible includes the inner straight wall and the outer straight wall.
[0065] Considering that the defects on the straight wall of the quartz crucible 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 the crucible image, wherein the large model, i.e., the first detection model, is used to detect defects with larger sizes, and the small model, i.e., the second detection model, is used to assist in detecting defects with smaller sizes. Figure 4 As shown, 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.
[0066] 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 during training, but directly enlarges the original image for reasoning during reasoning. 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 small model cropped image reasoning.
[0067] After using dual-model reasoning to obtain all the detection frames of the crucible image, for some defects that may exist at intervals, such as linear black spots and bubble groups, the model may mark different segments of the same defect with one detection frame respectively, resulting in the same defect being divided into several segments, causing errors in defect quantity statistics and size measurement.
[0068] 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 detection frames of the same type.
[0069] After research, the inventor found that the Euclidean distance between the center points of the detection frames is directly used in general algorithms to determine the position of the detection frames. The detection frame distance determination for different positions of the same defect is not adaptable and cannot reflect the actual distance between the detection frames. Therefore, this embodiment provides a method for determining the distance between detection frames, including: first determining the specific direction between the detection frames, for example, through the coordinates of the detection frames, determining that the second detection frame is located at the lower right of the first detection frame, according to this direction, the lower right point of the first detection frame and the upper left point of the second detection frame can be selected to calculate the Euclidean distance, and a distance threshold is set. If the threshold is met, the two detection frames are merged into the same defect.
[0070] like Figure 5 As shown, in traditional distance judgment, the Euclidean distance is often obtained by calculating the distance of the center points through 1-1 and 2-1 in the figure, while in the distance judgment of the present application, the reference point of the minimum distance between the two detection frames is obtained according to the relative positions of the two detection frames, and the area spacing of the two detection frames is calculated based on the reference point.
[0071] Calculate the real 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. According to the real size corresponding to the pixel value of the image taken by the industrial camera, convert the detection frame of all detected defects into the real width and height.
[0072] A crucible defect detection method provided in this embodiment detects defects on the straight wall of the crucible through a deep learning network, with high coverage of detection types and high accuracy. By setting up a dual-model fusion detection method, the recognition of defects of different sizes can be met, 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. Through the method of grayscale segmentation and cropping the image, the original image is segmented by grayscale value, and the deep learning model is detected after intercepting the target detection area, which can reduce the misjudgment and time consumption of defect detection.
[0073] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0074] Based on the same inventive concept, the embodiment of the present application also provides a crucible defect detection device for implementing the above-mentioned crucible defect detection method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more crucible defect detection device embodiments provided below can refer to the limitations of the crucible defect detection method above, and will not be repeated here.
[0075] In one embodiment, Figure 6 As shown, a crucible defect detection device is provided, comprising: an identification module 100, a merging module 200 and a determination module 300, wherein: The recognition module 100 is used to perform defect recognition on the crucible image to be inspected, and obtain a plurality of defect detection areas; each defect detection area corresponds to a defect type; A merging module 200 is used to merge 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; The determination module 300 is used to determine the defect detection result based on the multiple defect detection areas after the merging process.
[0076] In one embodiment, the identification module 100 is further configured to: 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.
[0077] In one embodiment, the identification module 100 is further configured to: Amplifying the image of the crucible to be inspected or the target inspection area according to a preset magnification to obtain an enlarged image; 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.
[0078] In one embodiment, the identification module 100 is further configured to: Acquire multiple historical crucible images and defect annotations of each historical crucible image; Based on multiple historical crucible images and defect annotations, a global image training set is obtained; Based on the global image training set, a first deep learning network is trained to obtain a first detection model.
[0079] In one embodiment, the identification module 100 is further configured to: Based on the preset magnification, the plurality of historical crucible images are cropped to obtain a plurality of historical crucible sub-images and defect annotations corresponding to each historical crucible sub-image; Based on multiple historical crucible sub-images and defect annotations, a local image training set is obtained; Based on the local image training set, the second deep learning network is trained to obtain a second detection model.
[0080] In one embodiment, the merging module 200 is further configured to: Calculate the area distance between every 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.
[0081] In one embodiment, the merging module 200 is further configured to: 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.
[0082] In one embodiment, the determination module 300 is further configured to: Calculate the number of horizontal pixels and 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, an actual width and an actual height of each defect detection area are determined.
[0083] Each module in the above crucible defect detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0084] 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 7 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, 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 an 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 the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a crucible defect detection method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0085] 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 those shown in the figure, or combine certain components, or have a different arrangement of components.
[0086] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the crucible defect detection method of any of the above embodiments is implemented: 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; Merging the defect detection areas with the same defect type and an area spacing 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.
[0087] 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: 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; Merging the defect detection areas with the same defect type and an area spacing 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.
[0088] 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.
[0089] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and 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 embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium 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), magnetoresistive 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0090] The technical features of the above embodiments may 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.
[0091] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached 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 a plurality of defect detection areas; each defect detection area corresponds to a defect type; Merging the defect detection areas with the same defect type and an area spacing 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 is performed to obtain a plurality of defect detection areas, including: 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 defect identification includes: Amplifying the image of the crucible to be inspected or the target inspection area according to a preset magnification to obtain an enlarged image; 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.
4. The crucible defect detection method according to claim 3, characterized in that: The step of inputting the to-be-detected crucible image 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 comprises: Acquire a plurality of historical crucible images and defect annotations of each of the historical crucible images; Based on the plurality of historical crucible images and the defect annotations, a global image training set is obtained; Based on the global image training set, a first deep learning network is trained to obtain a first detection model.
5. The crucible defect detection method according to claim 4, characterized in that: After acquiring a plurality of historical crucible images and marking defects of each of the historical crucible images, the method further includes: 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; Based on the plurality of historical crucible sub-images and the defect annotations, a local image training set is obtained; Based on the local image training set, a second deep learning network is trained to obtain a second detection model.
6. 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 an area spacing less than a preset threshold in the plurality of defect detection areas comprises: Calculate the area distance between every 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.
7. The crucible defect detection method according to claim 6, characterized in that: The step of sequentially calculating the area spacing between every two defect detection areas with the same defect type comprises: 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.
8. 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.
9. A crucible defect detection device, characterized in that: The crucible defect detection device comprises: An identification module is used to identify defects on the crucible image to be inspected, and obtain multiple defect detection areas; each defect detection area corresponds to a defect type; 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.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Circuit board defect detecting and positioning method and device and storage medium
CN113222913A
Insulator defect detection method, device and equipment and storage medium
CN114693609A
Stainless steel product surface quality detection method
CN115060754A
Defect classification and identification method and device, storage medium and electronic equipment
CN115170512A
Defect detection method, model training method and device
CN116977249A
Cited By
Crucible inner bottom surface defect detection method and device and electronic equipment
CN119444764A
