Crucible bottom surface defect detection method, device and electronic equipment

By collecting multi-frame images on the inner bottom of the crucible and using a pre-trained model to identify defects, combined with the comparison of the reference image and the target image, the problem of low efficiency and accuracy of traditional defect detection methods is solved, and more efficient and accurate defect detection is achieved, reducing costs.

CN119444764BActive Publication Date: 2025-04-22ZHEJIANG JINGSHENG MECHANICAL & ELECTRICAL CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510045979.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-04-22
Estimated Expiration
2045-01-10

AI Technical Summary

Technical Problem

The traditional quartz crucible defect detection method relies on manual visual inspection or handheld instruments, which has problems such as low detection efficiency and accuracy, difficulty in achieving standardization, unreliable stability, unstable detection accuracy and high cost.

Method used

A camera is used to rotate the crucible around the inner bottom surface of the crucible multiple times to collect multiple frames of images, and input these images into the pre-trained defect detection model for defect identification. By defining the reference image and the target image, compare the direction, center distance, area and center angle of the defect, determine whether the defect is repeated, and finally exclude the repeated defects for accurate counting.

Benefits of technology

It improves the accuracy and consistency of detection, enhances defect analysis capabilities, reduces costs, improves product quality, and has good flexibility and adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444764B_ABST
    Figure CN119444764B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device and electronic device for detecting defects on the bottom surface of a crucible. The method uses a camera to continuously collect multiple frames of images when the crucible rotates around the center of the bottom surface of the crucible multiple times along a set direction and a set angle, and inputs these multiple frames of images into a pre-trained defect detection model. The defect detection model can identify and mark the defects in the image and generate multiple frames of identification images with defect identification. For each two adjacent identification frames in the multiple identification images, by defining a reference image and a target image, and comparing the defects therein, it is determined whether the defects are repeated based on four conditions: direction, center distance, area and center angle, and finally the repeated defects are eliminated for accurate counting, thereby improving the detection speed or efficiency, improving the detection accuracy and consistency, reducing repeated counting, enhancing the defect analysis capability, reducing costs, improving product quality, and having good flexibility and adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of defect detection, and in particular to a method, device and electronic equipment for detecting defects on the inner bottom surface of a crucible. Background Art

[0002] Traditional quartz crucible defect detection methods mainly rely on manual visual inspection or handheld instruments, which have the following limitations. Low detection efficiency and accuracy: Manual visual inspection is slow and easily affected by factors such as personal experience, skill level and mental state, resulting in inaccurate detection results; Difficult to achieve standardization: Different manual inspectors may have different inspection standards and requirements for the same product, resulting in unstable product quality; Unreliable stability: For the same inspector, the inspection results may also vary due to personal emotions, work experience and fatigue, resulting in unreliable stability of the inspection data; Unstable detection accuracy: Manual visual inspection is easily affected by external factors such as light, angle, environment, etc., resulting in unreliable detection results; High cost: Manual visual inspection requires a lot of human resources, including recruitment, training and management costs. Summary of the invention

[0003] Based on this, it is necessary to provide a method, device and electronic equipment for detecting defects on the bottom surface of a crucible in order to solve the above technical problems.

[0004] In a first aspect, the present application provides a method for detecting defects on the inner bottom surface of a crucible, the method comprising:

[0005] Acquire multiple frames of images of the inner bottom surface of the crucible; wherein the multiple frames of images are continuously acquired by the camera when the crucible rotates around the center of the inner bottom surface of the crucible multiple times along a set direction and a set angle;

[0006] Input multiple frames of images into a pre-trained defect detection model for defect recognition, and generate multiple frames of marked images with defect marks;

[0007] For each two adjacent frames of identification images in the multiple frames of identification images, one of the frames of identification images is defined as a reference image, the other frame of identification images is defined as a target image, any defect with a defect identification in the reference image is defined as a first defect, and for the first defect, it is determined whether there is a second defect in the target image, and the second defect and the first defect meet the first condition, the second condition, the third condition and the fourth condition; wherein the first condition is that the first defect is located in the set direction of the second defect or in the direction opposite to the set direction, the second condition is that the first defect and the second defect are substantially equal in distance from the center of the circle of the inner bottom surface of the crucible, the third condition is that the area and / or length and width of the first defect and the second defect are substantially equal, and the fourth condition is that the center angle formed by the coordinates of the first defect, the coordinates of the second defect and the center of the circle of the inner bottom surface of the crucible is substantially equal to the set angle;

[0008] If there is a second defect in the target image, and the second defect satisfies the first condition, the second condition, the third condition and the fourth condition with the first defect, the first defect in the reference image is marked as an invalid defect, and the invalid defect does not participate in the counting of the number of defects in the reference image.

[0009] In one of the embodiments, for every two adjacent frames of identification images in a plurality of frames of identification images, one of the frames of identification images is defined as a reference image, the other frame of identification images is defined as a target image, and any defect with a defect identification in the reference image is defined as a first defect, including: for every two adjacent frames of identification images in the plurality of frames of identification images, the i-th frame of identification image is defined as a reference image, and the i-1-th frame of identification image is defined as a target image; the type of each defect with a defect identification in the reference image is determined according to the reference image, and defects of the same type are divided into a target set, each target set including at least one defect element; for the same target set, any defect element therein is defined as a first defect in turn.

[0010] In one embodiment, determining whether there is a second defect in the target image, and the second defect satisfies a first condition with the first defect, includes: obtaining the coordinates of the center point of the first defect identification frame c1=(x1, y1) and the coordinates of the center point of the second defect identification frame c2=(x2, y2), and determining whether the first defect is located in the clockwise direction of the second defect based on at least the coordinates of the center points of the two identification frames; wherein the crucible is rotated clockwise around the center of the bottom surface of the crucible for multiple times by a set angle.

[0011] In one embodiment, the coordinates of the center point of the first defect identification frame c1=(x1, y1) and the coordinates of the center point of the second defect identification frame c2=(x2, y2) are obtained, and whether the first defect is located in the clockwise direction of the second defect is determined at least based on the coordinates of the center points of the two identification frames, including: obtaining the coordinates of the center point c1 (x1, y1) of the first defect identification frame and the coordinates of the center point c2 (x2, y2) of the second defect identification frame, and determining the coordinates of the center point c3 (x3, y3) of the line connecting the two points based on the coordinates of the two center points; if c3 (x3, y3) is in the first quadrant of the inner bottom circle center O, If x1>=x2 and y2>=y1, the first defect is located in the clockwise direction of the second defect; if c3 (x3, y3) is in the second quadrant of the inner base circle center O, x1>=x2 and y1>=y2, the first defect is located in the clockwise direction of the second defect; if c3 (x3, y3) is in the third quadrant of the inner base circle center O, x2>=x1 and y1>=y2, the first defect is located in the clockwise direction of the second defect; if c3 (x3, y3) is in the fourth quadrant of the inner base circle center O, x2>=x1 and y2>=y1, the first defect is located in the clockwise direction of the second defect.

[0012] In one of the embodiments, determining whether there is a second defect in the target image, and the second defect and the first defect satisfy the second condition and the third condition, includes: obtaining the center point coordinates of the first defect identification frame and the center point coordinates of the second defect identification frame; based on the two center point coordinates, determining the distance from the center point of the first defect identification frame to the center of the inner bottom circle and the distance from the center point of the second defect identification frame to the center of the inner bottom circle; if the difference between the two distances is less than a distance threshold, the second condition is satisfied between the first defect and the second defect; obtaining the length and width of the first defect and the length and width of the second defect; if the difference between the length and the difference between the width of the two defects are both less than a set threshold, the third condition is satisfied between the first defect and the second defect.

[0013] In one of the embodiments, determining whether there is a second defect in the target image, and the second defect satisfies the fourth condition with the first defect, includes: obtaining the center point coordinates of the first defect identification frame and the center point coordinates of the second defect identification frame; based on the two center point coordinates, determining a first distance from the center point of the first defect identification frame to the center point of the inner bottom surface, a second distance from the center point of the second defect identification frame to the center point of the inner bottom surface, and a third distance from the center point of the first defect identification frame to the center point of the second defect identification frame; substituting the first distance, the second distance, and the third distance into an arccosine function to determine a center angle formed by the first defect coordinates, the second defect coordinates, and the center point of the inner bottom surface of the crucible; if the difference between the center angle and the set angle is less than an angle threshold, the fourth condition is satisfied between the first defect and the second defect.

[0014] In one embodiment, when capturing an image of the inner bottom surface of the crucible, the camera is located above the crucible and maintains a minimum distance from the inner bottom surface of the crucible; wherein the minimum distance between the camera and the inner bottom surface of the crucible along the extension direction of the crucible is equal to the length of the crucible along its extension direction.

[0015] In one embodiment, training a defect detection model includes: acquiring an original image; wherein the original image is an image with defects on the bottom surface of a crucible; using a sliding window to perform fixed position cropping on the original image to generate a training image with consistent resolution; wherein 75% of the training image data is used as a training set, 10% of the training image data is used as a validation set, and 15% of the training image data is used as a test set, and the training set, validation set, and test set data are not repeated; and the defect detection model is trained using the training set, validation set, and test set data.

[0016] In a second aspect, the present application provides a crucible bottom surface defect detection device, the device comprising:

[0017] An acquisition module is used to acquire multiple frames of images of the bottom surface of the crucible; wherein the multiple frames of images are acquired by continuously acquiring the image when the crucible rotates around the center of the bottom surface of the crucible for multiple times along a set direction and a set angle;

[0018] A generation module is used to input multiple frames of images into a pre-trained defect detection model for defect recognition, and generate multiple frames of identification images with defect identification;

[0019] A judgment module, for each two adjacent frames of identification images in the multiple frames of identification images, defines one frame of identification image as a reference image, defines the other frame of identification image as a target image, defines any defect with a defect identification in the reference image as a first defect, and for the first defect, determines whether there is a second defect in the target image, and the second defect and the first defect meet the first condition, the second condition, the third condition and the fourth condition; wherein the first condition is: the first defect is located in the set direction of the second defect or in the direction opposite to the set direction, the second condition is: the first defect and the second defect are substantially equal in distance from the center of the circle of the inner bottom surface of the crucible, the third condition is: the area and / or length and width of the first defect and the second defect are substantially equal, and the fourth condition is: the center angle formed by the coordinates of the first defect, the coordinates of the second defect and the center of the circle of the inner bottom surface of the crucible is substantially equal to the rotation angle;

[0020] The counting module is used to mark the first defect in the reference image as an invalid defect if there is a second defect in the target image and the second defect satisfies the first condition, the second condition, the third condition and the fourth condition with the first defect. The invalid defect does not participate in the counting of the number of defects in the reference image.

[0021] In a third aspect, the present application provides an electronic device for detecting defects on the bottom surface of a crucible. The electronic device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the method for detecting defects on the bottom surface of a crucible according to the first aspect is implemented.

[0022] The above-mentioned crucible bottom surface defect detection method, device and electronic device use a camera to rotate the crucible around the center of the crucible bottom surface for multiple times to collect multiple frames of images, and input the multiple frames of images into a pre-trained defect detection model. The defect detection model can identify and mark the defects in the multiple frames of images, and generate multiple frames of identification images with defect identification; further, for each two adjacent frames of identification images in the multiple frames of identification images, by defining a reference image and a target image, and comparing the defects therein, it is determined whether the defects are repeated based on four conditions: direction, center distance, area and center angle, and finally the repeated defects are eliminated for accurate counting, thereby improving the accuracy and consistency of detection, enhancing the defect analysis capability, and reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1A schematic flow chart of a method for detecting defects on the bottom surface of a crucible according to an embodiment;

[0024] Figure 2 is a schematic diagram of a logo image with a defect logo in one embodiment;

[0025] Figure 3 A schematic diagram of a process of defining any defect with a defect mark in a reference image as a first defect in an embodiment;

[0026] Figure 4 is a schematic diagram of various defect types in one embodiment;

[0027] Figure 5 A schematic diagram of a flow chart for determining whether a first condition is satisfied between a second defect and a first defect in one embodiment;

[0028] Figure 6 is a schematic diagram of the relative directions between the first defect and the second defect in each quadrant in one embodiment;

[0029] Figure 7 A schematic diagram of a flow chart for determining whether a first defect and a second defect satisfy a second and a third condition in one embodiment;

[0030] Figure 8 A schematic diagram of a flow chart for determining whether a fourth condition is satisfied between a first defect and a second defect in one embodiment;

[0031] Fig. 9 A diagram showing the position relationship between a camera and a crucible when capturing an image of the bottom surface of the crucible in one embodiment;

[0032] Fig.10 A schematic diagram of a process for training a defect model in one embodiment;

[0033] Fig.11 A diagram of a device for detecting defects on the bottom surface of a crucible in one embodiment;

[0034] Fig.12 FIG. 1 is a schematic diagram of the structure of an electronic device in an embodiment. DETAILED DESCRIPTION

[0035] 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.

[0036] In one embodiment, Figure 1 As shown, a method for detecting defects on the bottom surface of a crucible is provided, comprising the following steps:

[0037] Step 101: Acquire multiple frames of images of the bottom surface of the crucible; wherein the multiple frames of images are continuously acquired by the camera when the crucible rotates around the center of the bottom surface of the crucible multiple times along a set direction and a set angle;

[0038] Specifically, a high-resolution CCD camera can be selected here to collect images of the bottom surface of the crucible. CCD cameras are ideal for detecting defects on the bottom surface of the crucible due to their high image quality, low noise, high sensitivity and stability. These characteristics ensure that clear and consistent images can be obtained during the rotation acquisition process, providing reliable visual data for subsequent defect detection. A bracket is provided on the outside of the crucible, and the camera is fixed on the bracket, wherein after the defect detection of one crucible is completed, the next crucible can be switched to continue defect detection. The crucible rotates around the center of the inner bottom surface of the crucible in a set direction and a set angle. The camera starts from a starting position of the crucible, collects the first frame of image, and then the crucible rotates along the set rotation direction at a set angle to collect the second frame of image, and the crucible rotates along the set rotation direction at a set angle to collect the third frame of image, and repeats the rotation and image acquisition process until the entire bottom surface of the crucible is covered, and multiple frames of images containing the entire bottom surface of the crucible are obtained. Among them, the set rotation direction can be clockwise or counterclockwise, and the rotation angle should be relatively small to ensure that there is enough overlapping area between the images of two adjacent frames.

[0039] Step 102: inputting multiple frames of images into a pre-trained defect detection model for defect recognition, and generating multiple frames of marked images with defect marks;

[0040] Specifically, the pre-trained defect detection model here can be a YOLO series model, which is a deep learning model widely used for target detection and is suitable for processing defect recognition problems in images. Multiple frames of images are input into the pre-trained defect detection model for defect recognition. The defect detection model will analyze each frame of the image, not only identify the defects in each frame of the image, but also mark the location of the defect on each frame, and generate multiple frame identification images with defect identification. Among them, the defect identification can be an identification box, a specific color mark, etc., which can be as follows Figure 2 As shown, defect identification can be represented by an identification box.

[0041] Step 103: for each two adjacent frames of identification images in the multiple frames of identification images, define one of the frames of identification images as a reference image, define the other frame of identification images as a target image, define any defect with a defect identification in the reference image as a first defect, and for the first defect, determine whether there is a second defect in the target image, and the second defect and the first defect meet the first condition, the second condition, the third condition and the fourth condition; wherein the first condition is that the first defect is located in the set direction of the second defect or in the direction opposite to the set direction, the second condition is that the first defect and the second defect are substantially equal in distance from the center of the inner bottom surface of the crucible, the third condition is that the area and / or length and width of the first defect and the second defect are substantially equal, and the fourth condition is that the center angle formed by the coordinates of the first defect, the coordinates of the second defect and the center of the inner bottom surface of the crucible is substantially equal to the set angle;

[0042] Specifically, for each two adjacent identification images in the multiple identification images, one of the identification images can be defined as a reference image, and the other identification image can be defined as a target image. In the reference image, any defect with a defect identification is defined as a first defect. In the target image, find out whether there is a second defect in the target image that meets the relevant conditions with the first defect. The relevant conditions are the first, second, third and fourth conditions. For the first condition, determine the coordinate direction of the first defect and the second defect. Here, the image captured by the CCD camera can be an image captured by rotating the crucible along the center of the bottom surface of the crucible in a set direction or in the direction opposite to the set direction. Determine whether the point of the first defect mark is located in the set direction or in the direction opposite to the set direction of the point of the second defect mark. If so, the first condition is met; for the second condition, calculate the distances between the point of the first defect mark and the point of the second defect mark and the center of the bottom surface of the crucible. If the distances between the two defect mark points and the center of the bottom surface of the crucible are basically equal, the second condition is met; for the third condition, compare the area and / or length and width of the first defect and the second defect. If the area and / or length and width of the two are basically equal, the third condition is met, wherein for irregularly shaped defects, their area and / or length and width can be determined by calculating the area and / or length and width of the defect identification frame; for the fourth condition, calculate the center angle formed by the first defect coordinates, the second defect coordinates and the center coordinates of the bottom surface of the crucible. If the center angle is basically equal to the set angle, the fourth condition is met. It should be noted that “substantially equal” means equal within the allowable error range.

[0043] Step 104: If there is a second defect in the target image, and the second defect satisfies the first condition, the second condition, the third condition and the fourth condition with the first defect, the first defect in the reference image is marked as an invalid defect, and the invalid defect does not participate in the counting of the number of defects in the reference image.

[0044] Specifically, if there is a second defect in the target image, and the second defect satisfies the first condition, the second condition, the third condition and the fourth condition with the first defect at the same time, then the first defect and the second defect are considered to be the same defect, and the first defect in the reference image is marked as an invalid defect. The invalid defect does not participate in the counting of the number of defects in the reference image, and deduplication processing is required when counting defects.

[0045] In this embodiment, the method uses a camera to continuously collect multiple frames of images when the crucible rotates around the center of the inner bottom surface of the crucible multiple times along a set direction and a set angle, and inputs these multiple frames of images into a pre-trained defect detection model. The defect detection model can identify and mark the defects in the image and generate multiple frames of identification images with defect identification. For each two adjacent identification frames in the multiple identification images, by defining a reference image and a target image, and comparing the defects therein, it is determined whether the defects are repeated based on four conditions: coordinate direction, center distance, area and center angle, and finally the repeated defects are eliminated for accurate counting, thereby improving the detection speed or efficiency, improving the detection accuracy and consistency, reducing repeated counting, enhancing the defect analysis capability, reducing costs, improving product quality, and having good flexibility and adaptability.

[0046] In one embodiment, Figure 3 As shown, for each two adjacent frames of identification images in the multiple frames of identification images, one of the frames of identification images is defined as a reference image, the other frame of identification images is defined as a target image, and any defect with a defect mark in the reference image is defined as a first defect, including the following steps:

[0047] Step 301: for every two adjacent frames of identification images in a plurality of frames of identification images, define the i-th frame of identification image as a reference image, and define the i-1-th frame of identification image as a target image;

[0048] Specifically, the multiple identification images are numbered according to the acquisition order, for example, the first frame, the second frame, the third frame, etc. The i-th identification image is defined as the reference image, and the i-1-th identification image is defined as the target image. For example, if i=2, the second frame is the reference image, and the first frame is the target image.

[0049] Step 302: determining the type of each defect with a defect identifier in the reference image according to the reference image, and dividing the defects of the same type into a target set, each target set including at least one defect element;

[0050] Specifically, the types of defects with defect marks in the reference image are determined according to the reference image, wherein the defect types include: bubbles, open bubbles, bubble groups, yellow bubble groups, bubble group protrusions, quartz protrusions, white spots, devitrification spots, foreign matter, pits, black spots, linear black spots, scratches, quartz sand, quartz sheets, transparent layer cracks, etc. Figure 4 As shown. The defects in the reference image are feature extracted, and the effective information of the defect features includes: multiple defect features and each defect feature, and the effective information of the defect features includes threshold (position information x coordinate, y coordinate), width, roundness, height, length, area, etc. The effective information of each defect feature in the reference image is judged to obtain the defect classification result. The defects of the same type in the classification result are divided into a target set, each target set includes at least one defect element, and the defects corresponding to these defect elements belong to the same type of defects.

[0051] Step 303: For the same target set, define any defect element therein as the first defect in turn.

[0052] Specifically, taking the bubble type in the defect type as an example, if the bubble type contains 7 defect elements, then the 7 defect elements of the bubble type are divided into a target set, that is, the target set is a target set in which each defect element is a bubble type. Any one defect element is selected in turn from the 7 defect elements in the target set and defined as the first defect.

[0053] In this embodiment, the method defines the i-th frame in each of two adjacent identification images as the reference image, and then defines the i-1-th frame as the target image. All defects with defect identification are identified and classified in the reference image, and defects of the same type are classified into a target set. Within the same target set, a defect element is arbitrarily selected as the first defect for analysis. This method improves the accuracy and efficiency of defect detection by systematically comparing and classifying defects.

[0054] In one embodiment, determining whether there is a second defect in the target image, and whether the second defect satisfies a first condition with the first defect, includes:

[0055] Obtain the coordinates of the center point of the first defect identification frame c1=(x1, y1) and the center point of the second defect identification frame c2=(x2, y2), and determine whether the first defect is located in the clockwise direction of the second defect based on at least the coordinates of the center points of the two identification frames; wherein the crucible is rotated clockwise around the center of the bottom surface of the crucible for multiple times at a set angle.

[0056] Specifically, the camera first continuously captures images when the crucible rotates clockwise around the center of the inner bottom of the crucible for a set angle multiple times. Get the coordinates of the center point of the first defect recognition frame in the reference image c1=(x1, y1) and the coordinates of the center point of the second defect recognition frame in the target image c2=(x2, y2), and set the coordinates of the center of the inner bottom of the crucible O=(x0, y0), which is also the center of rotation of the crucible. The arctan2 function can be used here to calculate the angles of the center point coordinates c1 of the first defect recognition frame and the center point coordinates c2 of the second defect recognition frame relative to the coordinates of the center O, where the arctan2 function is a function that calculates the inverse tangent, which can be calculated using C language or python. The arctan2 function takes into account the quadrant of the input point, thereby returning an angle value in the range of −π to π.

[0057] For the coordinates of the center point c1 of the first defect identification frame, set θ1=arctan2(y1- y0, x1- x0), and for the coordinates of the center point c2 of the second defect identification frame, set θ2=arctan2(y2- y0, x2- x0). If θ1 and θ2 are both between 0 and π (the first and second quadrants), directly compare their sizes. If θ1<θ2, the first defect is located in the clockwise direction of the second defect. If θ1 and θ2 are between -π and 0 (the third and fourth quadrants), they need to be converted to the range of π to 2π for comparison, that is, add 2π to θ1 and θ2 at the same time, convert the angle to the range of π to 2π and then compare. If θ1<θ2 after conversion to the range of π to 2π, the first defect is located in the clockwise direction of the second defect. In special cases, if θ1 is in the range of 0 to π, θ2 is in the range of -π to 0, and θ1<θ2+2π, the first defect is located in the clockwise direction of the second defect. If θ1 is in the range of -π to 0, θ2 is in the range of 0 to π, and θ1+2π<θ2, the first defect is located in the clockwise direction of the second defect. If the first defect is located in the clockwise direction of the second defect, the first condition is satisfied; otherwise, the first condition is not satisfied.

[0058] In this embodiment, by obtaining the coordinates of the center points of the identification frames of the first defect and the potential second defect, these coordinates are used to determine whether the first defect is located in the clockwise direction of the second defect, thereby determining whether the two defects are the same defect in two adjacent identification images. This method utilizes the characteristic of the camera continuously collecting multiple frames of images when the crucible rotates around the center of the inner bottom surface of the crucible multiple times in a set direction and a set angle, and identifies repeated defects by comparing coordinates, thereby improving the accuracy and efficiency of defect detection.

[0059] In one embodiment, Figure 5As shown, the coordinates of the center point of the first defect identification frame c1=(x1, y1) and the center point of the second defect identification frame c2=(x2, y2) are obtained, and at least according to the coordinates of the center points of the two identification frames, it is determined whether the first defect is located in the clockwise direction of the second defect, including the following steps:

[0060] Step 501: Obtain the center point coordinates c1 (x1, y1) of the first defect identification frame and the center point coordinates c2 (x2, y2) of the second defect identification frame, and determine the center point coordinates c3 (x3, y3) of the line connecting the two points based on the two center point coordinates;

[0061] Specifically, the camera first continuously collects images when the crucible rotates around the center of the inner bottom surface of the crucible multiple times in a set direction and at a set angle. The center coordinates of the first defect recognition frame in the reference image c1=(x1, y1) and the center of the second defect recognition frame in the target image c2=(x2, y2) are obtained. Based on the coordinates of the two center points, the center point coordinates c3 of the line connecting the two points can be determined using the midpoint calculation formula: So the coordinates of c3 are c3=(x3,y3), where x3= , y3= .

[0062] Step 502: If c3 (x3, y3) is in the first quadrant of the inner bottom circle center O, x1>=x2 and y2>=y1, then the first defect is located in the clockwise direction of the second defect;

[0063] Specifically, the center coordinates of the bottom surface of the crucible are set to O = (x0, y0), and it is determined whether c3 (x3, y3) is located in the first quadrant of the center O. The condition that c3 is located in the first quadrant of the center O is x3>0 and y3>0. If c3 satisfies the condition that it is in the first quadrant of the center, the center point coordinates of the first defect and the second defect are compared. When x1>=x2 and y2>=y1, the first defect is located in the clockwise direction of the second defect.

[0064] Step 503: If c3 (x3, y3) is in the second quadrant of the inner bottom circle center O, x1>=x2 and y1>=y2, then the first defect is located in the clockwise direction of the second defect;

[0065] Specifically, the center coordinates of the bottom surface of the crucible are set to O = (x0, y0), and it is determined whether c3 (x3, y3) is located in the second quadrant of the center O. The condition that c3 is located in the second quadrant of the center O is x3 < 0 and y3 > 0. If c3 satisfies the condition of being in the second quadrant of the center, the center point coordinates of the first defect and the second defect are compared. When x1>=x2 and y1>=y2, the first defect is located in the clockwise direction of the second defect.

[0066] Step 504: If c3 (x3, y3) is in the third quadrant of the inner base center O, x2>=x1 and y1>=y2, then the first defect is located in the clockwise direction of the second defect;

[0067] Specifically, the center coordinates of the bottom surface of the crucible are set to O = (x0, y0), and it is determined whether c3 (x3, y3) is located in the third quadrant of the center O. The condition that c3 is located in the third quadrant of the center O is x3 < 0 and y3 < 0. If c3 satisfies the condition that it is in the third quadrant of the center, the center point coordinates of the first defect and the second defect are compared. When x2>=x1 and y1>=y2, the first defect is located in the clockwise direction of the second defect.

[0068] Step 505: If c3 (x3, y3) is in the fourth quadrant of the inner base center O, x2>=x1 and y2>=y1, then the first defect is located in the clockwise direction of the second defect.

[0069] Specifically, the center coordinates of the bottom surface of the crucible are set to O = (x0, y0), and it is determined whether c3 (x3, y3) is located in the fourth quadrant of the center O. The condition that c3 is located in the fourth quadrant of the center O is x3>0 and y3<0. If c3 is in the fourth quadrant of the center, the center coordinates of the first defect and the second defect are compared. When x2>=x1 and y2>=y1, the first defect is located in the clockwise direction of the second defect.

[0070] An example is needed: Figure 6 As shown, it represents the situation where the center point coordinate c3 is in the first, second, third and fourth quadrants respectively, and the first defects are all located in the clockwise direction of the second defect.

[0071] In this embodiment, the coordinates of the center points of the identification frames of the first defect and the second defect are obtained, and the coordinates of the midpoint of the line connecting the two defects are calculated based on these coordinates. According to the comparison of different quadrant positions and coordinate values, it is determined whether the first defect is located in the clockwise direction of the second defect. Repeated defects are identified by analyzing the coordinate system and quadrants, thereby improving the accuracy and efficiency of defect detection.

[0072] In one embodiment, Figure 7 As shown, determining whether there is a second defect in the target image, and the second defect and the first defect satisfy the second condition and the third condition, includes the following steps:

[0073] Step 701: Obtain the coordinates of the center point of the first defect identification frame and the coordinates of the center point of the second defect identification frame; based on the two center point coordinates, determine the distance between the center point of the first defect identification frame and the center point of the inner bottom surface circle and the distance between the center point of the second defect identification frame and the center point of the inner bottom surface circle; if the difference between the two distances is less than the distance threshold, the second condition is satisfied between the first defect and the second defect;

[0074] Specifically, first, the camera continuously captures images when the crucible rotates a set angle along a set direction around the center of the inner bottom surface of the crucible multiple times. Obtain the center point coordinates c1=(x1, y1) of the first defect recognition frame and the center point coordinates c2=(x2, y2) of the second defect recognition frame. Determine the coordinates (x0, y0) of the center O of the inner bottom surface of the crucible. Use the Euclidean distance formula to calculate the distance between the center point coordinates of the first defect recognition frame and the coordinates of the center O of the inner bottom surface of the crucible, and the distance between the center point coordinates of the second defect recognition frame and the coordinates of the center O of the inner bottom surface of the crucible respectively. Obtain the distance d1 between the center point coordinates of the first defect recognition frame and the coordinates of the center O of the inner bottom surface of the crucible, d1= ; the distance d2 between the center point coordinates of the second defect recognition frame and the coordinates of the center O of the inner bottom surface of the crucible, d2= . Calculate the difference Δd =∣d1− d2∣ between the two distances. Compare the difference with a preset distance threshold e. If Δd<e, then the second condition is satisfied between the first defect and the second defect.

[0075] Step 702: Obtain the length and width of the first defect and the length and width of the second defect; if the differences in length and width between the two defects are both less than a set threshold, then the third condition is satisfied between the first defect and the second defect.

[0076] Specifically, here, the length and width of the recognition frame of the first defect and the length and width of the recognition frame of the second defect can be used. Obtain the length L1 and width W1 of the first defect recognition frame, and obtain the length L2 and width W2 of the second defect recognition frame. Calculate the difference in length and the difference in width between the two defect recognition frames, which are respectively: the difference in length ΔL=∣L1-L2∣ and the difference in width ΔW=∣W1-W2∣. Compare the difference in length and the difference in width with a preset length threshold eL and width threshold eW. If ΔL<eL and ΔW<eW, then the third condition is satisfied between the first defect and the second defect. In addition, it is also possible to determine whether the third condition is satisfied between the first defect and the second defect by comparing the areas of the two recognition frames. When the difference between the area of the first defect recognition frame and the area of the second recognition frame is less than a set threshold area, the third condition is satisfied between the first defect and the second defect.

[0077] In this embodiment, the coordinates of the center points of the first defect and the second defect identification frame are first obtained, the distances from the two center points to the center of the inner bottom surface are calculated, and the coordinates of the center points of the first defect and the second defect identification frame are compared to calculate whether the difference in the distances from the two center points to the center of the inner bottom surface is less than a preset distance threshold, and to determine whether the first defect and the second defect meet the second condition. Then, the length and width of the two defects are obtained, and the difference in the size between the first defect and the second defect is compared to determine whether it is less than a preset size threshold, and to determine whether the first defect and the second defect meet the third condition. Through the analysis of spatial distance and size, the same defects in adjacent images can be accurately identified and matched, thereby improving the accuracy and reliability of defect detection.

[0078] In one embodiment, Figure 8 As shown, determining whether there is a second defect in the target image, and the second defect and the first defect satisfy a fourth condition, includes the following steps:

[0079] Step 801: Obtain the center point coordinates of the first defect identification frame and the center point coordinates of the second defect identification frame;

[0080] Specifically, the camera first continuously collects images when the crucible rotates multiple times around the center of the bottom surface of the crucible along a set direction and a set angle, and obtains the center point coordinates c1=(x1, y1) of the first defect recognition frame and c2=(x2, y2) of the second defect recognition frame.

[0081] Step 802: Based on the coordinates of the two center points, determine a first distance between the center point of the first defect identification frame and the center point of the inner bottom surface, a second distance between the center point of the second defect identification frame and the center point of the inner bottom surface, and a third distance between the center point of the first defect identification frame and the center point of the second defect identification frame;

[0082] Specifically, the coordinates of the center O of the inner bottom surface of the crucible are set (x0, y0). The Euclidean distance formula is used to calculate the first distance d1 from the center point of the first defect identification frame to the center point of the inner bottom surface, the second distance d2 from the center point of the second defect identification frame to the center point of the inner bottom surface, and the third distance d3 from the center point of the first defect identification frame to the center point of the second defect identification frame. d1= 、d2= and d3= .

[0083] Step 803: Substitute the first distance, the second distance and the third distance into the arccosine function to determine the central angle formed by the first defect coordinates, the second defect coordinates and the center of the bottom surface of the crucible;

[0084] Specifically, the first distance d1, the second distance d2 and the third distance d3 are calculated. You can use the law of cosines to calculate: . Use the arccosine function to calculate the central angle of a circle , The output range of the arccosine function is If the required angle range is , may need to be based on , and The value of adjusts the result.

[0085] Step 804: If the difference between the center angle and the set angle is less than the angle threshold, the fourth condition is satisfied between the first defect and the second defect.

[0086] Specifically, obtain the center angle α and set the angle threshold eα, which is the allowable angle error range. Calculate the center angle and set the angle threshold The difference, Δ =∣ - ∣, the difference Δ With the angle threshold e For comparison. <e , then the fourth condition is satisfied between the first defect and the second defect.

[0087] In this embodiment, the coordinates of the center points of the first defect and the second defect identification frame are obtained, and then the distances from the center points of the first and second defect identification frames to the center of the circle and the distance between the center points of the two defect identification frames are calculated. Using these distances, the center angle formed by the defect coordinates and the center of the circle is calculated by the arc cosine function. Finally, the difference between the calculated center angle and the set angle is compared with the angle threshold to determine whether the first defect and the second defect meet the fourth condition. This method improves the accuracy and reliability of defect detection. By comprehensively considering the spatial position and angle relationship of the defects, this method can effectively distinguish repeated defects in adjacent images and reduce misjudgments and missed detections.

[0088] In one embodiment, Fig. 9 As shown, when collecting the image of the bottom surface of the crucible, the camera is located above the crucible and maintains a minimum distance from the bottom surface of the crucible;

[0089] The minimum distance between the camera and the inner bottom surface of the crucible along the extension direction of the crucible is equal to the length of the crucible along the extension direction.

[0090] Specifically, the length of the crucible along its extension direction is measured, which will be the minimum distance between the camera and the inner bottom surface of the crucible along the extension direction of the crucible, and this minimum distance can be A. The camera is placed above the crucible, and the center of the lens can be biased to one side of the center of the inner bottom surface of the crucible, for example, the center of the lens can be to the right of the center of the inner bottom surface, and the camera will image the entire right half of the inner bottom surface of the crucible, and some of the left half, and then the left half will be imaged successively by rotating the crucible.

[0091] In this embodiment, the camera is placed above the crucible, keeping a minimum distance from the inner bottom surface of the crucible, which is equal to the length of the crucible along its extension direction. This setting ensures the imaging accuracy of the inner bottom surface of the crucible, and the camera and the inner bottom surface can maintain the closest distance. There is a situation where a single picture can only image part of the inner bottom surface, so the crucible is rotated clockwise for a certain angle multiple times to image multiple pictures to present the complete inner bottom surface.

[0092] In one embodiment, Fig.10 As shown, training the defect detection model includes the following steps:

[0093] Step 1001: Acquire an original image; wherein the original image is an image with defects on the bottom surface of the crucible;

[0094] Specifically, ensure that the camera is at an appropriate height, that is, when the distance between the camera and the inner bottom surface of the crucible is equal to the length of the crucible along its extension direction, start the camera, collect images, and select images with defects on the inner bottom surface of the crucible for subsequent defect detection. These images with defects on the inner bottom surface of the crucible are used as original images.

[0095] Step 1002: Use a sliding window to crop the original image at a fixed position to generate a training image with consistent resolution; wherein 75% of the training image data is used as a training set, 10% of the training image data is used as a validation set, and 15% of the training image data is used as a test set, and the training set, validation set, and test set data are not repeated;

[0096] Specifically, first determine the size of the sliding window used to crop the image, which is based on the model training requirements and the resolution of the original image. Use the sliding window to crop the original image at a fixed position to generate multiple smaller image blocks, each with the same resolution. From all the cropped image blocks, randomly select 75% of the training image data as the training set, 10% of the training image data as the validation set, and 15% of the training image data as the test set, ensuring that there is no overlap between these data sets.

[0097] Step 1003: Complete the training of the defect detection model using the training set, validation set, and test set data.

[0098] Specifically, select a deep learning model architecture suitable for defect detection tasks, such as a convolutional neural network (CNN) or a specific target detection model (such as YOLO, Faster R-CNN, etc.). Here, the yolov5 network can be used as a deep learning model architecture suitable for defect detection models. Preprocess the images in the training set, validation set, and test set, which can be normalization, data augmentation, etc., to improve the generalization ability of the model. Use the training set data to train the model. During the training process, the model will learn to identify defect features in the image. Regularly use the validation set data to evaluate the model performance and monitor the performance of the model on unseen data to prevent overfitting. Use the test set data to perform a final evaluation of the trained model to test the accuracy and generalization ability of the model.

[0099] In this embodiment, original images with defects on the bottom surface of the crucible are obtained, and these original images are cropped at fixed positions by sliding window technology to generate training images with consistent resolution. These training image data are divided into training set, verification set and test set according to the ratio of 75%, 10% and 15% respectively, ensuring that there is no overlap between these data sets. The training of the defect detection model is completed using these data sets. This method ensures that the model can learn from diverse data and accurately identify defects through systematic data preparation and model training processes, thereby improving the efficiency of model training and the generalization ability of the model.

[0100] Based on the same inventive concept, the embodiment of the present application also provides a crucible inner bottom surface defect detection device for implementing the above-mentioned crucible inner bottom surface 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 inner bottom surface defect detection device embodiments provided below can refer to the limitations of the crucible inner bottom surface defect detection method above, and will not be repeated here.

[0101] In one embodiment, Fig.11 As shown, a crucible bottom surface defect detection device is provided, comprising: an acquisition module 1101, a generation module 1102, a judgment module 1103 and a counting module 1104, wherein:

[0102] The acquisition module 1101 is used to acquire multiple frames of images of the bottom surface of the crucible; wherein the multiple frames of images are acquired by continuously acquiring the image when the crucible rotates around the center of the bottom surface of the crucible for multiple times along a set direction and a set angle;

[0103] A generating module 1102 is used to input multiple frames of images into a pre-trained defect detection model for defect recognition, and generate multiple frames of marked images with defect marks;

[0104] The judgment module 1103 is used for defining one of the two adjacent frames of the identification images in the multiple frames of identification images as a reference image, defining the other frame of the identification image as a target image, defining any defect with a defect identification in the reference image as a first defect, and determining whether there is a second defect in the target image for the first defect, and the second defect and the first defect satisfy a first condition, a second condition, a third condition and a fourth condition; wherein the first condition is that the first defect is located in a set direction of the second defect or in a direction opposite to the set direction, the second condition is that the first defect and the second defect are substantially equal in distance from the center of the circle of the inner bottom surface of the crucible, the third condition is that the first defect and the second defect are substantially equal in area and / or length and width, and the fourth condition is that the center angle formed by the coordinates of the first defect, the coordinates of the second defect and the center of the circle of the inner bottom surface of the crucible are substantially equal to the rotation angle;

[0105] Counting module 1104, if there is a second defect in the target image, and the second defect satisfies the first condition, the second condition, the third condition and the fourth condition with the first defect, marks the first defect in the reference image as an invalid defect, and the invalid defect does not participate in the counting of the number of defects in the reference image.

[0106] In one embodiment, the judgment module 1103 defines one of the identification images as a reference image and the other identification image as a target image for every two adjacent identification images in the multiple identification images, and defines any defect with a defect identification in the reference image as a first defect. Specifically, it is used to: define the i-th identification image as a reference image and the i-1-th identification image as a target image for every two adjacent identification images in the multiple identification images; determine the type of each defect with a defect identification in the reference image based on the reference image, and divide defects of the same type into a target set, each target set including at least one defect element; and define any defect element in the same target set as a first defect in turn.

[0107] In one embodiment, the judgment module 1103 determines whether there is a second defect in the target image, and the second defect satisfies the first condition with the first defect, specifically for: obtaining the coordinates of the center point of the first defect identification frame c1=(x1, y1) and the coordinates of the center point of the second defect identification frame c2=(x2, y2), and determining whether the first defect is located in the clockwise direction of the second defect at least based on the coordinates of the center points of the two identification frames; wherein the crucible is rotated clockwise around the center of the bottom surface of the crucible for multiple times by a set angle.

[0108] In one embodiment, the judgment module 1103 obtains the center point coordinates c1=(x1, y1) of the first defect identification frame and the center point coordinates c2=(x2, y2) of the second defect identification frame, and determines whether the first defect is located in the clockwise direction of the second defect based on at least the center point coordinates of the two identification frames, and is specifically used to: obtain the center point coordinates c1(x1, y1) of the first defect identification frame and the center point coordinates c2(x2, y2) of the second defect identification frame, and determine the center point coordinates c3(x3, y3) of the line connecting the two points based on the coordinates of the two center points; if c3(x3, y3) is at the center of the inner bottom surface circle O, If c3 (x3, y3) is in the first quadrant of the inner base circle center O, x1>=x2 and y2>=y1, then the first defect is located in the clockwise direction of the second defect; if c3 (x3, y3) is in the second quadrant of the inner base circle center O, x1>=x2 and y1>=y2, then the first defect is located in the clockwise direction of the second defect; if c3 (x3, y3) is in the third quadrant of the inner base circle center O, x2>=x1 and y1>=y2, then the first defect is located in the clockwise direction of the second defect; if c3 (x3, y3) is in the fourth quadrant of the inner base circle center O, x2>=x1 and y2>=y1, then the first defect is located in the clockwise direction of the second defect.

[0109] In one embodiment, the judgment module 1103 determines whether there is a second defect in the target image, and the second defect satisfies the second condition and the third condition with the first defect, and is specifically used to: obtain the center point coordinates of the first defect identification frame and the center point coordinates of the second defect identification frame; based on the two center point coordinates, determine the distance from the center point of the first defect identification frame to the center of the inner bottom circle and the distance from the center point of the second defect identification frame to the center of the inner bottom circle; if the difference between the two distances is less than the distance threshold, the second condition is satisfied between the first defect and the second defect; obtain the length and width of the first defect and the length and width of the second defect; if the difference between the length and the difference between the width of the two defects are both less than the set threshold, the third condition is satisfied between the first defect and the second defect.

[0110] In one embodiment, the judgment module 1103 determines whether there is a second defect in the target image, and the second defect satisfies the fourth condition with the first defect, and is specifically used to: obtain the center point coordinates of the first defect identification frame and the center point coordinates of the second defect identification frame; based on the two center point coordinates, determine the first distance from the center point of the first defect identification frame to the center of the inner bottom surface, the second distance from the center point of the second defect identification frame to the center of the inner bottom surface, and the third distance from the center point of the first defect identification frame to the center point of the second defect identification frame; substitute the first distance, the second distance and the third distance into the arccosine function to determine the center angle formed by the first defect coordinates, the second defect coordinates and the center of the inner bottom surface of the crucible; if the difference between the center angle and the set angle is less than the angle threshold, the fourth condition is satisfied between the first defect and the second defect.

[0111] In one embodiment, when capturing an image of the inner bottom surface of the crucible, the camera is located above the crucible and maintains a minimum distance from the inner bottom surface of the crucible; wherein the minimum distance between the camera and the inner bottom surface of the crucible along the extension direction of the crucible is equal to the length of the crucible along its extension direction.

[0112] In one embodiment, the crucible bottom surface defect detection device also includes a training module, which is used to train a defect detection model, specifically for: obtaining an original image; wherein the original image is an image with defects on the inner bottom surface of the crucible; using a sliding window to perform fixed position cropping on the original image to generate a training image with consistent resolution; wherein 75% of the training image data is used as a training set, 10% of the training image data is used as a verification set, and 15% of the training image data is used as a test set, and the training set, verification set and test set data are not repeated; and the training set, verification set and test set data are used to complete the training of the defect detection model.

[0113] Each module in the above-mentioned crucible bottom surface defect detection device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules 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 the operations corresponding to each of the above modules.

[0114] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Fig.12 As shown. The electronic 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 electronic device is used to provide computing and control capabilities. The memory of the electronic 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 electronic 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 method for detecting defects on the bottom surface of a crucible is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the housing of the electronic device, or an external keyboard, touchpad or mouse.

[0115] The above is a detailed introduction to a method, device and electronic device for detecting defects on the bottom surface of a crucible provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referenced to each other. For the devices and electronic devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

[0116] The above 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 method for detecting defects on the bottom surface of a crucible, characterized in that: The method comprises: Acquire multiple frames of images of the inner bottom surface of the crucible; wherein the multiple frames of images are continuously acquired by a camera when the crucible rotates around the center of the inner bottom surface of the crucible multiple times along a set direction and a set angle; Inputting the multiple frames of images into a pre-trained defect detection model for defect recognition, and generating multiple frames of marked images with defect marks; For each two adjacent frames of identification images in the multiple frames of identification images, one of the frames of identification images is defined as a reference image, the other frame of identification images is defined as a target image, any defect with a defect identification in the reference image is defined as a first defect, and for the first defect, it is determined whether there is a second defect in the target image, and the second defect satisfies a first condition, a second condition, a third condition, and a fourth condition; wherein the first condition is that the first defect is located in a set direction of the second defect or in a direction opposite to the set direction, the second condition is that the first defect and the second defect are substantially at the same distance from the center of the circle of the inner bottom surface of the crucible, the third condition is that the first defect and the second defect are substantially equal in area and / or length and width, and the fourth condition is that the center angle formed by the first defect coordinates, the second defect coordinates, and the center of the circle of the inner bottom surface of the crucible is substantially equal to the set angle, and if the difference between the center angle and the set angle is less than an angle threshold, the fourth condition is satisfied between the first defect and the second defect; If there is a second defect in the target image, and the second defect satisfies the first condition, the second condition, the third condition, and the fourth condition with the first defect, the first defect in the reference image is marked as an invalid defect, and the invalid defect does not participate in the counting of the number of defects in the reference image; Among them, the coordinates of the center point of the first defect identification frame and the coordinates of the center point of the second defect identification frame are obtained; based on the two center point coordinates, the distance between the center point of the first defect identification frame and the center point of the inner bottom circle and the distance between the center point of the second defect identification frame and the center point of the inner bottom circle are determined respectively; if the difference between the two distances is less than the distance threshold, the second condition is satisfied between the first defect and the second defect; the length and width of the first defect and the length and width of the second defect are obtained; if the difference between the length and the difference between the width of the two defects are both less than the set threshold, the third condition is satisfied between the first defect and the second defect.

2. The method for detecting defects on the inner bottom surface of a crucible according to claim 1, characterized in that: For each two adjacent frames of identification images in the multiple frames of identification images, one of the frames of identification images is defined as a reference image, the other frame of identification images is defined as a target image, and any defect with a defect mark in the reference image is defined as a first defect, including: For every two adjacent frames of identification images in the multiple frames of identification images, define the i-th frame of identification image as a reference image, and define the i-1-th frame of identification image as a target image; Determine the type of each defect with a defect identifier in the reference image according to the reference image, and divide the defects of the same type into a target set, each of the target sets including at least one defect element; For the same target set, any defect element is defined as the first defect in turn.

3. The method for detecting defects on the inner bottom surface of a crucible according to claim 2, characterized in that: Determining whether there is a second defect in the target image, where the second defect satisfies a first condition with the first defect, includes: Obtain the coordinates of the center point of the first defect identification frame c1=(x1, y1) and the center point of the second defect identification frame c2=(x2, y2), and determine whether the first defect is located in the clockwise direction of the second defect based on at least the coordinates of the center points of the two identification frames; wherein the crucible is rotated clockwise around the center of the bottom surface of the crucible for multiple times by a set angle.

4. The method for detecting defects on the inner bottom surface of a crucible according to claim 3, characterized in that: Obtaining the coordinates of the center point of the first defect identification frame c1=(x1, y1) and the center point of the second defect identification frame c2=(x2, y2), and determining whether the first defect is located in the clockwise direction of the second defect at least according to the coordinates of the center points of the two identification frames, including: Obtain the coordinates of the center point of the first defect identification frame c1=(x1, y1) and the coordinates of the center point of the second defect identification frame c2=(x2, y2), and determine the coordinates of the center point of the line connecting the two points c3(x3, y3) based on the coordinates of the two center points; If c3(x3, y3) is in the first quadrant of the inner bottom circle center O, and x1>=x2 and y2>=y1, then the first defect is located in the clockwise direction of the second defect; If c3(x3, y3) is in the second quadrant of the inner bottom circle center O, and x1>=x2 and y1>=y2, then the first defect is located in the clockwise direction of the second defect; If c3(x3, y3) is in the third quadrant of the inner bottom circle center O, and x2>=x1 and y1>=y2, then the first defect is located in the clockwise direction of the second defect; If c3(x3, y3) is in the fourth quadrant of the inner base circle center O, and x2>=x1 and y2>=y1, then the first defect is located in the clockwise direction of the second defect.

5. The method for detecting defects on the inner bottom surface of a crucible according to claim 1, characterized in that: Determining whether there is a second defect in the target image, where the second defect and the first defect satisfy a fourth condition, includes: Obtaining the coordinates of the center point of the first defect identification frame and the coordinates of the center point of the second defect identification frame; Based on the coordinates of the two center points, respectively determine a first distance from the center point of the first defect identification frame to the center point of the inner bottom surface, a second distance from the center point of the second defect identification frame to the center point of the inner bottom surface, and a third distance from the center point of the first defect identification frame to the center point of the second defect identification frame; Substituting the first distance, the second distance and the third distance into an arccosine function to determine a central angle formed by the first defect coordinate, the second defect coordinate and the center of the circle of the inner bottom surface of the crucible; If the difference between the central angle and the set angle is less than the angle threshold, the fourth condition is satisfied between the first defect and the second defect.

6. The method for detecting defects on the inner bottom surface of a crucible according to any one of claims 1 to 5, characterized in that: When collecting the image of the inner bottom surface of the crucible, the camera is located above the crucible and maintains a minimum distance from the inner bottom surface of the crucible; The minimum distance between the camera and the inner bottom surface of the crucible along the extension direction of the crucible is equal to the length of the crucible along the extension direction.

7. The method for detecting defects on the inner bottom surface of a crucible according to any one of claims 1 to 5, characterized in that: Training the defect detection model includes: Acquire an original image; wherein the original image is an image with defects on the bottom surface of the crucible; Using a sliding window to perform fixed position cropping on the original image to generate a training image with consistent resolution; wherein 75% of the training image data is used as a training set, 10% of the training image data is used as a validation set, and 15% of the training image data is used as a test set, and the training set, the validation set, and the test set data are not repeated; The training set, the validation set and the test set data are used to complete the training of the defect detection model.

8. A crucible bottom surface defect detection device, characterized in that: The device comprises: An acquisition module, used to acquire multiple frames of images of the inner bottom surface of the crucible; wherein the multiple frames of images are acquired by continuously acquiring the image when the crucible is rotated multiple times around the center of the inner bottom surface of the crucible along a set direction at a set angle; A generation module, used for inputting the multiple frames of images into a pre-trained defect detection model for defect recognition, and generating multiple frames of marked images with defect marks; a judgment module, for defining, for each two adjacent frames of identification images in the multiple frames of identification images, one of the identification images as a reference image, the other of the identification images as a target image, and any defect with a defect identification in the reference image as a first defect; for the first defect, determining whether there is a second defect in the target image, and whether the second defect satisfies a first condition, a second condition, a third condition, and a fourth condition; wherein the first condition is that the first defect is located in a set direction of the second defect or in a direction opposite to the set direction; the second condition is that the first defect and the second defect are substantially at the same distance from the center of the inner bottom surface of the crucible; the third condition is that the first defect and the second defect are substantially equal in area and / or length and width; and the fourth condition is that a central angle formed by the first defect coordinates, the second defect coordinates, and the center of the inner bottom surface of the crucible is substantially equal to the set angle; if the difference between the central angle and the set angle is less than an angle threshold, the fourth condition is satisfied between the first defect and the second defect; a counting module, configured to mark the first defect in the reference image as an invalid defect if there is a second defect in the target image and the second defect satisfies a first condition, a second condition, a third condition and a fourth condition with the first defect, and the invalid defect does not participate in the counting of the number of defects in the reference image; Among them, the coordinates of the center point of the first defect identification frame and the coordinates of the center point of the second defect identification frame are obtained; based on the two center point coordinates, the distance between the center point of the first defect identification frame and the center point of the inner bottom circle and the distance between the center point of the second defect identification frame and the center point of the inner bottom circle are determined respectively; if the difference between the two distances is less than the distance threshold, the second condition is satisfied between the first defect and the second defect; the length and width of the first defect and the length and width of the second defect are obtained; if the difference between the length and the difference between the width of the two defects are both less than the set threshold, the third condition is satisfied between the first defect and the second defect.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for detecting defects on the inner bottom surface of a crucible according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Defective polaroid identification method, electronic equipment and storage medium

    CN113628212A

  • Cable appearance defect detecting and positioning method based on binocular vision

    CN114529493A